mysqli Unable to initialize module - php

I am using Apache2.4 and PHP 7.1.12
In php.ini file I had mentioned -
extension_dir = "ext"
It is throwing following error:
PHP Startup: mysqli: Unable to initialize module. Module compiled with module API=20151012 PHP compiled with module API=20160303

You are using mysqli module compiled for PHP 7.0 in PHP 7.1. As those versions have different APIs, it won't work. Obtain modules for PHP 7.1 - they usually come with PHP distribution.

Related

Installing PHP 7.2 extension pdflib, module error

I am trying to install pdflib on PHP 7.2 which I already had installed before. Somehow I restructured my PHP Installation with Homebrew a while ago. Before that restructure I had my extensions in /usr/local/etc/php/7.2/extensions. I just needed to reference my .so Files in php.ini and everything had been working just fine.
After the restructure I used pecl to install new extensions. Now I have my extensions in usr/local/lib/php/pecl/20170718 which is also referenced in my php.ini as extension_dir. But if I put the pdflib.so inside this directory and register it in php.ini I get the following error:
Warning: PHP Startup: PDFlib: Unable to initialize module
Module compiled with module API=20160303
PHP compiled with module API=20170718
These options need to match`Warning: PHP Startup: PDFlib: Unable to
initialize module
How can I solve this or is there a way to roll back to the old configuration?
Module compiled with module API=20160303
PHP compiled with module API=20170718
this message indicate, that a PDFlib DSO is loaded, which was build for an older PHP (PHP 7.1).
I see two possible problems:
a different extension is loaded by accident. For example due to different names. (php_pdflib.so vs pdf.so)
your PECL build go wrong, and it was build the extension against the old PHP 7.1.
I would recommend
check your php.ini and remove all extensions with pdf
download the latest PDFlib 9.1.2 from the website and unpack the package
copy the correct DSO (php_pdflib.so) to your extension_dir
add now extension=php_pdflib.so to your php.ini
hope that helps,
Rainer

i am using php 5.6.24 in xamp and i'm installing V8js extension and getting following warning

php -i | findstr "Thread"
PHP Warning: PHP Startup: v8js: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0
Thread Safety => enabled
You have installed the wrong version of the extension. You need the version that is compiled with API 20131226. So you have to search for the correct version and install them. Then is should work.
https://github.com/terrylinooo/v8js-dll
here you can see the versions that are included. So normally if you have used the correct version it should be correct.

PHP Warning: PHP Startup: solr: Unable to initialize module

I'm getting the below warning while adding the solr-client extinctions.
PHP Warning: PHP Startup: solr: Unable to initialize module
Module compiled with module API=20131226
PHP compiled with module API=20121212
These options need to match in Unknown on line 0
can any one Please hep me out in this ?
PHP Warning: PHP Startup: solr: Unable to initialize module
1:Check extension_dir directive in php.ini. It should point to folder with 5.2 modules.
2:This is because PHP extensions are developped in C, and are "close" to the internals of PHP -- which means that, if the APIs of those internals change, the extension must be re-compiled, to use the new versions.
And, between PHP 5.2 and PHP 5.3, for what I remember, there have been some modifications in the internal data-structures used by the PHP engine -- which means extensions must be re-compiled, in order to match that new version of those data-structures.
How to update your PHP extensions will depend on which system you are using.
If you are on windows, you can find the .dll for some extensions here : http://downloads.php.net/pierre/
For more informations about the different versions, you can take a look at what's said on the left-sidebar of windows.php.net.
If you are on Linux, you must either :
Check what your distribution provides
Or use the pecl command, to re-download the sources of the extensions in question, and re-compile them.

PHP Startup ffmpeg Unable to initialize module

When start Apache I get this error..
How can I solve it?
PHP Warning: PHP Startup: ffmpeg: Unable to initialize module
Module compiled with module API=20060613
PHP compiled with module API=20100525
These options need to match
extension=php_ffmpeg.dll : added to php.ini
php_ffmpeg.dll copied to php/ext
avcodex-51.dll/ avformat-51.dll/ avutil-49.dll/ pthreadGC2.dll : added to C:\Windows\SysWOW64
The php_ffmpeg.dll was compiled with an older version of PHP. It's possible your PHP installation was updated but the module was not. You will need to get an updated version the the php_ffmpeg module or remove it.

PHP can't connect to Mongodb

I followed the windows installation instructions in mongodb's website but I still can't connect to MongoDB through PHP because of this error:
Class 'Mongo' not found
Why isn't the file containing the Mongo Class not being loaded?
I've also found this error:
PHP Warning: PHP Startup: mongo: Unable to initialize module
Module compiled with module API=20090626, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=1
These options need to match
in Unknown on line 0
I'm using php 5.2.5 and the mongo-php-driver is Windows PHP 5.2 VC6 thread safe
Thanks
The driver was compiled for php 5.3 though the name suggests otherwise.
Can you upgrade to php 5.3(.2) ?
On archlinux, Installing php-mongo 1.2.10-1 solved this problem for me.

Categories