Failed upload of file - file too big?

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
ejennings_98
Forum Newbie
Posts: 8
Joined: Tue Jun 10, 2003 1:28 pm
Location: Vancouver, CA
Contact:

Failed upload of file - file too big?

Post by ejennings_98 »

I have a simple file upload routine, and if I try to upload a file that is over 500k the upload fails. I get a bad post error or something like that. If the file size is under the 500k size, everything works just fine.

I found that I did not have a php.ini file setup, so I added one in the /usr/local/etc. The php.ini file has the upload and max post set to 8M, and the problem has not been fixed. How do I know that I have put the ini file in the correct location?

Thanks, Eric
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

If you do:

Code: Select all

<?php phpinfo(); ?>
it should tell you where it thinks the php.ini is.

Mac
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

can you show the script that you are using?

Mark
ejennings_98
Forum Newbie
Posts: 8
Joined: Tue Jun 10, 2003 1:28 pm
Location: Vancouver, CA
Contact:

Post by ejennings_98 »

Thanks for the feedback twigletmac, I will be trying some more tests on the weekend, and will definatly use the phpinfo command.

I will post some script after some testing,

Thanks, Eric
ejennings_98
Forum Newbie
Posts: 8
Joined: Tue Jun 10, 2003 1:28 pm
Location: Vancouver, CA
Contact:

Post by ejennings_98 »

Found the problem. My distribution is Mandrake 9.1. There was no php.ini config file and the PHP module was compiled with a non standard directory location for the php.ini config file. By using phpinfo(); I was able to determine the location of the config directory, and then set the max upload size to a larger number.

Thanks, Eric
Post Reply