Jump to content

more than 1 php.ini file


jimfog

Recommended Posts

I am developing 2 applications. The one is a Joomla site and the other custom(not open source). The problem is that php.ini affects these 2 in the same way-something I do not want. For example, in Joomla I want error reporting to off, while in the other application I wanted turned to on. Is is possible I have 2 different php.ini files(one with the settings for Joomla and the other with the settings for the custom app), and if yes where I will place them?

Link to comment
Share on other sites

How am I going to understand if php runs as an Apache module? I used the phpinfo function to get some info about the php confuguration-in the Apache2handler/loaded modules sectionI saw this: mod_php5Does the above mean that PHP runs as an Apache module?

Edited by jimfog
Link to comment
Share on other sites

Ok. I made some efforts to solve the issue but I could not...here is what I did: I place a .htaccess file in the joomla directory, and the file had this directive in it(according to the PHP manual):

<IfModule mod_php5.c>display_errors "0"</IfModule>

It did not work...joomla homepage still displays errors.Any ideas?

Link to comment
Share on other sites

No effect. Again...here is the syntax I used:

<IfModule mod_php5.c>php_value display_errors "0"</IfModule>

I am not saying the problem is related with the syntax. Probably the cause is somewhere else. Some other adjustment must be done...somewhere.

Link to comment
Share on other sites

This is the syntax I used:

<IfModule mod_php5.c>php_flag display_errors off</IfModule>

I still get errors. And to precise, errors such: SCREAM: Error suppression ignored forStrict standards: Non-static method JFilterOutput::ampReplace() should not be called statically in C:\Apache24\htdocs\modules\mod_menu\tmpl\default_url.php on line 23 The htaccess file is placed here:C:\Apache24\htdocs...where joomla is located.

Link to comment
Share on other sites

If you want to verify whether or not the setting is taking effect, open a phpinfo page and look for the display_errors setting in the Local Value column. If it still says it's on then something else is wrong. Otherwise, you might want to disable the scream setting which is causing that error message to be shown even though the code is trying to suppress it.

Link to comment
Share on other sites

  • 2 weeks later...
If you want to verify whether or not the setting is taking effect, open a phpinfo page and look for the display_errors setting in the Local Value column. If it still says it's on then something else is wrong. Otherwise, you might want to disable the scream setting which is causing that error message to be shown even though the code is trying to suppress it.
Unfortunately the local value is still ON.How am I going to disable the scream setting? Need to mention also that now I DO NET get the error suppression ignored message. I just get error of the type Strict Standards:non static method.. Again this is the syntax of the htaccess file-another line added now to disable also startup errors,in any case anything good came out of it.
<IfModule mod_php5.c>php_flag display_startup_errors offphp_flag display_errors off</IfModule>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...