Getting APC working

software development

#1

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!


#2

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

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

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?


#4

Overkill, perhaps, but definitely writable :stuck_out_tongue:

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

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#5

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.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost