Page 1 of 1

Failed upload of file - file too big?

Posted: Wed Nov 05, 2003 10:02 am
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

Posted: Thu Nov 06, 2003 2:48 am
by twigletmac
If you do:

Code: Select all

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

Mac

Posted: Thu Nov 06, 2003 2:56 am
by JayBird
can you show the script that you are using?

Mark

Posted: Thu Nov 06, 2003 10:21 am
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

Posted: Fri Nov 07, 2003 4:52 pm
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