Re: PHP and upload



Jørn Dahl-Stamnes wrote:

Erwin Moller wrote:
Hi again,

Well that is strange indeed. I blindly assumed the code was failing on
all
uploads, but you claim it only fails on pdf. Sorry, my bad. :-)

Or I did not explain my self good enough...

Summarizing:
1) Your upload script works fine for all files except (some) pdf.

Yes, and make it ONE pdf file.

2) In your log you can see the call to the upload-script for all
succesfull uploads, but NOT when uploading this pdf. You find NO record
in apachelogs at all.

That is right. No entry in the log that indicate that the upload script
has been called when I get the error message.

With an older version of Firefox unde FC4 I get "Alert: Document contain
no data", while I with the latest Firefox under Windows 2000 get a message
that say "The connection to the server was reset while the page was
loading". And I get a different message with IE under W2k.

If this is the situation, my guess would be that apache2 is somehow
screwing up before php gets involved.

Can you check your apache errorfiles?
Anything out of the ordinary?

No errors in the error_log file.

I also tried:
* Open the original Word document on my W2k machine and save it as pure
txt * Start word and insert the txt file and do a simple format
* Save the document to a new filename.
* On FC4: Convert the new document file in OpenOffice and convert it to
PDF * Upload the PDF file.

This works OK. But FC4 is not able to view the PDF file.

I also had a friend to convert the first Word document to PDF on a Windows
platform (since I don't have the proper software under Windows). This one
also fails, but now I can view the PDF file on FC4 without problems.


Hi,

Beats me. :-/
What bothers me most is the fact apache is not logging the call to the
uploadscript.
I think I would focus on that first before worrying about conversions via
word/open office/etc.
I looks like the upload is failing at a very early stage...
Some currupt headers or something that confuses Apache enough to refuse to
log it.
I never have been in that situation before.

Maybe you could repost your problem in an apache newsgroup if noby in here
comes up with ideas.

Good luck.

Regards,
Erwin Moller
.



Relevant Pages

  • Re: Hyperlinks
    ... You have never told us how you are producing your pdf file, ... that you are adding an extension when the pdf maker already adds one. ... the download folder and then went to the root folder and deleted and ... Log on to your host, delete the old file, and upload the correct file. ...
    (microsoft.public.publisher.webdesign)
  • Re: PHP and upload
    ... Your upload script works fine for all files except pdf. ... and make it ONE pdf file. ... On FC4: Convert the new document file in OpenOffice and convert it to PDF ...
    (comp.lang.php)
  • Re: PHP and upload
    ... When I try this to a web-server running Apache 2 on a FC 4, ... You should check what PHP is doing. ... I can upload all kinds of documents, images, excel sheets etc. ... have also had it converted to PDF in MS Word that could create PDF ...
    (comp.lang.php)
  • Re: PHP and upload
    ... You should check what PHP is doing. ... The PDF document is created by OpenOffice 2.0 from a MS Word document. ... even if you upload it. ... The mime type of the file, if the browser provided this information. ...
    (comp.lang.php)
  • Re: problem metadata pdf
    ... why does the file properties of a pdf disappear after a upload/download ... SharePoint fields. ... when we upload office documents, the file properties (title, comments, ...
    (microsoft.public.sharepoint.portalserver)