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
standard themes supplied with 1.2.5
Thanks.
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;`
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 ?
"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.