Stooney Posted December 27, 2007 Share Posted December 27, 2007 I have private site where the admin can upload files. I need to put a php.ini file in that directory to increase the upload size and post size. Below is what I have. It just doesn't seem to work. I know the upload script works but when I try it with say a 50mb file, after a long wait the script just stops without the file being uploaded. I've never worked with the php.ini so im pretty clueless. I read the memory_limit should be higher than post_max_size so that's why it's like that. And I'm assuming the max_execution_time affects how long the script will wait for the file to be uploaded so I set that to 20 minutes (for large files). Am I missing something? php.ini upload_max_filesize:500 M max_execution_time:1800 memory_limit:550 M post_max_size:500 M Quote Link to comment https://forums.phpfreaks.com/topic/83343-solved-phpini/ Share on other sites More sharing options...
rajivgonsalves Posted December 27, 2007 Share Posted December 27, 2007 you should use ini_set in your scripts for the requested settings http://php.net/ini_set Quote Link to comment https://forums.phpfreaks.com/topic/83343-solved-phpini/#findComment-424007 Share on other sites More sharing options...
Stooney Posted December 27, 2007 Author Share Posted December 27, 2007 Will do raj, thanks. Just to be sure, are my settings correct/valid? And are there any others i would need to set that would affect file upload sizes? Quote Link to comment https://forums.phpfreaks.com/topic/83343-solved-phpini/#findComment-424010 Share on other sites More sharing options...
rajivgonsalves Posted December 27, 2007 Share Posted December 27, 2007 mostly some servers don't allow you to change the php settings, you can do it in various ways, ini_set, .htaccess.. if u have a virtual dedicated hosting or a dedicated hosting its easy, ini_set is only for the current running script and does not affect the actual php settings on the server. Quote Link to comment https://forums.phpfreaks.com/topic/83343-solved-phpini/#findComment-424019 Share on other sites More sharing options...
Stooney Posted December 27, 2007 Author Share Posted December 27, 2007 Alright, looked into it and upload_max_filesize and post_max_size can't be set through ini_set. So I'll have to do a php.ini in that folder. I'll email my host and see if they allow me to change that setting. (I use 1and1.com linux business package). If they don't allow the setting to be changed, is there any alternative to uploading methods? Or do I just need to find a different host or dedicated server to use? Quote Link to comment https://forums.phpfreaks.com/topic/83343-solved-phpini/#findComment-424026 Share on other sites More sharing options...
rajivgonsalves Posted December 27, 2007 Share Posted December 27, 2007 you will have to check with your hosting provided if they can modify it for you since there is a requirement, because there is also a apache setting thats need to be done... Quote Link to comment https://forums.phpfreaks.com/topic/83343-solved-phpini/#findComment-424035 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.