<snip>
> I have a script that allows the user to browse his/her local hard
drive
for
> a file and email it as an attachment.  Text files come through OK but
any
> binary type file, e.g., JPEG or PDF arrive broken.  JPEG will show as
a
red
> X in my browser and Adobe will complain about the PDF.  I don't know
why???
</snip>

I recently encountered this issue and as far as I can tell it has
nothing to do with PHP.  In my case it was caused by some arcane problem
which occurred when installing the os and software (Apache, PHP,
PostgreSQL, etc.) straight from a RedHat cd instead of downloading and
compiling the source files.

Everything worked fine except POST method uploads.  Whenever I attempted
to upload a file it would not upload properly, and if I was using a
textarea to post a large chunk of code to a page for processing the code
would also get mangled somewhere after clicking the submit button and
before it was accessible via the $_POST array in the receiving script.

The only thing I was able to surmise was that the problem had something
to do with the "vanilla install" (as my sysadmin described it) of
Apache, PHP and PostgreSQL.  When I moved the project I was working on
to its permanent home (an actual Dell server with everything compiled
properly from the source) the problem disappeared altogether.

I also tested it on a number of other production machines here and it
worked fine on all of them.

If possible I would suggest you take your code to another machine and
test it out there as I would wager that the problem is within your
system, not your code or PHP settings.

I know this isn't an answer per se but I hope that is of some use and
will save wasted time in trying to figure out the problem.

Cheers,
Pablo.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to