ispCP - Board - Support
Changing php error reporting from .htaccess - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: Changing php error reporting from .htaccess (/thread-14224.html)



Changing php error reporting from .htaccess - aseques - 06-21-2011 06:41 PM

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


RE: Changing php error reporting from .htaccess - kilburn - 06-21-2011 11:30 PM

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...


RE: Changing php error reporting from .htaccess - aseques - 06-22-2011 11:15 PM

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.