Active
Project:
iPaper
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 May 2009 at 01:02 UTC
Updated:
10 Oct 2009 at 05:07 UTC
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
Comment #1
rares commentedFailed 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?
Comment #2
Bigpappaj commentedI 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.
Comment #3
rares commentedI 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.moduleand replace that with
if (!function_exists("curl_init")) {Comment #4
Bigpappaj commentedI 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.
Comment #5
Bigpappaj commentedI 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?
Comment #6
rares commentedThe 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.
Comment #7
rares commentedIn 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?