PHP won't update


#1

Hello,
So last night around midnight I was working to install APC via SSH on a non-VPS hosting plan (according to the Dreamhost Wiki, it should work on a shared environment). I modded my php.ini file, and then ran the install script via SSH which seemed to go smoothly. Though when I tested to see if it was working, I got an error “No cache info available. APC does not appear to be running.”

No problem, maybe my php.ini file didn’t update yet. So I run a phpinfo script, and sure enough, the APC modifications I’ve made in the php.ini file are not to be found. No problem, I’ll just patiently wait for Apache to restart or something.

In the mean time, I noticed my PHP version is 5.2.17. Thinking this makes updating php.ini more difficult, I decided to update the PHP version to 5.3.x via the web panel. Done, Dreamhost says wait 5-10 minutes to take effect. One hour later, still no luck. No problem, it’s 1AM, I’ll go to sleep and it’ll be updated when I awake.

Nope - still PHP version 5.2.17, and my php.ini file still hasn’t updated. Okay, I’ll send an email to Dreamhost tech support about it and maybe they can manually reset Apache for me. Six hours later, still no help.

tl;dr
I tried both modding my php.ini file, and updating my PHP version from 5.2.17 to 5.3.x via web panel last night, and I’m still waiting 18 hours later for changes to occur in either.

What should I do?


#2

What install script did you run for APC? Some older APC install scripts may end up making some changes to your .htaccess file that lock you in to PHP 5.2. If this is the case, you’ll need to back out those changes to see PHP 5.3.


#3

Thanks for the quick response.

This is the APC script I used:
http://wiki.dreamhost.com/Pecl_APC
[hr]
I was just able to verify that php.ini does update other variables like upload_max_filesize, etc, just none of these APC lines. Let’s see if Dreamhost will allow me to at least switch over to 5.2 CGI mode so I can kill the FCGI processes… I’ll post an update after…
[hr]
Ugh.

phpinfo still shows
Server API: CGI/FastCGI

When I run top in SSH, I only see bash, ssh and top, nothing else.

I don’t know what else to try.


#4

Andrew, how would I back out of the changes?


#5

The install script on that page seems to assume you’ve got some other customizations in place to have a custom php.ini. What instructions did you use for that?


#6

I was lazy and ran SXi’s Easy Auto Copy Script.

Other than that, there’s nothing I can think of.
[hr]
Oh yeah, and before I found you could update PHP through the web panel, I began running this PHP 5.4 install script:

Though at some point in the process it warned about some issue with IPv6 that may occur if I followed through, and asked if I’d rather cancel out of the build and revert the changes. At this point I had found the alternative way to update through Dreamhost webpanel, so I chose this opportunity to cancel out of the build.

Is it possible this changed the .htaccess file and locked me in to 5.2?
[hr]
I just took a look at my .htaccess file, and found only these lines…

#--- DH-PHP handlers --- AddHandler php-cgi .php Action php-cgi /cgi-bin/dispatch.cgi

It seems SXi’s Easy Auto Copy Script accidentally replaced all of the files contents with this instead of adding this information. Is there a way to restore my .htaccess file?
[hr]
Haha, I cleared out .htaccess and PHP instantly updated to 5.3.13… I can’t believe that’s all it was.

Thanks for pointing me in the right direction, Andrew.