Softaculous


Topic : Apache won't start with php 7 - Ampps on Mac


Posted By: john91 on May 15, 2016, 5:57 pm
Apache starts on all other php versions, but will not start with php 7. How can i troubleshoot this?

Thanks

Posted By: john91 on May 15, 2016, 7:01 pm | Post: 1
Just some more information:

I ran

Code
sudo /Applications/AMPPS/apache/bin/httpd


in terminal and the error I received was:

httpd: Syntax error on line 154 of /Applications/AMPPS/apache/conf/httpd.conf: Cannot load /Applications/AMPPS/php/libphp5.so into server: dlopen(/Applications/AMPPS/php/libphp5.so, 10): image not found

Line 154 of the httpd.conf file reads

Code
LoadModule php5_module /Applications/AMPPS/php/libphp5.so

Posted By: john91 on May 15, 2016, 7:12 pm | Post: 2
I'm sorry I got it all sorted out. Just a newbie with server stuff. Here's what fixed the issue for me. In case someone is having the same issue.

It turns out I don't have a libphp5.so file. I have libphp7.so.

So I commented line 154 out by adding a # sign to the beginning of the line, then added the following right after

Code
LoadModule php7_module /Applications/AMPPS/php/libphp7.so


All is working now.

Posted By: erickb on November 10, 2016, 7:34 am | Post: 3
same here

in httpd.conf

#LoadModule php5_module /Applications/AMPPS/php/libphp5.so
LoadModule php7_module /Applications/AMPPS/php/libphp7.so

now it works


Posted By: Rishi_P on December 2, 2016, 12:20 pm | Post: 4
Hi,

Download this patch.
http://files.ampps.com/Ampps.zip

We have fixed this issue, if you are still facing the same issue then open support ticket here.

https://www.softaculous.com/support/

Posted By: Navee on December 6, 2016, 1:52 pm | Post: 5
Quote From : john91 May 15, 2016, 7:12 pm
I'm sorry I got it all sorted out. Just a newbie with server stuff. Here's what fixed the issue for me. In case someone is having the same issue.

It turns out I don't have a libphp5.so file. I have libphp7.so.

So I commented line 154 out by adding a # sign to the beginning of the line, then added the following right after

Code
LoadModule php7_module /Applications/AMPPS/php/libphp7.so


All is working now.


Lol, you are hardly a newbie and should give yourself more credit for running Terminal and locating the error and line number in the conf file. Checking the directory to notice you don't have the file (just as the error stack indicated--thus no wonder the error) then changed the path to the file you do have which IS the php7 you intended and 'easy peasy' it worked as it should. Nah, you are a pro guy--not many would have investigated the blatant error beyond a cry without action (otherwise complaint!)

YOU ARE A HERO DUDE KEEP UP THE GOOD WORK!!!

Of course the Ampps Team heroes saves the day with a patch fix--because from the looks they are faster at fixing things than Apple! Are you running Sierra? I'm waiting on it to become more reliable than it is with current software...too many devs are needing to re-adjust to conform. I tried it and is slowed my Mac down...but more than likely it was the upgrade from El Cap to Sierra rather a full clean install because El Cap upgrade did the same slow crawl thing too until I did a full clean install. How is your Sierra experience with Ampps if that is what you are using? Just gaining intel from others and learning from their mistakes and troubles before I get started  :angel:


-----------------------
The worst installation to support is when a user installs the application to the Desktop!

Posted By: learnfastlearn on August 26, 2020, 4:43 pm | Post: 6
if someone is still facing this problem then try these steps (www(dot)ampps(dot)com(forward-slash)wiki(forward-slash)Apache_is_Not_Running) :

Mac OS X :

Default Server
Mac OS comes with LAMP stack so default Apache is already installed on /usr/bin or /usr/sbin location.
To stop default Apache open terminal and run following commands.

sudo apachectl -k stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
sudo killall httpd



Port 80 is held By Another Process

It could be due to a port conflict i.e some other application or web server must be using port 80. Make sure that no other Application is listening on port 80. You can use Port Scan Feature of Network Utility to check which Application is listening on port 80.

Incorrect httpd.conf. We can always find why Apache din't work by running the following command in Terminal:

sudo /Applications/AMPPS/apache/bin/httpd


The above commands starts Apache if everything is correct, else it will throw an error.

Hope it will help.

Cheers!

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.