PDF HTML FlashPaper

JSC405

Contents

  • 1 Technical Requirements
    • 1.1 Operating System Options
    • 1.2 XAMPP or MAMP
    • 1.3 Installing XAMPP
    • 1.4 Installing XAMPP on 64-bit OS
      • 1.4.1 Setting the MySQL Password
    • 1.5 Browser
      • 1.5.1 Browsers for Windows
      • 1.5.2 Browsers for Mac OS X
    • 1.6 Firebug for Firefox
      • 1.6.1 Using Firebug with Ajax
  • 2 Class Files
  • 3 Setup Instructions
    • 3.1 Data Source Names
      • 3.1.1 Using Microsoft Access
      • 3.1.2 Using MySQL
    • 3.2 Database Access in 64-bit Windows
    • 3.3 Testing The Setup

Technical Requirements

Operating System Options

  • Windows XP Service Pack 2
  • Windows Vista
  • Windows 7
  • Mac OS X

XAMPP or MAMP

Instead of installing a Web Server, Applications Server, and Database separately, you can install one of the following all-in-one packages:

  • XAMPP (Apache, PHP, MySQL on Windows)
    • Download
  • MAMP (Apache, PHP, MySQL on Macintosh)
    • Download

Installing XAMPP

XAMPP is a free distribution that makes it easy to install Apache Web Server, PHP, PEAR, and MySQL. Before installing XAMPP, you should turn off any other web servers you have running on your machine. NOTE: If you are having trouble installing XAMPP go to this link to view Instructions for Linux, Windows, MAC and Solaris.

  1. Go to http://www.apachefriends.org/en/xampp.html and choose XAMPP for Windows, Linux, or Mac OS X (depending on your own operating system) and download the Installer file for XAMPP (not XAMPP Lite).
  2. After downloading the program, simply run it. XAMPP needs to be installed into a top-level folder (e.g., the C drive).
  3. You can start it by running XAMPP_Start.exe in the XAMPP folder (e.g., C:\XAMPP). This will start Apache Web Server, PHP and MySQL.
  4. To test the install, navigate to http://localhost. You should see the XAMPP home page.

Installing XAMPP on 64-bit OS

  1. For instructions on installing XAMPP on a 64-bit Windows OS, see Getting XAMPP to work on Windows 7 (64-bit).

Setting the MySQL Password

  1. The PHP files use "pwdpwd" for the MySQL root password, while the default password is NO password.
  2. Change the password by navigating to http://localhost/security and entering pwdpwd under the MYSQL SECTION: "ROOT" PASSWORD heading and submitting the form.
* More information on this is available at http://www.apachefriends.org/en/xampp-windows.html under the The XAMPP Security console heading..

Browser

At least one of the following browsers.

Browsers for Windows

  • Mozilla Firefox 2.0 or greater - Download
  • Internet Explorer 6 or greater - Download

Browsers for Mac OS X

  • Mozilla Firefox 2.0 or greater - Download
  • Safari 3.0 or greater - Download

Firebug for Firefox

  • Get Firebug

Using Firebug with Ajax

We strongly recommend getting Firebug when taking any of our Ajax courses because you can:

  • See the Ajax calls being made to the server and what parameters, if any, were passed.
  • See the response from the server after the Ajax calls are made in either plain text, JSON, or XML accordingly.
  • Inspect HTML elements
  • Learn more...

Class Files

  1. Download the class files.

Setup Instructions

  1. Create a folder in the root of your C:\xampp\htdocs directory called "Webucator" and extract the class files zip to that folder.

Data Source Names

Create three data source names: "Northwind", "Presidents", "DragDrop" that map to the databases of the same names in your class files.

Using Microsoft Access

  • Open the Windows ODBC Data Source Administrator by clicking on Start > Settings > Control Panel > Administrative Tools > Data Sources (ODBC)
  • Open the System DSN tab
  • Click Add...
  • Choose the Microsoft Access driver (*.mdb) and click 'Finish'
  • Enter the appropriate datasource name as specified above and select the appropriate Microsoft Access mdb file in the ClassFiles Setup directory.

Using MySQL

  • Download the MyQL ODBC driver from the MySQL Web Site
  • Open the Windows ODBC Data Source Administrator by clicking on Start > Settings > Control Panel > Administrative Tools > Data Sources (ODBC)
  • Open the System DSN tab
  • Click Add...
  • Choose the MySQL ODBC Driver and click 'Finish'
  • Enter the appropriate datasource name as specified above, enter 'localhost' for the Server address, your account credentials you created when installing MySQL and choose the appropriate Database that matches the datasource name.

Database Access in 64-bit Windows

The first option is to use MySQL instead of the Access files. Since this does not use ODBC.

To use the Access files with ODBC, if you do not have a 64-bit MS Office installation:

  1. You need to have a 32-bit Java installation which would generally be in C:\Program Files (x86) and therefore you will also need a 32-bit tomcat installation
  2. Set a JAVA_HOME environment variable as discussed in the setup instructions and do the same for CATALINA_HOME (It is generally better to use the 8.3 form of paths that would have spaces, as in: C:\Progra~2\Java\jdk1.6.0_20 in which the ~2 is there because C:\Progra~1 is going to be C:\Program Files).
  • You can test if the path is correct when written that way by pasting into the address bar of Windows Explorer.
  • Go to c:\windows\SysWOW64. Find and double-click odbcad32.exe - that opens the 32-bit ODBC administrator

Testing The Setup

  1. In your browser navigate to http://localhost/Webucator/ClassFiles/MoreAjaxApps/Solutions/Presidents.php. You should see a table of the presidents.
  2. Click once on the word "Washington" in the first row. It should become editable in a form field.
  3. Modify the word (e.g, change it to "Washington2") and click the little edit icon next to it. It should blink and then show the new word.
  4. Refresh the page. Your change should be shown.

  • Instructor-led Online Classes
  • My Classes
  • Class Requirements
  • Setup Support
  • Class Setup Policy
  • FAQs

  • Onsite Classes
  • Class Info

  • Wiki Navigation
  • Login