Why would a file upload time out...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Why would a file upload time out...

Post by Luke »

I have a php program that times out or something weird when I try to upload a file any larger than like a meg. I checked with my host that the upload-max-file-size is 16MB, the max size in the php file is 150000000000 Bytes... and yet if the file is larger than like a meg, it stops here:

Code: Select all

// check if no file selected.
            If (!IS_UPLOADED_FILE($_FILES['filetoupload']['tmp_name'])) {
                Echo "<tr><td class='content'><strong>Error: Please select a file to upload!. </strong></td></tr>";
                $ERROR_FUNCTION = true;
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

check the max post size.

also if indeed it is timing out, you might try using set_time_limit()
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

how come IS_UPLOADED_FILE is upper case? Does case not matter in php? (This obviously is not code written by me)
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

The Ninja Space Goat wrote:how come IS_UPLOADED_FILE is upper case? Does case not matter in php? (This obviously is not code written by me)
Function names are case insensitive but variable names aren't.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

completely news to me... haha wow!
Post Reply