Php.ini problem


#1

#!/bin/sh
CGIFILE="$HOME/abc.com/cgi-bin/php.cgi"
INIFILE="$HOME/abc.com/cgi-bin/php.ini"
rsync -a /dh/cgi-system/php5.cgi "$CGIFILE"
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”

it’s saved as one abc.sh.
i just tried to make my custom php5 into my website. but while i execute abc.sh, come out with one problem, -bash: ./abc.sh: /bin/sh^M: bad interpreter: No such file or directory.

anyone can help me with this. thank you.


#2

What about that ^M ? Are you editing that shell file with an editor that doesn’t support unix style line endings?

–rlparker
–DreamHost Tech Support


#3

[quote]it’s saved as one abc.sh.
i just tried to make my custom php5 into my website. but while i execute abc.sh, come out with one problem, -bash: ./abc.sh: /bin/sh^M: bad interpreter: No such file or directory.[/quote]
What did you use to edit abc.sh? The ^M leads me to believe you uploaded it from a Windows system with binary FTP mode. If for some reason you have to upload via FTP as binary you will want to run dos2unix on the text file.

Then also try changing
#!/bin/sh
to
#!/usr/bash

Customer since 2000 :cool: openvein.org


#4

i uses windows vista to edit the file, but i not meet any problem last week. now i need the cgi to use for another website. and it met this problem.


#5

$ dos2unix abc.sh
$ sh abc.sh

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#6

What sxi and Atropos7 said! :slight_smile:

–rlparker
–DreamHost Tech Support


#7

done. thank you :smiley: