XAMPP - Apache无法在Mac OS上启动

8tntrjer  于 2023-10-23  发布在  Apache
关注(0)|答案(2)|浏览(145)

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(& T)
安装后它保持给我这个错误

  1. Starting all servers...
  2. Starting MySQL Database...
  3. /Applications/XAMPP/xamppfiles/mysql/scripts/ctl.sh : mysql started at port 3306
  4. Starting Apache Web Server...
  5. Exit code: 8
  6. Stdout:
  7. apache config test fails, aborting
  8. Stderr:
  9. 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,那么它会在localhost下面的错误

  1. <?php
  2. if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
  3. $uri = 'https://';
  4. } else {
  5. $uri = 'http://';
  6. }
  7. $uri .= $_SERVER['HTTP_HOST'];
  8. header('Location: '.$uri.'/dashboard/');
  9. exit;
  10. ?>
  11. Something is wrong with the XAMPP installation :-(

所以我根本无法运行XAMPP。

xkrw2x1b

xkrw2x1b1#

我有这个问题困扰了我一整天,这是解决方案。
删除XAMPP/xamppfiles/lib/文件夹并再次运行XAMPP安装程序。这可能是由于旧的lib文件从以前的版本没有被正确更新。
https://community.apachefriends.org/viewtopic.php?t=77199&p=261450

v09wglhw

v09wglhw2#

我遇到了这个问题,并注解掉了/Applications/XAMPP/xamppfiles/etc/extra/httpd-xampp.conf的第13行,重新启动后它工作正常-显然,这意味着您没有加载Pearl模块,但可以作为临时工作,直到您找到问题所在

相关问题