Php.ini and upload size issue


#1

Hi everyone
so im using a file upload system from xtrafile.com
ive successfully installed this in 2 of my other servers from different hosts. But i ran into a problem when i got to use this host service. The other sites provided me with a php.ini premade by them and all i did was change the upload limits in them. Would it be possible for you guys to maybe send your php.ini file to me? I have very limited web coding knowledge and it would makes things easier if someone can help me out =)


#2

The wiki is your friend:
http://wiki.dreamhost.com/index.php/PHP.ini

Oh, and we’re customers in here, just like you, but we love to help. The control panel has a Support section if you really want to contact support.

-Scott


#3

alright so i followed the 1st steps by making a php-update.sh
then used Putty and logged in, but when i try to execute the ./php-update.sh it gives me the error

“bad interpreter:no such file or directory”

what should i do guys? did i do something wrong?


#4

Can you post your php-update script? Just X out your website directory in the path, but leave the rest. My first suspicion is that your #!/bin/sh has a typo. Did you also do the “chmod +x php-update.sh” bit?

-Scott


#5

well i basically copied what was in the wiki:

#!/bin/sh
CGIFILE="$HOME/X/cgi-bin/php.cgi"
INIFILE="$HOME/X/cgi-bin/php.ini"
cp /dh/cgi-system/php5.cgi "$CGIFILE"
cp /etc/php5/cgi/php.ini “$INIFILE”

perl -p -i -e ‘
s/.post_max_size./post_max_size = 9999M/;
s/.upload_max_filesize./upload_max_filesize = 9999M/;
’ “$INIFILE”


#6

I suspect that however you edited didn’t put UNIX line breaks in the file. Had I more closely read the wiki article, I would have seen the exact error you mentioned (and I quoth):
If you get the error message: “bad interpreter: No such file or directory”, there is probably an unseen problem with the formatting of the file.
Run the following command to convert it to proper Unix format before calling the script again: dos2unix php-update.sh

-Scott


#7

yay it worked!
omg i totally over looked that part in the wiki, im so sorry to cause you trouble =(

thanks a bunch scott!


#8

uhoh too early to celebrate.

so i got the php.ini and php.cgi made, but now when i try to access my sites in the directories it says:

"The requested URL /cgi-bin/php.cgi/main/index.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

strange because now the url has the “/cgi-bin/php.cgi” in front of it =( so now all my sites cant be viewed. How do i fix that?


#9

How about trying to dos2unix trick on your .htaccess file too?

-Scott


#10

This happens to me too…
"The requested URL /cgi-bin/php.cgi/brainphantom/index.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

http://[my domain]/[something]/cgi-bin/php.ini works fine, and shows my adjusted upload limit. And no, dos2unix doesn’t seem to be the problem. Help!!


#11

I don’t understand where the /[something]/ sub-directory comes from in your path. If you followed the wiki article precisely, the php.cgi and php.ini files should be in /yourdomain/cgi-bin/

It might help if you post the contents of your .htaccess file.

Mark


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)


#12

Oh you’re right. I guess it doesn’t work if you put it in sub-dir. I made a new subdomain and it works fine now. Thanks!