Re: PHP 4.0 Bug #7130 Updated: HTTP file upload fails when the filename contains a space
| From: | Sybren Stuvel | Date: | Wed, 01 Nov 2000 16:03:44 +0000 |
| Subject: | Re: PHP 4.0 Bug #7130 Updated: HTTP file upload fails when the filename contains a space | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-36662@lists.php.net to get a copy of this message | ||
Ok, here it is:
The HTML file used for uploading the file:
<HTML>
<BODY>
<FORM ACTION="theScript.php" METHOD="POST">
<INPUT TYPE=FILE NAME="someFile">
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
And the PHP script (theScript.php)
<HTML>
<BODY>
$someFile = <?=$someFile?><br>
$someFile_name = <?=$someFile_name?><br>
$someFile_size = <?=$someFile_size?><br>
</BODY>
</HTML>
Try uploading a file with spaces in its name, and look at the values of the variables.
Greetz,
Sybren
Bug Database wrote:
> ID: 7130
> Updated by: stas
> Reported By: sybren.stuvel@wellance.com
> Status: Feedback
> Bug Type: HTTP related
> Assigned To:
> Comments:
>
> please provide a short script reproducing this behaviour
>
> Previous Comments:
> ---------------------------------------------------------------------------
>
> [2000-10-11 03:42:06] sybren.stuvel@wellance.com
> When using HTTP upload, as described in the online PHP manual, things go wrong when I try to
> upload a file that contains spaces. All PHP works fine, except for this. Assuming you uploaded a
> file called "with spaces.txt", the following variables are set:
>
> $somefile = null;
> $somefile_name = "with spaces.txt";
> $somefile_size = 0;
>
> I compiled PHP using the following configure options:
>
> ./configure
> --with-mysql=/opt/mysql
> --enable-track-vars
> --prefix=/opt/php4
> --with-apxs=/opt/apache/bin/apxs
>
> I use Apache version 1.3.12 in combination with Apache's Tomcat engine version 3.1.
>
> The only PHP specific thing I have in my httpd.conf is this:
>
> LoadModule php4_module libexec/libphp4.so
> AddModule mod_php4.c
> DirectoryIndex index.html index.jsp index.php index.htm index.cgi
> AddType application/x-httpd-php .php
> AddType application/x-httpd-php-source .phps
> php_value upload_max_filesize 20971520
>
> ---------------------------------------------------------------------------
>
> Full Bug description available at: http://bugs.php.net/?id=7130