Possibility to have a global php.ini file
-
Is there a way to have a global php.ini file that is included in all versions?
I have a multi-version PHP setup with Laragon 3.1.8, and for each new version, I edit the new php.ini directory to set certain INI settings back (max_execution_time for example). It would be great if we could have a /etc/php/php.ini file that is always included in addition to the default php.ini file.
Appreciate your time reading this and if you could shed a light.
Thank you.
-
@Ayesh : I'll add the feature to next version of Laragon
-
Thank you. like laragon.
-
@leokhoa This is awesome! Thank you so much for all your efforts in this! I can't thank enough.
-
I just migrated from XAMPP and i really started to love LARAGON
i have around 200 website with 4 PHP Versions installed
I would like to know if this feature is added in the latest version.
-
@Ayesh , @varunsridharan : From Laragon 3.3+, you can use global php.ini:
When changing PHP version, Laragon will check and useusr\tpl\php.ini.tpl
if it exists.
You can also use Quick Settings to change some frequent used settings quickly: https://forum.laragon.org/topic/1015/tutorial-how-to-manage-php-quick-settings
-
@leokhoa i checked in the location
usr\tpl\php.ini.tpl
and the file was missing so i created and tried to change certain values of php config. but it din't work out well.@leokhoa said in Possibility to have a global php.ini file:
@Ayesh , @varunsridharan : From Laragon 3.3+, you can use global php.ini:
When changing PHP version, Laragon will check and useusr\tpl\php.ini.tpl
if it exists.
You can also use Quick Settings to change some frequent used settings quickly: https://forum.laragon.org/topic/1015/tutorial-how-to-manage-php-quick-settings
-
@varunsridharan : Just backup your current php.ini (rename to php.ini.bak). Then restart Apache/Nginx, Laragon will use your global php.ini file.
-
Ok but the current php.ini is from the php source folder
@leokhoa said in Possibility to have a global php.ini file:
@varunsridharan : Just backup your current php.ini (rename to php.ini.bak). Then restart Apache/Nginx, Laragon will use your global php.ini file.
-
@varunsridharan : That's right. Laragon will copy your global
php.ini.tpl
tophp.ini
in *E:....\bin\php\php-7.1.20....*
Tip: Laragon will correct wrong paths in your globalphp.ini.tpl
so you don't need to worry about them.
-
@leokhoa I think u missunderstood
i use php-7.1.20 version and the path for it is below
E:\localhost\bin\php\php-7.1.20-Win32-VC14-x64
and thephp.ini
file that came by default with that zip file which i have downloaded it from the php site.
and also created aphp.ini.tpl
file in the path you said.
now you want me to delete thephp.ini
which came by default with the php source ?
-
@varunsridharan : You can check my tutorial here:
https://forum.laragon.org/topic/1117/tutorial-using-global-php-ini