Member
Member
volfro   28-06-2007, 07:53
#1

Hi!

I developed a custom theme for ZP using the instructions for a ZP/WP integrated theme found at ruzee.com. (I actually hard-coded the header in instead of calling it so that I could customize the navigation.)

The theme works just fine locally, and looks great. (PHP version 5.2.1, MySQL version 5.0.38-Ubuntu_0ubuntu1-log.) ZP installs just fine on my shared hosting server, and actually runs perfectly when I'm using any one of the included themes. But when I try to use my custom theme, ZP dies as soon as it hits the loop (`` on index.php) with the following error message:

MySQL Query ( SELECT folder, sort_order FROM 'albums' ORDER BY sort_order ) Failed. Error: Table 'bsd_wordpress.albums' doesn't exist

The shared hosting service is using PHP 5 (not sure of the full version) and MySQL 4.1.14

Any ideas about what I'm doing wrong? I'm kinda stumped, since it works just fine locally. cache and albums are at 0777 on the server, and as far as I know, .htaccess and zp-config.php are configured correctly. And like I said, the included themes work fine.

I should also tell you that according to phpMyAdmin, the tables [i]are[/i] there.

Member
Member
Chilifrei64   28-06-2007, 16:56
#2
  1. do you have a link we can look at?
  2. copy your zp-config.php database portion into here so we can look at it (obvioulsy minus the username and pass).
Member
Member
volfro   28-06-2007, 20:29
#3

Here it is. It's going to be an online portfolio/blog thing.

Zp-config looks a little something like this:

`

////////////////////////////////////////////////////////////////////////////////

// Database Information (the most important part!)

////////////////////////////////////////////////////////////////////////////////

$conf['mysql_user'] = "my user info";

$conf['mysql_pass'] = "my password";

$conf['mysql_host'] = "mysql01.powweb.com"; // Won't need to change this 90% of the time.

$conf['mysql_database'] = "zenphoto_bsd";

// If you're sharing the database with other tables, use a prefix to be safe.

$conf['mysql_prefix'] = "";

`

No prefix, and it's connecting to/writing to the database just fine. I think.

Thanks!

Member
Member
volfro   29-06-2007, 03:47
#4

Should I post the contents of my index.php as well?

Member
Member
volfro   30-06-2007, 03:54
#5

Hope this helps somebody help me...The index.php looks like this, up until the loop:

`

Member
Member
Chilifrei64   30-06-2007, 14:26
#6

This setup doesnt seem to follow the setup on ruzee.com

The reason it is not working is because it is looking at the incorrect database. it is looking at your wordpress database for the zenphoto pictures (bsd_wordpress.albums as opposed to zenphoto_bsd.albums as specified in your zp-config)

There is nothing in your index that specified to connect to the zenphoto database. You said you hardcoded the header for your navigation but after the wp header you need the db_connect() to connect to the zenphoto database then after the zp loops you need to add back in the $wpdb->select(DB_NAME); // reconnect wordpress db.

I hope this maybe sheds a little light on your problem

Member
Member
volfro   30-06-2007, 21:15
#7

Craps. You're exactly right. I had been using the same DB as the WP one on my local server instead of creating a new one for ZP.

Told it to hook up to the ZP database and it works like a charm now. Thanks chili! I needed some outside eyes to catch such a dumb mistake.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.