I've got a clean install of my macbook again, reinstalled the OS and just installed XAMPP. I've clicked "Start" on Apache, and just as the icon turns orange it turns red again.
I have tried:
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
but that just returns the following:
/System/Library/LaunchDaemons/org.apache.httpd.plist: Could not find specified service
~~~~~~~~~~~~
Then I tried
sudo apachectl stop
And that returned the following:
/System/Library/LaunchDaemons/org.apache.httpd.plist: Could not find specified service
~~
Using the following starts it and works, though the MySQL doesnt work with it
sudo /Applications/XAMPP/xamppfiles/bin/apachectl start
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
Though I don't want to go through the process of doing it through the terminal every single time.
Gyazo gif of my situation
This is really frustrating because this is the 3rd time I've re-installed my OS (Had nothing to lose so I went on and did it)
Is it possible that it has invalid permissions?
Related
First, I'm running macOS High Sierra, with Homebrew's PHP 7.1
I've also followed the Valet documentation to the letter, as well as trying what was on these asks: Valet (Laravel): DNS address can not be found and Laravel valet It works aaaaaand, despite all of that, when I navigate to project.dev, I just get "It works!" I was having issues pinging, but that turned out to be Stealth Mode in the macOS Firewall.
I have Laravel set up in this directory, so I SHOULD be getting the default splash page, right?
Also, in case it matters, here's the line I used to install PHP 7.1 itself: brew install php71 --with-httpd --with-pear --with-postgresql --with-thread-safety --with-homebrew-curl
You should check your settings related to firewall. Make sure you are allowing pings and ICMP.
To check it on a Mac :
System Preference > Security & Privacy > Firewall > Firewall Options
This sounds like the Apache that comes pre-installed with macos is running in the port 80. Before starting valet, make sure that Apache is stopped.
You can these commands: sudo apachectl stop or sudo apachectl -k stop to stop Apache, and after that, then you can proceed with your valet process.
Hope it helps.
I installed lamp long time ago and was able to execute php files. However, recently I tried to install cakePHP and ran into trouble (restarting apache started to generate errors). Thus I purged apache2 from my system. I reinstalled apache2 using command "apt-get install apache2" but after doing so it could no longer open .php files, shows a blank page instead. I've set the necessary permissions (given -R 777 to /etc and /var/www). I've also ran the command "apt-get install php7.0 libapache2-mod-php7.0" and restarted apache several times, nothing works. Can anyone help?
PS: I was originally trying to run phpmyadmin, before purging I was able to run it but after reinstalling it threw errors, thence I discovered my server was not able to execute any php file.
Additionally, when I access the file (home.php) via localhost/home.php it shows a blank page but if follow the path file:///var/www/html/home.php it brings a pop up that asks me to either save or open the script.
I think problem is the apache-php-mod is not well installed,I suggest you purge remove all apache and php package,then reinstall them.
sudo apt-get purge apache2
sudo apt-get purge php
sudo apt-get autoremove
Then,find all apache2 or php files, and remove them,you can do it by using find command,be carefully when do this!
sudo find / -name apache2
At last,you can reinstall them
I uninstall xampp with php 5.6 and download and install my xampp with php7.
Then I use the manage server to start the Apache Web Server, the light red turns on a yellow light, but after returns to red light.
The Application log show this:
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
What´s happening here?
open your terminal and write this command and press enter
sudo apachectl stop
to stop your apache osx and re-open your apache
Good Luck
I've downloaded php5.6 from here https://www.mamp.info/en/downloads/ and added it to php folder. After that I can't run Apache server. I removed that folder, but Apache still doesn't work. Files in /Local/logs/ are empty.
Mac OS Mavericks.
Same problem here. A (temporary) solution is to start apache from the terminal:
sudo /Applications/MAMP/Library/bin/apachectl start
MAMP detects it as its status light becomes green! But I cannot explain why MAMP doesn't command apache anymore, with nothing logged.
Tried to modify file /bin/startApache.sh, adding a sudo before start command, without success.
I'm trying to install zend debugger in my Ubuntu 9.04 machine, I've done it in win. but not in linux, I hope you could help me, this is what I've done:
1)Copied the file ZendDebugger.so to /etc/php5/apache2 (didn't choose this folder for anything in special).
2)Added this lines to php.ini:
zend_extension="/etc/php5/apache2/ZendDebugger.so" zend_debugger.allow_hosts=127.0.0.1,127.0.1.1,localhost,*
zend_debugger.expose_remotely=always
I've also tried without quotes(zend_extension=/etc/php5/apache2/ZendDebugger.so)
3)Copied file dummy.php to /var/www
And then restarted Apache but I didn't see the information about Zend Debugger in the phpinfo(), the only related thing I found there was report_zend_debug On.
Thanks in advance
I found much more easy to install Xdebug in my Ubuntu machine.
sudo mv /etc/php5/apache2/ZendDebugger.so /usr/lib/php5/20060613/ZendDebugger.so
This is where your memcache.so, apc.so, etc. are located. Unless you modified your php extensions directory that is where new exts should go.
In php.ini:
zend_extension=/usr/lib/php5/20060613/ZendDebugger.so
cd to that directory and chmod a-x ZendDebugger.so to remove executable bits from the .so.
sudo /etc/init.d/apache2 stop
In another terminal window, tail -f /var/log/error.log and clear console so it is easy to see new log entries coming in (cmd-k on macos).
Then:
sudo /etc/init.d/apache2 start
If there are no errors in error.log, check phpinfo() and see if the debugger section shows up.
You might get errors in the configuration of other php extensions that occur further up in php.ini (e.g., xcache or eaccellerator) that will make loading stuff further down in php.ini problematic.
This is a baseline setup and should work if there are no other problems.
You can also try to install Zend Server Community Edition
You'll get Zend Debugger enabled by default, along with some other nice features. There is a link to the deb repository available through the download page.
I followed the same steps that you did with the same result. In the end the problem was that I was trying to load a 32bit binary with apache running in 64bit mode base (as described in this post) I was able to get it running immediately by doing the following.
stopping apache
executing sudo arch -i386 /usr/sbin/httpd
restarting apache.
After replacing the 32bit binary with the 64bit binary everything worked as expected with no special apache handling. There was also some facepalming involved, but it did not affect the overall outcome.