Convert API failing in certain situations - convertapi

We have a site that uses ConvertAPI to create PDFs and download them. They are working in most instances but are failing with large files in certain circumstances. Here's what I could gather:
1: it only happens with a large PDF.
2: it only happens on the mac
3: it appears to have a commonality with Acrobat where Acrobat's plugin called "Web2PDF" is listed as "loaded: no" on the two machines that are not correctly allowing the ConvertAPI code to work. There's another mac where it DOES work in our office, but that mac is working fine.
Anyone seen this before? Help?
Thanks.
Paul

It is hard to say for sure what is the problem, as there is no information about which command is used. However, the similar problem occurs with large files if you are using the ConvertApi with a secure https URL instead of the http, as in this case:
Powerpoint upload stops at ~9MB with cURL -F
Please let us know if changing to the http URL helps with the problem.

Related

dailymotion video is not playing with linux based embedded system

daily motion videos are not playing in my Linux based embedded system.
i am using qt4.8 browser.
server returns forbidden error (http://www.dailymotion.com/stream)
i want to know the reason for this error. please help me
You should rather use http://dailymotion.com/tv , this one works. Your link is the wrong one (old one).

How do I get wkhtmltopdf running for a Drupal site on cPanel shared hosting?

First off, I will acknowledge that I am aware of another similar thread on the topic of wkhtmltopdf, but it was not similar enough to resolve my issue. Here's the other thread: wkhtmltopdf
Second, I will say that I have successfully used wkhtmltopdf with a Drupal site on a dedicated server that I run, where I installed the libX11 and used the most recent static version of wkhtmltopdf. That's on a CentOS 5 system and it runs nicely.
So, I have another hosting arrangement and I need to get the wkhtmltopdf to work, because it does the most amazing job producing bookmarked PDFs. The PDFs are beautiful.
The hosting is cPanel. I determined that it is on a server that has CentOS 5.5. It is not a problem to drop the static wkhtmltopdf in the print module's lib folder. However, I get the following message back in the Drupal admin status reports page (admin/reports/status).
It says,
"wkhtmltopdf library
The currently selected version of wkhtmltopdf () is not supported. Please update to a newer version."
I have obtained all of the needed .so files for CentOS 5, based on what jockie provided in his answer in the other StackOverflow thread.
Can someone knowledgeable confirm that his list was complete?
The idea of a shell script wrapper seems interesting and appears could be done for Drupal, if the naming of the shell script is called something like "wkhtmltopdf-wrapper.sh".
I have tried to use the shell script code that jockie provided, in a shell script. I did place all of the .so files in a sub-folder called "lib". I confess that I do not know what such things mean, in the script:
export HOME="$PWD"
Can someone interpret for me, what $PWD means?
export LD_LIBRARY_PATH="$PWD/lib/"
I understand that the script is going to get the .so files with that line, yes?
And can someone interpret the following line:
exec $# 2>/dev/null
What I am wondering is, where does the actual pdf get output? I did run the script. It did not throw any errors. However, I did not see a resulting PDF file.
Also, jockie's directions are not totally clear or defined enough. He says, "(some of them are symlinks)" under the list of .so files. Are such lines (in his list), the symlinks?:
lib/libX11.so.6 lib/libX11.so.6.2.0
Or am I mistaken? I was able to get all of them, so I don't know why they would be symlinks. The only thing is, that some of the versions are different. Do I need to delete the following files and make symlinks instead?:
lib/libX11.so.6
lib/libXau.so.6
lib/libxcb.so.1
lib/libXext.so.6
Should the shell script code be written differently, with Drupal in mind?
Thanks for reading and I hope someone can help!
...Finally, if anyone knows of a better solution, please share! Again, I appreciate the help!
...There does not seem to be a way, here on StackOverflow.com to notify jockie to check out this thread. I wish there was a way to write to them or notify them, so that they could clarify for them-self or contribute to this thread as well. If someone knows of a way, please let me know that too!

Weird corruption problem with http uploads

My brother has a computer running Windows XP with SP2 installed. His computer was behaving badly (very old installation of Win) and one of the problems was that he could not upload jpegs to Facebook, for example. The upload would complete, but the images are garbled.
Finally I decided it was time to format his computer and reinstall windows, which I did.
Still, images would upload garbled to Facebook. I tried using Google Chrome instead of IE, same problem. Then I discovered that this is not just a problem with image uploads, all HTTP uploads seem to fail. For example, I could not send an e-mail with an attachment on his computer using G-mail, the attachment got corrupted.
Any ideas? I don't really know where this problem originates.
Happens in different browsers
Win XP has been re-installed
Just got a new xDSL router (the wired lan section on the old one seized), but same problem
Is it possible his network is glitching? The only correctness check on a HTTP upload is the Content-Length header and even that's option (and frequently unchecked by the receiving end anyway). If his TCP connections are dropping then the receiving end could think it has a full image but really have gotten only the beginning of it.

Classic ASP on IIS7: ADODB.Stream error File could not be opened - accessing outside the webroot

I've just reinstalled a server, it is a new machine, same OS verion (Win2008) and same IIS version (7.0). The app was working perfectly (and then the machine blew up).
I'm getting this error when I try to access a file outside the webroot:
ADODB.Stream error '800a0bba' File could not be opened
I can access it fine using FileSystemObject, but cannot open it with ADODB.Stream.
Also, I can create a PDF using abcPDF, but I cannot create one again with the same name and overwrite it (this used to work). This works fine inside the website folder structure but not outside.
Also, I cannot attach a file using JMail any more. This applies to files BOTH inside and outside the webroot. So that is weird.
I've assigned Full Control to Everyone on the whole drive to isolate whether it is a permissions problem and it made no difference.
Any ideas anyone?
UPDATE: The problem with attaching files inside the site does not appear to be happening any more, since I mucked round with several things. I'm not sure what did it unfortunately. I got nowhere on this and lost hours over it, so I ended up move all the files inside the webroot and now everything works. This is not ideal and I would still like to get to the bottom of it, but the workaround is acceptable.
Updated question as I accidentally wrote Win2003 instead of 2008.
I think you should check the from your database in the first place how you save the PDF file in question. That is where you saved the file in question into the database from the same machine or from a remote machine. Usually when you save from the same developer machine and you are accessing there will be no error but when the file was saved from a machine other than the developer machine, then you will have such error.
For example:
'1. dbSignatureImage = New ADODB.Stream
'2. dbSignatureImage.Type = ADODB.StreamTypeEnum.adTypeBinary
'3. dbSignatureImage.Open()
'4. dbSignatureImage.
LoadFromFile(dbRecordSet.Fields("client_signature_filename").Value)
From the above code, I was trying to display two different images from the database (one at a time) and among the two images I saved one directly from the developer machine and the other image was saved from a different PC over my network. Whenever I try displaying the second image which was saved from a network PC, then I have the error of file could not be opened. Now what I did was commenting the 4th line and the error seized but then the image was not displaying so I tried displaying the image itself directly from the BLOB field using IO.MemoryStream with the following codes and it is working fine for both the developer machine and any PC over the network.
Dim PassportImageArray() As Byte = CType(dbRecordSet.Fields("client_passport_image").Value, Byte())
Dim SignatureImageArray() As Byte = CType(dbRecordSet.Fields("client_signature_image").Value, Byte())
Dim PassportImageMemoryStream As New MemoryStream(PassportImageArray)
Dim SignatureImageMemoryStream As New MemoryStream(SignatureImageArray)
With picSearchPhotograph
.Image = Image.FromStream(PassportImageMemoryStream)
.SizeMode = PictureBoxSizeMode.StretchImage
.BorderStyle = BorderStyle.None
End With
I think you can go round your problem with this my small idea. I hope it will you some how.
Kasapa-Sunyani
You probably need to take a closer look at the security permissions on the folders outside of your applications home folder. Also take a look at the what user identity is actually used to run your code, for example do you have windows integrated security turned on? If not, is that true of the previous server?
It might help if we could know for sure whether this really is an IIS7 question in which case your server is 2008 not 2003. You might also find that this sort of thing is best handled by the serverfault.com people.
The problem with attaching files inside the site does not appear to be happening any more, since I mucked round with several things. I'm not sure what did it unfortunately. I got nowhere on this and lost hours over it, so I ended up move all the files inside the webroot and now everything works. This is not ideal and I would still like to get to the bottom of it, but the workaround is acceptable.

ASP.NET 3.5 / IIS 6 Output Garbled / Corrupt

I have inherited a web application and when trying when trying to put it on the same server on a different IP and IIS site I get a page full of stuff like this in all browsers. (not sure how the server here will output this but it is basically the same as if you were to open a binary in a text editor or bad character encoding).
���r#ə6��{��Ί��&��6�K�MЀh��"Pd�AP;�RN�K9�r��<ϛ���!��GZ�4��J�z�����R'���i�j�uZLe�V`=��&��T!e]rGVx#d��N���V���w>���pc�hw��B>��^�|L�]��3�~-��g��n��n�i�>Z� �ٲ������z_�����U�,i��2��\�+���F��FB���m��r�7�v��7�}�U�N�o�G�K�o?�w凲��و�����ߓ�x!���_?��V��v�/V��olt˭Z����� >M�kwkh&��j�C3�|̓��=�8��jJ����Uo�~��T7�\w�eW�������u*���f0c��}�.����]o������7���|�;}�&O���N�)[ys��+Q��o�T�~����F����c���έm��.�Q�ů�2#P���i�ˠ�~g��u�<| $ۭ>zZ/e��'�;R�'���v�ˠ�����
I've copied the same build and all its files to the site running under another IP, used the <globalization> web.config tag and set all encoding to UTF-8 and for the hell of it I even tried setting it to ASCII.
The application, although written for users in only US cities does make use of localization resource files for Russian and Romanian since it had been outsourced to developers there. I guess they did so to make things easier on developers who may have been less fluent in english, who knows.
Besides using the exact same copy running in production and changing web.config encoding settings I have found it runs fine on my IIS 7/Windows 7 workstation, tried throwing a uncompiled copy up there with .cs files and all, wrote a simple ASPX page that performed a response.write (which came out fine).
So as you can see I am pretty much at a roadblock and decided to ask the fine professional community we have here. Any input you may have on this matter would be highly appreciated.
I fixed it by exporting the IIS settings for the production system that it worked fine on and created a new IIS site from that file. Sadly I could see no difference between the 2 before I did this but if you run into this issue then here is another thing you can add to your list of troubleshooting tasks.
It's probably a long shot based on your description, but from a little Internet digging, a couple of forum posters have mentioned bad NICs corrupting packets. You did say you had the app on a different IP on the server -- does your server have more than 1 NIC?

Resources