CMIS 320 Download and install Apache web server. Download and install PHP. Configure them to connect to MySQL server. Has the most recent versions (2.2.6?) of Apache web server. Win32 Binary MSI OR get it locally from: \\kadenix\public\apache_2.0.55... Install it. use the examples to fill in the boxes. Start it. Runs as service if have administrator privilege, else runs as console (DOS box pops up and stays up). If running as service: point web browser to: localhost If running as console: point web browser to: localhost:8080 should get welcome page from the installed, running, properly configured web server. Edit c:\program files\apache group\apache2\htdocs\index.html.en add on line 19: "My name is whatever". Save. Refresh the localhost web page to see your change. Ask your neighbor his IP address, point your browser to that IP address to see his index.html SKIP: Windows Binaries PHP 5.2.5 installer OR get it locally from \\kadenix\public USE the version 4!!! SKIP: Install it: click Apache 2.0. Browse to conf folder of Apache. END SKIP------ Unzip the zip file. Move or copy the folder to C:Program Files as 'php' (Php does not run as a server, it merely runs to execute a program when asked to. It can be run from the command line: php myprogram.php or when the web server runs it) Configure web server so it knows what to do with a request for a .php file (viz. run the Php interpretor to execute the .php file and send its output to the web browser as the response to the request) Edit c:\Program files\Apache Group\apache2\conf\httpd.conf on line 173 add these 3 lines: ScriptAlias /php/ "c:/program files/php/" AddType application/x-httpd-php .php Action application/x-httpd-php "/php/php.exe" Save changes. Restart apache (for a service in cmd: net stop apache2 net start apache2 (or use Services.msc) (for a console, kill the DOS box, restart the console). Create a file helloworld.php in ...apache2/htdocs: PHP Test Hello World
'; echo date('r')."\n"; ?> Point browser to 'localhost/helloworld.php' OR 'localhost:8080/helloworld.php' should be Hello World and whatever the current date is displayed. Download the phpinfo.php.txt file from the class web site into the htdocs folder changing its name to just phpinfo.php and invoke it from the web server. The phpinfo() function gives gobs of information about the version and configuration of the Php interpretor. Copy mysqlCommands.txt and mysqlQuery.txt from class web site to the ...apache2/htdocs folder, renaming them to end in .php If your MySQL has a user and password, edit the line with the mysql_connect function call to include the user and password: $dbcnx = @mysql_connect("localhost", "username", "thepassword"); these are web interfaces to the MySQL server. petphp.txt demo's accessing the pet table.