简体   繁体   English

在PHP 7中使用--with-ldap会在Mac 10.13上导致错误“找不到php_pdo_driver.h”

[英]Using --with-ldap in PHP 7 causes error “Cannot find php_pdo_driver.h” on Mac 10.13

I am able to compile PHP 7.2.5 on my Mac 10.13.4, but when I add --with-ldap I get the following error during compilation: 我可以在Mac 10.13.4上编译PHP 7.2.5,但是当我添加--with-ldap时,在编译过程中会出现以下错误:

checking for PDO includes... checking for PDO includes... ./configure: line 65719: test: too many arguments ./configure: line 65721: test: too many arguments 检查/ PDO包括...检查/ PDO包括... ./configure:65719行:测试:参数太多./configure:65721行:测试:参数太多

configure: error: Cannot find php_pdo_driver.h. 配置:错误:找不到php_pdo_driver.h。

Here is my complete configure command: ./configure --prefix=/usr/local/php7 --with-apxs2=/usr/local/apache-2.4.33/bin/apxs --enable-exif --with-mysqli --with-curl --enable-ftp --with-gd --enable-mbstring --with-openssl=/usr/local/openssl --enable-sockets --with-zlib --with-ldap 这是我完整的配置命令:./configure --prefix = / usr / local / php7 --with-apxs2 = / usr / local / apache-2.4.33 / bin / apxs --enable-exif --with-mysqli --with-curl --enable-ftp --with-gd --enable-mbstring --with-openssl = / usr / local / openssl --enable-sockets --with-zlib --with-ldap

I have tried using --with-ldap=/usr and --with-ldap-sasl, but the error was the same. 我尝试使用--with-ldap = / usr和--with-ldap-sasl,但是错误是相同的。

I am trying to get WordPress running locally. 我正在尝试使WordPress在本地运行。 I got it running without LDAP, but now I want to use Active Directory credentials and the plugin I chose ( https://wordpress.org/plugins/ldap-login-for-intranet-sites/ ) informs me that PHP is missing LDAP... 我让它在没有LDAP的情况下运行,但是现在我想使用Active Directory凭据,并且我选择的插件( https://wordpress.org/plugins/ldap-login-for-intranet-sites/ )通知我PHP缺少LDAP ...

I had deleted the PHP source folder and re-created it. 我已经删除了PHP源文件夹并重新创建了它。 I thought Terminal was using the new PHP source folder but it was not. 我以为Terminal使用的是新的PHP源文件夹,但事实并非如此。 Now the compile worked as expected and I can now configure the WP AD plugin! 现在,编译工作按预期进行,我现在可以配置WP AD插件!

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

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