LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > [Solved] compiling PHP and including memcache

Reply
 
Thread Tools Display Modes
  #1  
Old 02-11-2013, 07:28 AM
joek168 joek168 is offline
Member
 
Join Date: Jan 2009
Posts: 19
Default [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.
Reply With Quote
  #2  
Old 02-11-2013, 07:44 AM
joek168 joek168 is offline
Member
 
Join Date: Jan 2009
Posts: 19
Default 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.

Last edited by joek168; 02-11-2013 at 07:51 AM..
Reply With Quote
  #3  
Old 02-11-2013, 08:31 AM
joek168 joek168 is offline
Member
 
Join Date: Jan 2009
Posts: 19
Default 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!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:26 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.