Categories
Development System & Network

PHP Warning: Module compiled with module API=X, {but} PHP compiled with module API=Y, These options need to match, in Unknown on line 0

My hosting company (BlueHost) supports a range of PHP versions, from 5.6 up to 7.3. Somehow I’m getting a nonfunctional mix of 5.2 and 7.3 — both attempting to run at the same time.

Whenever I try having no PHP version specified in the .htaccess in the /public_html folder, PHP version 5.2.17 is shown as operating in both the main root site (/public_html) and all subdomain / subfolder sites. That version is even lower that the lowest version my hosting company claims to currently offer, and it is too low for even WordPress to tolerate. I want 7.3 in all sites, both in the main root site and all subfolders. Version 7.3 worked flawlessly for me for many months now for all sites. It only recently broke somehow.

Whenever I specify PHP 7.3 in the .htaccess in the /public_html folder, the main site (in public root) will result in a fatal server error, while all subdomains / subfolders will show PHP version 7.3. But the site at the root does not run at all … and that fatal server error happens in conjunction with PHP error_log notes that say the PHP modules are compiled in a different version than the PHP system itself. I would wager that mismatched lower version is 5.2.17.

NOTE: The fatal error in the main site happens even with nothing in that site but a simple one-line script asking for PHP info:

<?php phpinfo(); ?>

I’m several days into this issue. The BlueHost support team is unable to resolve it. Since I’m on shared hosting, I don’t seem to have access to either fix (or break) the PHP system at a core server level. However, if someone knowledgeable can provide a nudge in the right direction, I could relay that tip the BlueHost support team.

I only ever edited PHP script files in the public root folder (/public_html) and below (in subfolders), never touching anything in the area above that (/), to my knowledge.

Does any one know of a way that editing something in the top root “/” (even accidentally) could break PHP in the way described above? Thanks for any tips in the right direction.

Here are some bits copied and pasted from the PHP error_log:

I get lots of this:

[14-Feb-2020 23:09:02 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_pgsql.so' (tried: /usr/lib64/php/modules/pdo_pgsql.so (/usr/lib64/php/modules/pdo_pgsql.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/pdo_pgsql.so.so (/usr/lib64/php/modules/pdo_pgsql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[14-Feb-2020 23:09:02 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_sqlite.so' (tried: /usr/lib64/php/modules/pdo_sqlite.so (/usr/lib64/php/modules/pdo_sqlite.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/pdo_sqlite.so.so (/usr/lib64/php/modules/pdo_sqlite.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[14-Feb-2020 23:09:02 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'wddx.so' (tried: /usr/lib64/php/modules/wddx.so (/usr/lib64/php/modules/wddx.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/wddx.so.so (/usr/lib64/php/modules/wddx.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[14-Feb-2020 23:09:02 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'xmlreader.so' (tried: /usr/lib64/php/modules/xmlreader.so (/usr/lib64/php/modules/xmlreader.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/xmlreader.so.so (/usr/lib64/php/modules/xmlreader.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[14-Feb-2020 23:09:02 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'xmlrpc.so' (tried: /usr/lib64/php/modules/xmlrpc.so (/usr/lib64/php/modules/xmlrpc.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/xmlrpc.so.so (/usr/lib64/php/modules/xmlrpc.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

…and lots of this:

Module compiled with module API=20060613
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
[14-Feb-2020 23:09:02 UTC] PHP Warning:  PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
[14-Feb-2020 23:09:02 UTC] PHP Warning:  PHP Startup: magickwand: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
[14-Feb-2020 23:09:02 UTC] PHP Warning:  PHP Startup: mailparse: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
[14-Feb-2020 23:09:02 UTC] PHP Warning:  PHP Startup: uploadprogress: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
[14-Feb-2020 23:09:02 UTC] PHP Warning:  PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
[14-Feb-2020 23:09:02 UTC] PHP Warning:  PHP Startup: magickwand: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
[14-Feb-2020 23:09:02 UTC] PHP Warning:  PHP Startup: mailparse: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
[14-Feb-2020 23:09:02 UTC] PHP Warning:  PHP Startup: uploadprogress: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0

Leave a Reply

Your email address will not be published. Required fields are marked *