Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Uploading Files Error $_FILES empty!

Status
Not open for further replies.

fireburner69

Programmer
Aug 22, 2002
108
GR
echo "<pre>";
print_r($_FILES);
?>
<form action="a.php" enctype="multipart/form-data" method="POST">
<input type="file" name="filez">
<input type="submit">
</form>



The problem is that When I try to upload a file that is larger than 512k the $_FILES returns empty!

Files that are lower than 512k are working fine!

So it not any options from config files.!

And here is some setting from phpinfo!

post_max_size 8M;

I have searched everywhere but I can not find the reason why!
Also the server conf is

CentOS
Apache/2.0.46
PHP 4.3.2

In another server we have not problem uploading the file with the same script! so no errors in the scripts!

Does anyone have any ideas what could cause the problem to this?


Thanks for your time :)
 
Well Ok just found out!

I believed that apache did not have any other .conf file!

I just checked out that! Apache also includes some other files like
php.conf in the conf.d directory and this file inside has this lines of conf

<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524000
</Files>


and this could not allow images to be loaded! well not its fixed! :)

But beware of this!!

Have fun ppl


 
This is wrong!

I have setup the MAX FILE SIZE to 2M but that did not work too!

The only problem I had was the one I mentioned above :)

But thanks for your time :)

Have in mind also that MAX FILE SIZE can not change either the php.;ini conf I think it like a second limit! :) just for the page you have made :)

Anyway
that's all!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top