Puzzled by apache (remote JavaScript)

Discuss Networking
Post Reply
Tux
guru
guru
Posts: 689
Joined: Wed Jan 08, 2003 10:40 am

Puzzled by apache (remote JavaScript)

Post by Tux » Wed Apr 22, 2009 4:45 pm

Hello all, it's been a long time.

..and I'm positively stumped!

I'm trying to use a Google API to do a little project of mine. Unfortunately it will not work on my web server at home, however it works perfectly if I host the same stuff on my university web space.
I think the problem is that it loads some remote JS from google, like so:

Code: Select all

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
and I think Apache at my end is messing that up somehow. The problem is I don't know precisely why. I've looked in http.conf and tried to read up on the issue but no joy.

And ideas what I need to do to apache?
Does it know how to resolve remote domain names for example?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Wed Apr 22, 2009 9:34 pm

I can't imagine it's an issue on the server side as it's just javascript and it's all done between the client and google. I have done a bit with google maps using the maps API. I'm sure you know you can't use the same Google API Key at both places right or don't you need a key for what you're doing? I don't see you using a key. For the maps API it's one key per host. Any more to go on?

Tux
guru
guru
Posts: 689
Joined: Wed Jan 08, 2003 10:40 am

Post by Tux » Thu Apr 23, 2009 12:00 pm

Well first of all, everything's fixed now. :-D

What I was trying to do was use QGoogleVisualizationAPI which is a PHP wrapper for Google's Vizualization API. It looks pretty neat, so far.

With fresh eyes I noticed the following error in /var/log/httpd/error_log
PHP Fatal error: Call to undefined function dom_import_simplexml()
Bingo!
This was because the fedora PHP build disables DOM support, so the function genuinely was missing. To solve it I just need to install php-xml from the regular repositories :)

Post Reply