XAMPP - Apache not starting on Mac OS

十年热恋 提交于 2020-07-23 06:56:05

问题


https://www.apachefriends.org/download.html

Previously I'm using xampp-osx-7.1.10-0-installer.dmg.

Now as my project required PHP 7.2.X above so I took the backup of all DB & project. & try to install xampp-osx-7.2.7-0-installer.dmg

After installation it keep gives me this error

   Starting all servers...
    Starting MySQL Database...
    /Applications/XAMPP/xamppfiles/mysql/scripts/ctl.sh : mysql  started at port 3306
    Starting Apache Web Server...
    Exit code: 8
    Stdout:
    apache config test fails, aborting
    Stderr:
    httpd: Syntax error on line 522 of /Applications/XAMPP/xamppfiles/etc/httpd.conf: Syntax error on line 13 of /Applications/XAMPP/xamppfiles/etc/extra/httpd-xampp.conf: Cannot load modules/mod_perl.so into server: dlopen(/Applications/XAMPP/xamppfiles/modules/mod_perl.so, 10): Symbol not found: _modperl_handler_anon_add\n  Referenced from: /Applications/XAMPP/xamppfiles/modules/mod_perl.so\n  Expected in: dynamic lookup\n

Can I upgrade PHP version only in XAMPP?

If I'm now try to install xampp-osx-7.1.10-0-installer.dmg again then it gives on localhost below error

<?php
    if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
        $uri = 'https://';
    } else {
        $uri = 'http://';
    }
    $uri .= $_SERVER['HTTP_HOST'];
    header('Location: '.$uri.'/dashboard/');
    exit;
?>
Something is wrong with the XAMPP installation :-(

So I'm not able to run XAMPP at all.


回答1:


I had this issue and commented out line 13 of /Applications/XAMPP/xamppfiles/etc/extra/httpd-xampp.conf and it's working fine after a restart - obviously, this means that you aren't loading the Pearl module but may work as an interim until you can find out what's wrong with that




回答2:


I had this issue that troubled me for a whole day and this was the solution.

Remove the XAMPP/xamppfiles/lib/ folder and run the XAMPP installer again. It's probably due to old lib files from previous version not being updated properly.

https://community.apachefriends.org/viewtopic.php?t=77199&p=261450



来源:https://stackoverflow.com/questions/51308008/xampp-apache-not-starting-on-mac-os

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!