can't install memcache php module - php

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?

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

PHP Installation Yosemite

I believe I have an issue with my PHP installation
When I type php into the command line, i get the following
PHP Warning: PHP Startup: pdo_pgsql: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20121212
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: pgsql: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20121212
These options need to match
in Unknown on line 0
Can anyone advise?
I tried this - http://jason.pureconcepts.net/2014/11/install-apache-php-mysql-mac-os-x-yosemite/
As the author of that post, the issue is with the previously compiled modules pdo_pgsql and pgsql.
As noted in the comments, you will need to reinstall these modules for the Yosemite's of PHP (run php -v).
Steps for doing so with these specific modules has been answered already.
I just had the same issue and I don't use Postgres so I really didn't care for installing PEAR and then autoconfig, etc.
So I found that you can simply comment out those extensions in php.ini
To find the ini file location:
php -i | grep php.ini
And then comment out the above 2 extensions in the ini file. Mine was located at: /Library/Server/Web/Config/php/php.ini

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.

updating php extensions Ubuntu

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!

How do I fix these errors when running the PHP Composer Installer?

I have a server that was recently upgraded to PHP 5.3. Now when I try to install composer, I get the following error messages:
PHP Warning: PHP Startup: ffmpeg: 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
How do I fix these errors and get the installer to run properly?
Your problem seems to be an invalid PHP module being installed, not something with the Composer installer.
Have you tried running a simple PHP script like
<?php phpinfo();
Does this work?

Categories