简体   繁体   English

XAMPP Apache无法在端口81上启动,无法加载动态库?

[英]XAMPP Apache won't start on port 81, unable to load dynamic library?

  • XAMPP 5.6.3-0 XAMPP 5.6.3-0
  • Mac Yosemite 10.10.5 Mac Yosemite 10.10.5

I ran sudo lsof -nP -iTCP:81 and found that Dropbox was blocking it first, so I unlinked that (never use it). 我运行sudo lsof -nP -iTCP:81 ,发现Dropbox首先阻止了它,所以我取消了链接(从不使用它)。 Now, when I run that command, it is empty. 现在,当我运行该命令时,它为空。

If I run sudo lsof -nP -iTCP:80 I get: 如果我运行sudo lsof -nP -iTCP:80我得到:

httpd       75    root    4u  IPv6 0xaac1841fb411203d      0t0  TCP *:80 (LISTEN)
httpd      532    _www    4u  IPv6 0xaac1841fb411203d      0t0  TCP *:80 (LISTEN)

Which I think is okay, since it's on a different port, right? 我认为还可以,因为它在另一个端口上,对吗?

If I look inside the /Applications/XAMPP/logs for the error_log, ssl_request_log, and access_log there isn't anything logged since two months ago. 如果我在/Applications/XAMPP/logs查找error_log,ssl_request_log和access_log,则自两个月前以来没有任何日志记录。

If I look inside the php_error_log I see this: 如果我查看php_error_log看到以下内容:

[08-Jan-2016 16:13:43 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226/php_pdo_mysql.dll' - dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226/php_pdo_mysql.dll, 9): image not found in Unknown on line 0

I found a similar problem in this question . 我在这个问题中发现了类似的问题。 I ran the command in the top answer (but obviously changed the dir path to mine), and it didn't work. 我在最上面的答案中运行了该命令(但显然将目录路径更改为我的目录路径),但它不起作用。 I read the forum with the link he attached and someone said that on Mac is is DYLD_LIBRARY_PATH not LD_LIBRARY_PATH , so i tried that as well, and it still doesn't work. 我阅读了带有他附加的链接论坛,并且有人说在Mac上是DYLD_LIBRARY_PATH而不是LD_LIBRARY_PATH ,所以我也尝试过,但仍然无法使用。 I've tried restarting my computer and the osx-manager multiple times. 我尝试过多次重启计算机和osx-manager。

If I look inside the /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226/ directory, it doesn't have php_pdo_mysql.dll in there. 如果我查看/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226/目录,则该目录中没有php_pdo_mysql.dll Is it supposed to be in there already, or is it trying to load the library in there, and it's not working? 它应该已经在其中了吗,还是正在尝试将库加载到那里,并且无法正常工作?

I get the dynamic library error every time I try to start it, so I'm guessing that is the issue, but I'm not sure how to fix it. 每次尝试启动动态库时都会收到错误,所以我猜这是问题所在,但我不确定如何解决。

For clarity, I have these lines in my httpd.conf file: 为了清楚起见,我在httpd.conf文件中包含以下几行:

Listen 81
ServerName localhost:81

And in my php.ini file I have the extension=php_pdo_mysql.dll line uncommented, and it's the only extension uncommented. 在我的php.ini文件中,我的extension=php_pdo_mysql.dll行未注释,这是唯一未注释的扩展名。 Does it depend on another extension? 是否依赖其他扩展名? I'm so lost. 我很迷路。

Update 更新资料

$ . /Applications/XAMPP/xamppfiles/xampp stopapache
$ XAMPP: Stopping Apache...not running

$ . /Applications/XAMPP/xamppfiles/xampp startapache
$ XAMPP: Starting Apache...fail.
$ XAMPP:  Another web server is already running.

But running lsof -nP -i :81 still gives me no results! 但是运行lsof -nP -i :81仍然没有结果! =( =(

Well, I had to shut down the Apache server running on port 80 for this to work. 好吧,我必须关闭在端口80上运行的Apache服务器,才能正常工作。 I thought I wouldn't have to, since I had it configured to run on port 81. My only guess to why this happened is that I had it configured on port 80, started it, and then changed the configuration to 81 before shutting it down. 我以为我没有必要,因为我将其配置为在端口81上运行。我唯一想到的原因是我在端口80上对其进行了配置,启动了它,然后在关闭之前将其配置更改为81。下。 I also had to comment out the php_pdo_mysql extension. 我还必须注释掉php_pdo_mysql扩展名。 I couldn't figure out that issue. 我不知道那个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM