Reaper0167 Posted February 17, 2010 Share Posted February 17, 2010 i am currently with godaddy, i called them and asked what the upload file size limit was and they said that there is no limit, but, php sets the limit to 8 by default. what do i need to do to change that to 30? also, is there anything else in the .ini file that needs to be changed(memory, etc) to work with the change of the upload size limit? if anyone is familar with this, I would really appreciate your input, thanks. maybe there is way to change the size limit on the fly in the upload script? Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/ Share on other sites More sharing options...
Reaper0167 Posted February 17, 2010 Author Share Posted February 17, 2010 i found this thread on this site http://www.phpfreaks.com/forums/index.php/topic,212307.msg967307.html#msg967307 but it says nothing about what exactly should be on the php5.ini file someone told me that I should have the corrent tags on the ini file (kinda like php tags) Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1013470 Share on other sites More sharing options...
teamatomic Posted February 17, 2010 Share Posted February 17, 2010 ; Maximum allowed size for uploaded files. upload_max_filesize = 200M HTH Teamatomic Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1013472 Share on other sites More sharing options...
Reaper0167 Posted February 17, 2010 Author Share Posted February 17, 2010 so i would just create a file called 'php5.ini' inside that file i would just have 'upload_max_filesize = 20M' save it, upload to my root directory and that is it? of course without the quotes i don't want to doubt your knowledge, but have you personally done this without any problems? Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1013476 Share on other sites More sharing options...
idontkno Posted February 17, 2010 Share Posted February 17, 2010 so i would just create a file called 'php5.ini' inside that file i would just have 'upload_max_filesize = 20M' save it, upload to my root directory and that is it? of course without the quotes i don't want to doubt your knowledge, but have you personally done this without any problems? No, you would change the configuration file used by PHP. For a quick fix, use ini_set();. ini_set('upload_max_filesize', 20); Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1013480 Share on other sites More sharing options...
Reaper0167 Posted February 17, 2010 Author Share Posted February 17, 2010 ok, so then i would have ini_set('upload_max_filesize', 20); at the start of my upload script? also, shouldn't the the number be in kb instead of mb Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1013483 Share on other sites More sharing options...
idontkno Posted February 17, 2010 Share Posted February 17, 2010 ok, so then i would have ini_set('upload_max_filesize', 20); at the start of my upload script? Yep. Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1013486 Share on other sites More sharing options...
Reaper0167 Posted February 17, 2010 Author Share Posted February 17, 2010 The following had no effect. I still get the internal error 500 <?php set_time_limit(300); ini_set('upload_max_filesize', 20); ini_set('post_max_size', 20); ini_set('memory_limit', 100); ini_set('max_execution_time', 300); session_start(); include "connection.php"; blah blah blah, etc. Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1013493 Share on other sites More sharing options...
Andy-H Posted February 17, 2010 Share Posted February 17, 2010 You could use a .htaccess file if your host is running apache .htaccess <IfModule mod_php5.c> php_value upload_max_filesize = 200M </IfModule> Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1013499 Share on other sites More sharing options...
Reaper0167 Posted February 17, 2010 Author Share Posted February 17, 2010 windows server , iis7 Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1013502 Share on other sites More sharing options...
Andy-H Posted February 17, 2010 Share Posted February 17, 2010 Not looking good then m8 lol Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1013507 Share on other sites More sharing options...
Reaper0167 Posted February 17, 2010 Author Share Posted February 17, 2010 i uploaded a file called php5.ini to the root directory containing upload_max_filesize = 30M post_max_size = 30M memory_limit = 100M max_execution_time = 300 then i checked my phpinfo, and it was changed. but then when i go to my site, it tells me that i cannot connect to mysql. what does the above info have to do with mysql? any other ideas. somebody has had to come across this. i read a lot on google, others have this problem, but i can't find the solution. Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1013512 Share on other sites More sharing options...
PFMaBiSmAd Posted February 17, 2010 Share Posted February 17, 2010 Edit: Upon examining the godaddy faq information, their IIS7 hosting does support php. What exact type of hosting (shared, VPS, dedicated...) do you have, because the best available information is that shared Windows hosting at godaddy does not support php (even though they have installed php on their Windows servers and some php code will run.) When you contacted godaddy support about this, did you mention to them that your hosting was using Windoes/IIS? The link you posted Yesterday at 06:01:04 PM that contains a link to a godaddy article mentions that the information is for 'Linux Shared Hosting'. You also cannot set the two upload size settings using ini_set() statements in your code. And for the settings you can set that way, like 'memory_limit', the number supplied is in bytes unless you include an M or G to specify a larger value (you most likely were getting a runtime error because ini_set('memory_limit', 100); means 100 bytes.) Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1013640 Share on other sites More sharing options...
PFMaBiSmAd Posted February 17, 2010 Share Posted February 17, 2010 As to your post in the freelance section (normal members cannot post replies in that section), you should try to get godaddy to post their default Windows/iis7 php.ini in their FAQ section as a starting point. Assuming you are developing your php code on a Windows based system, you could use your php.ini from your development system (make sure to set things like display_errors, register_globals, magic_quotes_gpc, magic_quotes_runtime, allow_url_include ... to OFF.) You would also need to set extension_dir, SMTP, smtp_port, session.save_path ... to the correct values (from your existing phpinfo() output) and enable any extensions that you are using (mysql, GD,...) Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1013650 Share on other sites More sharing options...
Reaper0167 Posted February 18, 2010 Author Share Posted February 18, 2010 i added the extensions that i needed. and everything in my php5.ini file is the same as my default settings except, upload_max_filesize = 30M post_max_size = 30M memory_limit = 128M max_execution_time = 300 i still get the 500 internal server error. there must be something that I am missing. i tried to upload a 2.86mb file and it worked. then i tried a 7.88 and it did not work. and right now it is set for 5 minute timeout, but I am not even coming close to 5 minutes before the error Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1014130 Share on other sites More sharing options...
PFMaBiSmAd Posted February 18, 2010 Share Posted February 18, 2010 For debugging purposes, you need to set error_reporting = E_ALL and display_errors = ON (in the php5.ini would work) in order to get php to display the reason for the server error. Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1014136 Share on other sites More sharing options...
Reaper0167 Posted February 18, 2010 Author Share Posted February 18, 2010 i put error_reporting = E_ALL display_errors = ON in my php5.ini file and this is all i get for an error 500 - Internal Server Error There is a problem with the resource you are looking for, and it cannot be displayed. Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1014139 Share on other sites More sharing options...
Reaper0167 Posted February 18, 2010 Author Share Posted February 18, 2010 i have searched google and it seems that no one knows what the 500 error means. Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1014162 Share on other sites More sharing options...
Reaper0167 Posted February 18, 2010 Author Share Posted February 18, 2010 You have got to be joking. I am extremely upset. I called godaddy, again. (5th time in 2 weeks) This time a woman anwered. i asked her about the upload file size, she put me on hold, and when she came back, she said that my shared hosting plan only alows uploads up to 10mb. I can't believe no one else told me this. I guess it is time to move to a virtual dedicated server.(30 bucks a month) Quote Link to comment https://forums.phpfreaks.com/topic/192323-could-someone-please-help-me-with-my-php5ini-file/#findComment-1014278 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.