douzhang5984 2016-01-08 16:37
浏览 83
已采纳

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

  • XAMPP 5.6.3-0
  • 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). Now, when I run that command, it is empty.

If I run sudo lsof -nP -iTCP:80 I get:

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.

If I look inside the php_error_log I see this:

[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. I've tried restarting my computer and the osx-manager multiple times.

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. 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:

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. 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! =(

  • 写回答

1条回答 默认 最新

  • doulan4939 2016-01-11 17:13
    关注

    Well, I had to shut down the Apache server running on port 80 for this to work. 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. I also had to comment out the php_pdo_mysql extension. I couldn't figure out that issue.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。