NameSilo

PHP upload limit

Spaceship Spaceship
Watch

dev99

Established Member
Impact
7
Hi
I have a file upload script. Now the script works fine and the file upload limit in php.ini is set to 100mb. But i just tried to upload a 30 meg file, and it didnt upload. Is there any restriction in cpanel/whm stopping me from doing this.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable DomainsUnstoppable Domains
AFAIK, the limit has to be modified in two files; last time I did that personally on a cPanel server, I had to do it in two different places. I'll ask the tech that usually does that for me as soon as he gets back online.
 
0
•••
Thanks for the reply, i have read somewhere it has to be modified in two different places, but i cant remember where that it.
 
0
•••
100 Mb is rather huge unless the upload takes place on a LAN (intranet). The script may time out after a certain number of minutes. You can get round this with set_time_limit - if your host allows.
 
0
•••
php.ini and httpd.conf
 
0
•••
Watch out for server timeouts. You can set a certain timelimit (in milliseconds) for page timeout.

-Steve
 
0
•••
thanks everyone for the replies
Where would you set this script timeout limit, also, which httpd.conf do i edit, as i said, im on cpanel.
 
Last edited:
0
•••
in all honesty you would be far better off to get the uploads via ftp then use php to process the uploaded file.

HTTP was never meant for such large transfers.
 
0
•••
Well its quite a small site, i am really looking for a simple solution, which is why i bought the script.

Does anyone know how to modify the time limit.
 
0
•••
- which httpd.conf do i edit
usually httpd.conf on a CPanel system is located in /usr/local/apache/conf/
Don't forget to restart Apache after you modify httpd.conf (service httpd restart).

- how to modify the time limit.
in httpd.conf search for something like this:

Code:
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300
 
0
•••
Thanks, is there any upload limit to change in httpd.conf.
 
0
•••
No upload limit in httpd.conf.

In php.ini you need to look to these variables:

Code:
max_execution_time = 30 ; Maximum execution time of each script, in seconds
post_max_size =  55M ; Maximum size of POST data that PHP will accept.
 
0
•••
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back