Fixed: Apache won't start on new install on Win10

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Fixed: Apache won't start on new install on Win10

Postby TPO » 18. March 2020 21:02

I hit similar errors to others when attempting a fresh install on a Win10 laptop. Sharing these notes, hopefully they'll save others a few hours of reinstalling and searching for answers.

SYMPTOM: Fresh install of XAMPP v3.2.4 on Windows 10 64-bit encounters errors when trying to start Apache and PHP from Control Panel or via services

ISSUE #1: The installer doesn't prefix the installation filepath into the many .conf and .ini files, so execution cannot find components
ISSUE #2: The current version of PHP requires Microsoft Visual C++ Redistributable for Visual Studio 2019 (look under "Other Tools and Frameworks" here https://visualstudio.microsoft.com/downloads/)

Standard installation
1. Install to your chosen location e.g. Z:\Progs\xampp
2. Run xampp-control.exe as administrator
3. Errors encountered when starting Apache or MySQL, either with [>] buttons or as installed services

Fix missing prefixes in Apache .conf files
4. Find all .conf files in Z:\Progs\xampp (32 files)
5. Edit all .conf files in Notepad++
6. Find and replace "/xampp/" with "Z:/Progs/xampp/" (swap your install location's backslashes for forwardslashes, make sure to include the last "/")
EXCEPT row 253 <Directory "Z:/progs/xampp/htdocs"> which should be fully declared already. If you accidentally replace this to "Z:/progsZ:/progs/xampp/htdocs", it will prevent access to the htdocs root from your browser and give a 403 Forbidden error
7. Save all and close

Fix missing prefixes in PHP .ini file
8. Edit Z:\Progs\xampp\php\php.ini
9. Find and replace "\xampp\" with "Z:\Progs\xampp\" (all backslashes, make sure to include the last "\")
10. Save and close

Fix missing prefixes in MySQL .ini file
11. Edit Z:\Progs\xampp\mysql\bin\my.ini
12. Find and replace "/xampp/" with "Z:/Progs/xampp/" (swap your install location's backslashes for forwardslashes, make sure to include the last "/")
13. Save and close

Ensure Microsoft Visual C++ Redistributable for Visual Studio 2019 is installed
14. Goto https://visualstudio.microsoft.com/downloads/
15. Scroll down to "Other Tools and Frameworks"
16. Download and install (14.6MB)

Note: the installation warns against installing to C:\Program Files (x86) but this was a "red herring" when installing elsewhere - you don't need to alter Component Services with the steps above

TPO
Last edited by TPO on 18. March 2020 21:20, edited 1 time in total.
TPO
 
Posts: 2
Joined: 18. March 2020 20:37
XAMPP version: 3.2.4
Operating System: Win10 Home x64

Re: Fixed: Apache won't start on new install on Win10

Postby Altrea » 18. March 2020 21:17

TPO wrote:SYMPTOM: Fresh install of XAMPP v3.2.4 on Windows 10 64-bit encounters errors when trying to start Apache and PHP from Control Panel or via services

3.2.4 is the version number of the single component "control panel" NOT the version number of the whole XAMPP bundle.


TPO wrote:Fix missing prefixes in Apache .conf files
4. Find all .conf files in Z:\Progs\xampp (32 files)
5. Edit all .conf files in Notepad++
6. Find and replace "/xampp/" with "Z:/Progs/xampp/" (swap your install location's backslashes for forwardslashes, make sure to include the last "/")
7. Save all and close

Fix missing prefixes in PHP .ini file
8. Edit Z:\Progs\xampp\php\php.ini
9. Find and replace "\xampp\" with "Z:\Progs\xampp\" (all backslashes, make sure to include the last "\")
10. Save and close

why not executing setup_xampp.bat once? This should fix all needed paths.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10265
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Fixed: Apache won't start on new install on Win10

Postby TPO » 18. March 2020 21:22

Altrea - your suggestion is likely 100% the right way to do it, but as a second-time user of XAMPP, and having spent hours today trying to get *something* working, this was my findings... (maybe I should RTFM)
TPO
 
Posts: 2
Joined: 18. March 2020 20:37
XAMPP version: 3.2.4
Operating System: Win10 Home x64

Re: Fixed: Apache won't start on new install on Win10

Postby Altrea » 18. March 2020 21:32

It's totally fine and thank you for the very detailed explanation.
I didn't want to criticise you, I just want to give users reading this give an easier way to correct their paths.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10265
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 24 guests