macos - XAMPP - Apache 未在 Mac OS 上启动

标签 macos apache xampp

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

之前我使用的是xampp-osx-7.1.10-0-installer.dmg

现在,由于我的项目需要 PHP 7.2.X 以上,所以我备份了所有数据库和项目。并尝试安装xampp-osx-7.2.7-0-installer.dmg

安装后它一直给我这个错误

   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

我可以只在XAMPP中升级PHP版本吗?

如果我现在尝试再次安装xampp-osx-7.1.10-0-installer.dmg,那么它会在本地主机上出现以下错误

<?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 :-(

所以我根本无法运行 XAMPP。

最佳答案

这个问题困扰了我一整天,这就是解决方案。

删除 XAMPP/xamppfiles/lib/文件夹并再次运行 XAMPP 安装程序。这可能是由于以前版本的旧 lib 文件没有正确更新。

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

关于macos - XAMPP - Apache 未在 Mac OS 上启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51308008/

相关文章:

c++ - Xcode中发生的一些奇怪的事情

swift - 没有 Storyboard ,NSApplicationDelegate 无法工作

php - (63)文件名太长 : access to/xyz failed referer:www. mydomain.com

android - 为什么 Eclipse/adb 不能在我的 Mac 上检测到我的三星 Galaxy Tab 设备?

macos - 除非我让用户选择路径,否则保存到路径不起作用

regex - 如果文件或目录存在,则 RewriteCond 跳过规则

apache - 安装Apache(libaprutil)时出错

c# - 将 DateTime 作为 VarChar 返回以在 DataGridView 中使用

apache - 本地主机错误代码 : 200 | Error in processing request (It seems like the connection to server has been lost.)

security - 在 Apache 和文档根目录中使用 SSL 保护页面