|
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2007-07-18 02:05:36 - In reply to message 10 from Indra Syafruddin
Those values indicate that the problem is not with magic quotes. It may be a specific problem with that version of PHP you are using with problems.
Are you using any PHP optimizer extension with that version of PHP with problems?
Can you mail me the script, attachment file, and the php.ini file you are using so I can test it here with that version?
![Picture of Indra Syafruddin Picture of Indra Syafruddin](/graphics/unknown.gif) Indra Syafruddin - 2007-07-18 09:34:22 - In reply to message 11 from Manuel Lemos
The email doesn't work on my hosting provider, so I can't access php.ini file. But I will send you the script and phpinfo link for the not-working site.
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2007-07-18 23:15:54 - In reply to message 12 from Indra Syafruddin
The ZIP file that you sent me is already corrupted.
I tried your script from the command line and forged some values for the attachment array to use. The message was built correctly in either PHP 4.3.3 and PHP 4.4 .
Anyway, you have magic_quotes_gpc on. I think it should not affect uploads but I don't know about past PHP versions. I cannot try PHP 4.3.3 from a Web server here to test.
What you can do to check if that PHP version is corrupting your file uploads is to compare the uploaded file and the file you have before uploading. If the files differ, the problem is with that PHP version.
![Picture of Indra Syafruddin Picture of Indra Syafruddin](/graphics/unknown.gif) Indra Syafruddin - 2007-07-19 02:04:53 - In reply to message 13 from Manuel Lemos
I managed to save the file first before the email is sent. The uploaded file is not corrupt, I sent you the file by email. Meanwhile, I will try to set magic_quote_runtime to off.
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2007-07-19 02:38:29 - In reply to message 14 from Indra Syafruddin
The file you sent me is named test.rar but it is a zip file not rar. Are you sure your problem is not really caused by a file extension confusion?
![Picture of Indra Syafruddin Picture of Indra Syafruddin](/graphics/unknown.gif) Indra Syafruddin - 2007-07-19 07:22:44 - In reply to message 15 from Manuel Lemos
I don't think so. it is actually a zip file, but in uploading test, I set the name as "test.rar", just to make sure that all upload process overwrite the test.rar.
I have also tried to upload a jpg file, and the email still returns corrupt attachment.
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2007-07-19 17:45:11 - In reply to message 16 from Indra Syafruddin
I tried your script under PHP 4.3.3 on Linux from the command line and it worked well as expected.
I have no way to try it under Microsoft IIS Web server as you run it to try the exact same conditions on which you experience problems.
Anyway, since you run the same script under PHP 4.4 without problems, I deduct that the problem is very specific to the environment you have.
Since I could not figure what exactly caused your problem, I am afraid have no way to do anything to avoid it. Sorry.
![Picture of Indra Syafruddin Picture of Indra Syafruddin](/graphics/unknown.gif) Indra Syafruddin - 2007-07-20 02:19:31 - In reply to message 17 from Manuel Lemos
That's ok, thank you for your effort.
![Picture of Hamed Saatchi Picture of Hamed Saatchi](/graphics/unknown.gif) Hamed Saatchi - 2008-09-05 11:30:59 - In reply to message 17 from Manuel Lemos
I had this problem and when I change the file like below :
$file = $_FILES["clima"]["tmp_name"];
echo $file;
$image_attachment=array(
"FileName"=>$file,
"Content-Type"=>"automatic/name",
"Disposition"=>"attachment"
);
it's solved, but there is a problem. It's attach a file with a temporary name, not the same name of the file. when I rename the attach file, it'll open good.
for example I select this file "31195456.701" on my pc and after submit the form, I get an e-mail with an attached file and with this name: "phpfGYG0e.dat"
All the files are with .dat extension
Please help me to solve it.
|