I have a problem with updating the pecl inotify extension.
but i think it applys to all extensions.
i recently updated my server.
first i got the error that inotify.so wasn't found.
so i copied it to the new php extension directory
#server:~# locate inotify.so
/usr/lib/php5/20100525/inotify.so
/usr/lib/php5/20121212/inotify.so
but now i'm getting the error:
PHP Warning: PHP Startup: inotify: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20121212
These options need to match
so how do i update / reinstall / reconfigure these extensions?
the "long" way round.
pecl uninstall inotify
pecl install inotify
there should be a better way to reconfigure an php extension. right?!
but this works for now!
Related
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
PHP Core Warning – yii\base\ErrorException
PHP Startup: zip: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
2. yii\base\ErrorHandler::handleFatalError()
Webpage runs ok but at the end of page this errors come. i tried one method which remove these errors temporary which are written in terminal.
# pecl upgrade fileinfo # pecl upgrade memcache # pecl upgrade mhash # pecl upgrade readline
thanks in advance.
I think they are not compatible, It might be versions issue so please perform the following steps:
Update your PHP.
Update your modules (PHP extensions).
Here is how you can update your PHP extensions. 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.
First install it
pecl uninstall module_name
Then install it
pecl install module_name
Don't forget to restart the Apache.
Is there a version of Mailparse that works with PHP 5.6.2? I installed it this morning using pecl install mailparse and it placed mailparse.so in what seems to be the wrong location and when I view it in Finder it shows up as a document.
I decided for the heck of it to copy it to the appropriate folder and when I execute the code the uses it I get these messages:
Warning: PHP Startup: mailparse: 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
FYI, I'm not a PHP expert by any stretch.
For php 5.6 and debian first install php5-dev module:
apt-get install php5-dev
and next use latest build for php5, which is currently:
pecl install mailparse-2.1.6
If mailparse is already installed you can remove it before any action:
pecl uninstall mailparse-2.1.6
Officially, no, there's not.
http://php.net/manual/en/mailparse.installation.php
Windows users will enable php_mailparse.dll inside of php.ini in order
to use these functions. A DLL for this PECL extension is currently
unavailable. See also the building on Windows section.
It seems to be just a matter of compiling, so anyone should be able to compile it and share the DLL, but as far as I know no one has done this.
mailparse hasn't had a release for some years - though the git repo is showing recent work (April 2015). I recently used it for a project, however the version I used had some issues in decoding the display-name & email from a list of not perfectly formatted string of multiple names.
I've since installed mmucklo/email-parse and I'm using that as a native PHP solution on PHP 5.6.
I'm trying to install Laravel4 on my 10.6 Mac / PHP 5.4.14. And I seem to be going down a rabbit hole.
After "composer install"ing Laravel4 .. command line showed that I needed the Mcrypt PHP extension. So I tried to install that and I was told I had to have Mhash installed. So I installed Mhash .. then went back and installed Mcrypt
extension = mcrypt.so
Libraries have been installed in:
/Users/****/downloads/php-5.4.14/ext/mcrypt/modules
Then I went back to installing Laravel 4 and now I'm showing this
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20100525/intl.so' - dlopen(/opt/local/lib/php/extensions/no-debug-non-zts-20100525/intl.so, 9): image not found in Unknown on line 0
Loading composer repositories with package information
Installing dependencies from lock file
Nothing to install or update
Generating autoload files
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20100525/intl.so' - dlopen(/opt/local/lib/php/extensions/no-debug-non-zts-20100525/intl.so, 9): image not found in Unknown on line 0
Laravel requires the Mcrypt PHP extension.
.. and I thought I had already taken care of that intl.so issue .. but it seems I installed an old version?
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Laravel requires the Mcrypt PHP extension.
So can someone maybe give me a bit of perspective on this and point me in the right direction? I'm a little fuzzy with compiling PHP.
Your command line might be using a different version of PHP. You'll have to update your path variable in your .bash_profile file to point to the correct version of PHP.
How are you installing PHP?
I'm thinking the 5.4 version you installed is getting mixed up with the built-in 5.3 version that comes with OS X.
i'm trying to install memcache module from http://pecl.php.net/package/memcache. Im using xampp in ubuntu (lampp) with php 5.3. After download the extension, I run phpize, make and make install, then I add extension=memcache.so in my php.ini but when I restart xampp the following message appears:
Warning: PHP Startup: memcache: Unable
to initialize module Module compiled
with module API=20060613 PHP
compiled with module API=20090626
These options need to match in
Unknown on line 0
Anyone have any ideia on what happening?
Thanks
5.3 Is known to give problems. Go back to 5.2.3.
Does this http://bugs.php.net/bug.php?id=42187 answer your question?