Custom PHP.ini


#1

Hello I am trying to set up custom php.ini. I followed http://wiki.dreamhost.com/PHP.ini
copied the default php.ini, created script wrapper, set permissions, but When I put
Options +ExecCGI
AddHandler php5-cgi .php
Action php-cgi /cgi-bin/php-wrapper.fcgi
Action php5-cgi /cgi-bin/php-wrapper.fcgi

in .htaccess, site does not load, and shows blank page. When I remove last line-Action php5-cgi /cgi-bin/php-wrapper.fcgi, site starts working, but it doesnt load my custom php.ini

What could be the problem?


#2

How did you edit your files? Some text editors will muck up line returns and such. Running dos2unix on the files may clean them up.

The wiki has so much in it, so I’m not sure which steps you used. Just using sXi’s script makes life much easier:
http://sxi.sabrextreme.com/dh-phpini


#3

Hi Scott thanks for replying. I followed PHP 5.2 fast cgi setup- Custom php.ini for a Single domain. There are two different directories inside a domain and both these directories are different projects, I am trying to set up custom php for both of them, I was able to do it for one directory but not working for another one. I followed same process for both.
regarding text editor problem, I double checked the files content, that is correct!!,
dh-phpini creates a editable file inside domain I think, I want to put it inside a particular directory in domain. Will it be able to do that?


#4

Each directory you want to uniquely control would need its own cgi-bin folder and corresponding .htaccess file.


#5

yeah I did the same but as I told you I followed PHP 5.2 fast cgi setup- Custom php.ini for a Single domain (http://wiki.dreamhost.com/PHP.ini) and When I put
Options +ExecCGI
AddHandler php5-cgi .php
Action php-cgi /cgi-bin/php-wrapper.fcgi
Action php5-cgi /cgi-bin/php-wrapper.fcgi

in .htaccess, site does not load, and shows blank page. When I remove last line-Action php5-cgi /cgi-bin/php-wrapper.fcgi, site starts working, but it doesnt load my custom php file