WebFaction
Community site: login faq

I am attempting to install the memcached extension. I got the memcache module working fine, however it seems like the memcached extension is a little newer/better.

I tried the following command:

pecl install memcached

It all seemed to be going well, but at the end I received an error:

checking for libmemcached location... configure: error: memcached support requires libmemcached. Use --with-libmemcached-dir=<DIR> to specify the prefix where libmemcached headers and library are located
ERROR: `/home/vmichnowicz/pear/temp/memcached/configure' failed

So the I tried:

pecl install memcache  --with-libmemcached-dir=/usr/local/bin/memcached

That went well until I got a permission denied error. Haha... So is there any way I can get my memcached PHP extension on?

asked 31 Jan '11, 22:19

Victor Michn...
111
accept rate: 0%


Hi Victor,

It looks like if you want to install PECL modules you'll need to build your own Apache/PHP server. We've created a script for you to do just this, here is what you will need to do:

PHP 5.2

  1. Create a "Custom app listening on port" call it phpstack, note the port number you are assigned.
  2. SSH into the server into the new application directory (~/webapps/phpstack/)
  3. run: wget http://wiki.webfaction.com/attachment/wiki/MiscellaneousFiles/build_php_worker.sh?format=raw
  4. Check that the file is executable by running: chmod +x build_php_worker.sh
  5. Run the script ./build_php_worker.sh . PORT_NUMBER
  6. Wait for it to finish building and read the instructions at the end. (This can take 1 to 2 hours to complete.)

That's it!

permanent link

answered 31 Jan '11, 23:34

klynton
1.6k1210
accept rate: 41%

Cool, I'll try this later. I can also use it as an excuse to install PHP 5.3. I'll report back later with my success.

(01 Feb '11, 07:07) Victor Michn...

Hi Jan, i tried running both the instruction you gave above and the other two(2) found here :

https://wiki.webfaction.com/attachment/wiki/MiscellaneousFiles/build_php_worker.sh#L12

and here :

https://wiki.webfaction.com/attachment/wiki/MiscellaneousFiles/build_php_worker_531.sh

Unfortunately, they both start off well but then keep exiting without completing with this same error for all three instances:

Building the mod_fcgid Apache module... + cd /home/genitin/webapps/phpstack/.src + ls -d mod_fcgid ls: mod_fcgid: No such file or directory + cvs -z3 -d:pserver:anonymous@mod-fcgid.cvs.sourceforge.net:/cvsroot/mod-fcgid co . /dev/stdin: line 370: cvs: command not found

Any help please. I really need Memcache up and running soon.

Thanks in advance.

(19 Aug '11, 11:57) de Youngster

Sorry, i just realised from :

http://docs.webfaction.com/software/memcached.html#memcached-setting-up

that memcached is pre installed on webfaction. I'm still reading to see if it can be configured to work as desired.

(19 Aug '11, 12:25) de Youngster

It seems i still need to install the PECL modules, so please help re the error from my first comment i.e.

Building the mod_fcgid Apache module... + cd /home/genitin/webapps/phpstack/.src + ls -d mod_fcgid ls: mod_fcgid: No such file or directory + cvs -z3 -d:pserver:anonymous@mod-fcgid.cvs.sourceforge.net:/cvsroot/mod-fcgid co . /dev/stdin: line 370: cvs: command not found

Thanks.

(19 Aug '11, 13:28) de Youngster

I have just done a test build, with the above instructions, on your server without errors. I would suggest deleting your phpstack application and add a new application. Then download the script and try the build again. If you are still having problem, please open a support ticket.

(19 Aug '11, 14:45) timg ♦♦

I tried it one last time before opening a ticket. It turned out CVS wasn't installed on my server yet hence the errors. I was later contacted to try the installation again after support had completed the CVS installation. Then it worked perfectly.

Thanks Timg.

(21 Aug '11, 23:00) de Youngster

This script, as noted above, installs PHP 5.2. Is there any plans to update it to 5.3?

Maybe I could modify the script for 5.3 but this seems alot of work just to get WebFaction PHP to work with memcached and likely lots of other people want to do this.

(24 Sep '11, 09:45) carbonsink

A version for PHP 5.3 already exists here.

(24 Sep '11, 10:11) seanf
showing 5 of 8 show 3 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×34
×1
×1

question asked: 31 Jan '11, 22:19

question was seen: 9,734 times

last updated: 24 Sep '11, 10:12

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM