开发者

PHP APC problem on Mac XAMPP development server

开发者 https://www.devze.com 2023-01-11 14:34 出处:网络
I have just set up PHP APC module on a Mac running OSX 10.6 using XAMPP. After a lot of fiddling around I thought I have it working but now when I load a URL the first site that is loaded is the site

I have just set up PHP APC module on a Mac running OSX 10.6 using XAMPP. After a lot of fiddling around I thought I have it working but now when I load a URL the first site that is loaded is the site that displays for every site hosted on the server.

These are the steps I followed to get it installed:


cd /tmp

wget http://pecl.php.net/get/APC-3.1.4.tgz

tar -xf APC-3.1.4.tgz

cd APC-3.1.4

/Applications/XAMPP/xamppfiles/bin/phpize-5.3.1

MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS="-arch i386 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -g -Os -pipe" CXXFLAGS="-arch i386 -g -Os -pipe" LDFLAGS="-arc开发者_如何转开发h i386 -bind_at_load" ./configure --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config-5.3.1

make

make test

sudo make install

sudo emacs /Applications/XAMPP/xamppfiles/etc/php.ini

Add the line to php.ini

extension=apc.so

sudo /Applications/XAMPP/xamppfiles/xampp stopapache

sudo /Applications/XAMPP/xamppfiles/xampp startapache


Any help on why this is occurring would be much appreciated.

Thanks


You should add the following line to php.ini:

apc.cache_by_default=0 # disable by default


I had the same problem with APC on XAMPP for Mac.

However, i managed to make eAccelerator to work: How to install eAccelerator for XAMPP on Mac OS X 10.7 Lion

Btw, in the APC readme, there are some suggested settings to be put in php.ini, I didnt follow that part. As the only thing PECL modified in php.ini is:

extension=apc.so

That alone didnt work for me.

0

精彩评论

暂无评论...
验证码 换一张
取 消