XAMPP Apache not starting because of Apache2.4 - php

So I'm starting to use MySQL and phpMyAdmin and I firstly installed Apache2.4. After installing Apache2.4 there were numerous errors so I decided to install XAMPP instead. Now me not thinking through the consequences deleted the Apache2.4 Folder completely along with all its contents.
So now when I start XAMPP, MySQL runs fine but Apache is stuck on "Attempting to start Apache service..." Now when I look at the services tab Apache2.4 is still on my list, I have disabled it but it's made no difference. I have checked through my computer for any remaining Apache2.4 files but I can't find any.
If anyone can help me with this, it would be extremely helpful!
UPDATE: I have restored Apache24 from my recycling bin, should I attempt a uninstall using cmd?

It appears that an instance of apache 2.4 is running on the system. It is probably locking port 80 which the reason why XAMPP apache is unable to start.
Shutdown apache 2.4 from it's control panel, shutdown the service, and ensure there is no "httpd" process running using task manager. If there is kill it.
Once the above are done you should be able to start xampp.

Follow those steps:
1- Uninstall Apache 2.4
2- Clean Windows Registry with a tool like CCleaner
3- Restart Windows
4- Install XAMPP

Related

How to properly install Xampp on Mac in order to run PHP code

I downloaded the installer version of Xampp version 8.1.6-0 for Mac and went to the manager-osx widget to start the Apache and MySQL servers but neither would start.
I then tried using the command sudo apachectl start and then created an index.php file and put it in htdocs, and then tried to open it using http://localhost/index.php as well as http://localhost:8080/index.php and both times it said the server could not be reached.
I've actually downloaded Xamp in the past and was able to reach the server but wasn't able to get php scripts to run, but now for some reason I can't even get the server to run.
I made sure to download the installer and not the virtual machine version. I'm running Monterey version 12.4.
I tried the solutions here but they didn't seem to work. I checked my activity monitor and nothing is running on port 80.
I also installed MAMP from here and tried to start Apache but it displayed the error:
"Apache couldn't be started. Please check your MAMP installation and
configuration."
Any help would be appreciated as I just want to run PHP.

WAMP Server errors switching Apache / PHP versions on fresh install

A fresh download and install of WAMP Server works successfully (Apache 2.4.4 PHP 5.4.12).
However as soon as I install a different version of Apache, in this case 2.4 to 2.0 (so I can run PHP 5.2 & 5.4), WAMP goes offline with an orange icon.
If I try to switch BACK to the original Apache version I get this show-stopping error:
Sorry,
This Apache version doesn't seem to be compatible with your actual PHP Version.
Switch cancelled.
Press ENTER to continue...
This doesn't make any sense, as this is a fresh install so both the Apache + PHP versions are the defaults.
Here's what the UI is telling me:
The WAMP icon is now orange
the Apache/Version/2.4.4 icon has a red warning icon next to it
the Apache/Version/2.0.63 icon has a tick next to it
I've tried installing other versions of Apache too, but the issue seems to be with the base 2.4 WAMP installed options.
Extra info: port 80 is free, and I used to use WS 2.0e all the time without these kinds of issues.
Thanks,
Dave
Go To \wamp\bin\php\phpX.Y.Z\wampmanager.conf.
Edit wampmanager.conf via Notepad++
Add This Codes.. And Save wampmanager.conf
$phpConf['apache']['2.4']['LoadModuleName'] = 'php5_module';
$phpConf['apache']['2.4']['LoadModuleFile'] = 'php5apache2_4.dll';
$phpConf['apache']['2.4']['AddModule'] = '';
Restart Wamp Manager..
just had a similar problem - was upgrading WAMP from Apache 2.2 / PHP 5.3 to Apache 2.4 / PHP 5.4
This is what worked for me:
Stop apache service
Remove the unwanted version's apache service using WAMP manager's 'Remove service' option. (check in Windows services if really removed)
Manually edit the 'wampmanager.conf' in the WAMP's installation directory to use Apache and PHP versions you want to use (sections: 'php', 'phpCli' and 'apache' / properties 'xVersion' and 'xLastKnown')
Shutdown WAMP manager
(Re)Start WAMP manager
(Re)Install the wanted version's apache service using WAMP manager's 'Install service' option. (check in Windows services if really installed)
(Re)Start apache service
NOTE: Always run WAMP manager as admin
... After this phpinfo() shows new Apache and PHP versions and seems to work fine.
Hope it helps.
The problem is WAMP version 2.4. I don't know why but v2.4 is not compatible with addons. Then I tried 2.2E. It was fine with addons.
By the way, addons compiled for 32bit. So do not install 64bit Wamp if you think that you would use addons.
When updating WAMP from 2.2 to 2.4 or switching from Apache 2.2.22/PHP 5.3.13 to Apache 2.4.4/PHP 5.4.12, WAMP installs new service as Apache/2.4.4 (Win64) PHP/5.3.13 to make it use PHP 5.4.12
1) Uninstall apache service
2) Modify
C:\wamp\bin\apache\Apache2.4.4\conf\httpd.conf
Change line
LoadModule php5_module "c:/wamp/bin/php/php5.3.13/php5apache2_4.dll"
to
LoadModule php5_module "c:/wamp/bin/php/php5.4.12/php5apache2_4.dll"
3) (Re)Start WAMP
4) Install Apache Service
5) Restart all services
Verify the service description of service wampapache in windows service manager to match Apache/2.4.4 (Win64) PHP/5.4.12
I had this same issue - what I finally did was follow ofzza's and Ankit Sharma's tips, as well as manually removing the directory of the older php version while the services were stopped.
It seems to have worked, except when I call phpinfo() the top heading still claims it's the older version of php even though it's definitely running the newer one. Very strange, but everything is working so I'm fine with it.
The previous installation could be part of the problem. Install WAMP 2.4 in a new directory (It comes bundled with the Apache version you want) & then migrate your www folder.
Directly upgrading has not been error-free for me.
Alternatively, back-up your current version [Databases, config files & www dir], uninstall it and install the new version. Restore your information after

Activate Apache/PHP on Mac OS X 10.8.3

I have a MacBook Pro with OS X 10.8.3 factory installed. I want to set up a working Apache/PHP environment on my local machine. Is this a matter of activating/changing settings in Terminal or do I need to install something?
There have been other guides out there but they don't explicitly answer how to begin if I have a factory installed OS and not an upgrade from an earlier version.
Thanks for any help.
If I'm not mistaken, all you have to do is edit the httpd.conf (/etc/apache2/httpd.conf) file to load the php module into apache (Look for 'LoadModule php5_module', it will probably be there, but with a # at the beginning of the line, simply remove it) and then start apache by entering this in terminal: apachectl start (you will maybe need to put 'sudo' before)
Of course this will only run apache and php. After that you can change your documentRoot and all the settings you want
I found a guide that'll walk someone through getting the factory installed Apache and PHP working on OS X 10.8. It goes over getting MySQL installed too:
http://coolestguyplanettech.com/downtown/install-and-configure-apache-mysql-php-and-phpmyadmin-osx-108-mountain-lion

MAMP - Existing Apache and PHP

I'm very new to Mac OS, and also to MAMP.
So, Mac OS X comes preloaded with Apache web server, PHP, etc. I have a question regarding installing MAMP:
Will the PHP, Apache, etc that is installed with MAMP replace the preloaded ones? Or, will MAMP install a second instance of each of these?
Thanks!
MAMP is self-contained and will be run instead of the pre-installed Apache. You'll have to disable the "Web Sharing" feature in the System Settings to disable the builtin Apache server.
No, it won't replace anything. MAMP is entirely self-contained. All files live exclusively in the /Applications/MAMP folder and the Apache server runs on a different port.
MAMP is self contained. It does not replace the Apache, Mysql or any other thing in the computer or any original settings. It runs these services from its own folder with different port number. The original installation of Apache in MAC OS will continue to run on default port i.e.
Original Apache install will continue to run on
localhost:80
Mamp will install the service on the port port 8888, 8889 for apache, mysql. New MAMP Apache Installation will run on
localhost:8888
Uninstallation of these services from MAMP is simple as deleting the MAMP folder from applications

Apache windows uninstall path

I'm trying to find the path of the uninstall file for apache 2.2. I can see it in add/remove programs, and tried to find the uninstall path in the registry under HKLM\software\microsoft\windows\currentversion\uninstall but there is no folder for apache...
I'm trying to find the path because I'm making an install file which installs apache/php/mysql and want to uninstall any existing installations of those 3 beforehand.
I know that running the apache installer gives you the option of repair/remove if its already installed but I want the uninstall to be silent/automated, so that the end user doesnt have to manually select remove to actually uninstall the existing apache.
I hope this makes sense, thanks in advance.
On my WinXP x32 laptop there is a key for Apache (2.2.13), installed with the MSI, under
HKLM\software\microsoft\windows\currentversion\uninstall
...and the uninstall string is
MsiExec.exe /I{UUID of key}
Just checked a Win2003 machine (Apache 2.2.19) at work and it is the same.
This probably doesn't help you very much, because you need to find the key before you know which UUID to pass to msiexec.
Looking through the other keys, this seems to be similar for all packages that were installed with MSIs.
Which version of Apache are you looking at? Because some older releases in the 2.2 branch didn't use MSI (if I remember rightly), I think they may have used InstallShield?
How did you originally install apache? Most of the time on Windows it is installed with XAMPP, WAMP, or some other similar bundled package. Try a search for php.ini or apache.conf, then look at the directory structure. That should point you in the right direction, you could also try
apache -k uninstall
Also take a look here http://support.esri.com/en/knowledgebase/techarticles/detail/23569
Here are the instructions I followed when I uninstalled my Apache server on Windows 7: http://www.ehow.com/how_7361546_uninstall-apache-windows.html
And one more thing, when doing the command prompt instruction, be sure to run it as Administrator or it will tell you that access is denied.

Categories