Hello,
after editing correctly the default theme in order to include my website header etc..i'm getting the following:
Fatal error: Cannot redeclare strip() (previously declared in /home/.sites/242/site105/web/resources/zenphoto/zen/functions-db.php:96) in /home/.sites/242/site105/web/call/news.php on line 1000
the header of my index.php deafut theme it's actually like this:
<?php session_start(); include('../../call/news.php'); ?>
<?php if (!defined('WEBPATH')) die(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
please, do you know how can i fix this Fatal error?
Thanks so much!
tito
Comments
Just save your zp-config, update the new zp-config, upload the new files, then run zen/upgrade.php
After you do this PLEASE let us know if you still have this error
the point is that line 96 of /zen/functions-db.php where "Cannot redeclare strip()" it occurs, and on such file i can see:
96. function strip($string) {
97. if (get_magic_quotes_gpc()) {
98. return stripslashes($string);
99. etc...
i guess it has something to do with that function strip on line 96.
do you believe that i should download one of those unstable packages to solve this issue? i guess it has something to do with sessions. do you have any idea how to solve this?
Thanks so much!
tito
994. function strip($text) {
995. $search = array('/\[include\](.*?)\[\/include\]/', '/\[break\]/', '/</', '/>/');
996. $replace = array('', '', ' <', '> ');
997. $output = preg_replace($search, $replace, $text);
998. $output = stripslashes(strip_tags($output));
999. return $output;
1000. }
Since this is not a zenphoto issue but a specific issue to you because both of your scripts contain a function with the same name I dont see this being changed in ZenPhoto.
Best,
tito
MySQL Query ( SELECT folder, sort_order FROM `albums` ORDER BY sort_order ) Failed. Error: Table 'call_news.albums' doesn't exist
Please can you help me? Thanks!
tito
The error you are getting is because mySQL did not find a database table row. If your database is named call_news, check what tables it has. You may not have run the setup or you don't have the proper db prefix set up in zp-config.
i do have a dedicated database called 'photos' where only zenphoto tables are stored, and i can see album and images listed through phpMyAdmin. so there's not need of a prefix.
i guess that error is due to a theme/default conflict, maybe echo getAlbumLinkURL() is causing a conflict with functions with the other non zenphoto script? (see prev postings).
I really dont't know..
and now there are 2 session on top of these pages:
<?php session_start(); include('../../call/news.php'); ?>
<?php if (!defined('WEBPATH')) die(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
aitf311 suggested to change the strip function in order to solve the 'Cannot redeclare strip', and it worked.
now, i guess there's a problem with getAlbumLinkURL() code from the themes, cause i get: Error: Table 'call_news.albums' doesn't exist. sounds like it's getting the wrong URL path, isn'it?
sbillard, i can confirm that the changes in themes are causing these problems, but just because different sessions and functions from others scripts are usually settled on websites, and mine was the case. i'm not a php programmer, so your suggestions are much appeciated.
Thanks so much!
tito