|
|
|
|||||||
|
||||||||
|
|
|
|||||||
Setting up XAMPP for CSCI 2442Note: This tutorial was created using a 1GB USB drive, using the Windows XP Operating System. 01 - First verify you are not running Internet Information Services (IIS) locally on your computer. To do this, right click My Computer and select Manage. Expand the Services and Application section. If you do not see IIS, procede to the next step. If you do see it, go to Start -> Control Panels -> Add/Remove Programs -> Add/Remove Windows Components. Uncheck the IIS box, then click Next and complete the uninstall wizard. Verify everything is uninstalled by starting your browser and entering http://127.0.0.1 as a URL. You should receive an "Unable to connect to network" message. 02 - Download and install the basic PortableApps Suite to your USB drive. The drive letter for this example will be G:, your drive letter may be different. After installation is complete, delete the Suite_Setup installation program to free up drive space. Next download the main XAMPP package from here. Download the Windows Installer program to the G: drive and run the installed program. Set the Destination Folder to G:\PortableApps\xampp. Uncheck "Create an XAMPP Desktop Icon" and "Create an Apache Friends XAMPP Folder", then place checks next to "Install Apache as a Service" as well as "Install MYSQL" as a service." Continue the install Wizard, which will take a few minutes, then do not start the XAMPP control panel when prompted. Delete the XAMPP installation program when done. 03 - Start PortableApps and click XAMPP-Start. Select "Unblock" if you receive a Firewall Alert Messages. Next click XAMPP-Control icon in Portable Apps and click Start for both Apache and MySql. Verify all is working correctly by starting your browser and entering first http://127.0.0.1 then http://localhost/ into your browsers URL. You should see the XAMPP for Windows splash page. In the Apache Control Panel, click Exit, then click XAMPP-Stop from the PortableApps menu. Next, close PortableApps and safely remove your USB drive. Verify Apache is no longer running by starting your browser and entering http://127.0.0.1 as the URL. 04 - Plug your USB back in, then navigate to G:\PortableApps\xampp\htdocs and rename index.html and index.php to oldindex.html and oldindex.php respectively. Create a new index.php file in this directory in Notepad with the following code:
<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/csci2442/');
exit;
?>
Something is wrong with the XAMPP installation :-(
Create a new directory called csci2442 inside G:\PortableApps\xampp\htdocs. Copy the index.php file you created for Handout #1, along with the file image1.jpg to G:\PortableApps\xampp\htdocs\csci2442. 05 - Restart Portable Apps, then click XAMPP-Start. Start up XAMPP-Control Panels and Start both the Apache and MySql services. Start your browser and set the URL to http://127.0.0.1. Verify you see the same page you saw in Handout #1. From now on, test all your files locally by viewing and testing them in G:\PortableApps\xampp\htdocs\csci2442 before you upload them to your account at www.000webhost.com. Note: Minor problems will occur when you plug in your USB drive into a different machine and the drive letter does not match the one used during the initial setup procedure. If this occurs, perform the folowing procedure AFTER pluggin in your USB drive but BEFORE starting PortableApps or any of the XAMPP modules. Navigate to X:/PortableApps/xampp (where X is the current drive letter of your USB drive) and run the setup_xampp.bat file. Select "1" to refresh the environment. After waiting, press a key to continue when prompted and start PortableApps and XAMPP normally. BACK |
||||||||