Hi all,
I can upload plaintext files to the server fine, but when I try to
upload a pdf, it tells me that the file is damaged and could not be
repaired. The file is uploaded to the correct place on the server, but
is significantly larger (almost twice as large) as the original file
before upload.
Viewing the uploaded files in a web page (download.php) or accessing
the files directly gives the same message, so I believe the problem is
happening during the upload process.
Code snippet follows...
set_magic_quote s_runtime(0);
$pdfname="d".$j ob."-".$select.".pdf ";
copy($filename, addslashes("/home/images/$pdfname"));
unlink($filenam e);
header("Locatio n: admin.php?ID=$I D&add_design=Y& job=$storm");
I added the set_magic_quote s_runtime(0) and addslashes() function
calls. Permissions are set to 755 in directory /home/images/
Any advice on this would be much appreciated,
Cheers,
Ade.
I can upload plaintext files to the server fine, but when I try to
upload a pdf, it tells me that the file is damaged and could not be
repaired. The file is uploaded to the correct place on the server, but
is significantly larger (almost twice as large) as the original file
before upload.
Viewing the uploaded files in a web page (download.php) or accessing
the files directly gives the same message, so I believe the problem is
happening during the upload process.
Code snippet follows...
set_magic_quote s_runtime(0);
$pdfname="d".$j ob."-".$select.".pdf ";
copy($filename, addslashes("/home/images/$pdfname"));
unlink($filenam e);
header("Locatio n: admin.php?ID=$I D&add_design=Y& job=$storm");
I added the set_magic_quote s_runtime(0) and addslashes() function
calls. Permissions are set to 755 in directory /home/images/
Any advice on this would be much appreciated,
Cheers,
Ade.
Comment