Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP Extension|Module load order

Discussion in 'EasyApache' started by tmcstom, Sep 14, 2016.

  1. tmcstom

    tmcstom Member

    Dec 31, 2014
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    For example when checking "/opt/cpanel/ea-php70/root/etc/php.d" I see that configuration files are prefixed with a number :

    -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?
    #1 tmcstom, Sep 14, 2016
    Last edited by a moderator: Sep 14, 2016
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    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.

Share This Page