Current time: 12-23-2024, 01:31 PM Hello There, Guest! (LoginRegister)


Post Reply 
Changing php error reporting from .htaccess
Author Message
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #1
Changing php error reporting from .htaccess
Hi, I am upgrading several server from previous versions of ispcp. The problem I'm facing is that the error reporting level can't be change by the domain owner.

So after ispcp changed the default int php.ini from:
Code:
error_reporting = E_ALL & ~E_NOTICE
to:
Code:
error_reporting = E_ALL & ~E_DEPRECATED

Several people have tons of warnings on their sites. I'd like to put a .htaccess on the sites so I can warn the domain owner in order to fix the problems.
It doesn't work for me, is there any way of doing this?

Thanks
06-21-2011 06:41 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: Changing php error reporting from .htaccess
I'm afraid that there is no way to do what you want, because php is run out of the apache process (and thus .htaccess can not control its settings).

You'll have to change the settings in php.ini...

PS: The users themselves *can* change the error_reporting level using the "error_reporting()" function inside any .php script. However, this will not help you...
06-21-2011 11:30 PM
Visit this user's website Find all posts by this user Quote this message in a reply
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #3
RE: Changing php error reporting from .htaccess
That's a problem Sad
Do you know if there's any way to link an external file in php.ini?
If possible, we could do as with the apache and the "Include" directive.
I already found the error_reporting function, but the problem is that usually the customer don't want to make an investment for this unless it's strictly necessary.
(This post was last modified: 06-22-2011 11:17 PM by aseques.)
06-22-2011 11:15 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)