Page 2 of 2

Posted: Fri Sep 07, 2007 12:33 pm
by icesolid
This is all I have in my .htacess file:

Code: Select all

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.website.com$
RewriteRule ^(.*)$ http://www.website.com/$1 [R=301]

ErrorDocument 404 http://www.website.com/error.php
The first three lines are used to redirect any website.com requests to http://www.website.com. Nothing that should effect PHP error reporting. I have infact tried removing everything from the .htaccess file and error reporting still does not work.

My whole problem is that everything worked fine until I upgraded to PHP 5.2.2. This is really starting to get to me becasue I can not find anyway that PHP should NOT be showing me my errors. It used to work.

I have tried re-installing PHP, shutting down the server and rebotting and double checking my php.ini file.

Still no success.

Posted: Fri Sep 07, 2007 3:43 pm
by volka
In order to have parse errors printed to the client you have to enable display_startup_errors before the script is parsed (e.g. in the php.ini).

But that doesn't explain why error_reporting appears to be set to 0 although phpinfo() says otherwise.

Posted: Fri Sep 07, 2007 9:09 pm
by icesolid
I have turned display_startup_errors and it is still not displaying my errors.

Posted: Sat Sep 08, 2007 8:41 am
by volka
and next try ...

Code: Select all

<?php
foreach( array('display_errors', 'display_startup_errors','error_reporting') as $p ) {
	echo $p, '  cfg: ', get_cfg_var($p), ' ini:', ini_get($p), "<br />\n";
}
echo "<br />\n";

error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
foreach( array('display_errors', 'display_startup_errors','error_reporting') as $p ) {
	echo $p, '  cfg: ', get_cfg_var($p), ' ini:', ini_get($p), "<br />\n";

Posted: Sat Sep 08, 2007 8:59 am
by icesolid
Thank you volka for that.

However, I told my dedicated host last night that I needed this fixed immediately (I have been trying to figure it out my self thus far, so I could learn what the issue is for future reference) and they put some guy to work going through each line of the 5.2.2 php.ini file comparing it to the old 4.3.3 php.ini file and somehow he got the problem fixed going that route. How, they didn't tell me and the guy went home. He worked on it for 2.5 hours.

Great host by the way, liquidweb.