Search

I have created an XML document sample in a location within my workspace which has then been referenced by a Dynamic XML datasource. When I look at debug on the page, it is erring with the following message:

<terminology valid="false">
    <error>Status code 0 was returned. Content-type: </error>
</terminology>

The XML document has an XSL file attached to it, but this file can not be reached. I am not sure if this could be causing problems, but it might be a good thing to see what happens if you remove the reference from the XML.

Thanks creativedutchman. I actually added that xsl reference in after this post, it does exactly the same with or without.

Aha! The content type is not set on the response. Could you try to add that?

Also, the code 0 is generally thrown if the response is empty. What is the exact url you are using to fetch the document?

Looks like your hosting provider is blocking local requests back to the same domain.

@nick, do hosts do that?

Nick, I think you are absolutely right. I have since installed the XML importer and had the same issue. As a test, I added an XML doc to another host and it was pulled in without issue. I will have a chat with my host and see about getting this turned off.

I have had a reply back from my hosting provider:

We do block loopback connections, but unfortunately, this restriction cannot be lifted as it is in place for security reasons. You can try referencing the file via its serverpath, ie /home/sites/k-rapley.co.uk/public_html/path/to/script as that will work OK.

So, when I create a datasource in Symphony and reference it via page settings, can I edit it somewhere so that it works via the fully qualified serverpath?

Or, is it time to find a new host?

@nick, do hosts do that?

Yeah, many shared hosts do. And indeed my first VPS (a managed server with vps.net) was configured this way until I requested it be changed. I lost many hours troubleshooting until I realised this was the case. Sigh.

Oh wow, well, that's good to know; both in extension development and picking hosts!

So, @nickdunn do I have to get a new host, or is there something configurable in the PHP to reference the fully qualified serverpath?

You could set /home/sites/k-rapley.co.uk/public_html/symphony/workspace/library/terminology.xml instead of http://k-rapley.co.uk/symphony/workspace/library/terminology.xml in your datasource, see if that helps.

But, if you do that the URL field shouts that it is an invalid URL. It seems to only take a URL with {$param} in it.

I attempted your logic with /home/sites/k-rapley.co.uk/public_html/{$workspace}/library/terminology.xml and now have different errors in the output. Progress?

<terminology valid="false">
    <error>The <code>Mutex</code> class failed to acquire a lock, check that <code>/home/sites/k-rapley.co.uk/public_html/symphony/manifest/tmp</code> exists and is writable.</error>
    <error>Transformed XML is invalid.</error>
    <errors>
        <item>loadXML(): Empty string supplied as input</item>
        <item>loadXML(): Empty string supplied as input</item>
    </errors>
</terminology>

I have invested in a VPS. I had a number of shared hosts with this company so it will actually work out more cost effective to manage this myself. This will now give me full control and allow loopback connections. Thank you for all your help on this. I am looking forward to getting up and running again to see if this has worked.

I am now running Symphony on my new VPS, and no longer am I having local requests back to the same server blocked. @Nickdunn, awesome knowledge in identifying this as the issue. This would of had me scratching my head for a long time without your input.

This is now resolved.

Hi guys, I'm having similar problem. I set Tweets DS as Dynamic XML and using this url: http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=primedominios&count=3&include_rts=true
and Update cache for 30 minutes.

Sometimes I can save this DS and works ok. Shows 3 last tweets on this page: http://primedominios.com/contato/

But sometimes I can't see the tweets and check the DS, try save have this error on URL field:
Use {$param} syntax to specify dynamic portions of the URL. Failed to load URL, status code 400 was returned.

So, the problem is Shared Hosting? I spent much time to try resolve it and searching until find this topic.

Please, confirm if yes, so I will try change my domain to VPS option on dreamhost.

Thanks.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details