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.
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!
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
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.