uploading in PHP

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
karteek
Forum Newbie
Posts: 2
Joined: Thu Jun 26, 2003 9:38 am

uploading in PHP

Post by karteek »

Hi,

I wrote a code to upload files in PHP.I exectuted the code on two machines.I got the result only in one machine.So I copied the php.ini file on that machine into the machine in which the script failed.But still I am not able to upload files greater than 500KB on that machine.What else should I change so as to upload large files.
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

Don't know. Could be a dozen things that are preventing you from uploading. Care to share some code? Maybe a Url to a phpinfo() output would be helpful as well.
Galahad
Forum Contributor
Posts: 111
Joined: Fri Jun 14, 2002 5:50 pm

Post by Galahad »

If you are using apache, there is a setting (it's in "etc/httpd/conf.d/php.ini" on my machine) called "LimitRequestBody <somenumber>" that you may need to change. The default on my machine (Redhat 8.0) is 524288 or about 500k.
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

php.ini wrote: ; Maximum allowed size for uploaded files.
upload_max_filesize = 2M
That's my current setting. M = MB
Post Reply