Wednesday, April 2, 2014

Kickstart PHP101 project with UwAmp


-----
Kickstart PHP101 project with UwAmp        

INTRODUCTION

UwAmp is a great tool for beginners to quickly kick-start their 101 (introductory) projects.

STEPS

0) PRE-REQUISITE:
1) Start UwAmp.
- Check that both Apache and MySQL servers are running.
- Check that PHP, Apache and MySQL Configuration is right.
https://docs.google.com/document/d/16NEFk2q7JkY9az2bpK9E-k_NWJKJ9gEISBrRAP6uKgg/pubimage?id=16NEFk2q7JkY9az2bpK9E-k_NWJKJ9gEISBrRAP6uKgg&image_id=1MOKJfCYfCYeRaNbeixovc_Zszg-_jtpI1Le0QA
Apache “Offline Mode” means that the server is available for local machine only and will not be accessible from other network clients.
2) www Site Page.
- Check that your www Site is working. (Click the www Site button. Your Default Web Browser should open the UwAmp Start Web Page. It is recommended that you use Chrome Web Browser as your Default Web Browser. Bear in mind that Chrome hides the text http:// so you just see word localhost only in the URL box.)
- Additionally, you may want to click PHPMyAdmin and PHP Info links just to see that they are alive.
- Notice that the section Projects shows “No project found” message.
3) www Folder.
- Close the Web Browser and switch back to UwAmp Control Panel.
- Click the www Folder button. (File Explorer will run and automatically show the content of www Folder)
- At the moment, there is only one file ie the script file that outputs the web page in Step 2.
4) Create new folder “php101”.
- While in the www folder, right-click and choose New/Folder.
- Rename the new folder as “php101”.
5) Viewing projects directory in UwAmp Start Web Page.
- Switch to UwAmp Control Panel and click www Site button.
- Notice that the folder name “php101” now appears under the Projects Section in UwAmp Start Web Page.
- If you click the link, you will be forwarded to the php101 directory.
- Since you haven’t put any file in this directory (and the Apache Server allows “Option Indexes” directive), you will get an auto-generated page with empty file listing.
6) Test index.php
- Using your Text Editor, create an index.php file in php101 folder containing the following codes: <?php echo “hello 101”; ?>
- Browse http://localhost/php101 again.
- From this observation we know that:
---- Apache is running.
----- Apache automatically recognizes php file extension.
----- PHP interpreter correctly interprets the script.

No comments:

Post a Comment

Labels