The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

phpize compiles memcache against previous version of PHP

Discussion in 'EasyApache' started by kidrobot, Jun 26, 2014.

  1. kidrobot

    kidrobot Member

    Joined:
    Sep 9, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    My client performed an upgrade using EasyApache bringing php up to 5.4.29.

    Code:
    root@server1 [/usr/bin]# php -v
    PHP 5.4.29 (cgi-fcgi) (built: Jun 25 2014 18:41:45)
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    root@server1 [/usr/bin]# grep ^extension_dir /usr/local/lib/php.ini
    extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20100525"
    Previously, it was running php 5.3.x and we had compiled the memcache extension for it.

    The upgrade broke the memcache integration so I downloaded it and recompiled it again.

    However, it appears phpize is pulling the old version of PHP as the extension was compiled into the old extension directory not the new one. See abbreviated output from commands below.

    Code:
    root@server1 [~/memcache]# wget http://pecl.php.net/get/memcache-3.0.8.tgz
    root@server1 [~/memcache]# tar -zxf  memcache-3.0.8.tgz
    root@server1 [~/memcache]# cd memcache-3.0.8
    root@server1 [~/memcache/memcache-3.0.8]# phpize
    Configuring for:
    PHP Api Version:         20090626
    Zend Module Api No:      20090626
    Zend Extension Api No:   220090626
    root@server1 [~/memcache/memcache-3.0.8]# ./configure
    root@server1 [~/memcache/memcache-3.0.8]# make
    root@server1 [~/memcache/memcache-3.0.8]# make install
    Installing shared extensions:     /usr/lib/php/extensions/no-debug-non-zts-20090626/
    How can I compile memcache with the correct version of php?
     
  2. kidrobot

    kidrobot Member

    Joined:
    Sep 9, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Figured it out. Looks like PHP is installed in two places.

    I was able to compile the extension properly using the following.

    root@server1 [~/memcache]# cd memcache-3.0.8
    root@server1 [~/memcache/memcache-3.0.8]# /usr/local/bin/phpize
    root@server1 [~/memcache/memcache-3.0.8]# ./configure --with-php-config=/usr/local/bin/php-config
    root@server1 [~/memcache/memcache-3.0.8]# make
    root@server1 [~/memcache/memcache-3.0.8]# make install
    Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20100525/
     
  3. kidrobot

    kidrobot Member

    Joined:
    Sep 9, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Restarted Apache, but still no dice.

    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
    in Unknown on line 0
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Have you tried installing it through PECL? EX:

    Code:
    pecl install memcache
    Note that you may want to uninstall any existing implementations of memcache that you manually installed before running the above command.

    Thank you.
     
Loading...
Similar Threads - phpize compiles memcache
  1. amitsonkhiya
    Replies:
    3
    Views:
    404

Share This Page