2 users online. Create an account or sign in to join them.Users

Search

I am trying to load Google charts using JIT (because I need to serve them via https). I have already learned that the trailing slash rule in the .htaccess file will add a slash to the URL, thus render the URL useless. So I try the direct URL to the JIT script:

http://www.example.com/extensions/jit_image_manipulation/lib/image.php?param=1/...

where “…” is a Google chart API URL like this:

chart.apis.google.com/chart?cht=bvg&chs=520x250&chco=e75c0f&chm=N,000000,0,-1,11,,h::5&chbh=r,0.1,0.22222222222222&chd=t:5,4,4,7,4,18,11,16,21&chl=2009-09|2009-10|2009-11|2009-12|2010-01|2010-02|2010-03|2010-04|2010-05&chds=0,25.2&chxr=1,0,25.2&chxt=x,y

It works with simpler URLs, but there seems to be a problem with the chart URL, probably the ampersands. Symphony’s log file says:

2010/06/06 10:27:23 > ERROR: 256 - Unsupported image type. Supported types: GIF, JPEG and PNG in file /var/www/www.example.com/extensions/jit_image_manipulation/lib/image.php on line 200
2010/06/06 10:27:23 > NOTICE: Image class param dump - mode: 0, width: 0, height: 0, position: 0, background: 0, file: chart.apis.google.com/chart?cht=bvs, external: 1, raw input: 1/chart.apis.google.com/chart?cht=bvs

Looks like most of the URL has been cut off, doesn’t it?

Any ideas?

Try url encoding the ampersands in the google url. You’re passing a parameter into an existing url string, so definitely the ampersands are the problem. Your url will think that they are another parameter, not part of the url your passing.

Use %26 in place of & in your Gogle URL. I don’t know if it will actually work though ;)

Ah, no it doesn’t work. I get the following when I try this:

Error: Connecting to that external site is not permitted.

Damn.

That error means that you have not allowed the Google chart domain for JIT (under Symphony’s preferences). You will need chart.apis.google.com* there.

I will try %26 and report the results!

It works!!! Thank you very much, designermonkey!

Woohoo! I got something right ;)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details