When i upload relatively smaller docs using iPaper module, everything goes well.
When i try to upload files > 2MB, i get an error "Document failed to convert" in ipaper viewer.

I have increased 'post_max_size and upload_max_filesize values.
ini_set('post_max_size', '10M');
ini_set('upload_max_filesize', '20M');

That did not help.

Any idea what could be wrong?

K

Comments

kiranp’s picture

typo in the above comment.
Here's the actual setting:
ini_set('post_max_size', '20M');
ini_set('upload_max_filesize', '10M');
ini_set('max_execution_time', 900);

I'm noticing that the upload process terminates at about 60 seconds.
I've changed the code in ipaper.module to not let it time after 57 seconds.

Still, i can't get the Upload to finish. (It times out around 60 seconds).

gforce301’s picture

How big is the file you are trying to upload

kiranp’s picture

It's 2.5 MB

Smaller files (30K, 50K) seem to work fine.

WorldFallz’s picture

it may be obvious-- but did you confirm your php changes with phpinfo?

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

kiranp’s picture

yes, i did confirm the changes.

gforce301’s picture

Have you checked your error log? Is the script timing out or is the file size limit being hit for some reason?

kiranp’s picture

There are no errors in the log files. Script seems to be timing out.

Problem seems to pop up only when i upload using ipaper module.

When i use regular drupal file upload, i can upload pretty large files to my server without any problem.
When i use ipaper module, there are 2 sets of transfers (From my local machine to my server, and then from my server to scribd). Wonder if that has anything to do with the problem i'm noticing.

gforce301’s picture

Try increasing the memory of php.
Try jacking the scipt timeout to something ridiculous like 10 min just to see if it works.

rares’s picture

Hi, I wrote the code for that module.
What it does is upload the file to scribd.com through the API and then sends a request every 2 seconds to see if it has finished converting the document. It wants to have the conversion complete so it can fetch the plain text and thumbnail for the document before it finishes saving the node.
The module should stop waiting for the conversion to finish after max(57 seconds, your php.ini maximum_execution_time), at which point it returns a message to the user (drupal_set_message) and the document is shown (drupal_goto("node/$nid")). there should not be any page timeout.
I agree that with large documents you are likely to run into this, so maybe in a future version the implementation should be different. But even with this implementation, you should still see your document eventually.
also, from what I know, max_post_size should be set to about twice the size of max_upload_size, not the other way around.

@kiranp, maybe you can create an issue in the iPaper issue to shadow this forum thread?