0

Hi everyone,

I recently migrated to PHP 5.3.2, and realized that I am unable to turn off notice errors in my site now. I went to php.ini, and in these lines:

; Common Values:
;   E_ALL & ~E_NOTICE  (Show all errors, except for notices and coding standards warnings.)
;   E_ALL & ~E_NOTICE | E_STRICT  (Show all errors, except for notices)
;   E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR  (Show only errors)
;   E_ALL | E_STRICT  (Show all errors, warnings and notices including coding standards.)
; Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED
; http://php.net/error-reporting
error_reporting = E_ALL & ~E_NOTICE

I've tried setting everything (and I restart apache each time), but I am unable to get rid of notices.

The only way I'm able to get rid of notice errors is by setting :

display_errors = Off

Can someone help? Is this a bug in PHP 5.3.2 or something I am doing wrong?

Thank you very much for your time!

P. S. Also, how can I get PHP 5.3.2 to support the .php3 extension?

2
Contributors
5
Replies
8
Views
7 Years
Discussion Span
Last Post by knkk
0

You've definately got the right php.ini? Some hosts have them lying all over the place for different domains, depends on the setup.

php3 settings are in php.ini too, aren't they?

Do you have any settings coded into .htaccess? Maybe that's messing with the setup?

0

Thanks, sourcez. Yes, it is the right php.ini - the errors stop coming when I do display_errors = Off. And no, nothing in .htaccess, since the code was working fine until I upgraded PHP :(

0

I'm guessing with you here, how about trying it with htaccess then? Just to see whether that works (I know it wouldn't be ideal but is a start)

php_flag display_errors off
0

Okay, I figured what was going wrong. I set error_reporting in my code, which was overwriting the php.ini error_reporting.

Now the reason that that same stuff was working until I upgraded to PHP 5.3.2 was this - in my code, I set the error_reporting command:

error_reporting(6143);

I should've set it as:

error_reporting(E_ALL ^ E_NOTICE);

I'm guessing the meaning of 6143 is different in PHP 5.3.2 compared to in 4.1 (or whatever my earlier version was).

As for the php3 extension, it was to be set in the /etc/httpd/conf.d/php.conf file:

AddHandler php5-script .php .php3
AddType text/html .php

Thank you, sourcez, for your suggestions!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.