[Solved] php.ini locations/load order/best practice.

spacecabbie

Verified User
Joined
Oct 11, 2019
Messages
103
Location
The Netherlands
https://help.directadmin.com/item.php?id=301 and https://help.directadmin.com/item.php?id=672 specifiy:
/usr/local/lib/php.ini <-- Default
/usr/local/etc/php5/cgi/php.ini <-- CGI mode (suPhp)
/usr/local/php*/lib/php.ini <-- php-FPM
/usr/local/php*/lib/php.conf.d/10-directadmin.ini <--custom build
/usr/local/php*/lib/php.conf.d/50-webapps.ini <--custom build
/usr/local/directadmin/data/users/username/php/domain.com.ini <--If activated per user php
Afaik you don't edit main php.ini files so I edit 50-directadmin.ini to remove session save path (i use redis)

But with conf rewrite this gets overwritten.
So short question how do i properly add/adjust 50-directadmin.ini persistently

Long version:
What is the best practice to adjust/append php.ini
like httpd and custom dir. there must be a guide but for some reason can't find it on the DA site.

MY assumption is i create a manual ini file in the ../lib/php.conf.d/ ?

Ps. Please don't send centos etc guides i know those i like to do it the DA way.
 
Top