Jump to content
westman

php file upload (limit)

Recommended Posts

Hello everyone,

I hate to reopen this but in the last few days I have noticed that my upload is not working and it's also very slow before failing after 2-3 minutes.

 

I have not change my code but i have changed phpinfo.php

 

In my phpinfo.php I now have...

 

max_execution_time 7200

max_file_uploads 20

max_input_nesting_level 64

max_input_time 7200

memory_limit 221M

post_max_size 220M

upload_max_filesize 220M

 

any help?

Edited by westman

Share this post


Link to post
Share on other sites

Have you tried to check if your web-hosting server is preventing large files. Forexample all basic free hosts have PHP upload maxfile size few mb.

 

do phpinfo(); at some of your webpage and check if the web-host isn't preventing that.

 

My php upload file code looks like this

$_FILES['<myfile>']['size']/1024/1024) <= 30  //30MB
  • Check PHP.ini
  • .htaccess
  • phpinfo();

Share this post


Link to post
Share on other sites
  • .htaccess is empty
  • phpinfo(); i posted
  • PHP5.ini looks like this...

register_globals = off
allow_url_fopen = off
expose_php = Off
max_input_time = 60
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
memory_limit = 221M
post_max_size = 220M
file_uploads = On
upload_max_filesize = 220M
max_execution_time = 7200
max_input_time = 7200
session.gc_maxlifetime = 10800

Share this post


Link to post
Share on other sites

What is the error message when it fails? You should be checking for error messages in the $_FILES array and also make sure that PHP is reporting all errors.

Share this post


Link to post
Share on other sites

Anyway you could display your full code for both files uploading & form?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...