Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WAMPserver, two php.ini files

I was looking for a way to change the max file size in phpmyadmin (mysql imports). I solved it after discovering there were two php.ini files: one is located at C:\wamp\bin\apache\Apache2.4.4\bin considering the default install path, while the other one is at C:\wamp\bin\php\php5.4.16.

The funny aspect here is that, when I want to change variables, I should pay attention to the apache/-located php.ini file, instead of the php/-located one.

And here comes my question: why? Why are there two php.ini files instead of one? I must even look at both files, depending on what do I need to change (and I'm NEVER sure what file should I look, but by trial and error). What's the purpose, and when should I look either file?

like image 317
Luis Masuelli Avatar asked Mar 31 '14 20:03

Luis Masuelli


People also ask

Does WAMPServer install PHP?

It's a software stack which means installing WAMP installs Apache, MySQL, and PHP on your operating system (Windows in the case of WAMP). Even though you can install them separately, they are usually bundled up, and for a good reason too.

Where is the PHP ini file stored?

user. ini file is the default configuration file for running applications that require PHP. It is used to control variables such as upload sizes, file timeouts, and resource limits. This file is located on your server in the /public_html folder.


Video Answer


1 Answers

The one from Apache folder is used for the web and the one from the PHP folder is used for the CLI.

If you want to update something on your php.ini related to a problem / an improvement on the web, you should update the one inside the Apache folder.

If you need some fine tuning on a task, which is launched using the CLI version of PHP, you should update the one in the PHP folder.

like image 110
j0k Avatar answered Sep 18 '22 11:09

j0k