I’m trying to find a way to set a custom PHP include path without having to hard code it into each page. Traditionally I’ve done this via .htaccess but that doesn’t seem to be supported with the default PHP setup on Dreamhost. I tried doing the custom PHP ini thing but it didn’t seem to work when I followed the posted instructions on the wiki (and may be overkill for my needs if there’s a simpler solution). Any suggestions on the best approach on Dreamhost to solve this problem?
First are you talking about
I followed the PHP.ini instructions and it worked like a charm .
follow the steps for “Custom php.ini for a Single domain”
if that worked
all you need do make a directory to keep your includes in
and change line 494 of your php.ini in the cgi-bin
include_path = ".:/usr/local/php5/lib/php:/usr/local/lib/php"
TO something like
include_path = “.:/usr/local/php5/lib/php:/usr/local/lib/php:/home/(YOUR_USER_NAME_HERE)/php_includes”
Where did go wrong for you?
That’s it - either custom PHP.ini or using ini_set() or set_include_path().
What do you mean, didn’t seem to work? Did you get error messages?
Editing include_path in your ini is probably easiest.
For a quick and easy DreamHost PHP.INI installation, see link below.
Maximum Cash Discount on any plan with MAXCASH
Thank you for the help. I’m not really sure why it didn’t work before, I went back and checked the instructions again and they matched up with what I had done the previous time (about two weeks ago) and yet this time it worked. Last time I was getting server errors and I couldn’t figure out what was causing them. I should have tried doing it again before posting, my apologies.