Upload Limit

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
texanjohn
Forum Newbie
Posts: 5
Joined: Tue Nov 23, 2004 4:29 pm

Upload Limit

Post by texanjohn »

I don't know if this is the correct forum, but here it goes.

I have a phpbb site (2.0.10) running on RedHat box. I have installed Attachment Mod successfully. If you are not familiar with this mod, it allows people to insert attachments in their posts (like jpg, doc, etc.). Before finding the Attachment Mod, I had someone write a similar script to allow users to upload video files.

In the past, I have uploaded videos through my custom script there were several MB's in size. I have only used the Attachment Mod to upload relatively small attachments within my posts.

For some reason, I can no longer upload anything larger than 500KB. This is through either my custom script or the Attachment Mod. I am new to web hosting, and may have done something to cause this. I am at my wit's end and don't know what to do or check.

I wrote a third script because I could not find solution/problem, and it also will not allow me to upload anything greater than 500kb. It looks something like this:

<?php

if (isset($_FILES['tst']) && is_array($_FILES['tst']) && isset($_FILES['tst']['tmp_name']) && is_uploaded_file($_FILES['tst']['tmp_name'])) {
copy($_FILES['tst']['tmp_name'], 'upload/'.$_FILES['tst']['name']);
unlink($_FILES['tst']['tmp_name']);
echo 'Uploaded file: '.$_FILES['tst']['name'].', '.$_FILES['tst']['size'].' bytes';
}

?>
<form enctype="multipart/form-data" action="upload_test.php" method="post">
Send this file: <input name="tst" type="file" />
<input type="submit" value="Send File" />
</form>

I have triple verified the things that I know to check. The attachment mod has a nice admin interface, and I have everything set to allow up to 4MB attachments. My php config is set to allow up to 8MB uploads. I have looked at Apache config files today. It is the first time I have ever looked at them. I don't understand most it, but it seems pretty straight forward.

I don't know where to check. Any help would be greatly appreciated.

BTW, I can FTP all the data I want. I also tried the script above on another domain on the same server, and it again won't allow upload of anything bigger than 500KB.
djot
Forum Contributor
Posts: 313
Joined: Wed Jan 14, 2004 10:21 am
Location: planet earth
Contact:

Post by djot »

-
Hi,

What is the upload limit of the server? Upload and execute phpinfo.php and seach for "upload_max_filesize"


phpinfo.php

Code: Select all

<?php
phpinfo();
?>
djot
-
texanjohn
Forum Newbie
Posts: 5
Joined: Tue Nov 23, 2004 4:29 pm

Post by texanjohn »

Thanks. I have confirmed that php.ini contains

post_max_size = 8M
upload_max_filesize = 8M
djot
Forum Contributor
Posts: 313
Joined: Wed Jan 14, 2004 10:21 am
Location: planet earth
Contact:

Post by djot »

-
Hi,

And what about max_execution_time?? Did forget that.

djot
-
texanjohn
Forum Newbie
Posts: 5
Joined: Tue Nov 23, 2004 4:29 pm

Post by texanjohn »

djot wrote:-
Hi,

And what about max_execution_time?? Did forget that.

djot
-
max_execution_time = 60
max_input_time = 60
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

change it to something higher, cause the file may take over 60 sec to upload before server stops the upload

Code: Select all

<?php
ini_set("max_execution_time = 999");
?>
Post Reply