Upon trying to upload any document to scribd using the API... I get this error. I am running WAMP on a server 2003 box with the "curl" extension enabled in PHP. I get these 2 errors when trying to upload:

•Request to Scribd.com failed. See the event log for more details.
•Scribd error #:

When I go to check out the log, I recieve this message:

Request failed (CURL) - failed creating formpost data - http://api.scribd.com/api?&access=public&file=%40sites%2Fdefault%2Ffiles...

Any help would be appreciated. Thank you :)

Comments

rares’s picture

Failed creating formpost data usually means that it can't find the file. Can you try with a different file? Maybe there is some strange character in the file name or the file didn't upload correctly?

Bigpappaj’s picture

I tried with several other files... same errors on them all. I checked to make sure all of them were being uploaded to the sites/default/files folder correctly and they were. I should also mention that at the moment I am running the site if offline mode... although I don't see that as being an issue. Thanks! And might I say... that was the fastest response ever... lol.

rares’s picture

I have no experience running Drupal on WAMP but maybe CURL will need a different way to reference files on a Windows server. I can't solve this since I don't have a Windows environment to test in, but I am pretty sure the issue is getting CURL to find the file.

I can see from the following posts that this is an issue in Windows
http://www.akchauhan.com/how-upload-file-using-curl/
http://forums.devshed.com/php-development-5/help-post-form-to-upload-fil...

...and the last post suggests that the file parameter needs to be different under windows ("C:\file\file.txt").
Unless you can figure out something else, you can bypass CURL for now by searching for
if (function_exists("curl_init")) { in ipaper.module
and replace that with if (!function_exists("curl_init")) {

Bigpappaj’s picture

I will check those posts and mess with curl to see what I can figure out and get back to you. Thank you very much for your fast responses.

Bigpappaj’s picture

I quickly decided I don't know enough about PHP to really know what I am doing. I bypassed it as you mentioned and everything is working fine now. Are there any repercussions that could come with doing it with this way?

rares’s picture

Title: •Request to Scribd.com failed. See the event log for more details. » Upload fails on Windows server

The module supports CURL and Fsockopen. The module tries to use CURL first (curl_init has to be missing for it to try the other method). They are equivalent so by making that change you are just forcing it to use fsockopen.

rares’s picture

Version: 6.x-1.0-rc8 » 6.x-1.1

In the latest version, there is an option on the admin pages to manually choose whether to use CURL or FOPEN. Can you try both and tell us if you have any success?