How to install APC and php4-memcache extension on Debian Sarge
To improve the PHP performance, I started playing with APC (Alternative PHP Cache) and memcached recently. However, to install the APC extension and PHP-Memcache client on Debian Sarge turned out to be not that trivial. Here I’d like to share my experience. It serves as my own personal record as well.
First of all, you need to have PHP4-dev and Pear package installed on your system:
apt-get install php4-pear php4-dev
In order to use the ‘pecl’ installation tool, you need to upgrade the bundled PEAR version to the latest:
pear upgrade pear-1.3.3
pear upgrade Archive_Tar
pear upgrade Structures_Graph
pear upgrade pear
pear upgrade-all
After the upgrade, you need one more step before proceeding with the pecl installation. If you don’t do the following you will have the error like this when compiling php-memcache: (configure: error: Cannot find php_session.h). Thanks to this post, I found the solution: you need to create the following symoblic link:
ln -s /usr/include/php4 /usr/include/php
Okay, final step is easy:
pecl install apc memcache
For APC, you may just choose not to compile with aspx-support, if it prompted you to select.
Now sit back, and wait for the compilation to finish. After it is done, you just need to enable the modules in your PHP.ini configuration file, which I am not going to touch upon here.
Good luck with your optimization for PHP code.
July 22nd, 2012 at 12:27 am
Hi! Someone in my Facebook group shared this site with us so I came to check it out. I’m definitely loving the information. I’m book-marking and will be tweeting this to my followers! Great blog and great style and design.
July 22nd, 2012 at 12:27 am
I am sure you had a few experience about handling smart comment spam. I love to hear from you and of course, your comments will definitely add value to this post.
August 6th, 2012 at 1:09 am
hey there is another online art aap. its a free online photoshop. you might considering looking at blastingart.com and its free to i really liked it
December 19th, 2013 at 7:18 am
I was also trying to complete the procedure after bundle pear version but after installation didn’t proceed the next steps so can’t complete the installation.
but your article complete my problem, i really appreciate with your work its really helpful to me and others to because most of the people are having same problem.
September 19th, 2014 at 8:00 am
One of me best friend tell me about this site for getting so much information php is one of the most difficult language for lean not possible but you are explaining here very well and its easy to understand.. Thank you so much for complete my problems..
May 6th, 2015 at 5:40 pm
It’s going to be ending of mine day, however before finish I am reading
this great post to improve my experience.
January 29th, 2017 at 12:13 am
hi!,I like your writing very much! proportion we keep in touch extra approximately
your post on AOL? I need a specialist on this house to resolve my problem.
May be that’s you! Looking forward to peer you.
February 14th, 2019 at 5:31 pm
It’s not at all simplistic to just always be making a gift of steps that most people have been selling.
June 11th, 2020 at 2:26 am
I truly enjoy looking through on this internet site, it holds excellent content. Beware lest in your anxiety to avoid war you obtain a master. by Demosthenes.
June 11th, 2020 at 2:29 am
This website definitely has all the info I wanted concerning this subject and didn at know who to ask.
September 27th, 2020 at 4:22 pm
bBHWXxLARpiVE
January 11th, 2021 at 2:04 am
Some genuinely choice blog posts on this site, saved to bookmarks.
January 24th, 2021 at 6:46 am
Just Browsing While I was surfing today I saw a excellent post concerning