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/