View previous topic :: View next topic |
Author |
Message |
eyn -
Joined: 11 Sep 2004 Posts: 32 Location: Canada
|
Posted: Sat Jan 08, 2005 8:32 am Post subject: PHP Upload Script |
|
|
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 |
|
 |
Glitch2082 -
Joined: 02 Dec 2004 Posts: 194
|
Posted: Sat Jan 08, 2005 8:51 am Post subject: |
|
|
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 |
|
 |
admin Site Admin
Joined: 03 Mar 2002 Posts: 1332
|
Posted: Sat Jan 08, 2005 10:50 am Post subject: Re: PHP Upload Script |
|
|
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 |
|
 |
eyn -
Joined: 11 Sep 2004 Posts: 32 Location: Canada
|
Posted: Sat Jan 08, 2005 6:55 pm Post subject: |
|
|
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 |
|
 |
|