So I ran into a bit of an issue with installing 2 different versions of XAMPP on my workstation for work. I don’t have a real development environment to work in like I did at my previous job with limited resources. So I figured I would document the issue(s) I ran into with my installation of XAMPP either for future reference or to provide some useful info for someone else that might stumble across the same experience I was having.
My workstation is running Windows 7 and my version of XAMPP v3.2.1 with PHP v5.5.19 was installed about 2 years ago. I am on the verge of starting a new project utilizing WordPress and requirements listed with the latest and greatest says it supports PHP v7.1 with MariaDB. I was able to install this version of WordPress with the current version of XAMPP I had but when it came to pushing a test copy of it to production I found myself running into issues. The business uses GoDaddy to host its sites and when I imported the WordPress Database to production I was receiving erroneous errors in which it could not create tables that had a specified “server connection collation” of utf8mb4_unicode_ci. So digging around online I found that most people got around this by doing a find/replace with “utf8mb4″ with “utf8″ within their SQL files. I then Google-d the heck out of this to only to find out it was a security feature placed in the new version of WordPress and this should not be done!
So my next step was to find find out if I could install the next up-to-date version of XAMPP. However I wanted to keep the current version for legacy use becuase of its PHP version. Indeed there is a way to install multiple versions, and this site link explains it well.
- change the folder name shortcut under the START MENU so the new installation does not override shortcuts
- open windows explorer, navigate to where XAMPP is defaulted to install and create a NEW folder and name it XAMPP and append it with version number like XAMPP-3.2.2
- run the installation .exe file and install to that new directory
So here is where I began to run into other issues…
Prior to installment I found that I could not run my older version of XAMPP because of some new network policies that were put in place that block port 80 and that is because of Skype! So in order to get around this I had to change some info in a lot of the APACHE CONFI files, reference > this link.
…then things began to work again!!!
I did the same exact thing with port changes with the new install of XAMPP 3.2.2 however it was not initializing. Would get errors like this -
[APACHE] Error: Apache shutdown unexpectedly.
[APACHE] This may be due to a blocked port, missing dependencies,
[APACHE] improper privileges, a crash, or a shutdown by another method
[APACHE] Press the Logs button to view error logs and check
[APACHE] the Windows Event Viewer for more clues
[APACHE] If you need more help, copy and post this
[APACHE] entire log window on the forums
Sometimes Apache would run and sometimes it would not when I started to change information by following some documentation over at Stackoverflow forums. However when I would launch http://localhost:7777 on my dev environment it was loading a page that was being served up from my originating XAMPP /htdocs/ installation and not the new one. So I was wondering what wires were being crossed here???
A little more digging through the APACHE CONFI files began to notice that all the references such as the Server Route were pointing to the first origination installation. So my next thought was why not do a find/replace for all files in the new XAMPP installation folder and replace /xampp/ with /xampp-3.2.2/
So I proceeded to do this and when I restarted XAMPP-v3.2.2 it would just hang with a very vague message like -
Waiting for localhost and Connecting...
Ugggggghhhhhh!!!!! So something did not get updated right…
XAMPP was not showing anything in the status panel to give and indication of what was holding it up. Also checked APACHE’s access/error logs but found nothing being written to them, even went as far as checking the Windows Event Viewer panel to see if anything was being flagged there.
So I continued to Google this issue, every piece of documentation that would turn up would reference that it was related to the ports but I knew that was not the case. So the find/replace that I did earlier I reset back to its default values. Then I came across a similar comment on Stackoverflow.
Exit out of all instances of XAMPP, and run from the command line this file called “C:/xampp-5.6.3/setup_xampp.bat” This will rewrite the path of all files to route to the renamed folder directory.
Gee if I only knew this before I tried doing a find/replace!!!
I started XAMPP up again but found I was still having issues, this time it was hanging. A little more digging around and a user on another forum board said to start and stop XAMPP from the command line rather than using the GUI dashboard. As it turned out, doing so would output any errors from there, and it certainly did!
This particular file came up for me -
…in which there was some sort of syntax issue that was being flagged. So I quickly jumped into the file using my text editor and made the change and restarted XAMPP.