Building the WAMP Platform
Total Page:16
File Type:pdf, Size:1020Kb
Wang Nina Building the WAMP Platform Bachelor’s Thesis Information Technology May 2011 DESCRIPTION Date of the bachelor's thesis 25th Apr, 2011 Author(s) Degree programme and option Wang Nina Information Technology Name of the bachelor's thesis Building the WAMP Platform Abstract WAMP is the abbreviation of the package: Apache, MySQL, and one of Perl, PHP, or Python in Microsoft Windows operating system. Apache HTTP server is web server software. PHP stands for Hypertext Preprocessor. It is a kind of HTML embedded language which executed on the server. MySQL Server is a small relational database management system. Initially, they are the entire independent program from each other, however, they are always used together, and have increasingly high compatibility degrees. So, these packages formed a powerful web application platform. So, how to build a WAMP platform on our own computer? How to modify the configuration of Apache HTTP Server, PHP and MySQL Server? How does the WAMP platform work? How to build a simple working entity to prove that the WAMP platform can work? These are the questions I concen- trate on in this thesis. Finding out the answers can help users understand the main principle of WAMP platform. Subject headings, (keywords) WAMP, MySQL Server, PHP, Apache HTTP Server Pages Language URN 49 pages English Remarks, notes on appendices Tutor Employer of the bachelor's thesis Timo Mynttinen ACKNOWLEDGEMENT First of all, my appreciation goes to my dearest parents, and the rest of my family. Throughout the whole period I am in Finland, they have been there always giving me continuous support, encouragement and understanding. This spiritual power gives me powerful energy. Then, I would also like to extend my sincere thanks to my tutor Timo Mynttinen. Thank you for conducting me to complete the final thesis. I did learn a lot from you. It’s my honor to meet you. Thirdly, my deepest gratitude and respect go to my mental tutor Mr. Matti Koivisto and all the other teachers who have taught me in the Mikkeli University of Applied Sciences. Thank you for teaching me the knowledge in Finland. I have benefited so much from the courses and constant encouragement. Fourthly, I want to thank my teachers in my home university. Thank you for giving me the chance to study in Finland. The study time in Beijing University of Technology is the most precious memories of my life. Last but not least, I would like to give my appreciation to my friend, Mr. Liu Shunyi, Thank you for helping me search material about my thesis, and most importantly, encouraging me whenever I feel frustrated and lonely. CONTENTS 1 INTRODUCTION ....................................................................................................1 2 OVERVIEW..............................................................................................................2 2.1 What is the WAMP platform .....................................................................................2 2.2 History and Function .................................................................................................4 2.2.1 WAMP and LAMP ..........................................................................................4 2.2.2 PHP ..................................................................................................................9 2.2.3 MySQL Server .............................................................................................. 10 2.2.4 Apache HTTP Server .................................................................................... 11 3 WORKING PRINCIPLLE OF PHP ..................................................................... 13 3.1 PHP and HTML ..................................................................................................... 13 3.2 Creating the database table and inserting the data into the table ........................... 15 3.3 Selecting and displaying data ................................................................................. 18 3.4 Connecting PHP with MySQL Server.................................................................... 19 4 EXPERIMENTS .................................................................................................... 22 4.1 Building the WAMP platform ................................................................................ 22 4.1.1 The aim of the experiment ............................................................................ 23 4.1.2 Installing and configuring MySQL ............................................................... 23 4.1.3 Installing and configuring PHP..................................................................... 26 4.1.4 Installing and configuring Apache ................................................................ 29 4.1.5 Text ............................................................................................................... 35 4.2 Building the working entity .................................................................................... 39 4.2.1 The aim of the experiment ............................................................................ 39 4.2.1 Building the webpage.................................................................................... 39 5 PROBLEMS ANALYSIS AND CONCLUSION ................................................ 43 5.1 Problems analysis ................................................................................................... 43 5.2 Conclusion .............................................................................................................. 47 BIBLIOGRAPHY............................................................................................................. 48 LIST OF FIGURES AND TABLES Figure 1. The management interface of WAMP 5 under Windows oprating system 7 Figure 2. The management interface of XAMPP under Linux operating system ...... 8 Figure 3. The logo of Zend PHP Company .............................................................. 10 Figure 4. The logo of MySQL .................................................................................. 11 Figure 5. The loge of Apache HTTP Server ............................................................ 13 Figure 6. The example of PHP file ........................................................................... 14 Figure 7. The result of the example. ......................................................................... 15 Figure 8. How to create a table in the database ........................................................ 16 Figure 9. Inserting data into the table ....................................................................... 17 Figure 10. The result of inserting data into a table .................................................. 17 Figure 11. The result of command: SELECT .......................................................... 19 Figure 12. An example shows connect the MySQL. ................................................ 21 Figure 13. The result of the example ........................................................................ 22 Figure 14. The first step of MySQL Server setup wizard. ....................................... 23 Figure 15. The second step of MySQL Server setup wizard.................................... 24 Figure 16. The second step of MySQL Server setup wizard.................................... 25 Figure 17. The fourth step of MySQL Server setup wizard. .................................... 25 Figure 18. The fifth step of MySQL Server setup wizard. ....................................... 26 Figure 19. Step1 of installing Apache HTTP Server ............................................... 30 Figure 20. Step2 of installing Apache HTTP Server ............................................... 30 Figure 21. Step3 of installing Apache HTTP Server ............................................... 31 Figure 22. Step4 of installing Apache HTTP Server ............................................... 32 Figure 23. Check Apache HTTP Server works. ...................................................... 33 Figure 24. Successful connect the Apache and PHP ................................................ 35 Figure 25. The result of PHP configuration ............................................................. 36 Figure 26. mysql module in PHP configuration ....................................................... 37 Figure 27. mysqli module in PHP configuration...................................................... 37 Figure 28. PHP text script......................................................................................... 38 Figure 29. MySQL feedback .................................................................................... 39 Figure 30. Main page view part 1 ............................................................................ 41 Figure 31. Main page view part 2 ............................................................................ 41 Figure 32. The view of register page ........................................................................ 42 Figure 33. The result of database answer ................................................................. 43 1 1 INTRODUCTION The word WAMP is the abbreviation of the package: Apache, MySQL, and one of Perl, PHP, or Python in Microsoft Windows operating system. It is a kind of open source software that can be used to build dynamic websites or servers. They are all independently-created programs, however, it has increasingly high compatibility degree because they often be put together to use.