views:

1366

answers:

1

php -v gives this

PHP 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
PHP 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
bogus test name tests/

ps. i've upgraded from php 5.2 to 5.3. before this everything worked okay.

+1  A: 

When you update the version of PHP (especially when going from version X.Y to version X.Z), you must update the PHP extensions as well.


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 .ddl 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.
Pascal MARTIN
that's what i actually thought i should do. I have openSUSE 11.2unfortunately, my distr. doesn't provide anything, what should I do to recompile php or its extensions -- google gives a lot thought scattered info... thx.
soshial
You probably don't need to recompile PHP itself : you have already updated it ;; to re-install/compile the extensions, the simplest way *(at least for memcache)* will be the pecl command ;; something like `pecl upgrade memcache`, I suppose, might do the trick *(You'll need what's required to build/compile stuff)* ;;; for more informations, you can take a look at http://www.php.net/manual/en/install.pecl.php
Pascal MARTIN
i tried to recompile php and all my module and nothing worked, but somehow "pear install -f pecl/memcache" did the trick for me :)anyway, thank you)
soshial
Well, glad you found a solution :-)
Pascal MARTIN