Saturday, September 5, 2015

XAMPP Install - Windows 7

Go to https://www.apachefriends.org/download.html and download the latest windows version. Note their is only 32bit versions now. The installer is a windows .exe binary executable.


This download includes: Apache 2.4.16, MySQL 5.6.26, PHP 5.6.12, phpMyAdmin 4.4.14, OpenSSL 1.0.1, XAMPP Control Panel 3.2.1, Webalizer 2.23-04, Mercury Mail Transport System 4.63, FileZilla FTP Server 0.9.41, Tomcat 7.0.56 (with mod_proxy_ajp as connector), Strawberry Perl 7.0.56 Portable.

Double-click the xampp install file in your downloads folder:


When the installer runs it displays a warning message:



We go to http://apachefriends.org/en/faq-xampp-windows.html#antivirus to see what the issue is. If you are using an aggressive anti-virus app these warnings will apply, for example the windows firewall is a likely culprit.

If you are installing a XAMPP application on a Windows machine with an antivirus app enabled, this may slow down the installation significantly, and there is also a chance that one of the servers (web server, database server) may be blocked by the antivirus software. If you have an antivirus tool enabled, check the following settings for running XAMPP without performance issues:
  • Add exceptions in the firewall: for Apache, MySQL or any other server.
  • Scan files when executing: If you have enabled the antivirus scan for all files, the executable files for the servers may slow down.
  • Scan the traffic for different URLs: If you are developing with XAMPP on your own machine, you can exclude "localhost" traffic in the Antivirus settings.
We continue with the installation. Now an UAC warning is displayed:



This is interesting as this machine has a long time WAMP installation and i don't remember and UAC problems, but that was years ago. What the message implies is that you should not select an installation target of Program Files (x86) as the account does not have write permissions. Possibilities:


  • We are installing under our own account (gnickers) which does not have write permissions to that folder. Unlikely as our account is part of the administrator group. 
  • Installs that have to write stuff and need administrator privileges can ask for it which is usual behavior
So do we proceed and see what happens or stop the install and run the installer as admin (right click on the windows installer and select run as admin). We need more info before making a decision (a common problem with many installers is that you cannot know the downstream consequences of a decision during the install and many do not allow you to go backwards). A quick search reveals this is also an issue with windows 8, which makes sense as that is how the UAC works.

The solutions seem to be:

  1. turn off UAC - which would seem to pose a security risk
  2. install xampp to another folder instead of Program Files (x86) which makes sense

Since one of our project goals is portability it makes sense to NEVER install to Program Files, installing to an external hard drive or USB stick (usb 3) makes a lot more sense. Most of my external drives are e-Sata or Firewire but i have some 2.5" usb 2 ones. Wonder if they will work ok. IF not we can always copy the XAMPP folder to a faster interface for work.

Ok let's go with the external hard disk install so it will get installed to the root of a hard drive. In windows this means drive letters so something like E:\XAMPP is where it should end up. We assume all .ini files use relative paths (although years ago we had a problem with Joomla settings that were hard coded by default). OK, external hard disk formatted as FAT32 (do not use NTFS!)

Back to the install we click OK at the UAC warning message to continue the install.


The install includes a lot of functionality that is not normally needed for a local install, things like the mail server, ftp server, tomcat, perl, webalizer etc. If you are installing to a USB stick and space is limited these can be skipped. For the sake of completeness we accept the defaults and click NEXT.

The default folder for install is C:\xampp which is the root of the system disk. Of course if your system drive dies you lose everything, which is why a better option is to an external disk.

We select I:\xampp as the destination which is an external drive. When the install is complete we can test out copying the xampp folder from I to other locations like E: or G: or over the network to another machine such as a laptop to make sure it works. Click NEXT and the install starts.

When the installation is complete we get a warning message about the windows firewall. This was expected...



You have to click the Allow Access button so your XAMPP works. Then click FINISH to complete the install. The default is to run the XAMPP Control Panel when the installation is complete, this allows you to check that everything is ok. The control panel is located in the XAMPP folder (in this case I:\xampp\xampp-control.exe). It indicates a problem with some ports.


It looks like apache is already running. Odd. So we exit the xampp control panel and run the currports portable app to check our tcp/ip connections:


And there is a web server running! Very odd. Let's take a look at it so we run a web browser and go to htpp://localhost and we see....


The xampp home page! So the apache web server is running...but the xampp control panel does not list any services as started...we check the mySQL service using a mySQL client to connect to localhost but it says the mySQL server is not running. We confirm this. Windows lists as a process httpd.exe *32 Apache web server is running. How? The installer must have started it but the control panel does not know it was running as it can't stop it - so it launched outside the control panel.

Not impressed. We kill the windows process. We run the xampp control panel again. Everything is ok now.


So it works but the process will be confusing for FIMS students as many do have not a lot of computer experience.

We start up the mySQL database service.


We get a warning message from windows firewall that it is blocking the connection:


So we allow access. We run a database client and confirm the mySQL database server is working ok.



UPDATE  9/6/2015:

Test of install of same xampp to an external USB disk.

OK - we can confirm the installer runs apache during the install process. The control panel checkbox has no effect.

So what the student will have to do is to uncheck the Run Control Panel checkbox during the intstall and then exit the install and run the Windows Task Manager, go to the Processes tab and right-click on the httpd entry for the Apache web server and End the Process.


This is not optimal but it is a workaround we can live with.

You can always TEST if the web server is running by opening a browser and going to http://localhost

And the test of the xampp control panel on the external usb is OK. So now we can move to phase 2 which is the installation of OMEKA.

UPDATE 9/7/2015

The OSX install on the mac pro running OSX 10.10.5 has some differences from the windows install. There is no option to install to a different target, the install defaults to /Applications/xampp and cannot be changed.

Once the install is completed it auto launches the apache web server but not the mySQL server, so phpadmin cannot be used immediately. But since it also auto launches the xampp control panel (which is slightly different that the windows version) it is easy to start the database server.

The Linux install on the quad code bolen running Linux Mint 17.2 x64 cinnamon is different that both mac and windows.

You have to open a terminal and:

cd /Downloads
sudo ./xampp-linux-x64-5.6.12-0-installer.run 

to make the installer file executable and run it with admin privileges. Once this is done the graphical installer launches and is the same as the win/osx versions. However, the install defaults to opt/xampp and cannot be changed.

When the installer completes it auto runs the web server but not the mySQL server but since the xampp control panel is also launched it is easy to start.

NOTE: by default XAMPP does not allow connections except from localhost so we have to edit the configuration on the mac pro and the linux box to allow connections from clients on the documentation machine...

Conclusion

Despite some consistences between the versions and a problem with the auto started apache server in windows the installers basically work as they should and the differences are trivial. So the use of XAMPP for FIMS students is certainly doable.

The next step is to install OMEKA on all three platforms.



1 comment:

Biswajit Das said...

Hi, Nice article. Thank you for the article. Please see my article about Download XAMPP for Windows.