Thursday 20 July 06

Been looking further into creating a Moodle block for the MSG tool, and started to do a little bit of coding now. But soon came across the cross-domain problem when using XmlHttpRequest – in that you can’t make an AJAX request from one domain to another (well, not without the user lowering their browser security levels on their machine first – which wouldn’t be a good plan!)

So it looks like we’ve got 3 options: 1, install the software on the same server so the url is the same and everything will be happy, 2, make proxy http calls, or 3, use frames/iframes. Option 3 is pretty much ruled out straight away, and I;ve gone for testing out option 2 (as I’m not sure if we’ll be able to run the buddy space service on the same machine as Moodle).

So my first task for this was to figure out how to make http requests in PHP, for this I needed pear installed. I’d read that pear was included with PHP 5 but jsut needed activating, but I didn’t have go-pear.bat in my PHP installation. This was because I’d just downloaded the PHP 5 installer rather than the PHP 5 zip package. So I downloaded the zip package and unpacked over the top of my existing PHP 5 install (overwriting any files) and that appears to have worked fine, as I now have the go-pear.bat and necessary extensions – just need to actually install them now!

Leave a Reply