SuperMach1 Posted September 2, 2006 Share Posted September 2, 2006 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.ThanksMach Quote Link to comment Share on other sites More sharing options...
corbin Posted September 2, 2006 Share Posted September 2, 2006 look up set_ini() Quote Link to comment Share on other sites More sharing options...
SuperMach1 Posted September 2, 2006 Author Share Posted September 2, 2006 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 :-[ Quote Link to comment Share on other sites More sharing options...
corbin Posted September 2, 2006 Share Posted September 2, 2006 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... Quote Link to comment Share on other sites More sharing options...
SuperMach1 Posted September 2, 2006 Author Share Posted September 2, 2006 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 scriptini_set("post_max_size","200M");ini_set("upload_max_filesize","200M");It still didnt work"The connection was resetThe connection to the server was reset while the page was loading."Any suggestions? Quote Link to comment Share on other sites More sharing options...
Joe Haley Posted September 2, 2006 Share Posted September 2, 2006 http://ca.php.net/manual/en/ini.core.php#ini.sect.file-uploadsLook for .htaccess on google.both those directives can be controlled via a .htaccess file Quote Link to comment Share on other sites More sharing options...
SuperMach1 Posted September 2, 2006 Author Share Posted September 2, 2006 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?thanksMAch Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 2, 2006 Share Posted September 2, 2006 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. Quote Link to comment Share on other sites More sharing options...
SuperMach1 Posted September 2, 2006 Author Share Posted September 2, 2006 Ok they got PHP Version 4.3.11Where 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? Quote Link to comment Share on other sites More sharing options...
SuperMach1 Posted September 2, 2006 Author Share Posted September 2, 2006 Ok I finally found one, thanks for all the help. Quote Link to comment Share on other sites More sharing options...
onlyican Posted September 2, 2006 Share Posted September 2, 2006 It is very rare for Shared hosting to allow you access to the php.ini fileSimple 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 firstso if php.ini is set to 8MB (standard) and you set MAX_UPLOAD_SIZE to 10MBThe limit is 8MBAgain, if php.ini is set to 8MB, and you set MAX_UPLOAD_SIZE to 4.Then the max upload size is 4 Quote Link to comment Share on other sites More sharing options...
SuperMach1 Posted September 3, 2006 Author Share Posted September 3, 2006 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? Quote Link to comment Share on other sites More sharing options...
onlyican Posted September 3, 2006 Share Posted September 3, 2006 Remember if your changing the Upload Size, you want to change the Time Out lengthin the php_ini file, you have a set time that a script will execute before dying Quote Link to comment Share on other sites More sharing options...
SuperMach1 Posted September 3, 2006 Author Share Posted September 3, 2006 What is the name for the timeout variable? Quote Link to comment Share on other sites More sharing options...
onlyican Posted September 3, 2006 Share Posted September 3, 2006 max_execution_time I think Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.