PHP. ini file configuration solution

Source: Internet
Author: User
PHP. ini file configuration This post was last edited and modified by cuishengbin0209 at 2014-07-212:5php. display_errorson in ini. & nbsp; after the apache service is restarted, it is displayed as "off". The modification does not take effect. the result of using the phpinfo function is as follows: Configuratio PHP. ini file configuration

This post was last edited by cuishengbin0209 at 21:51:58

Modify display_errors = on. in php. ini. after the apache service is restarted, it is displayed as "off". The modification does not take effect.
The result of using the phpinfo function is as follows:
Configuration File (php. ini) Path C: \ Windows
Loaded Configuration File C: \ Windows \ php. ini

I have seen that many methods have not been solved on the internet. Do I need to modify other configurations?
At the same time, the landlord tried to delete the php. ini file, but the parameter still takes effect. Does php have the default settings? can I delete the php. ini configuration file?

Thank you for your answers.
------ Solution ----------------------
Which one do you need to modify C: \ Windows \ php. ini?
------ Solution ----------------------
Loaded Configuration File indicates the php. ini File in use.
After modification, you need to restart the web server. sometimes you need to restart the machine (because you modified the content in the system directory)

You said the modification didn't work, but you didn't come up with evidence
For example, the value of display_errors in phpinfo () and the result of echo ini_get ('display _ errors ');

Although ini_set ('display _ errors ', 'on'); can take effect, it can only output error messages during running.
What exactly needs to be known is the errors that occur during compilation.
------ Solution ----------------------
Reference:
Quote: reference:

Is the previous ";" removed?
Or whether your php. ini is generated using another template. after modification, run it again. After running, check whether the display_erros in php. ini is off. If yes, it is estimated that it is generated using another template. You need to modify the template.

You do not need to change the php. ini method.
Add at the beginning of the PHP file
Ini_set ('display _ errors ', 'on.


You can use the ini_set method to make the parameter take effect.
But I don't understand the phrase "php. ini is generated using another template. I moved the php. ini file in the original php folder to the C: \ Windows path. Currently, the system only has one php. ini file. However, the display_errors parameter in the change does not take effect, and the previous ";" parameter is also removed. Isn't PHP finding the corresponding php. ini File based on Loaded Configuration File and reading the corresponding parameters?


Because some systems such as xamp have a php. ini. template file, which is copied as php. ini before each operation. Therefore, modifying php. ini does not work. you need to modify the php. ini. template file to make it take effect. Let's see if this is the case.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.