php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8210 file upload
Submitted: 2000-12-12 12:10 UTC Modified: 2001-05-14 20:17 UTC
From: cecot at dirbg dot com Assigned:
Status: Closed Package: HTTP related
PHP Version: 4.0.3pl1 OS: windows2000+apache-1.3.14+php4ap
Private report: No CVE-ID: None
 [2000-12-12 12:10 UTC] cecot at dirbg dot com
so when I use windows2000+apache-1.3.14+php4apache.dll php-4.0.3pl1 (php as apache module)
and I upload files and put them in MySQL table they do come full (only few bytes of them are inserted into MySQL) I do not know exactly how much.

I downgraded to windows2000+apache-1.3.12+php.exe php-4.0.2(php as CGI)

it works perfectly

on linux also works perfectly

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-12 12:36 UTC] cecot at dirbg dot com
I tried windows2000+apache-1.3.14+php.exe php-4.0.2(php as CGI) - works again, so I localize the problem in php4apache.dll I guess

here's the code if needed

if ($HTTP_POST_FILES["pic"] && $HTTP_POST_FILES["pic"]["tmp_name"] != "none"){
	$userRegistrationInfo["pic"] = addslashes(fread(fopen($HTTP_POST_FILES["pic"]['tmp_name'], "r"), filesize($HTTP_POST_FILES["pic"]['tmp_name'])));unlink($HTTP_POST_FILES["pic"]['tmp_name']);
	$userRegistrationInfo["pic_type"] = $HTTP_POST_FILES["pic"]['type'];
}

and after that something like
mysql_query("insert into person set ".implode(',', $userQuery));

 [2000-12-12 12:41 UTC] cecot at dirbg dot com
one more test
windows2000+apache-1.3.14+php.exe php-4.0.3pl1(php as CGI) is working

definetly the problem is in php4apache.dll

 [2001-02-25 07:45 UTC] sbergmann@php.net
Does the problem persist with PHP 4.0.4pl1 or the latest snapshot from http://snaps.php.net/?
 [2001-04-10 09:36 UTC] sniper@php.net
No feedback. If this happens with soon to be released PHP 4.0.5 too, reopen this bug report.

--Jani

 [2001-04-19 04:51 UTC] cecot at dirbg dot com
i haven't tried it my self, but mail@frank-wollenweber.de asked me to reopen it because in 4.0.5RC1 the bug is there
 [2001-05-14 20:17 UTC] sniper@php.net
RTFM. http://www.php.net/fopen

Pay attention escpecially on the part which says 
something about modes and having 'b' in it.

This is NOT a bug.

--Jani 

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 23:01:28 2024 UTC