Apache won't start on Mac with XAMPP. I tried updating PHP from 5.5.6 to PHP 5.6.8, and since that update XAMPP wouldn't start Apache. I tried completely re-installing XAMPP, but same issue.
Help would be appreciated, I'm more than happy to post any information that is necessary, not sure where to start. I've done a lot of looking around and haven't been able to find anything that points me in the right direction - I checked the Apache error_logs and there aren't any.
Try this -
Solution#1
This solution worked perfectly fine for me..
1) Close XAMPP control
2) Open Activity Monitor(Launchpad->Other->Activity Monitor)
3) Select filter for All processes (default is My processes)
4) In fulltext search type: httpd
5) Kill all httpd items
6) Relaunch XAMPP control and launch apache again
OR, Solution#2
sudo apachectl stop
This command kills Apache server that was pre-installed on MAC OS X.
OR, Solution#3
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
This will disable OSX's built-in Apache server and allows XAMPP to start on 80.
Now once Apache starts successfully modify the .htaccess file
Apache needs to be configured to recognize index.php as an index file. While adding 'DirectoryIndex index.php' to a .htaccess file may work,
NOTE:
In general, you should never use .htaccess files
This is quoted from http://httpd.apache.org/docs/1.3/howto/htaccess.html
Although this refers to an older version of apache, I believe the principle still applies.
Adding the following to your httpd.conf (if you have access to it) is considered better form, causes less server overhead and has the exact same effect:
<Directory /myapp>
DirectoryIndex index.php
</Directory>
I've updated PHP to 8.0 in xampp by renaming old PHP folder to PHP_7.4
and new pasted new php8 folder as php folder, it gave me same error,
SOLUTION
Step1: backup old php folder,
Step2: Paste php8 files in to old PHP folder and overwrite existing files,
Done: Restart Apache it should start
Related
I installed Apache, PHP and MySQL in Windows 10 and edit config file also. I made change all things which are required like Directory root and add php module and Change AllowOverride and also enable its LoadModule and also enable extensions in php.ini file.
I keep my "apache" and "php" folder under C:/intel. All the installation is correct and also working nice (php files are running well) but when I run php file which contains mysqli function browser shows error:
failed to load resources Internal server Error 500
How to fix it.Where am I doing wrong?
Note: I put "apache" and "php" folder under C:/ its working nice all php files run which contain MySQL function also.
I'll advice you install the XAMPP package which comprises of Apache, MySQL/MariaDB, PHP, Perl.
The installation is easy. It will save you all the stress and headache.
See here xampp
I was attempting to set-up my local environment for LAMP on my desktop with Guy Nathan's Installing LAMP stack on OSX Mavericks with Homebrew updated guide. Since I'm experienced with RoR, I proceeded with homebrews but along the way, evidently, I misconfigured the /usr/local/etc/apache2/2.2/httpd.conf file because whenever I try to start the apache server with sudo apachectl start or test with sudo apachectl configtest, the following error is invariably returned:
httpd: Syntax error on line 482 of /usr/local/etc/apache2/2.2/httpd.conf: Could not open configuration file /Sites/httpd-vhosts.conf: No such file or directory
Due to the length of the 'http.conf' file, I've created a gist of my 'httpd.conf file' for review.
At this point, I would just like to reset my 'httpd.conf' file, or whatever is necessary so I can properly configure my local environment for LAMP. I've tried other solutions involving a reversion of /private/etc/apache2/httpd.conf.pre-update but was unable to effect. Thank you.
It is failing to start because the httpd.conf file is specifying an include of /Sites/httpd-vhosts.conf which doesn't exist.
Either comment out line 482 by putting a # at the beginning of the line, or create an empty /Sites/httpd-vhosts.conf file so it can be included. If its empty it won't have any effect.
Here are some examples of what would typically go in that file.
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
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
I have OS X 10.5 set up with the precompiled versions of PHP 5 and Apache 2. I'm trying to set up the Zend Debugger, but with no luck. Here's what I did:
I downloaded ZendDebugger-5.2.14-darwin8.6-uni.tar
I created the directory /Developer/Extras/PHP and set the permissions to:
Permissions: drwxrwxr-x
Owner: root:admin
I copied ZendDebugger.so from the 5_2_x_comp directory to /Developer/Extras/PHP
I updated /etc/php.ini file, adding the following lines:
zend_extension=/Developer/Extras/PHP/ZendDebugger.so
zend_debugger.expose_remotely=always
zend_debugger.connector_port=10013
zend_debugger.allow_hosts=127.0.0.1
I restarted Apache via the System Preferences "Sharing" panel
When I run phpinfo() within a PHP file, I get no mention of the Zend Debugger. When I run php -m from the command line, it shows the Zend Debugger is loaded. Both state that they're running the same version of PHP, and loading the same INI file.
Anyone have another suggestion for me to try?
If I remember correctly, this problem is do to the fact that the Zend Debugger is compiled for 32-bit Apache while the Apache that comes with Max OS 10.5 is compiled as 64-bit application. Until Zend comes out with a 64-bit version, you have two options:
1) Restart Apache manually into 32-bit
2) Recompile Apache and PHP in 32-bit mode.
I haven't actually gotten around to doing either yet, but I think I am leaning to recompiling to avoid future problems.
Restarting in 32-bit mode did the trick. For those of you who want to be able to do this easily, here's a little bit of AppleScript:
do shell script "apachectl stop" with administrator privileges
do shell script "arch -i386 /usr/sbin/httpd" with administrator privileges
It's nice to have sitting somewhere so you can quickly pop into 32-bit mode when needed.
Zend released the 64bit version for Mac OSX, so just download the file from http://www.zend.com/en/products/studio/downloads and procede as normal.
You will have to register and answer some questions, but it worked for me.
Good Luck.
Me too, HOURS!! Thanks so much!!
Also if for some reason you need to restart apache/httpd after running this (e.g. you need to make a change in your php.ini) but when you run "sudo arch -i386 /usr/sbin/httpd" you're getting this error:
(48)Address already in use: make_sock: could not bind to address [::]:80
type this in a terminal window:
sudo killall httpd
then "sudo arch -i386 /usr/sbin/httpd" should work fine to restart apache/httpd.