I've been successfully uploading graphic files to a directory on my php
server for more than a year. Suddenly, it no longer works, and after a lot
of probing, I'm at a loss to determine why.

I run PHP4.0.4pl1-3 as an Apache module on RedHat7. Files upload as
expected, but PHP no longer provides the content-type as it should following
the upload, in the variable: $HTTP_POST_FILES['file']['type']. Furthermore,
the uploaded file no longer matches the original file: it has the content
type prepended at the start of the uploaded file.

For example, a file that starts out like this before the upload:

--------------------------------
GIF89aB h  ooorod?.}zqSL7/' ZO{}! , B h hj0J 
Zdizhlpn&#64979; B|HchHZCh <snip>
-------------------------------

....looks like this after being uploaded:

--------------------------------
Content-Type: image/gif

GIF89aB h  ooorod?.}zqSL7/' ZO{}! , B h hj0J 
Zdizhlpn&#64979; B|HchHZCh <snip>
-------------------------------

Clearly, these problems are related -- it seems the content-type header is
being sent, but gets interpreted as part of the file instead of a header
about the file. I just can't figure out why, especially since this worked as
expected on the same hardware/software setup only days ago.

Thank you in advance for any thoughts or recommendations!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to