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!

PHP Extension|Module load order

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

Tags:
  1. tmcstom

    tmcstom Member

    Joined:
    Dec 31, 2014
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    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 :

    Code:
    -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

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,793
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice