AJAX Extended - Installation

Installation instructions
The following document outlines the process of installation of AJAXExtended to you web server. Please note, however, that in order to use these instructions, you should have some basic server administration skills. Be sure, you're comfortable with terms like file permissions, scripts, cgi-bin, sockets etc.
1. Downloading the latest copy
AJAXExtended is stored in a Subversion repository at http://www.professionalconsulting.ru/svn/ajaxextended/trunk. If you have subversion installed on your local machine, you can check out the current version by typing svn co http://www.professionalconsulting.ru/svn/ajaxextended/trunk. If you have no subversion, you can either install it or click on the link above and download all the files one-by-one with your browser. In this case, be sure to keep the same directory structure.
Package description

  • MIT-LICENSE
  • INSTALLATION.html
  • README.html
  • xmlhttp.js
  • php.server/
    • data/
      • empty
    • tests/
      • index.php
      • base.php
      • session.php
      • simpletest/
        • compatibility.php
        • dumper.php
        • errors.php
        • expectation.php
        • invoker.php
        • reflection_php4.php
        • reflection_php5.php
        • reporter.php
        • scorer.php
        • simpletest.php
        • test_case.php
        • unit_tester.php
    • xmlhttp/
      • base.php
      • session.php
      • pear/
        • json.php
        • pear.php
        • request.php
        • socket.php
        • url.php
    • index.php
  • python.server/
    • httplib.py

/xmlhttp.js — that's the javascript part of AJAXExtended. It contains all the JS classes required for the XMLHTTP magic to work.

/python.server/ — that's just a placeholder for the coming-soon Python version.

/php.server/ — this directory contains the server part of AJAXExtended (PHP version). Make sure you have all these files and directories on your computer (including the empty data directory). Some of these files (e.g. unit-testing files) won't be required for production use, but for installation purposes they're required.
2. Uploading the files to your web server

  • First of all, upload all the files contained in the /php.server/ to any directory on your webserver that is available for public access.
  • Open xmlhttp.js in any text editor and change the line that says apiURL: 'http://api.ajaxextended.com/' to apiURL: 'http://www.yourwebserver.com/path-to-the-php-files/index.php'. The 'index.php' part is optional, you can skip it if you're sure you web server will treat this file as the default index file. In any case 'index.php' should correspond with the '/php.server/index.php' package file. Save xmlhttp.js and upload it to your web server.

3. Checking the server scripts
Once you're done uploading the files, fire up your browser window and type in the following address: http://www.yourwebserver.com/path-to-the-php-files/tests/ Depending on what you see on the screen, there're several options:

  1. You see a green box that says everything's just fine. You're almost done. Skip to to next step.
  2. You see a red box that says something failed (and mentions 'testcreatingsessionfile'). Change the permissions of the /data/ directory so that the PHP script has enough priviliges to write into this directory. A common (but not the best) solution is to do chmod 777, but it might be different with your server configuration.
  3. You see the source code of the script. Your web server does not support PHP or this functionality is disabled. In this case you should refer to your web server manual.

It doesn't work and you don't have a clue?
Send me an e-mail describing the problem and don't forget to include the description of you web server, the results of script testing (probably, even a screenshot) and other relevant information. Without this information, I won't be able to help you. Usually, you can expect a reply within a day.
4. Embedding AJAXExtended in your web pages
Insert a script tag:

in every html page of your site that will use AJAXExtended.
5. Test it
Start your javascript application and make sure AJAXExtended works.
6. Delete unnecessary files
Remove the /tests/ directory from your web server.
You're done. Congratulations!
Just don't forget to get back to AJAXExtended website every once in a while to upgrade you local copy to the latest stable release.

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

About Erich

Erich is a web developer and a native New Englander who is passionate about life, the universe, and everything.

He is a Drupal consultant, previously employed as a senior developer at Harvard University, working on the IQSS OpenScholar project.  Prior to joining the team at Harvard, he was the engineering manager at CommonPlaces e-Solutions, in Hampstead, NH, contributing as the lead engineer on the Greenopolis.com and Twolia.com.

Erich is active in the Drupal community, having contributed modules and patches to the community. He presented at DrupalCon in Szeged Hungary, and co-presented at DrupalCon 2009 in Washington, DC.

Erich lives in New Hampshire with his wife, two sons, and three weimaraners.  When not writing code, Erich enjoys landscaping and woodworking.

Faceted search

Categories

Content type

Project types

Artwork Type

Artwork Tags

Recent comments

Activity Stream

August 29, 2011

August 25, 2011

August 24, 2011

August 23, 2011

August 15, 2011

August 11, 2011

August 10, 2011

August 9, 2011

August 4, 2011

August 3, 2011