php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25873 local setting (.htaccess) of upload_max_filesize prevents file uploads to work
Submitted: 2003-10-14 16:21 UTC Modified: 2003-10-15 16:49 UTC
From: arnaud dot mlist1 at free dot fr Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4.3.2 OS: Linux
Private report: No CVE-ID: None
 [2003-10-14 16:21 UTC] arnaud dot mlist1 at free dot fr
Description:
------------
I think the problem is linked to Apache 2.0 but I am not really sure : could be the version of PHP (4.2.2) (but I cannot upgrade : it not my machine...)
Everythink works as expected on Apache 1.3 with PHP 4.3.2.

The problem : when trying to modify local setting of upload_max_filesize (in local .htaccess), phpinfo() shows the modification as expected, but file uploads don't work anymore (even with very small files of one byte). The function is_uploaded_file ($file) returns false in my scripts. Even when I use locally the same value as in the main php.ini, file uploads fail...
If I delete the line from the .htaccess, then everything works fine.

I also tried to modify locally other PHP settings to see if the problem was linked to modification of ANY local setting, but file uploads were not affected.

I know I should try to run PHP 4.2.2 on my Apache 1.3, to see if things work differently, but I thought I would ask first.

Thanks for anyone digging into this problem

Expected result:
----------------
$HTTP_POST_FILES['import_file']['tmp_name'] should not be empty

Actual result:
--------------
$HTTP_POST_FILES['import_file']['tmp_name'] is empty when local setting of upload_max_filesize is used

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-14 17:44 UTC] iliaa@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

Apache 2 code has change quite significantly since 4.2.2 and behaviour in 4.2.2 is not applicable.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 16:01:36 2024 UTC