2

I'm trying to do this on EC2, micro instance using amazon linux

I installed and started the memcached service without problems. But when trying to make the php part using pecl it told me pecl wasnt installed. So I installed pear, then pecl, when trying to run pecl install memcache I got an error asking for zlib (which btw, is installed), so instead I did this:

wget http://pecl.php.net/get/memcache-2.2.5.tgz
tar xvf memcache-2.2.5.tgz
cd memcache-2.2.5
phpize
./configure --with-zlib-dir=/usr/share/syslinux/com32/

But when I do the "make", I get a long list of errors, all of them in "zend" files, mostly missing types (ie. uint, hash_func_t, etc.).

My guess is that something else needs to be installed (ie. an include file with all the types that is asking for) , so I dont have to define all the missing types myself

In file included from /usr/include/php/Zend/zend.h:237,
                 from /usr/include/php/main/php.h:35,
                 from /usr/local/src/memcache-2.2.5/memcache.c:26:
/usr/include/php/Zend/zend_alloc.h:49: error: expected specifier-qualifier-list before 'uint'
In file included from /usr/include/php/Zend/zend.h:270,
                 from /usr/include/php/main/php.h:35,
                 from /usr/local/src/memcache-2.2.5/memcache.c:26:
/usr/include/php/Zend/zend_hash.h:45: error: expected declaration specifiers or '...' before '*' token
/usr/include/php/Zend/zend_hash.h:45: error: expected declaration specifiers or '...' before 'uint'
/usr/include/php/Zend/zend_hash.h:45: error: 'ulong' declared as function returning a function
/usr/include/php/Zend/zend_hash.h:55: error: field 'h' declared as a function
/usr/include/php/Zend/zend_hash.h:56: error: expected specifier-qualifier-list before 'uint'
/usr/include/php/Zend/zend_hash.h:67: error: expected specifier-qualifier-list before 'uint'
/usr/include/php/Zend/zend_hash.h:87: error: expected specifier-qualifier-list before 'uint'
/usr/include/php/Zend/zend_hash.h:99: error: expected declaration specifiers or '...' before 'uint'
/usr/include/php/Zend/zend_hash.h:99: error: expected declaration specifiers or '...' before 'hash_func_t'
In file included from /usr/include/php/Zend/zend.h:270,
                 from /usr/include/php/main/php.h:35,
                 from /usr/local/src/memcache-2.2.5/memcache.c:26:
/usr/include/php/Zend/zend_hash.h:100: error: expected declaration specifiers or '...' before 'uint'
/usr/include/php/Zend/zend_hash.h:100: error: expected declaration specifiers or '...' before 'hash_func_t'

etc... (list of errors is long...)

Cristian
  • 66
  • 5
  • This has absolutely nothing to do with EC2, much more with the operating system you have installed on it. Please a) remove any mentions of EC2 b) specify your OS. – chx May 11 '11 at 19:14
  • The OS is already specified: amazon linux. Amazon Linux AMI release 2011.02.1.1 (beta) Kernel \r on an \m . I mention EC2 because that might ring a bell on someone that already had the same problem when trying to do this on it. – Cristian May 11 '11 at 20:17
  • Learn this: you are running CentOS. Who cares about what a shady bookseller calls its own thrown together image? http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/index.html?LinuxAMIUserGuide.html – chx May 12 '11 at 07:38

1 Answers1

2

What about simply installing php-pecl-memcache instead of compiling one ?

yaplik
  • 401
  • 2
  • 3
  • memcache service is already installed and working, anso php and pecl. What I'm having trouble with is the php module for it – Cristian May 11 '11 at 20:13
  • `php-pecl-memcache` is memcache client module for php, not memcached, and it's the package you're trying to compile – yaplik May 11 '11 at 20:17
  • I tried yum install php-pecl-memcache and it worked with no errors, then added extension=memcache.so to php.ini, restarted apache, but php still not finding memcache functions – Cristian May 11 '11 at 20:33
  • Wait, it worked! (I was testing the wrong server) Thanks! :) – Cristian May 11 '11 at 20:37