Hello, great application, however, since the 1.4.2.4 upgrade, I can no longer access Gallery statistics, Refresh Metadata or Refresh Database. When I use those features I get the error below:
Zenphoto encountered an error
MySQL Query ( SELECT * FROM [prefix] WHERE id='0' ) failed. MySQL returned the error Table 'XXXXXXXzen182.zp' doesn't exist
Note: Xs masking my table name.
My site also crashes at least 1-2 times per week.
Please find my installation information below:
Zenphoto version 1.4.2.4 [10045] (Official Build)
Current locale setting: en_US.UTF8
Current gallery theme: zpFocus
PHP version: 5.3.10
Graphics support: PHP GD library bundled (2.0.34 compatible)
PHP memory limit: 1190M (Note: Your server might allocate less!)
MySql version: 5.1.52
Database name: XXXXXXXzen182
Table prefix: zp
Spam filter: none
CAPTCHA generator: zenphoto
Any thoughts?
I wasn't sure how much information you wanted me to share. Below I have included my setup log and a sampling of my debug log.
Setup Log:
Zenphoto Setup v1.4.3[10393]: Sun, 08 Jul 2012 10:59:28 -0700
Warn: MySql Version 5.0.0 or greater is required. Version 5.5.0 or greater is preferred. Use a lower version at your own risk.
Warn: You should remove the following files: zp-core/zp-extensions/colorbox/themeszp-core/zp-extensions/colorboxDelete extra files
Completed system check
Query ALTER TABLE zp_images DROP FOREIGN KEY zp_images`_ibfk1` Failed. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'zp_images`_ibfk1`' at line 1 Query ALTER TABLE `zp_comments` DROP FOREIGN KEYzp_comments_ibfk1 Failed. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'zp_comments_ibfk1' at line 1
Set Zenphoto default options
Set theme default options for effervescence_plus started
Notice: "Module mod_rewrite" is working. The Zenphoto option "mod_rewrite" is "disabled".
Option handler for effervescence_plus instantiated
Set theme default options for effervescence_plus completed
Set theme default options for default started
Option handler for default instantiated
Set theme default options for default completed
Set theme default options for garland started
Option handler for garland instantiated
Set theme default options for garland completed
Set theme default options for zpfocus started
Option handler for zpfocus instantiated
Set theme default options for zpfocus completed
Set theme default options for zpmobile started
Option handler for zpmobile instantiated
Set theme default options for zpmobile completed
Set theme default options for zenpage started
Set theme default options for stopdesign started
Option handler for zenpage instantiated
Set theme default options for zenpage completed
Option handler for stopdesign instantiated
Set theme default options for stopdesign completed
setup-functions.php deleted.
setup-option-defaults.php deleted.
setup-primitive.php deleted.
setup-sqlform.php deleted.
setup.css deleted.
setup_permissions_changer.php deleted.
setup_set-mod_rewrite.php deleted.
setup_themeOptions.php deleted.
setup.php deleted.
setup/ deleted.
Sampling of debug log
{Tue, 10 Jul 2012 00:29:35 GMT}
Backtrace: USER ERROR: MySql Error: ( SELECT id FROM [prefix] WHERE id='0' ) failed. MySql returned the error Table 'xxxxxxxzen182.zp' doesn't exist in /home/xxxxxxx/public_html/zen/zp-core/functions-db-MySQL.php on line 59
trigger_error called
from query (functions-db-MySQL.php [59])
from query_single_row (functions-db-MySQL.php [73])
from Gallery->garbageCollect (class-gallery.php [389])
from gallery_statistics.php [34]
{Tue, 10 Jul 2012 00:28:57 GMT}
Backtrace: NOTICE: Undefined variable: zpfocus_social in /home/xxxxxxx/public_html/zen/themes/zpfocus/album.php on line 5
include called
from index.php [92]
{Tue, 10 Jul 2012 00:27:05 GMT}
Backtrace: NOTICE: Undefined variable: firstPageImages in /home/xxxxxxx/public_html/zen/themes/zpfocus/search.php on line 126
include called
from index.php [92]
{Tue, 10 Jul 2012 00:27:06 GMT
{Tue, 10 Jul 2012 00:27:05 GMT}
Backtrace: NOTICE: Use of undefined constant x - assumed 'x' in /home/xxxxxxx/public_html/zen/themes/zpfocus/search.php on line 120
include called
from index.php [92]
{Tue, 10 Jul 2012 00:07:59 GMT}
Backtrace: ??: ?5??/home/xxxxxxx/public_html/zen/themes/zpfocus/image.php?Undefined variable: zpfocus_social
include called
from index.php [92]
All the errors in the debug log are from your theme. I'm guessing that you need an update to zpFocus as well, but gjr, the theme author, would know better.
Probably they have nothing to do with the Admin side errors. Also, the debug log will contain only non-fatal PHP errors. Unfortunately when a fatal error occurs, PHP is terminate so the scripts cannot record the error. These errors must be searched out in your server logs.
The SQL error is being caused by some bad data in your database. In particular there appears to be a record in the object_to_tag table which has an empty value for the type column.