PHP Warning: PHP Startup: modulename: Unable to initialize module Print

  • 0

You find a lot of errors inside your error_log for your httpd server which stating PHP Warning:  PHP Startup: mongodb: Unable to initialize module. Below are some sample of the errors that you might see inside the logs.

PHP Warning:  PHP Startup: mongodb: Unable to initialize module
Module compiled with module API=20100525
PHP    compiled with module API=20131226
These options need to match
 in Unknown on line 0


The above errors actually refers to a corrupt or faulty extension module. This could be due to wrong installation steps of the extension module for example you want to install PHP extension for PHP 7.0 but you use PHP 5.6 to install the extension module. It also possible happened due to there the extension_dir is not defined in your php.ini causing the generated module.so being save in a wrong folder.

Please refer below step to solve this issue.

1. Uninstall the broken PHP extension module. Remember to replace the PHP version that is related to you.

/opt/plesk/php/5.6/bin/pecl install modulename


2. Now please follow How to install mongodb extension for PHP on Plesk Server. Remember to change mongodb to your required module.

Was this answer helpful?

« Back