Problem when installing APC


#1

I’ve tried to follow this step http://wiki.dreamhost.com/Pecl_APC in order to have APC activated on my mutualised server but it didn’t work at all.

I’ve followed this instruction http://wiki.dreamhost.com/Advanced_PHP_configuration (so maybe it’s not a “Custom PHP install” as required by this page) and launched “apcinstall.sh”.

I’m on PHP5 via FastCGI, i’ve placed “apc.so” in “/home/myaccountname/php5/extensions” and my php.ini configuration file is where I want it to be.

Where are my mistakes please ?

Thanks!


#2

It’s not a “Custom PHP install” as required by that page.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

So I must compile my own PHP ? Right ?


#4

Yeah, check out the Wiki for hints about installing PHP5. There are copy/pasta scripts there, but many users have problems with them (they need to be cleaned up). You seem to know your way around shell so just use them as a guide and you’ll be good to go I reckon.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#5

Thanks for your answer :slight_smile:


#6

[quote]So I must compile my own PHP ? Right ?

[/quote]

No. You need to use a custom php.ini, but you DO NOT need to compile PHP yourself to do so. There are instructions on setting this up on the wiki.


#7

But I already have my own customized php.ini file and APC didn’t work. Any idea ?


#8

Not without more details. Offhand, it could be any of a number of things:

  • you might not be using the PHP wrapper correctly to load your php.ini
  • you might not be loading the extension from the right location in php.ini
  • you might have compiled apc.so incorrectly
  • something else might be going on

There’s really no way for me to tell which one it is from the details you’ve provided.


#9

Hi,

Now APC is running (shown in phpinfo()), I still have a problem (sorry about that).

It seems that APC Uptime is always equal to “0 minutes” and the Start Time has the now time value.

I’ve read that PHP with (F)CGI run & restart for each pages requested. Is it true ? How can I keep APC running ?

Thanks :slight_smile:


#10

I’m not so familiar with APC, but nothing in a shared account is a persistent process. Even if you find a way to keep APC running, there’s a root process that goes around killing long-running processes in shared accounts.

-Scott


#11

Hovewever, there is a way to Keep APC running even if PHP run with FCGI. I’ve read that : http://www.brandonturner.net/blog/2009/07/fastcgi_with_php_opcode_cache/ but I didn’t find how do the same without root access on my DH Account.