As long as I have the "error" part before the "other pages" part it is all good.
And doing this basically makes causes the second block (from Ultimate URLs) to never be triggered... Same as removing the block...
The example shipped with Ultimate URLs 2.212 and Zen Cart 1.5.x do not include following block of code:
# Handle when a resource is not found (404 Error Page)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=page_not_found&%{QUERY_STRING} [L]
The above snippet should not be added to the .htaccess file for a site with either CEON URI Mapping or Ultimate URLs installed. It does not add any benefit and may confuse people reading the .htaccess file.
robbie269:
Could not get it to do the error on the test site. Maybe it is something with my main .htaccess file??
You may want to post the entire .htaccess files you are using (use CODE blocks). Post the one in the Zen Cart installation and any .htaccess file located in a parent folder. Be sure to obscure any reference to the Zen Cart admin URL. Additionally when using CEON URI Mapping, make sure none of your Zen Cart pages (products, categories, ex-pages, etc) start with name as your admin folder (or any other items excluded by Rewrite Conditions).
Error reporting in Zen Cart does not start until partway through Zen Cart loading (Zen Cart does have to load the error handling code before it will log errors)... So just enabling STRICT_ERROR_REPORTING may not reveal anything... You can also enable DEBUG_AUTOLOAD (set to true) in order to see the progress of Zen Cart loading and the last step before the HTTP/500 occurs...
But the best long term method to catch 99% of PHP errors / warnings is to tell PHP to log them to a dedicated file. This allows one to track down PHP related errors before Zen Cart (or any other PHP application) enables internal logging... For example the following settings in "php.ini" will log PHP errors and warnings to the file /home/username/php_errors.txt:
error_reporting = E_ALL | E_STRICT
log_errors = On
display_errors = Off
error_log = /home/user/php_errors.txt
You may need to talk to your hosting provider on what methods they allow to enable logging of PHP errors.
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker