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.

Options: ReplyQuote
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.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.0 32 bit - Apache 2.4.41 - PHP 7.4.0/7.3.12/..../5.6.40 - MySQL 5.7.28 - MariaDB 10.4.10
Wampserver 3.2.0 64 bit - Apache 2.4.41 - PHP 7.4.0/7.3.12/..../5.6.40 - MySQL 5.7.28/8.0.18 - MariaDB 10.4.10
PhPMyadmin 4.9.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
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.

Options: ReplyQuote


Sorry, only registered users may post in this forum.