Php 5.2 install problem

software development


I attempted to install php 5.2 following the wiki guidelines because I need the JSON extension. I followed the instructions (or so I thought) but according to phpinfo, I’m running version 5.1.2.
From what I can guess, whatever needs to be “told” to look for the php install isn’t looking in the right place (right to me, anyway).
This may be an Ubernoobie question, but should the php files be in a www (for lack of a better term) directory? right now, it’s in
while my site path is
and the ini file is in
is there a specific section of my php.ini that I need to change? Is there something I need to change in .htaccess (I used the default .htaccess from the wiki, but it didn’t change the install).
I’ve hunted 'round the 'net trying to find the answer to this, but to no avail, and I’m really trying to understand/learn. Please help!
Thanks-- Andrea


unfortunately, DH supports only PHP5.1.2 and we can’t do anything about it.

Somebody complained about the same problem before. I hope DH will upgrade their server so as to support PHP 5.2

In the meanwhile, I guess you may need to modify some parts of your PHP codes so that it is compatible with PHP 5.1.2

Save [color=#CC0000]$97[/color] (max discount) on dreamhost by using promo code: [color=#CC0000]97CRAZY[/color].


Thanks for the response!
As far as I’m aware, DH has php 5.1.2 installed on server, but we can install/compile other versions. This is the response I had from support when I sent in the question:



[quote]We run a pretty “lean” version of PHP and little used extensions such as JSON are not available. We do allow you to run compile your own local version of PHP so that you can include features, extensions, libraries
and modules not available in the DreamHost provided php installation.
This page explains how:


They have changed the script that install the php… and now, i can’t install even the php 5.1.2…

I have also contacted the suport, but they refuse to help me…

What is going on with DH?!?!


You need to understand that DreamHost will not support any installation of PHP other than their own. They have always been quite specific about this. The DreamHost Wiki article is peppered with warnings about this (Installing PHP5 > Compiling a Customized PHP 5).

With the possible exceptions of upload_max_filesize and post_max_size (which are tediously stingy), the DreamHost default PHP.ini should be fine for most users. Basic shell experience is needed to maintain your own version of PHP.ini that tweaks a few settings. You should only install your own version of PHP itself if you are (a) competent at using the shell and (b) in need of an unsupported library or extension, after which you are on your own.

Simon’s website
Save $100 on 1-year plans with promo code [color=#CC0000]SCJESSEY100[/color] (details)


Are you trying to revert to the default install or to compile your own? Which script was changed? Someone updated it (split into two parts to lessen opportunity of kill) on the wiki, but much (if not all) of that is user-built (in true wiki fashion).
I realize that I’m having problems because I am trying to do something that’s not within DH’s regular services (and therefore, not within the scope of their tech support)-- at least they offer shell access (which I hadn’t used for a gazillion years before this).
According to phpinfo, I’m still running 5.1.2. Thanks to re-introducing myself to the shell, I was able to install moodle much more efficiently than I had when I d/l to my pc, then unzipped, then ftp’d to the site. <yay for the non-tech girl!>


Did you remember to change your .htaccess file to tell the system to use your own version of PHP? It’s easy to forget after all the shell stuff.

Simon’s website
Save $100 on 1-year plans with promo code [color=#CC0000]SCJESSEY100[/color] (details)


Yup. Currently have:

AddHandler phpFive .php
Action phpFive /cgi-bin/php.cgi

Though I tried

PHP 5, Apache 1 and 2

Options ExecCGI
AddHandler fastcgi-script fcg fcgi fpl
AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php5.fcgi

(Didn’t work)
and most of the other possibilities listed in the wiki “Installing PHP5” (including the suggestions in talk). :-/
Don’t know what I did wrong. See php 5.2 install problem. Finally gave up and deleted everything. Will try again at a later time on another server (need the site for school, which starts Monday).
Good idea though-- thanks.