MongoDB PHP驱动程序导致XAMPP OS X上的Apache失败 [英] MongoDB php driver causing apache on XAMPP OS X to fail

查看:68
本文介绍了MongoDB PHP驱动程序导致XAMPP OS X上的Apache失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于升级到Mac OS X El Capitan,如果我尝试使用php.ini文件中包含的'extension = mongo.so'在XAMPP中启动apache,则apache无法启动.如果删除此选项,则apache可以正常启动. Mongo使用随附的pecl命令安装在我的XAMPP构建中.新操作系统,驱动程序或XAMPP会出现问题吗?

Since upgrading to Mac OS X El Capitan, if I try to start apache in XAMPP with 'extension=mongo.so' included in the php.ini file, apache fails to start. If I remove this, apache starts up fine. Mongo was installed in my XAMPP build using the pecl command included. Is this a problem with the new operating system, the driver or XAMPP?

驱动程序在MAMP上正常工作,该问题必须在XAMPP中存在

Got the driver working properly on MAMP, the problem must exist in XAMPP

推荐答案

发件人: PHP进程加载mongodb.so,并执行libmongoc的_mongoc_do_init()函数,该函数在使用SASL编译时将调用sasl_client_init().如果在同一过程中多次初始化和销毁​​客户端,我会在OS X的Cyrus SASL的早期版本中发现一些有关崩溃的参考.但是,我希望_mongoc_do_init()周围的逻辑可以确保每个进程仅执行一次.我也不确定您安装的SASL版本(除了库中文件名中带有"2.2"之外),因此我不确定这是否是红色鲱鱼.我将需要跟libmongoc开发人员进行跟进,以确认.

The PHP process loads mongodb.so and libmongoc's _mongoc_do_init() function is executed, which calls sasl_client_init() when compiled with SASL. I found some references to crashes in earlier versions of Cyrus SASL on OS X if the client is initialized and destroyed multiple times in the same process; however, I'd expect the logic around _mongoc_do_init() ensures that it only executes once per process. I'm also not sure of the version of SASL you have installed (beyond the library having "2.2" in its filename), so I'm not sure if that is a red herring. I will need to follow up with the libmongoc devs to confirm.

在此期间,您能否提供pecl安装mongodb的日志?有一些有趣的方面与SASL的配置方式有关(不幸的是,不是确切的版本号).

In the meantime, could you provide a log of your pecl install mongodb? There are some lines of interest there related to how SASL is configured (sadly, not the exact version number).

此外,如果您手动构建驱动程序,则应该能够使用--with-mongodb-sasl = no参数配置为禁用SASL支持,这可能会解决该问题,直到我们进一步诊断为止.从外壳手动构建的步骤将是:

Also, if you manually build the driver, you should be able to use the --with-mongodb-sasl=no argument to configure to disable SASL support, which may work around the issue until we can diagnose it further. The manual build steps from a shell would be:

$ cd /path/to/mongo-php-driver
$ phpize
$ ./configure --with-mongodb-sasl=no
$ make clean && make all && make install

如果要克隆存储库,这还需要初始化git子模块.否则,您应该能够提取PECL tgz文件并使用这些源.

This would also requiring initializing git submodules if you are cloning the repository. Otherwise, you should be able to extract the PECL tgz file and use those sources.

这篇关于MongoDB PHP驱动程序导致XAMPP OS X上的Apache失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆