Getting APC working

Getting APC working

Posted by: deadbilly
Posted on: 2009-09-27 15:28:00

So, I've installed APC using the related wiki documents. I've used a localized version of the DH PHP binaries instead of compiling my own (this could be the problem, I guess, but I don't know). The extension seems to load fine (shows up on phpinfo page).

My problem is that when I go to actually use it, php seems to segfault ("premature end of script headers" shows up in error.log). This happens in fastcgi mode, and only when attempting to retrieve a cached value (i.e. apc_add works, but apc_fetch crashes). The result is a 500 Internal Server Error. In normal CGI mode, it doesn't crash, but the cache isn't persistent (i.e. no value is ever retrieved).

Anyone else seen this problem or have any insight into what might be causing it? If I have to compile PHP, I will, it just seemed that the only custom feature I needed was a dynamic extension, so the pre-existing binaries would be sufficient.

Thanks!

Re: Getting APC working

Posted by: sXi
Posted on: 2009-09-27 17:21:00

Haven't tried APC against the DH default gear myself, but check apc.mmap_file_mask= in your php.ini (path exists and writeable).




How To Install PHP.INI / ionCube on DreamHost

Re: Getting APC working

Posted by: deadbilly
Posted on: 2009-09-27 18:15:00

Thanks for the reply. That's one of the first things I checked. I have a tmp dir under my home that's 777 (overkill?). This should work, shouldn't it?

Re: Getting APC working

Posted by: sXi
Posted on: 2009-09-27 22:40:00

Overkill, perhaps, but definitely writable tongue

I'll try out APC against the default binary later to see if I get the same result.




How To Install PHP.INI / ionCube on DreamHost

Re: Getting APC working

Posted by: sXi
Posted on: 2009-09-28 04:53:00

Fetching worked under fcgi (32 bit server here), but refreshes resulted in 500's. Forking? My results are likely due to an error on my part, but if APC was a necessity I'd go the full compile route.




How To Install PHP.INI / ionCube on DreamHost

Tags: internal server errorpremature end of script headers500 internal server errorcgi modeapcdhcrashescrashinsight