Re[2]: [PHP] weird problems with file uploads

From: Date: Fri, 11 May 2001 13:54:12 +0000
Subject: Re[2]: [PHP] weird problems with file uploads
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-52463@lists.php.net to get a copy of this message
Hi Mpeglitis, >> I'm trying to implement a file upload on a website so people can send us >> files of their work and I'm having a fantastic success with text files. >> The problem comes when I try to upload binary files such as zip or mp3, >> when I get the typical file attack error mesage from the script, in >> other words, the is_uploaded_file() function does not recognise the file >> correctly. Mpeglitis> I do have the same problem on my WinNT box. I'm using Mpeglitis> php to store the file in a LargeBlob field in my mysql database. Mpeglitis> Text files upload successfully but binary files don't ( the Insert Mpeglitis> query fails ). If someone knows something let us know. well, is your form enctype="multipart/mixed" and method="post" ? did you use open($file, "rb"); (b is important 4 binary) did you use addslashes when storing the file in mysql ? well, you ought to specify the problem more exactly... ----------------------- EnjoY, Adaran (vielmailer@adaran.net) check http://www.adaran.net

« previous php.general (#52463) next »