Jump to content

Archived

This topic is now archived and is closed to further replies.

SuperMach1

php.ini with godaddy hosting

Recommended Posts

I have been working on an upload script lately and the max upload is 8mb.  I have found that you need to change the php.ini file.  Well with godaddy they dont give you access to this file.  Is there any alternatives to this?  I really need to get this change to a much larger number.

Thanks
Mach

Share this post


Link to post
Share on other sites
I was looking here http://us3.php.net/manual/en/function.ini-set.php and one guy said..

"Many settings, although they do get set, have no influence in your script.... like upload_max_filesize will get set but uploaded files are already passed to your PHP script before the settings are changed.

Also other settings, set by ini_set(), may be to late because of this (post_max_size etc.).
beware, try settings thru php.ini or .htaccess."

Is this true? and I couldnt quite figure out how to make a php.ini file  :-[


Share this post


Link to post
Share on other sites
Ummm, sorry, but I've never had to find a way around that since I host my own server on my computer and have direct access to my php.ini file...

Share this post


Link to post
Share on other sites
Well I dont know if that is correct or not, im in the dark here, not sure what is right or wrong.

I put this at the very top of my upload script
ini_set("post_max_size","200M");
ini_set("upload_max_filesize","200M");

It still didnt work
"The connection was reset
The connection to the server was reset while the page was loading."


Any suggestions?

Share this post


Link to post
Share on other sites
http://ca.php.net/manual/en/ini.core.php#ini.sect.file-uploads

Look for .htaccess on google.

both those directives can be controlled via a .htaccess file

Share this post


Link to post
Share on other sites
Ok well I talked to Godaddy and they said that I could make my own php.ini file and put it in my root directory.  Any hints on how to do this?

thanks
MAch

Share this post


Link to post
Share on other sites
see what version they got php running then download that version then change the settings as needed then.

dont know if that helps  or is a bad idear but i am assuming your host told you to do so, so do  it.

good luck.

Share this post


Link to post
Share on other sites
Ok they got PHP Version 4.3.11

Where would i find a php.ini code to download?
I was looking here, http://cvs.php.net/viewvc.cgi/php4.fubar/php.ini-recommended, But there is like a billion different ones, any idea which script to use?

Share this post


Link to post
Share on other sites
It is very rare for Shared hosting to allow you access to the php.ini file
Simple reason being, the php.ini is set for all people on that server.

using MAX_UPLOAD_SIZE can set a max upload size, but the one set in php.ini comes first
so if php.ini is set to 8MB (standard) and you set MAX_UPLOAD_SIZE to 10MB
The limit is 8MB

Again, if php.ini is set to 8MB, and you set MAX_UPLOAD_SIZE to 4.
Then the max upload size is 4

Share this post


Link to post
Share on other sites
With the way Godaddy works, if you have a certain hosting plan you can create your own php.ini file.  I did that and got the sizes changed but now they keep timing out or something.

"This document contains no data."

I believe thats what it says when I test upload a largge file.

Am I missing something?

Share this post


Link to post
Share on other sites
Remember if your changing the Upload Size, you want to change the Time Out length
in the php_ini file, you have a set time that a script will execute before dying

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.