0

I'm using WampServer 3, and I have two versions of PHP (PHP 5.6 and PHP 7.2).

How can I config WAMP to use a different php.ini file for different PHP versions?

Grant Miller
  • 27,532
  • 16
  • 147
  • 165
John
  • 2,494
  • 5
  • 21
  • 24

1 Answers1

0

WAMPServer already uses a different php.ini file for each version of PHP.

Start WAMPSevrer and activate one of the versions of PHP.

wampmanager->PHP->version-> (select one of the php versions installed)

Using the menus on the wampmanager in the system tray, edit php.ini

wampmanager->PHP->php.ini

This opens php.ini in your default editor. Make any amendments you want to make. Save php.ini

Switch the version of PHP, using the menus

wampmanager->PHP->version-> (select the other version of PHP installed)

Using the menus on the wampmanager in the system tray, edit php.ini

wampmanager->PHP->php.ini

This opens php.ini in your default editor. Make any amendments you want to make for this version of PHP. Save php.ini

This will effect only the php.ini file used by Apache. If you want to also switch the version of PHP used by the CLI, have a look at this answer and build yourself a little .cmd file to add the correct PHP version to the PATH each time you run the command window.

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149