Horde & Custom PHP

OK. I have been at this for 2 days now. I have searched the forums here and the wiki.

I am trying to compile a custom PHP4 install for using horde on a sub domain.

I think I have the PHP installed correctly. But, how do I tell this domian to use it? It is still reading the PHP5 install on the main domain.

I am sure I will have questions once I get passed this. But this part is killing me.

The php.cgi file is in sub.domain.com/cgi-bin

The php install is in home/.server/username/php

PEAR is in a folder named PEAR inside the php folder.

The .htaccess file is in the sub.domain.com root. It says:
AddHandler phpFour .php
Action phpFour /cgi-bin/php.cgi

Any help is greatly appreciated. I would even pay if someone showed me a working install on a dreamhost shared server.

Thanks folks!!!


First, I never customerize PHP.ini file in DH before.

I give these comments based on my experiences of editing PHP.ini file locally.


I doubt that yours still points to PHP5. You can try to switch to PHP4 via DH panel --> Domains --> Manage Domains --> Web Hosting --> Edit

Btw, PHP4 is already installed in DH. Unless you need a specific version, you do not need to install PHP. You only need a custom PHP.ini file.

If you want to install your own PHP, you may want to read this http://wiki.dreamhost.com/Installing_PHP5

Save $97 (MAX Discount) with code: [color=#CC0000]97YES[/color] Sign Up NOW or More Codes here

It could be that the OP is trying to run Horde 2.x. I think there have been lots of problems with people trying to run anything but Horde 3 under PHP5. Only the OP can say, though.

Free unique IP and $67 off with code [color=#CC0000]LMIP67[/color] or use [color=#CC0000]LM97[/color] for $97 off. Click for more promo code discounts


Let’s see if I can be more specific.

I am installing my own version of PHP4 as directed in the DreamHost Wiki http://wiki.dreamhost.com/Installing_PHP4 .

I am trying to use Horde 3.1.4.

I am also installing PEAR so I can use some modules the DH doesn’t have installed. These modules are required by Horde.

Base on php_info, it still states php5.

It has something to do with the bashrc, bash_profile, and htaccess files and how they work when installing PHP as a CGI.

I don’t think there would be a problem if we could run PHP as an Apache module.

It would be cool if anyone who has successfully setup Horde 3.X explain which part I am missing.

I’m off to find a host that can handle Horde as plan B. The client may just have to pay extra…

Then your custom install of PHP4 has, in one way or another, failed.

That failure may be nothing more than improperly specifying the handler in .htaccess, or it could be other things.

bashrc and bash_profile should have nothing to do with it. .baschrc, .bash_profile, and .pearrc have to do with PEAR installation, but you should first get your custom PHP iinstall “working” (recognized) and then add the PEAR stuff you need - this would eliminate on whole set of potential error/confusion.

It is obvious that you are frustrated, but this is an “old” pattern: A user claims he did stuff “as directed by wiki page X”, but does not provide the script that they used, complete with any edits or settings, and we have no way of knowing exactly what they have, or have not done, or whether they have tried before and failed, and cleaned-up up after themselves, or tried repeatedly and not cleaned-up after themselves before trying again, or what, if any, error messages were displayed from the script they ran, etc…

The wiki warns that this is “advanced stuff”, and cautions that there is no support for it … this is obviously not for everyone.

Then do that - you can run mod_apache on DreamHost, though that would still likely leave you with issues, as not all functions are available in the DH mod_php, and you may still have module issues.

I agree! It would be even cooler if that someone had the ability to “just know” exactly what you did, or didn’t, do or in some other way be enough of a mind-reader to just “automagically” know why your installation is not being used (as indicated by your phpinfo() output). Hey, we can guess, but it is not that simple.

Well that is certianly an alternative, and I guess makes it unnecessary to continue to try to get it sorted. :wink:



You obviously have me mistaken for someone who is bitter at DH or at the support here. That is not me.

I know the instructions say it is advanced, not for everyone, and not supported officially.

I am here asking for support from the community. I provided that I used the script on the wiki for compiling PHP4.

I also provided some locations of files that I thought were pertinent to the discussion.

If there is some info I left out that would be helpful in troubleshooting, by all means tell me so I can provide it.

I am letting the snideness I hear in your comments go because I understand how longtime users can be frustrated by newbs. The truth is I have been a DH customer for over 4 years. Any issue I ever had, I found the solution in here. This is the first time I had to ask…

Anyhow, I read the if PHP is run as CGI, than htaccess will be ignored as far telling where to look for the PHP installation.


Actually that was not at all how I perceived you; I just perceived you as someone who was frustrated that he had not gotten things to work the way they wanted, and am at a loss as to why you would think I interpreted your post that way.

I realize that, and that is great- it is how we all learn how to troubleshoot problems. What I was trying to point out was that just saying “I used the script on the wiki for compiling PHP4”, is only marginally helpful, in that it is a only a starting point, for anyone trying to help you figure out what “went wrong”. For instance, you could have had issues with anything on that page from the preparation of the script itself (did you use vi?) to the setting of various items/variables in the script ("# The domain in which to install the PHP CGI script.

While you did provide some file locations, you are not completely clear what they are. Is “sub.domain.com” located at “/home/.dataglob/username/sub.domain.com”, and is that what you mean by “the subdomain.com root”?

I’m sorry if you perceived “snideness” in my comments, and I apologize profusely for whatever carelessness in my writing resulted in leaving that impression with you. I was only trying to point out that it is really hard to tell where you might have a problem in such a complicated process given your “generalized” report of what was done.

Well, I’m sure you have read something similar to that, but that is not entirely correct. It is true that some php related .htaccess directives “will be ignored” (not work) when running PHP-CGI, but addhandler/action directives are not one of them. In fact, it is that very part of .htaccess that tells the webserver to parser your “.php” pages using* your “new” PHP; and that is where I believe you problem most likely lies.

I’m obviously not helping here, so I’ll just lurk through the rest of this thread and encourage you not to give up (unless, of course, you really do intend to use another host for this, as you indicated); I genuinely hope that some of the other more knowledgeable users here can get help you get it all sorted. PAX :slight_smile:



I ahven’t had the time to troubleshoot this since the weekend. I plan to pick it back up in a few days.

I will post back to this thread when I have an update.

I am trying to run Horde 3.1.4 on a self compiled PHP4 installation.

Thanks for the all the help guys.