PHP Upload Script

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
eyn
-


Joined: 11 Sep 2004
Posts: 32
Location: Canada

PostPosted: Sat Jan 08, 2005 8:32 am    Post subject: PHP Upload Script Reply with quote

I set up a upload feature using PHP after reading the tutorial here I have no problems with uploading small files but when you tried to upload those slightly larger file (say 3mb) the upload will not be completed. There's no error displayed, which means it is not a coding mistake since it works for small files. So what is the problem here? Anybody has any idea?

I tried this script using a standard paid server and it works. Is it some feature of Abyss that disallow large file creation/copying by PHP or is it my PHP's interpreter's error?
Back to top View user's profile Send private message Visit poster's website
Glitch2082
-


Joined: 02 Dec 2004
Posts: 194

PostPosted: Sat Jan 08, 2005 8:51 am    Post subject: Reply with quote

I think php sometimes doesn't upload files more than 2-3mb. Im not sure what its based on though. To make make sure its not the upload part use this:

Code:

$string = "the_upload_action_goes_here";
if(!$string) {
echo "The file wasn't uploaded succesfully.";
}

_________________
int main() {
cout << "Im Pro Apache";
cin.get();
}
Back to top View user's profile Send private message Send e-mail
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1332

PostPosted: Sat Jan 08, 2005 10:50 am    Post subject: Re: PHP Upload Script Reply with quote

Open php.ini and locate the line that starts with upload_max_filesize. It should be set to 2M (which means two megabytes.)

Set it to a larger value, save php.ini and enjoy.
Back to top View user's profile Send private message
eyn
-


Joined: 11 Sep 2004
Posts: 32
Location: Canada

PostPosted: Sat Jan 08, 2005 6:55 pm    Post subject: Reply with quote

Thank you for the replies. The problem is as admin has stated, the php.ini by default only allows 2mb as max upload size. You can change it to higher and it will work.

I spent sometime finding my php.ini, haha, didin't know it is in my Windows directory. :p
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group