When I use Coldfusion 10, locally, I can read a zip file's text file content using:
<cfzip action="read" file="http://someurl.com/somezip.zip" entrypath="sometext.txt" variable="somevar" />
But on my Railo VPS, this produces an internal server error 500 on IIS7.5
Can anyone tell me where I am going wrong with Railo?
Not sure about Railo, but according to the <cfzip> doc, ACF does not support reading off http://, only ram://. You should use <cfhttp> to download the content first.
Related
i try to embedd some files into the pdf using Apache FOP.
So far so good. But the attachements are only available using basic auth.
When i run my code i get an exception
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://sample.atlassian.net/rest/api/3/attachment/content/10015
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1997)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
at java.base/java.net.URL.openStream(URL.java:1161)
at org.apache.fop.apps.io.ResourceResolverFactory$NormalResourceResolver.getResource(ResourceResolverFactory.java:224)
at org.apache.fop.apps.io.ResourceResolverFactory$TempAwareResourceResolver.getResource(ResourceResolverFactory.java:152)
at org.apache.fop.apps.io.ResourceResolverFactory$DefaultResourceResolver.getResource(ResourceResolverFactory.java:121)
at org.apache.fop.apps.io.InternalResourceResolver.getResource(InternalResourceResolver.java:92)
at org.apache.fop.render.pdf.PDFRenderingUtil.addEmbeddedFile(PDFRenderingUtil.java:668)
at org.apache.fop.render.pdf.PDFDocumentHandler.handleExtensionObject(PDFDocumentHandler.java:329)
The embedding code looks like
#foreach($attachment in $issue.attachments)
<pdf:embedded-file filename="${attachment.id}-$xmlutils.escape($attachment.fileName)" src="url(${attachment.url})"
description="Attached to [$xmlutils.escape($issue.key)]"/>
#end
is there anything i could do, i could download the files and provide them as lokal files if that is possible? or could i provide an custom resource resolver, that also does authentication?
Help is appreciated
Regards
Oliver
I'm using Jmeter 5.3 on Windows 10. I'm facing with the following problem:
I set the HTTP request to content encoding: UTF-8. In the response I saw it as I wanted.
"name": "Győr, autóbusz-állomás",
I tried to extract the response with JSON Extractor, but my assertion is failed and in the debug sampler the extracted name look like:
origin.name=Gy�r, aut�busz-�llom�s
How could I extract the variable in UTF-8 to use it in my assertion?
Thank you in advice,
I had the same problem. It was resolved with setting in HTTP Request "UTF-8" value on field "Content encoding".
Without it in my request was "???" symbols.
I cannot reproduce your issue:
Double check file.encoding System property value using the Debug Sampler, you should have UTF-8
If you don't - try launching JMeter as:
jmeter -Dfile.encoding=UTF-8
if it helps - add file.encoding=UTF-8 line to system.properties file (lives in "bin" folder of your JMeter installation, JMeter restart will be required to pick the property up.
More information:
Guide to Character Encoding
Apache JMeter Properties Customization Guide
Try to resolve with:
Go to jmeter.properties file
Add property: sampleresult.default.encoding=UTF-8
Restart jmeter & enjoy
Good luck!
I'll start by stating the context this question is based on: I'm running eXist-4.7.1 in a Tomcat container, and am trying to specify fonts in a configuration file for a PDF transformation using FOP (eXist-4.7.1 ships with FOP version 2.3).
The good news: it seems that some progress has been made since earlier reports on font configuration on the eXist-open mailing list (https://markmail.org/message/so43jgratswpu4dz), and I'm now able to load fonts via the http:// protocol. Here is a self-contained XQuery example (which can be stored in and run from the db):
xquery version "3.1";
import module namespace xslfo="http://exist-db.org/xquery/xslfo";
let $fo :=
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="my_page" margin="0.5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="my_page">
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="urbanist">Hello world!</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
let $fop.config :=
<fop version="1.0">
<use-cache>false</use-cache>
<renderers>
<renderer mime="application/pdf">
<fonts>
<font kerning="yes" embed-url="https://github.com/coreywho/Urbanist/raw/master/fonts/static/Urbanist-Black.ttf">
<font-triplet name="urbanist" style="normal" weight="normal"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
let $pdf := xslfo:render($fo, "application/pdf", (), ($fop.config))
return response:stream-binary($pdf, "application/pdf", "output.pdf")
The even better news: this is working without problems on my Windows box, where it produces a PDF document looking as follows (with the right font):
The bad news: when running the exact same XQuery example in exactly the same Tomcat setup on my Linux production server, the xslfo:render() call exits with an error:
<exception>
<path>/db/apps/test-fop-fonts/test-fop-fonts.xq</path>
<message>exerr:ERROR .fop (Permission denied) [at line 40, column 13]</message>
</exception>
Unfortunately, this is about everything that's being logged. Clearly, something is going wrong on the Linux box, but I have no clue what it could be. Apart from this glitch, eXist is operating perfectly in my Linux Tomcat, so I'm quite confident file permissions should be OK.
Has anyone else encountered this "permission denied" error?
Best,
Ron
Apparently, it turned out to be a lower-level OS problem: the problem disappeared when starting Tomcat as root user, after which eXist could happily create the PDF file.
After some more digging, it appeared that FOP caches files in home directory of the user running it, which was lacking for my non-privileged Tomcat user.... and that the problem could be fixed by just creating a home directory for this user, or providing the path to a writable folder for that user in the Tomcat startup script, e.g. -Duser.home=$CATALINA_TMPDIR!
If anyone else should bump into this, I've found the solution here: https://forum.xwiki.org/t/pdf-export-issue-with-file-permissions/4933/11. (phew!)
I am trying to set dropbox as custom backup destination following below cpanel blog. The connection is working, but the backup files are not being transferred to DropBox. And when I press validate to custom backup destination it gives following error .
https://blog.cpanel.com/cpanel-whm-custom-backup-transport-example-dropbox/
Error: Validation for transport “dropbox” failed: Could not list files in
destination: Executed /usr/local/bin/backup_transport_dropbox.pl ls /
remotehost remoteuser : 2018-08-26T15:54:21 [WebService::Dropbox] [ERROR]
https://api.dropboxapi.com/2/files/list_folder {"path":"/"} -> [400] Error in
call to API function "files/list_folder": request body: path: Specify the root
folder as an empty string rather than as "/". at
/usr/local/share/perl5/WebService/Dropbox.pm line 184.
I am new to dropbox api and have no idea of perl so could not figure out what is discusses on below links.
https://github.com/silexlabs/unifile/issues/77
The error message is correctly indicating that the Dropbox API expects the value "" when referring to the root alone. The code is instead sending the value "/". This looks like a bug in the code.
It looks like you've already opened an issue with the developer for this:
https://github.com/CpanelInc/backup-transport-dropbox/issues/3
They should update the code to use "" when referring to the root folder on Dropbox.
I'm trying to figure out "why" I'm getting an error message from the Joomla 3.X component Gcalendar (google calendar). The error message is below.
Error Unable to Connect to ssl://www.google.com:443. Error
#-912967449: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
I have read several other threads on here and other sites but most outline 'how' to enable/install/etc... SSL. I've copied/pasted the info.php data into a google doc here. Everything dealing with SSL is labeled as 'on' or 'installed.
The server is not 'public' right now, it is only available from within the school district's network. Could this be the reason for the problem?
Any ideas anyone?
ssl://www.google.com:443
should be
https://www.google.com:443
I just had this error as well. In my case it was because I was working locally, not on the live site. Once I put it live, it worked fine. Just putting this here in case anyone else comes across the same thing.
Install OpenSSL module for php:
1. In the php.ini file,
add this line "extension = php_openssl.dll"
2.Make sure that the folder "ext" have this dll,
if not then add the desired version.
Установить для php модуль OpenSSL:
1)В файле php.ини,
добавь строку "extension=php_openssl.dll"
2) Убедись что в папке "ext" есть эта dll,
если нет то добавте необходимой версии.