![]() |
[Solved] compiling PHP and including memcache
Hello,
Using the LS admin panel, I compiled php5.4.11. I checked the box to include the memcache extension. It compiled but appears to have compiled using the wrong version of PHP. I get the following error: [STDERR] PHP Warning: PHP Startup: memcache: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20100525 These options need to match So I manually downloaded and phpized/config/install and get the same type error. I then used /opt/lsws/lsphp5/bin/phpize and it showed the correct version that matched the output of php_info(). config/install (i manually copied the file this time to the ext dir listed in the php_info() output) and graceful restart of the server. Still get the same sort of error: [STDERR] PHP Warning: PHP Startup: memcache: Unable to initialize module Module compiled with module API=20050922 PHP compiled with module API=20100525 These options need to match Where is the phpize that I should use to get the correct version (I installed LS with default options)? I appreciate any help. |
found the phpize for 5.4.11
I found the phpize for 5.4.11 in /opt/lsws/phpbuild/php-5.4.11/scripts
So, I re-compiled after /opt/lsws/phpbuild/php-5.4.11/scripts/phpize and again, ./configure then make, then copied the new memcache.so into the modules directory. The output of the phpize did show the correct version required, btw. Graceful restart and still get this error msg: [STDERR] PHP Warning: PHP Startup: memcache: Unable to initialize module Module compiled with module API=20050922 PHP compiled with module API=20100525 These options need to match When I look at the config.log it shows the following: configure:3059: checking for PHP includes configure:3061: result: -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext configure:3063: checking for PHP extension directory configure:3065: result: /usr/lib64/php/modules configure:3067: checking for PHP installed headers prefix configure:3069: result: /usr/include/php which seems to then point it to the wrong version of PHP. Anyone know of a way to force it to look at the correct PHP? I thought that is what phpize does but something is still incorrect. Any ideas would be much appreciated. |
solved
from php.net
If you have multiple PHP versions installed, you may be able to specify for which installation you'd like to build by using the --with-php-config option during configuration. --with-php-config=[Insert path to proper php-config here] ------------------------ this worked for me! |
| All times are GMT -7. The time now is 09:27 AM. |