简体   繁体   中英

XAMPP Apache Won't Start after PHP Upgrade

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM