Presentation on theme: "FIRST SESSION - XAMPP Jeongmin Lee. Jeongmin Lee CS PHD Machine Learning, AI Web System Development."— Presentation transcript:
FIRST SESSION - XAMPP Jeongmin Lee
Jeongmin Lee CS PHD Machine Learning, AI Web System Development
Information Office Hours: TBD
X ( L = Linux, M = Mac, W= Windows but X = cross-platform) Apache Server MySQL PHP Perl
Apache Server HTTP Server Written in C Open Source Windows, Linux, Mac OS X, Solaris, etc. By % of all websites used Apache
What is HTTP? Hypertext Transfer Protocol HTTP is the foundation of data communication for the World Wide Web.World Wide Web. Hypertext is structured text that uses logical links (hyperlinks) between nodes containing text. HTTP is a request-response protocol between server and client to transfer data
MySQL Relational Database Management System Open Source Written in C and C++
PHP PHP: Hypertext Preprocessor (recursive acronym ) PHP is a server-side scripting language designed for web development PHP code is interpreted by a web server with a PHP processor module
Perl Perl is a programming language. In the web development environment, Perl is a very powerful way to create dynamic web pages.
PHP vs Perl? PHP is easier to learn PHP is inline scripting language while Perl is not It is written within HTML code PHP is usually faster Perl much more powerfull in regex (PHP actually uses Perl to provide regex) Etc.
How to install XAMPP? Install on USB Flash Drive using zip file Install on USB Flash Drive Install on Mac Install on Windows
Install on USB Flash Drive using the zip file Download the zip file from 20Windows/1.8.3/xampp-win VC11.zip/download 20Windows/1.8.3/xampp-win VC11.zip/download Unzip the files into a directory in the root of the flash drive and name it xampp. In the xampp directory run “setup-xampp.bat” file to setup xampp settings in the current directory Run “xampp-control.exe” Continue the rest from slide 29
XAMPP for Portable for Windows on USB Use the following link to download the portable installer: 20Windows/1.8.3/xampp-portable-win VC11-installer.exe/download 20Windows/1.8.3/xampp-portable-win VC11-installer.exe/download
Portable XAMPP for Windows Installer will show you the a welcome window. Click next.
Portable XAMPP for Windows Installer will show options you can choose from, preferably, keep everything unless your running short of disc. You definitely will need MySQL, PHP, PHPMyAdmin and Apache.
Portable XAMPP for Windows Next page will ask you to choose proper location. For portable installation choose the USB flash drive.
Portable XAMPP for Windows After progress bar is finished click next till you can click on Finish.
Portable XAMPP for Windows Click on Finish.
Portable XAMPP for Windows Start Apache and MySQL servers when you open xampp from the installation folder.
Portable XAMPP for Windows To test, click on Admin button for Apache server and you will see a page similar to the following.
Install on Mac Go to: https://www.apachefriends.org/download.html https://www.apachefriends.org/download.html Download desired version (preferably the one with the news PHP version)
XAMPP for MAC Open the.dmg file For example: xampp-osx installer.dmg In the following window open the installer
XAMPP for MAC Choose next in the first setup window
XAMPP for MAC You can choose options and click next Keep both if you don’t really have disc problems
XAMPP for MAC Keep clicking on next till you the installation starts…
XAMPP for MAC Keep clicking on next till you the installation starts…
XAMPP for MAC After installation is done click on Finish
XAMPP for MAC In application window: go to Manage Servers tab All servers should have been started otherwise choose them and click on start. (You may need to give permissions)
XAMPP for MAC Make sure you don’t have any other instance of these Apache server or MySQL server running on your machine Stop them if any existed Stop Apache in terminal by running the following command: sudo apachectl stop Stop MySQL by running the following command in Terminal: sudo /usr/local/mysql/support-files/mysql.server stop
XAMPP for MAC Try XAMPP by clicking on “Go To Application” in “Welcome” Tab This what you will have to see in your browser. Under
XAMPP for MAC Try XAMPP Installation by clicking on “Go To Application Folder” in “Welcome” Tab There should be similar content in xamppfiles as shown in picture
XAMPP for MAC htdocs in xamppfiles is where you can store all your future PHP, HTML or any other files types needed.
Install on Windows Go to: https://www.apachefriends.org/download.html https://www.apachefriends.org/download.html Download desired version (preferably the one with the news PHP version)
Install on Windows Installer will show you the a welcome window. Click next.
Install on Windows Installer will show options you can choose from, preferably, keep everything unless your running short of disc. You definitely will need MySQL, PHP, PHPMyAdmin and Apache.
Install on Windows Next page will ask you to choose proper location. Choose a proper place on your Hard Drive.
Install on Windows After progress bar is finished click next till you can click on Finish.
Install on Windows Click on Finish.
Install on Windows Start Apache and MySQL servers when you open xampp from the installation folder.
Install on Windows To test, click on Admin button for Apache server and you will see a page similar to the following.
Playing Around With Configs How to have two different apache servers? What is the problem here? Why do you think that we had to stop the previous apache server? What if I want them to work simultaneously?
Problem? Both servers what to listen to the same port? Port 80 We have to change setting to use different port on XAMPP
Change Apache Port on Mac In Manage Servers tab, choose to highlight Apache Web Server and click on Configure.
Change Apache Port on Mac Change 80 to any port above Since anything below it is a reserved port. For example 8080 and restart server.
Change Apache Port on Mac Now doesn’t work anymore but is now active
Fix on Windows On windows you’ll clock on Config in the top right corner. Then you’ll click on Service and Port Settings in the new window an you’ll change 80 to 8080 in the new window and you’ll need to also save
Change Apache Port on Windows Now doesn’t work anymore but is now active
In case the GUI didn’t work Go to: Mac OS X: “/Applications/XAMPP/xampfiles/etc/” Windows: :\apache\conf\ Open the file: httpd.conf Apply following changes: Find the line which specifies the port number “Listen 80” It should be at line 58 in Windows and 52 In Mac Change the port from 80 to anything you desire Save and exit the file Restart apache server Test it Localhost:
Safety Issues If you visit the security status page if not working, visit Click “English” Click “Security” on left side bar You will se that there are three security errors
To fix this on Mac Run sudo /Applications/XAMPP/xamppfiles/xampp security Then open MySQL config file using the menues and find the line with: #password= your_password Remove # and change “your_password” to any password you desire.
Fix on Windows Go to Select password for both MySQL and XAMPP pages.