MAMP OS X Conflict with Built in Apache with Virtualhostx - apache

I am a newbie and I set up Mamp and virtualhostx on my IMAC and it works fine except when I restart the server in virtualhostx it tells me multiple servers are running and it could cause conflicts. I can go into settings and turn off Apache but it starts again when I restart with virtualhostx.
I used the setup suggested in http://seansperte.com/entry/Setting_Up_a_Killer_Local_Web_Development_Environment_on_a_Mac_with_MAMP_an/
and set my Apache and Mysql ports to to 80 and 3306 respectively
How can I keep the built in Apache turned off?

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
Answer from this source: http://tosbourn.com/turn-off-the-built-in-apache-on-osx/
with explanation. Worked for me. The above answer also doesn't work for me because sharing was completely disabled for me (nothing ticked in the first place).

You can disable it in System Preferences > Sharing. Remove the check next to "Web Sharing".

Related

localhost:8888 to localhost MAMP PRO mac [duplicate]

I have both apache and mySQL running with the default MAMP ports (8888 and 8889 respectively) and everything seems to work, but when I switch the ports to 80 for Apache and 3306 for mySQL, the mySQL server is unable to restart.
I am trying to setup MAMP to run on these ports because apparently this is optimal for developing in dreamweaver... Thus, given that I would like to have the ideal dev environment for dreamweaver, is there a way around using the 3306 port? Or, what could the potential problems be?
Thanks
Just in case anyone is having the same problem, here is how I fixed it:
I opened the Activity Monitor program and selected "All Processes"
Next I search for "mysqld" in the search text field. There is a good chance that you have an instance of mysql running and you have to find it and hit quit process.
Restart MAMP and you should be all set.
i posted my solution here..
but will it annoy the editor gods to re-post? i found this works so clearly and consistently that it's worth evangelizing.
fix courtesy of Abhinav Sood.
Launch MAMP. Open Terminal by typing terminal into Spotlight (Command + Space).
Open MAMP Preferences (Command + , ) and click on Reset MAMP Ports
(Port 8888 and Port 8889 for Apache and MySQL respectively).
Click on OK.
Switch to the terminal. Type sudo apachectl stop to shutdown the system Apache.
Restart MAMP.
Open MAMP Preferences once again and click on Set to Default Apache and MySQL ports. This will set the Apache and MySQL ports to 80 and 3306 respectively.
Switch to the terminal. Type sudo apachectl restart to restart Apache.
Switch back to MAMP and click on Open Start Page (or go to http://localhost/MAMP/?language=English in your browser)
And you’re done.
I configured httpd.conf.
In that file just replace:
Listen 80
for
Listen localhost:80
restart mamp. It worked for me.
#Mazal
Finally I found your great great solution of fixing this localhost:80 and apachectl issue. However, the issue will resume back when after re-start against!!!!!!
So fix this goto perference-->when quiting MAMP--> [uncheck] the box stop server.
this will keep the port setting to localhost:80 and apachectl in green light.
cheers!

Local site not running under MAMP after Yosemite upgrade

I just upgraded to Yosemite and noticing problems with MAMP. I was running Piwik locally (port 7788) before the upgrade, and it worked perfectly. Now, however, when I start MAMP I just get a 500 Internal Server Error.
Some searching around suggested that one issue was that MAMP was using Port 8888 for Apache and 8889 for MySQL, whereas they should now be changed to Port 80 and 3306 respectively (the default ones for those apps). This didn't change anything for me though.
I also read it could be an issue around PHP and a suggestion was to go to \etc\apache2\httpd.conf and uncomment the line LoadModule php5_module libexec/apache2/libphp5.so, again this did nothing.
I don't know enough about Apache2/MySQL/PHP to trawl through them and figure anything out so I'm hoping someone here can suggest how I go about correcting this.
MAMP will use it's own version of Apache2 so you will need to change the settings/ uncomment the modules in that httpd.conf file.
/etc/apache2/ is the default server preinstalled on the machine, which is different to MAMP's
Try looking for it here: Applications ▸ MAMP ▸ conf ▸ apache

Wamp and xampp on same machine

I use wamp2.2 for all the time, but i had to install xamp1.6.8 cause i've got to work with project created for old php version. Xamp installation goes fine but when i run it i cant get localhost site. Ive got blank page with favicon of wamp and comunicate that site is unavaible. I know that this is configuration case. Anybody know how to fix this?
I want to run only one of them at once, and i have configured some virtualhosts for wamp they dont have to be accesible while xamp is running i need xamp only for one project.
for run xampp and wamp in same computer you can use this tutorial from arasjoomla website: http://arasjoomla.ir/joomla-tutorial/how-to-run-xampp-and-wamp-on-same-computer
for example we used wamp with default port and setting and set changed in xampp:
Change xampp apache port 80 to example 8080 in httpd.conf from
directory C:\xampp\apache\conf
In my.ini from C:\xampp\mysql\bin change port=3306 to port=3307
In config.inc.php from C:\xampp\phpMyAdmin after this code:
$cfg['Servers'][$i]['AllowNoPassword'] = true;
add this code:
$cfg['Servers'][$i]['port'] = '3307';
restart xampp now we cab use xampp and wamp for example use this
code in xampp port 3307 for connection database:
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "my_db";
$port = '3307';
$conn = mysqli_connect($servername, $username, $password, $dbname,$port);
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$sql = "SELECT id, name FROM users";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
while($row = mysqli_fetch_assoc($result)) {
echo "id: " . $row["id"]. " - Name: " . $row["name"]. "<br>";
}
} else
echo "0 results";
mysqli_close($conn);
WAMP and XAMPP are basically the same thing i.e. Apache MySQL and PHP so if one is running it's Apache will have captured port 80, so the second one wont be able to get to port 80, ditto one's MySQL server will have captured port 3306 so the others wont run.
Why do you need to install XAMPP to get an old version of PHP running, WAMPServer is designed to allow you to switch between multiple versions of Apache/MySQL and PHP fairly easily.
But now you have done it, just make sure that the Apache and MySQL services from XAMPP are set to start manually and also Wampservers [wampapache] and [wampmysqld] services as well. then just run only one of them at any one time.
I have two working together, first was wamp. So xampp has to be changed at:
httpd.conf :
Listen 8080
ServerName localhost:8080
httpd-ssl.conf :
Listen 4433
<VirtualHost _default_:4433>www.example.com:4433
By the way, I realised so xampp has much better, mean faster, refreshing time.
The chances are that they are both trying to run on the same port via localhost.
I think it will be difficult to run both at the same time, there's a much better way to this using a tool called "Vagrant".
Vagrant allows you to start up a virtual host that you have full control over, including PHP version. You can see more information about Vagrant at http://www.vagrantup.com/. This tutorial is what helped me get set up and understand how it works: http://code.tutsplus.com/tutorials/vagrant-what-why-and-how--net-26500.
Good luck!
If you want to run both XAMPP and WAMP together on the same machine but access only one of the servers at a time then you could go ahead installing both of them one after another. But, keep in mind that before installing the other server you have to completely stop all the services running from the XAMPP or WAMP control panel then quit the application. After this step you can go ahead installing the other server without changing any configurations or port numbers. This is because in this case we assumed that only one of the servers would be accessed at a time. Hence, before launching the other server one has to completely quit the application that is running currently by stopping all of it's services. If skype is installed then one has to change the default incoming connection ports to other than port 80 and 443.
If you messed up changing ports and config files then you could end up with the following error while trying to access phpmyadmin from XAMPP control panel:
**mysql said: Cannot connect: invalid settings. xampp**
note: while launching the servers , run it as administrator else some services will not start properly.
I TRIED INSTALLING BOTH XAMPP AND WAMP ON WINDOWS 10 AS SUCH AS
POINTED BY MANY THREADS I CHANGED THE DEFAULT PORTS FOR MYSQL & APACHE
XAMPP AS IT WOULD CONFLICT WITH WAMP ALREADY INSTALLED ONLY ENDING UP
UNABLE TO ACCESS PHPMYADMIN FROM XAMPP CONTROL PANEL. THEN REINSTALLED
XAMPP WITHOUT CHANGING ANY CONFIGS OR PORTS. STOP THE WAMP SERVICES,
QUIT THE APP AND THEN LAUNCH PHPMYADMIN FROM XAMPP CONTROL PANEL. AT
LAST IT WORKED!. THE PROCESS LOOKS SHORT THOUGH WHEN IN REALITY IT
TOOK ME COUNTLESS HOURS AND PAIN RESEARCHING ON THE WEB AND TESTING
FOR A POSSIBLE SOLUTION UNTILL I CAME UP WITH THIS.
Hopes, this quick tips and guides would be helpful.
If you guys wanna use MYSQL specifically on Both Wamp and Xampp . Yes It's possible. Not only that You can use the Apache server and all the components of it parallely. Let's say you need two different versions of MYSQL on a same machine then this solution that I am gonna tell you will be helpful.
First Install WAMP server and then after launching it Just go down to the bottom right of ur desktop and hit on the wamp server icon. You will be able to see All the components there. Now if you hit on MYSQL specifically then you'll see a my.ini file pointed there. Now open that file on a notepad and then search for "port" and replace the existing port of mysql which is 3306 to a new random port let's say 3360.
Now after this just press on restart all the services It's done.
Now Install xampp server and now go to xamp folder and search for mysql and rename that to mysql_old. Create a new and empty mysql folder now. Now redirect to the below link https://dev.mysql.com/downloads/mysql/5.5.html?os=3&version=5 and download the zip and extract it. After extracting it just paste all the contents of it in the newly created mysql folder. Now redirect to the bin path inside newly created mysql folder and create a new my.ini file. Over there just paste the below contents:
[mysqld]
# Set basedir to your installation path
basedir=C:/xampp/mysql
port=3306
key_buffer_size = 256M
# Set datadir to the location of your data directory
datadir=C:/xampp/mysql/data
# Default: 128 MB
# New: 1024 MB
innodb_buffer_pool_size = 1024M
# Default since MySQL 8: caching_sha2_password
default_authentication_plugin=mysql_native_password
[client]
ssl-mode=DISABLED
port=3306 #This port can be again anything..
Now after this just redirect to bin folder and hit on mysql d --initialize.
And then you're good to run mysql server on xamp using the following command
mysql -u root -p -h localhost.
This can help u run mysql on a different port.
Cheers

Apache Shutdown unexpectedly (nothing seems to work!)

I've tried just about everything (expect for re-installing xampp) everyone's suggested doing, but Apache just won't run anymore on my setup. It did for a few days, but stopped randomly. I changed nothing before it's demise.
Here's my setup (& some of what I've tried already):
I'm using xampp 1.8.3 (apache version: 2.4.9)
Nothing else is taking up Port 80 or 443 - I've checked multiple times!
I don't have Skype installed
IIS isn't installed (nor are any other server related systems)
I tried changing the ports via httpd.conf & restarting my computer
I tried changing the port settings via the Service Settings in xampp's control panel configuration
tried a previous system restore point (when it worked)
Not sure what to try next. Help?

XAMPP on Windows - Apache not starting

I have installed XAMPP on my windows 7 machine but can't get Apache to work.
On start I get the following errors:
13:09:21 [apache] Apache Service Detected With Wrong Path
13:09:21 [apache] Uninstall the service manually first
13:09:21 [apache] Possible problem detected!
13:09:21 [apache] Port 80 in use by "system"!
13:09:21 [tomcat] Tomcat Service Detected With Wrong Path
13:09:21 [tomcat] Uninstall the service manually first
After opening the XAMPP panel and installing Apache service: I have tried start it, it always get stuck "Starting apache service..."
Any advice on how I could resolve this ?
Thanks
Jamil
I was able to fix this!
Had the same problems as stated above, made sure nothing was using port 80 and still not working and getting the message that Apache and Mysql were detected with the wrong path.
I did install XAMPP once before, uninstalled and reinstalled. I even manually uninstalled but still had issues.
The fix. Make sure you backup your system first!
Start Services via Control Panel>Admin Tools (also with Ctrl+R and services.msc)
Look for Apache and MySQL services. Look at the patch indicated in the description (right click on service then click on properties). Chances are that you have Apache listed twice, one from your correct install and one from a previous install. Even if you only see one, look at the path, chances are it's from a previous install and causing your install not to work. In either case, you need to delete those incorrect services.
a. Got to command prompt (run as administrator): Start > all programs > Accessories > right click on Command Prompt > Select 'run as administrator'
b. on command prompt type sc delete service, where service is the service you're wanting to delete, such as apache2.1 (or sc delete Apache2.4). It should be exactly as it appears in your services. If the service has spaces such as Apache 2.1 then enter it in quotes, i.e. sc delete "Apache 2.1"
c. press enter. Now refresh or close/open your services window and you'll see it`s gone.
DO THIS for all services that XAMPP finds as running with an incorrect path.
Once you do this, go ahead and restart the XAMPP control panel (as administrator) and voila! all works. No conflicts
my friend this the will fix ur problem ;)
in root of folder ( xampp ) just run this file ( setup_xampp.bat ) then press enter
and try to start the apache server
every things will work like charm ;)
The most likely reason would be that something else is using port 80. (Often this can be Skype, IIS, etc.)
This tutorials shows How to Change the Apache Port in XAMPP
I spent over 3 hours to find out solution. Actually port 80 was being used by "system" service so I tried to change port from 80 to 8080 in "httpd" file but same problem raised "port 80 is used by system". It had driven me mad for 3 hours as every thing was changed like port , localhost server etc pointing to 8080.
At last I found mistake that was server root. Basically "Server Root" in "httpd" should be pointing to apache foler of xampp. In my case that's was
ServerRoot "xampp/apache"
I just changed it as follows:
ServerRoot "C:/xampp/apache"
It has worked successfully and now everything is running with OK status.
refer this:- http://www.sitepoint.com/unblock-port-80-on-windows-run-apache/
and to enable telnet http://social.technet.microsoft.com/wiki/contents/articles/910.windows-7-enabling-telnet-client.aspx
I encountered the same issue after XAMPP v3.2.1 installation. I do not have Skype as most people would believe, however as a Software Developer I assumed port 80 is already in use by my other apps. So I changed it by simply using the XAMPP Control Panel:
Click on the 'Config' button corresponding to the APACHE service and choose the first option 'Apache (httpd.conf)'. In the document that opens (using any text editor - except MS Word!), locate the text:
Listen 12.34.56.78:80
Listen 80
And change this to:
Listen 12.34.56.78:83
Listen 83
This can be any non-used port number.
Thanks.
I know this is somewhat of an old topic, but in case anyone reads this in the future...
I uninstalled xampp, deleted everything under the c:\xampp folder, then reinstalled xampp as administrator and it worked like a charm.
For me, the problem was I had two installations of Apache Tomcat
The following steps solved my problem:
Open up services.msc in command prompt
Select the Apache Tomcat service, right click and select properties
Check the path to the executable of the service
Follow the instructions in
https://stackoverflow.com/questions/7190480/modifying-the-path-to-executable-of-a-windows-service
to change the path to "\tomcat\bin\tomcat7.exe" //RS//Tomcat7
Restart XAMPP Control Panel
I had my Apache service not start same as MySQL one.
Please follow these steps if none of above tips works :
Open regedit.exe on any windows this available . Run as administrator. (Only on windows 7 and later editions )
Go to local machine/system/controlset001/services
Find and delete folders of services apache and mysql .
Uninstall xampp . Delete folder of xampp.
Restart computer and reinstall Xampp . After that your Xampp apache and Mysql should work.
Note: Ports 80 and 443 must be unused by any program.
If it is in use . Just edit ports. There is a lot of tutorials about that .