Custom php.ini stopped working

About a year ago I setup a custom php.ini as per the steps in the wiki: which btw have since changed, they used to be the same as posted here (looks like drupal copy pasted from dreamhost or vice versa)

The other day this custom version stopped working, the server is just using its default php.ini as if this custom version doesnt exist. After seeing that the steps in the wiki had changed I went through them again, but still no luck.

I suspect it`s a change/missconfiguration on dreamhosts part, but support just refuse to help and directed me here.

So, any ideas? Ive done everything in my power to troubleshoot it, with dreamhost the only ones with access to the servers config I cant do any more.

I`m kind of stuck, any help much appreciated!

Thanks in advance.

Are you on VPS?

Maximum Cash Discount on any plan with MAXCASH

Yep on a VPS.

Create file ini.cgi in your cgi-bin folder with these contents:

export PHPRC=/home/[color=#CC0000]user[/color]/[color=#CC0000][/color]/cgi-bin
exec /home/[color=#CC0000]user[/color]/[color=#CC0000][/color]/cgi-bin/php.cgi

Set permissions for ini.cgi:

[color=#00CC00]$[/color] chmod 0700 /home/[color=#CC0000]user[/color]/[color=#CC0000][/color]/cgi-bin/ini.cgi


Replace: Action php-cgi /cgi-bin/[color=#CC0000]php.cgi[/color]

With: Action php-cgi /cgi-bin/ini.cgi

Maximum Cash Discount on any plan with MAXCASH

Thanks sXi, using what you posted I was able to get it working.

I added this to php-wrapper.cgi

export PHPRC=/home/[user]/[domaion.tld]/cgi-bin
exec /dh/cgi-system/php5.cgi $*

Seems to be working fine and I think its using the servers copy of php so I dont need a cron job to keep it updated.

Thanks again sXi, your a star :slight_smile:

This was great got my custom php.ini working again WOOHOO!

But now my subdomains dont don’t use the custom php.ini. Darnit!
How would I get bit working for the subdomains?

If your subs are in the form you can run this in any of them in which you want a custom php.ini

Maximum Cash Discount on any plan with MAXCASH

“Are you on VPS?”

Will a custom php.ini only work on vps?

You can setup a php.ini file to edit (or even compile your own php) on any DH server.

Maximum Cash Discount on any plan with MAXCASH

I already did, but as a lot others, it doesn’t seem to work. My phpinfo still says I’m using the ini file from the /etc/* folder

Well I’ll maintain you can setup a php.ini or even completely customise your own php environment on any DH server.

Did you first try an install as described in the Wiki?

Maximum Cash Discount on any plan with MAXCASH

I did exactly as described here:

I have no errors, it just doesn’t work.

Conf. file says /etc/php5/cgi
Loaded Configuration File says /etc/php5/cgi/php.ini
in phpinfo()

First undo whatever it is you’ve done. That could include deleting your cgi-bin folder and removing any edits the Wiki instructed you to make to your .htaccess file. Then run the script linked above.

Maximum Cash Discount on any plan with MAXCASH

I just got it to work with this link:

Although I had to copy the php5.cgi file instead.

But how do I then get it to work on my subdomains? Just the same procedure?

If the subdomains haven’t been corrupted with bad edits, simply run the script linked above. If you’ve already tried to apply Wiki on them then follow the previous advice or disregard it entirely, it’s up to you.

Maximum Cash Discount on any plan with MAXCASH