Zenphoto 1.2.5 (6/2/09) - Page Not Found 404 Error

Hi,
We have just upgraded from v 1.22 to 1.25, the server runs php via fastcgi.
With Zen 1.2.2 we had to edit the index.php and remove the line
header("Status: 404 Not Found"); for the 404 page to be displayed.

This is not working with 1.2.5.

From gallery root (domain/gallery/type-non-existent-page) we get:

The requested URL /cgi-bin/php5.fcgi/gallery/index.php was not found on this server.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

From (domain/gallery/parrot-photos/type-non-existent-page) we get:

Notice: Trying to get property of non-object in /home/users/username/html/domain/gallery/zp-core/functions-controller.php on line 414

Warning: Cannot modify header information - headers already sent by (output started at /home/users/username/html/domain/gallery/zp-core/functions-controller.php:414) in /home/users/username/html/domain/gallery/index.php on line 21

Warning: Cannot modify header information - headers already sent by (output started at /home/users/username/html/domain/gallery/zp-core/functions-controller.php:414) in /home/users/username/html/domain/gallery/index.php on line 124

Warning: Cannot modify header information - headers already sent by (output started at /home/users/username/html/domain/gallery/zp-core/functions-controller.php:414) in /home/users/username/html/domain/gallery/index.php on line 125

The 404 page is displayed below the above error messages.

Please help.... ;-)

Comments

  • acrylian Administrator, Developer
    Actually you should not have to change the root index.php file. A theme can have its own 404.php page for custom error pages or the default one will be used. Take a look at the standard themes. FastCGI should not matter as that works fine on my site, too.
  • boo Member
    Hi, I am using the un-modified index.php and we also get the issue with the
    standard themes supplied with 1.2.5

    Thanks.
  • acrylian Administrator, Developer
    Well, I have no idea as it does works on both my local and my webserver. Maybe sbillard will have an idea.
  • Modify functions-controller.php as follows:

    line 412: `if (is_null($_zp_current_album) || !$_zp_current_album->exists) return false;`

    line 414: `if (is_null($_zp_current_image) || !$_zp_current_image->exists) return false;`
  • boo Member
    Hi, ok have done that, now we don't get the error messages but the theme 404
    is not displayed just a standard page cannot be found.

    *** Actually I've just re-edited the index.php and removed the line as we did with zen 1.22 and it's working !!!

    removed header("Status: 404 Not Found");

    Brilliant, thanks very much!!!

    Do I need to ask my hosting provider to change anything at their end to fix this without editing the files ?
  • We do not understand why that line needs to be removed.
  • boo Member
    Hi, ok your possible reason was:
    "If the script is not getting run it is because the server has preimpted it"

    You suggested to try and remove either or both lines from index:

    header("HTTP/1.0 404 Not Found");
    header("Status: 404 Not Found");

    It is important that search engines see a proper 404, looking at Google's webmaster tools, images / albums that have been deleted or renamed etc are reported as "404 Not Found". So that is good.

    Thankyou for your help.
Sign In or Register to comment.