yes another php.ini problem

yes another php.ini problem

Posted by: teamstevo
Posted on: 2007-02-18 11:28:00

I have followed the wiki step for step.

First I made a php-copy.sh and put it into my server direrectory that hold all my domains.


#!/bin/sh
CGIFILE="$HOME/domain.com/cgi-bin/php.cgi"
INIFILE="$HOME/domain.com/cgi-bin/php.ini"
rsync -a /dh/cgi-system/php5.cgi "$CGIFILE"
# REMOVE THE FOLLOWING LINE TO CREATE THE UPDATE-ONLY SCRIPT:
cp /etc/php5/cgi/php.ini "$INIFILE"

perl -p -i -e '
s/.*post_max_size.*/post_max_size = 100M/;
s/.*upload_max_filesize.*/upload_max_filesize = 100M/;
' "$INIFILE"


Ok I did all the cron jobs and everything using putty. I had no errors or problems there. Now everything seems right untill I put the .htaccess file into my domain.com directory i get 2 errors, one is a 404 error, and one if a this .php file couldnt not be found at cg-bin/php.ini . I copied the


Options +ExecCGI
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php.cgi


from the wiki, but it doesn't work. Anyone have any solutions or can help me out.

Re: yes another php.ini problem

Posted by: rlparker
Posted on: 2007-02-18 12:31:00

You *did* replace the "domain.com" in the scripts with "yourdomainname.tld", right?

--rlparker

Re: yes another php.ini problem

Posted by: teamstevo
Posted on: 2007-02-18 14:32:00

yes i did, I just put that their in place of my real domain

Re: yes another php.ini problem

Posted by: teamstevo
Posted on: 2007-02-18 17:31:00

please someone help me.

Re: yes another php.ini problem

Posted by: Raz2133
Posted on: 2007-02-18 18:19:00

In reply to:

please someone help me.


Firstly, confirm that you have the directory /yourdomain.com/cgi-bin/ and that this directory contains the files php.cgi and php.ini

The instructions in the wiki article do work, but you need to be very careful to follow them *exactly*.

Mark

Re: yes another php.ini problem

Posted by: teamstevo
Posted on: 2007-02-18 20:39:00

sigh............

Yes I have a cgi-bin directory in my top level domain and those 2 files are there.

Re: yes another php.ini problem

Posted by: Raz2133
Posted on: 2007-02-18 21:00:00

In reply to:

sigh............


I am sorry for the obvious question, but, in my experience, most problems people have when trying this procedure turn out to be simple ones, usually caused by them missing a step or two in the wiki instructions, so it is best to cover the obvious things first.

In reply to:

Yes I have a cgi-bin directory in my top level domain and those 2 files are there.


Let me just confirm again, the cgi-bin directory should be in the root of the web-directory for the domain or sub-domain.

If you have sub-domains configured as sub-directories of your parent domain (some ex-cPanel users prefer to do it this way), you need to install php for the sub-domain that requires it, installing it in the parent domain will not automatically provide the custom install to the sub-domain, even though it is configured as a sub-directory.

Also, some recent problems along these lines have been resolved by running the dos2unix utility on the install script and/or the .htaccess file to correct the CR/LF differences between the editor used and what is required.

http://discussion.dreamhost.com/showflat.pl?Cat=&Board=forum_troubleshooting&Number=65587&page=&view=&sb=&o=&vc=1

Mark

Re: yes another php.ini problem

Posted by: teamstevo
Posted on: 2007-02-19 17:05:00

what command do I type into the shell to dos2unix the .htaccess file?

Re: yes another php.ini problem

Posted by: khatfield
Posted on: 2007-02-19 17:07:00

Not sure why you would need to? If you uploaded the file just upload it Ascii and not binary. Otherwise, if you created it on the server, there is no need.

Save

Re: yes another php.ini problem

Posted by: Mousee
Posted on: 2007-02-19 17:10:00

The command and program are both the same.
So literally:

In reply to:

dos2unix .htaccess


... would do the trick wink

Tags: php cgihtaccess filecgi bincron jobshome domainmax sizephp5100mwikiputtyoptions execcgiphp copycgi systemphp filersync404 erroruntilldhsh