Page 1 of 1

!!!Does http file uploaded started by PHP have a size limit?

Posted: Thu Apr 10, 2003 2:27 am
by 3dron
URGENT!!! Please help!

I created a client file upload/download area for one of my clients. I have everything working, directory creation, deletion, file size listing, directory size listings, etc...

But when it comes to my upload dialogue, files over a couple of megabytes fail. Smaller files upload without a hitch.

You chose the file name through a form field (superdat).
Here is part of my code:

if ($superdat_name != "") {
copy("$superdat", $dir.$superdat_name) or
die("Couldn't copy file.");

(It fails on the middle line. "Warning: Unable to open 'none' for reading: No such file or directory ")

Why do smaller files work, and others don't?

URGENT!!! Please help!

Ron R

Posted: Thu Apr 10, 2003 2:31 am
by twigletmac
Check the output of phpinfo(), look for the value of upload_max_filesize. It looks like the default is 2Mb which would explain why some of your uploads are failing. If you can, adjust the value of upload_max_filesize in your php.ini.

Mac

Posted: Thu Apr 10, 2003 2:40 am
by 3dron
Yes it's at 2M. I am going to have to ask my host tomorrow. Is 40mb an usually large request for a limit?

Is the php.ini per user (domain)? Or is it global for all php running of that server?

Ron R