PHP Extension|Module load order
For example when checking "/opt/cpanel/ea-php70/root/etc/php.d" I see that configuration files are prefixed with a number :
I thought I read somewhere this is due to module load order. For example if we wanted "xml" to be loaded after "mysqli" we would change the ini name to "40-xml.ini". Is this correct? And, is there a recommended prefix for new modules and if so what should they be set to?
-rw-r--r-- 1 root root 59 Aug 25 13:11 20-tokenizer.ini
-rw-r--r-- 1 root root 47 Aug 25 13:11 20-xml.ini
-rw-r--r-- 1 root root 59 Aug 25 13:11 20-xmlwriter.ini
-rw-r--r-- 1 root root 47 Aug 25 13:11 20-xsl.ini
-rw-r--r-- 1 root root 47 Aug 25 13:11 20-zip.ini
-rw-r--r-- 1 root root 53 Aug 25 13:11 30-mysqli.ini
-rw-r--r-- 1 root root 59 Aug 25 13:11 30-pdo_mysql.ini
-rw-r--r-- 1 root root 61 Aug 25 13:11 30-pdo_sqlite.ini
I thought I read somewhere this is due to module load order. For example if we wanted "xml" to be loaded after "mysqli" we would change the ini name to "40-xml.ini". Is this correct? And, is there a recommended prefix for new modules and if so what should they be set to?
-
Hello, Yes, for instance, with "/opt/cpanel/ea-php70/root/etc/php.d/" PHP will scan all files ending in .ini in alphabetical order. Thus, if you wanted "20-xml.ini" to load later, you could rename it to "40-xml.ini". The "Scan Directories" section on the following PHP document goes into more detail on this: PHP: The configuration file - Manual The following document also references exceptions to this behavior: The cPanel PHPRC PHP Patch for EasyApache 4 - EasyApache 4 - cPanel Documentation Thank you. 0
Please sign in to leave a comment.
Comments
1 comment