After an upgrade to the latest version 1.2.3 (from I think 1.1) all comments are still there in the admin section but they are not shown with the images. Is there a way to repair this?
Probably then the allow comments option is not selected. But if you have no checkbox next to it you have a more serious problem. Please review your CGI logs to see what errors are being generated.
hmmmm... cgi? I do not know where to find those logs but when I searched files with that name (I have shell access, Debian Lenny) I saw php 4 and cgi (my former php version) but not php5. So I did: apt-get install php5-cgi, which installed a package. I will keep you informed.
After this, I tried to add a comment. Result:
Fatal error: Call to undefined function fetchComments() in /var/www/wordpress/zenphoto/zp-core/functions.php on line 971
That error had to do with e-mailing comments, so disabling notification would fix it. (It has been corrected in the nightly builds.) Also the problem with old comments not showing up is fixed, so your best bet is to install the nightly build.
Downloaded the latest nightly. Done running upgrade.php (several tables updated).
Still no sign of "old" comments.
How can they show up in the admin section but not with the images? The new comments are there with the images. Surely both scripts get their data from the same table in the database?
Enabling comment notifications still produces Fatal error: Call to undefined function fetchComments() in /var/www/wordpress/zenphoto/zp-core/functions.php on line 971
Interestingly, new comments have the originating IP address in the Admin section shown.
Something else: rss-comments.php shows all comments (old and new).
If you are still geting this error you have not sucessfully installed the nightly build. Remove all the files in the zp-core.php folder and re-upload from the nightly build archive.
When I unzip, files are overwritten. There are no files used by the nightly build which are not overwritten. But Ok, I will try it.
What I did:
- Rename zp-core - Unzip the nightly build - Copy back zp-config.php - Ran upgrade.php
Now, I get several errors and most of the images are not displayed (though comments are!):
Notice: Undefined index: album_folder in /var/www/wordpress/zenphoto/zp-core/functions-basic.php on line 642
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/index.php on line 25
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/zp-core/admin-functions.php on line 9
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/index.php on line 113
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/index.php on line 114
Strange error above (the first one.) Can you tell me exactly where in the process it occurred? It is an indication that one of the basic arrays of Zenphoto is not setup. It should have been setup in zp-config.php.
Did the setup program run on the new install?
Anyway, your work-around would be to change the `type` field of the old comments to match the same field in the new comments. (But, of course, that should not be required!)
- Rename zp-core - Unzip the nightly build (of 19/3) - Copy back zp-config.php - Set all permissions (chown -R www-data zenphoto) - Ran setup.php
I get: ------------------------------------------------------------ Zenphoto has detected that you're upgrading to a new version.
Systems Check:
PHP version 5.2.6-1+lenny2 PHP Safe Mode PHP magic_quotes_gpc Grapics support PHP GD library PHP gettext() support PHP mbstring package PHP MySQL support zp-config.php file Strict Permissions [is not in effect] Warning! When this option is not in effect, file and folder permissions are relaxed. This could constitute a security risk so it is recommended that you enable Strict Permissions. However, on some servers Zenphoto does not function correctly with strict file/folder permissions. If you enable this option and Zenphoto has permission errors, run setup again and disable the option.
Click here to use strict file/folder permissions.
NOTE: This option applies only to new files and folders created by Zenphoto. You may have to change permissions on existing ones to resolve problems.
MySQL setup in zp-config.php connect to MySQL MySQL version 5.0.51a connect to the database wordpress SQL mode MySQL access rights MySQL show tables found: zenphotoadministrators, zenphotoadmintoalbum, zenphotoalbums, zenphotocaptcha, zenphotocomments, zenphotoimages, zenphotoobj_to_tag, zenphotooptions, zenphototags Zenphoto core files .htaccess file (RewriteEngine is ON) .htaccess RewriteBase is /zenphoto Notice: Undefined index: album_folder in /var/www/wordpress/zenphoto/zp-core/setup.php on line 990
albums folder (zenphoto) cache folder locale folders Database tables to update: zenphotooptions, zenphotoalbums, zenphotoimages, zenphotocomments, zenphotoadministrators, zenphotoadmintoalbum, zenphototags, zenphotoobj_to_tag, zenphotocaptcha.
Running setup ------------------------------------------------------------ After that, I get an error: ------------------------------------------------------------ Notice: Undefined index: album_folder in /var/www/wordpress/zenphoto/zp-core/functions-basic.php on line 642 ------------------------------------------------------------ I tried to run upgrade.php
------------------------------------------------------------ About to update tables...
Notice: Undefined index: album_folder in /var/www/wordpress/zenphoto/zp-core/functions-basic.php on line 642
Done with table update ------------------------------------------------------------
When viewing the gallery I get the aforementioned errors:
Notice: Undefined index: album_folder in /var/www/wordpress/zenphoto/zp-core/functions-basic.php on line 642
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/index.php on line 25
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/zp-core/functions.php on line 1769
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/zp-core/admin-functions.php on line 9
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/index.php on line 113
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/index.php on line 114 ---------------------------------------------------------------------------------
To me, the basic functions of the album are more important than the comments but I still would like to have them back..... ;(
I have reset everything to the release.
By the way: unfortunately, I know nothing about php, but I do not understand why it is so difficult to display comments with the images.
As my simple uneducated logic says, the php script fetches data (comments) from the database. It does so on the rss page and the admin page, and on the album page as well. Would it be difficult to have the script on the album page get the same info from the db as the admin page?
I suspect that your zp-config.php file is not based on the current release. Can you post the content of your file? Of course, obscure the User code/password information.
You are correct in that it is pretty simple to fetch the comments. The devil is in the details. Comments can be made on a number of different items, so the fetch code has to take this into account. You would not want album comments show on an image, would you.
The problem with the old comments is a bug in what the code is looking for. As I mention above, the work-a-round will get you back the old comments.
I noticed another anomoly in the setup listing above. It is saying that your album folder is named 'zenphoto' which is also your install base folder. That is not a likely situation.
Didn't know that I could not use the zp-config.php from the old installation (thought it would be updated). Followed an upgrade guide which mentioned I could use the old zp-config.php.
And... well, if I change anything in the folder names some things won't be working (e.g. links to the images from my main, Wordpress site).
Started with the nightly zp-config.php (renamed the zp-config.php.source but I had to copy it back because the setup did not like the fact that I had renamed it).
Well, the old zp-copnfig.php should have worked. Guess we have a migration bug to deal with. Anyway, glad it is working for you now. Just out of curiosity, do you know what version zenphoto you were using when the zp-config.php file was created?
The version number of your current install is printed on the admin overview and in the footer. According to our changelog archive in May 2006 it was probably 1.0.3 beta. http://www.zenphoto.org/2006/05/version-103-beta/
I have that version no longer running of course; zp-config.php (original)(see below) Maybe you can see what version this was. (Tried in vain to add some // to get rid of formatting.
<?php /* PUT NOTHING BEFORE THIS LINE, not even a line break! */ $conf = array(); define("DEBUG", false);
/** Do not edit above this line. **/ /**********************************/
/////////// zenPHOTO Configuration Variables ////////////////////////////// // After you're done editing this file, load // http://www.yoursite.com/zenphotodir/zen/setup.php // to run the setup (of course, replacing the paths where needed).
// NOTE: web_path and server_path are no longer needed! If you're having problems // with the auto-detected paths, you can override them at the bottom of this file. ////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// // Database Information (the most important part!) ////////////////////////////////////////////////////////////////////////////////
$conf['mysql_user'] = "myuser"; $conf['mysql_pass'] = "mypass"; $conf['mysql_host'] = "localhost"; // Won't need to change this 90% of the time. $conf['mysql_database'] = "mydb";
// If you're sharing the database with other tables, use a prefix to be safe. $conf['mysql_prefix'] = "zenphoto";
//////////////////////////////////////////////////////////////////////////////// // General Gallery Configuration ////////////////////////////////////////////////////////////////////////////////
// What you want to call your photo gallery. $conf['gallery_title'] = "pictures";
// If you're in a different time zone from your server, set the offset in hours: $conf['time_offset'] = 0;
//ADDED SOME // for readability 2009 // Tags allowed in comments //$conf['allowed_tags'] = "<i><b>
I think that the date of your old release is sufficient information. We don't really need the release level. Thanks for your reports. The next release will do a better job of migrating from these old versions thanks to your report.
Comments
Current theme is default.
Image: http://tweakers.net/ext/i.dsp?FotoAlbumID=150743&format=full&ext=.jpg
Strangely enough, there are no checkboxes next to some of the comments options.
Under the pictures, there are no comments (in the admin section, under this picture there is, but not in the public part of the site):
http://tweakers.net/ext/i.dsp?FotoAlbumID=150751&format=full&ext=.jpg
After this, I tried to add a comment. Result:
Fatal error: Call to undefined function fetchComments() in /var/www/wordpress/zenphoto/zp-core/functions.php on line 971
I find this thread when searching that error:
http://www.zenphoto.org/support/topic.php?id=4859
I disabled notifications and new posted comments are now visible but not the old ones. The call to undefined function error is not showing any more.
Seems like I have to rename a table in the db to get the old comments back?
It says:
Same problem with the last nightly (Version de Zenphoto 1.2.3 [3445] (Version officielle))
I update directly in the database the 'type': images -> _images
images (old comments)
_images (recent comment)
But I guess only old messages will be shown.
Still no sign of "old" comments.
How can they show up in the admin section but not with the images? The new comments are there with the images. Surely both scripts get their data from the same table in the database?
Enabling comment notifications still produces
Fatal error: Call to undefined function fetchComments() in /var/www/wordpress/zenphoto/zp-core/functions.php on line 971
Interestingly, new comments have the originating IP address in the Admin section shown.
Something else: rss-comments.php shows all comments (old and new).
What I did:
- Rename zp-core
- Unzip the nightly build
- Copy back zp-config.php
- Ran upgrade.php
Now, I get several errors and most of the images are not displayed (though comments are!):
Notice: Undefined index: album_folder in /var/www/wordpress/zenphoto/zp-core/functions-basic.php on line 642
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/index.php on line 25
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/zp-core/admin-functions.php on line 9
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/index.php on line 113
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/index.php on line 114
- Rename zp-core
- Unzip the offical build
- Copy back zp-config.php
- Ran upgrade.php
Everything works normally, except old comments.
Did the setup program run on the new install?
Anyway, your work-around would be to change the `type` field of the old comments to match the same field in the new comments. (But, of course, that should not be required!)
Well, I tried it again:
- Rename zp-core
- Unzip the nightly build (of 19/3)
- Copy back zp-config.php
- Set all permissions (chown -R www-data zenphoto)
- Ran setup.php
I get:
------------------------------------------------------------
Zenphoto has detected that you're upgrading to a new version.
Systems Check:
PHP version 5.2.6-1+lenny2
PHP Safe Mode
PHP magic_quotes_gpc
Grapics support PHP GD library
PHP gettext() support
PHP mbstring package
PHP MySQL support
zp-config.php file
Strict Permissions [is not in effect]
Warning!
When this option is not in effect, file and folder permissions are relaxed. This could constitute a security risk so it is recommended that you enable Strict Permissions. However, on some servers Zenphoto does not function correctly with strict file/folder permissions. If you enable this option and Zenphoto has permission errors, run setup again and disable the option.
Click here to use strict file/folder permissions.
NOTE: This option applies only to new files and folders created by Zenphoto. You may have to change permissions on existing ones to resolve problems.
MySQL setup in zp-config.php
connect to MySQL
MySQL version 5.0.51a
connect to the database wordpress
SQL mode
MySQL access rights
MySQL show tables found: zenphotoadministrators, zenphotoadmintoalbum, zenphotoalbums, zenphotocaptcha, zenphotocomments, zenphotoimages, zenphotoobj_to_tag, zenphotooptions, zenphototags
Zenphoto core files
.htaccess file (RewriteEngine is ON)
.htaccess RewriteBase is /zenphoto
Notice: Undefined index: album_folder in /var/www/wordpress/zenphoto/zp-core/setup.php on line 990
albums folder (zenphoto)
cache folder
locale folders
Database tables to update: zenphotooptions, zenphotoalbums, zenphotoimages, zenphotocomments, zenphotoadministrators, zenphotoadmintoalbum, zenphototags, zenphotoobj_to_tag, zenphotocaptcha.
Running setup
------------------------------------------------------------
After that, I get an error:
------------------------------------------------------------
Notice: Undefined index: album_folder in /var/www/wordpress/zenphoto/zp-core/functions-basic.php on line 642
------------------------------------------------------------
I tried to run upgrade.php
------------------------------------------------------------
About to update tables...
Notice: Undefined index: album_folder in /var/www/wordpress/zenphoto/zp-core/functions-basic.php on line 642
Done with table update
------------------------------------------------------------
When viewing the gallery I get the aforementioned errors:
Notice: Undefined index: album_folder in /var/www/wordpress/zenphoto/zp-core/functions-basic.php on line 642
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/index.php on line 25
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/zp-core/functions.php on line 1769
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/zp-core/admin-functions.php on line 9
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/index.php on line 113
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wordpress/zenphoto/zp-core/functions-basic.php:642) in /var/www/wordpress/zenphoto/index.php on line 114
---------------------------------------------------------------------------------
To me, the basic functions of the album are more important than the comments but I still would like to have them back..... ;(
I have reset everything to the release.
By the way: unfortunately, I know nothing about php, but I do not understand why it is so difficult to display comments with the images.
As my simple uneducated logic says, the php script fetches data (comments) from the database. It does so on the rss page and the admin page, and on the album page as well. Would it be difficult to have the script on the album page get the same info from the db as the admin page?
You are correct in that it is pretty simple to fetch the comments. The devil is in the details. Comments can be made on a number of different items, so the fetch code has to take this into account. You would not want album comments show on an image, would you.
The problem with the old comments is a bug in what the code is looking for. As I mention above, the work-a-round will get you back the old comments.
And... well, if I change anything in the folder names some things won't be working (e.g. links to the images from my main, Wordpress site).
Started with the nightly zp-config.php (renamed the zp-config.php.source but I had to copy it back because the setup did not like the fact that I had renamed it).
Now it works perfectly. Thanks for all the help!
How can I find out the version of Zenphoto? Is it only in the db or also in some file?
zp-config.php (original)(see below)
Maybe you can see what version this was. (Tried in vain to add some // to get rid of formatting.
<?php /* PUT NOTHING BEFORE THIS LINE, not even a line break! */
$conf = array();
define("DEBUG", false);
/** Do not edit above this line. **/
/**********************************/
/////////// zenPHOTO Configuration Variables //////////////////////////////
// After you're done editing this file, load
// http://www.yoursite.com/zenphotodir/zen/setup.php
// to run the setup (of course, replacing the paths where needed).
// NOTE: web_path and server_path are no longer needed! If you're having problems
// with the auto-detected paths, you can override them at the bottom of this file.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Database Information (the most important part!)
////////////////////////////////////////////////////////////////////////////////
$conf['mysql_user'] = "myuser";
$conf['mysql_pass'] = "mypass";
$conf['mysql_host'] = "localhost"; // Won't need to change this 90% of the time.
$conf['mysql_database'] = "mydb";
// If you're sharing the database with other tables, use a prefix to be safe.
$conf['mysql_prefix'] = "zenphoto";
////////////////////////////////////////////////////////////////////////////////
// General Gallery Configuration
////////////////////////////////////////////////////////////////////////////////
// What you want to call your photo gallery.
$conf['gallery_title'] = "pictures";
// If you're in a different time zone from your server, set the offset in hours:
$conf['time_offset'] = 0;
//ADDED SOME // for readability 2009
// Tags allowed in comments
//$conf['allowed_tags'] = "<i><b>
//
//
<abbr><acronym>
//
//
//
//
//
//
";
// If you have Apache mod_rewrite, put true here, and you'll get nice cruft-free URLs.
// MAKE SURE TO EDIT THE .htaccess FILE with your path information.
$conf['mod_rewrite'] = false;
// Admin interface username (also required for running setup).
$conf['adminuser'] = "myadminuser";
// This isn't that secure, so don't put anything here you don't want anyone to see...
// (but make sure you change it to something other than 1234...)
$conf['adminpass'] = "mypass";
// The email for the admin user. Used to send notification emails.
$conf['admin_email'] = "johnsmith@email.com";
// If you're running a secure server, change this to 'https' (Most people will leave this alone)
$conf['server_protocol'] = "http";
// The character encoding to use internally. Leave at UTF-8 if you're unsure.
$conf['charset'] = 'UTF-8';
////////////////////////////////////////////////////////////////////////////////
// Image Processing Configuration
////////////////////////////////////////////////////////////////////////////////
// JPEG Compression quality for all images and thumbnails (respectively):
$conf['image_quality'] = 85;
$conf['thumb_quality'] = 75;
// Default image display width (themes will be able to control this
// to an extent in the future, but for now you may have to adjust it to fit your theme).
$conf['image_size'] = 595;
// If this is set to true, then the longest side of the image will be $image_size.
// Otherwise, the *width* of the image will be $image_size.
$conf['image_use_longest_side'] = true;
// Allow images to be scaled up to the requested size? This could result in loss
// of quality, so it's off by default.
$conf['image_allow_upscale'] = false;
// Default thumbnail size and scale:
// If $thumb_crop is set to true, then the thumbnail will be a centered portion of the image
// with the given width and height after being resized to $thumb_size (by shortest side).
// Otherwise, it will be the full image resized to $thumb_size (by shortest side).
// NOTE: thumb_crop_width and height should always be less than or equal to thumb_size
$conf['thumb_size'] = 100;
$conf['thumb_crop'] = true;
$conf['thumb_crop_width'] = 85;
$conf['thumb_crop_height'] = 85;
// Paging options:
// Control of their display is done in the theme, so you might need to change these
// after switching themes to make it look better.
$conf['albums_per_page'] = 5;
$conf['images_per_page'] = 15;
////////////////////////////////////////////////////////////////////////////////
// Path Overrides
////////////////////////////////////////////////////////////////////////////////
// Uncomment the following two lines ONLY IF YOU'RE HAVING PROBLEMS.
// These allow you to override Zenphoto's detection of the correct paths
// on your server, which might work better on some setups.
////////////////////////////////////////////////////////////////////////////////
// define('WEBPATH', '/zenphoto');
// define('SERVERPATH', '/var/www/wordpress/zenphoto');
/** Do not edit below this line. **/
/**********************************/
$_zp_conf_vars = $conf;
?>