php.ini customizations for different versions
Posted by: daddytiger (12.216.69.---)
Date: April 12, 2019 06:53PM

Congrats and thanks to the authors, contributors, moderators of this wonderful development tool. I noticed as I had to customize php.ini (e.g., to work with xdebug, options at very end of file) that the customization is saved on/as a per specific version basis. Thinking ahead, may later want to similarly customize buffering, error display.. Pretty slick, my question is: Where are these changes saved if I want to back them up? (Simulink to php.ini, so ???). Thx for your help.

Re: php.ini customizations for different versions
Posted by: Otomatic (Moderator)
Date: April 12, 2019 08:21PM

Hi,

When you change the configuration of a version of PHP using the menus of the Wampmanager icon, for example :
- Left-Click -> PHP -> PHP settings -> ... several options to be modified
or
- Left-Click -> PHP -> PHP extensions -> ... several extensions to be checked or uncheched
it is the php.ini of the bin folder of the Apache version used that is modified, i. e. if you use Apache 2.4.39, the "file" wamp(64)\bin\apache\apache2.4.39\bin\php.ini
This "file" php.ini is not a real file, it is a symbolic link (symlink php code) to the real phpForApache.ini file of the PHP version used.

If the PHP version used is 7.3.4, the "real" wamp(64)\bin\php\php7.3.4\phpForApache.ini file will be modified.

A symbolic link can be a source of misunderstanding:
For example, if you validate Left-click -> PHP ->php.ini, the default text editor will open the symbolic link wamp(64)\bin\apache\apache2.4.39\bin\php.ini and in the editor's title bar (Notepad++) you will see the path to this file and "php.ini" in the file tab when in reality you are editing the "real" file wamp(64)\bin\php\php7.3.4\phpForApache.ini

To convince yourself of this, validate the order Left-click -> PHP ->php.ini then, in Notepad++ also open the real file wamp(64)\bin\php\php7.3.4\phpForApache.ini and you will see that if you make changes in the "php.ini" tab and then save, Notepad+++ will notify you that the phpForApache.ini file has been modified by another application.

The changes are therefore saved in the phpForApache.ini file and, if you change the PHP version, these changes remain and you will find them when you switch back to the PHP version.

Nota : Do not copy phpForApache.ini files from one version of PHP to another, there may be incompatible evolutions or modifications between versions.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Re: php.ini customizations for different versions
Posted by: daddytiger (12.216.69.---)
Date: April 12, 2019 08:36PM

Thanks!

Note to self:

"in reality you are editing the "real" file wamp(64)\bin\php\phpx.y.z\phpForApache.ini"


Very concise answer. Cheers.

Sorry, only registered users may post in this forum.