Search code examples
phpapachephp-inimbstring

PHP 56 + mbstring extension does not always load?


This is not a duplicate. I've never seen this before.

My EeasyApache4 cpanel server (centos7) has the php56 module loaded.

yum list | grep mbstring
ea-php55-php-mbstring.x86_64             5.5.38-1.1.2.cpanel     @EA4
ea-php56-php-mbstring.x86_64             5.6.24-1.1.2.cpanel     @EA4
ea-php70-php-mbstring.x86_64             7.0.9-1.1.2.cpanel      @EA4
ea-php54-php-mbstring.x86_64             5.4.45-19.20.6.cpanel   EA4

PHP INI file in /opt/cpanel/ea-php56/root/etc
Additional INI files from /opt/cpanel/ea-php56/root/etc/php.d

Inside the php.d directory there is an mbstring.ini file which loads extension=mbstring.so

Anwyway, here is the issue. You can load up a website that echos out phpinfo(); - and you just refresh over and over again and about 1/2 the time the mbstring module is loaded and the mbstring.ini file is listed in the additionally parsed ini files list, however the other 1/2 of the time its completely gone, not loaded nor is the ini file parsed. All other modules are fine as far as I can tell.

Also, if i sit here an tap "up / enter" to run "php -i | grep mbstring" over and over again, mbstring is loaded every time without fail. (uses the same php.ini)

Just for the hell of it, I even tried loading the mbstring.so extension from the main php.ini file and commented out the line in the mbstring.ini - The problem still happens and it even disappears from the parsed ini files when it happens.

I have no clue what could be causing this or how to fix it, I havent even seen any one else having this issue anywhere else on the net.


Solution

  • My hosting company reinstalled EA4 / rebuilt and the problem went away. Strange.