PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, November 13, 2022

[FIXED] How do I switch source of memcache to compile and for drush to enable it?

 November 13, 2022     drupal, memcached     No comments   

Issue

Ubuntu 14.04 LTS Drupal 7.43 PHP 7.0

I read in other posts:

I switched to the https://github.com/rlerdorf/php-memcached.git, then I can successfully build the extension.

So how do I actually switch to the other git repo to build?

Because of php 7.0, my current memcache fails to build; error below:

sudo pecl install memcache
...
config.status: executing libtool commands
running: make
/bin/bash /tmp/pear/temp/pear-build-rootNtdeGS/memcache-2.2.7/libtool --  mode=compile cc -I/usr/include/php/20151012 -I. -I/tmp/pear/temp/memcache - DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootNtdeGS/memcache-2.2.7/include - I/tmp/pear/temp/pear-build-rootNtdeGS/memcache-2.2.7/main - I/tmp/pear/temp/memcache -I/usr/include/php/20151012 - I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM - I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext - I/usr/include/php/20151012/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c      /tmp/pear/temp/memcache/memcache.c -o memcache.lo
libtool: compile:  cc -I/usr/include/php/20151012 -I. - I/tmp/pear/temp/memcache  -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootNtdeGS/memcache-2.2.7/include -I/tmp/pear/temp/pear-build-rootNtdeGS/memcache-2.2.7/main -I/tmp/pear/temp/memcache -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -  I/usr/include/php/20151012/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c   /tmp/pear/temp/memcache/memcache.c  -fPIC -DPIC -o .libs/memcache.o
/tmp/pear/temp/memcache/memcache.c:40:40: fatal error:     ext/standard/php_smart_str.h: No such file or directory
 #include "ext/standard/php_smart_str.h"
                                    ^
compilation terminated.
make: *** [memcache.lo] Error 1
ERROR: `make' failed

Solution

use git clone:

git clone https://github.com/rlerdorf/php-memcached.git

cd into folder

phpize

./configure

make

make install



Answered By - Anthony
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing