Member
Member
Mook   2011-05-07, 03:38
#1

Howdy Folks -

Just recently downloaded and installed ZenPhoto at my site - it seems to work just great, except for the Search function. Whenever I try to do a Search (regardless of what theme is Active), I get the following error message:

Fatal error: Call to a member function on a non-object in /home/root/htdocs/gallery/zp-core/template-functions.php on line 456

Can't seem to figure out the issue here; a reinstall didn't help, and a Google search for that error message came up with 0 hits (I must just be lucky

Thoughts?

Administrator
Administrator
acrylian   2011-05-07, 09:31
#2

Try a reupload, maybe your ftp client messed up something while uploading. That strangely happens..

Member
Member
sbillard   2011-05-07, 16:44
#3

It probably will not help, but the error is comming from the getNumAlbums() function and is indicating that _zp_current_search is not properly setup. Since you are on a search page I really do not know how that might happen.

Any change Zenphoto is being loaded by some other script like Wordpress?

Member
Member
Mook   2011-05-07, 18:43
#4

Thanks for the replies - after checking the ZenPhoto setup logs, I'm leaning towards this being an issue with my host using an older version of PhP:

"warn: PHP version 4.4.9 Version 5.2 or greater is strongly recommended"

I also notice an error message on the "Options" tab of the ZP admin panel:

"Fatal error: Call to undefined function: stripos() in /home/mook/htdocs/gallery/zp-core/admin-functions.php on line 590"

Unlikely my host will update their version, though I'll check - in the meantime I've just hacked the theme I was using to no longer display a link to the 'Search' function. Apart from that, error messages in the admin panel notwithstanding, everything seems to be working okay.

Member
Member
sbillard   2011-05-07, 20:12
#5

Please place the following code in zp-core/PHP4_functions/_functions.php at the end of the file:

function stripos($str,$needle,$offset=0) { return @strpos(strtolower($str),strtolower($needle),$offset); }
Since we do no longer test on PHP4, this PHP5 dependency was missed.

Member
Member
Mook   2011-05-07, 23:23
#6

Thanks for that sbillard, adding that code snippet took care of the admin panel errors.

I have an email in to my host to see if they would consider upgrading their PHP ... since I seem to be the only one having this issue, I'm sure that's the problem.

Appreciate the quick replies.

Member
Member
sbillard   2011-05-07, 23:43
#7

PHP4 is pretty old now. The version of Apache I run does not even support it. So hopefully they will upgrade.

If not, if you have more such problems let us know and we will see if we can find fixes. We don't deliberately make Zenphoto not work on PHP4, but since we cannot test, things slip through.

Administrator
Administrator
acrylian   2011-05-08, 08:16
#8

Just to note, I have no means to test PHP 4 as well anymore. My host has 5.2 and locally I use even 5.3 so we are "future save".

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