Apache web server remain stop after start all three in xampp control panel in ubuntu 22.04 - xampp

After pressing start all button in xampp contol panel, mysql database and proFTPD start but Apache Web Server don't start.image is given
Click here to see image
Every time i start xampp this problem occur,but it have two solution
sudo service apache2 stop
Another one is
sudo apachectl stop
My question is how to get rid of myself to command sudo service apache2 stop , sudo apachectl stop after every successful start of xampp.
Thanks for your valuable time.

Related

XAMPP can't start Apache on Mac

manager-osx flicks from "Starting…" back to "Stopped" with no error, and when I run sudo /Applications/XAMPP/xamppfiles/ctlscript.sh start apache on the command line, I get back:
Syntax OK
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
I've tried port swapping and running sudo apachectl stop to stop the built in server (as described at XAMPP can't start Apache in mac), but no luck. Open port scan doesn't show any live Apache servers on my machine. I've reinstalled XAMPP (multiple different versions), but nothing.
Running macOS Catalina 10.15.1.
Update: I've also tried using MAMP, and it can't start Apache either.
sudo /Applications/XAMPP/xamppfiles/xampp start
run this command to Start XAMPP on MacOS Catalina.

Why doesn't homebrew apache start at startup?

I’m trying to figure out why my apache doesn’t start at startup… (I would like for it to).
My OS: OSX Mojave
Impressions I’m under: that I’m running homebrew’s apache
Upon a fresh boot…
If I hit http://localhost in a browser I get
Unable to connect
Firefox can’t establish a connection to the server at localhost.
Fire up terminal…
$brew services list
returns
httpd started bigpimpin /Users/bigpimpin/Library/LaunchAgents/homebrew.mxcl.httpd.plist
php started bigpimpin /Users/bigpimpin/Library/LaunchAgents/homebrew.mxcl.php.plist
(That first line makes me think httpd is running and I should be able to hit localhost).
$which -a apachectl
returns
/usr/local/bin/apachectl
/usr/sbin/apachectl
then
$apachectl configtest
returns
Syntax OK
then
$sudo apachectl -V
returns (among other things)
-D SERVER_CONFIG_FILE="/usr/local/etc/httpd/httpd.conf"
(Isn’t this brew’s httpd.conf?)
There's a brew command (which I forget) that I already ran that is supposed to run httpd at startup.
Once I run
$sudo apachectl start
everything is jake. So it’s a low-priority question, but one I would like to solve and understand.
I had the same issue with Homebrew NGINX.
Running the brew services command with sudo solved the problem for me.
It appears that the Homebrew web-server packages require sudo to start | stop | restart.
Try running:
sudo brew services start apache2

Not able to cache templates and will be slow because of this notice

Recently bought a Macbook Pro with macOS Sierra and installed XAMPP version 7.0.31.
After turning on MYSQL, ProFTPD and Apache Web Server, I noticed something when I opened phpmyadmin.
There was an error below saying:
The $cfg['TempDir'] (./tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.
Probably, do you get an error like this?
The Solution Process:
First, stop xampp service; /opt/lampp/lampp stop
Then, Go to the installation director of phymyadmin then find its "config.inc.php" file then add $cfg['TempDir'] = '/tmp'; like this
At the end, start xampp service /opt/lampp/lampp start

Can't change document root for apache 2.4

I want to set up local web server using Apache and PHP on my Mac running Sierra. I followed this tutorial:
https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions
And I am stuck at changing the document root from httpd.config, for whatever reason this change does not take effect at all. If I type http://localhost it still says "It works", it still uses the original html file.
Another weird thing is that apparently I can't stop apache at all. I tried running
$ sudo apachectl stop
but I still can’t access http://localhost
if I run
$ brew services list
httpd24 is stopped. What gives? What am I doing wrong?
There is an instance of apache pre-installed with macOS. So you have now two versions of apache installed. If you check:
which apachectl
you will probably obtain:
/usr/sbin/apachectl
which is the official macOS version of apachectl. Stop it with:
sudo apachectl stop
Disable the auto-loading of the pre-installed apache with (as explained in the tutorial you mentioned):
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
To run the homebrew version do:
brew services run httpd24
to stop it:
brew services stop httpd24
to register it to launch at login:
brew services start httpd24

xampp is not starting and not even showing any error

This is the error image
I have installed latest version of xampp first and then installed previous version.But it is not working now
I think you've Apache server installed explicitly (ie as a separate service). Apache server starts while system boot and thus this is preventing XAMPP from starting Apache again.
So, you either need to stop Apache server on CMD as:
cd C:\Apache24\bin
httpd -k -restart
Then, restart Apache on XAMPP.
Or, you'll have to uninstall Apache as a service completely as is given in this post: apache 2.4 - remove | delete | uninstall

Resources