最近装了一个MAMP打算学一下MySQL,结果打开发现Apache服务器不启动,折腾了一番后发现
在D:\MAMP\logs下的日志文件apache_error.log里的报错:
[Sat Jul 17 00:04:40 2021] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Jul 17 00:04:41 2021] [warn] pid file D:/MAMP/MAMP/bin/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Jul 17 00:04:41 2021] [notice] Digest: generating secret for digest authentication ...
[Sat Jul 17 00:04:41 2021] [notice] Digest: done
[Sat Jul 17 00:04:43 2021] [notice] Apache/2.2.31 (Win32) DAV/2 mod_ssl/2.2.31 OpenSSL/1.0.2h mod_fcgid/2.3.9 mod_wsgi/3.4 Python/2.7.6 PHP/7.4.1 mod_perl/2.0.8 Perl/v5.16.3 configured -- resuming normal operations
[Sat Jul 17 00:04:43 2021] [notice] Server built: May 6 2016 10:19:53
[Sat Jul 17 00:04:43 2021] [crit] (22)Invalid argument: Parent: Failed to create the child process.
[Sat Jul 17 00:04:43 2021] [crit] (OS 6)句柄无效。 : master_main: create child process failed. Exiting.
google了一下在stackoverflow发现了一个回答
解决方法是修改D:\MAMP\MAMP\conf\apache目录下的httpd.conf文件,将LoadModule perl_module modules/mod_perl.so这一行注释掉,再打开MAMP,成功启动Apache服务器