-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extension shows in phpinfo() but not in php -m #502
Comments
Is your php apache module compiled with phpbrew +apxs? it looks like your command-line php is different from your php apache module. |
Please check your apache config of loading php apache module, e.g. If you used phpbrew with |
Thank you very much for responding. I believe I set up this php with apxs but how to prove it? My apache config? Apache2.conf reports no modules and that's not right. Perhaps you mean my /etc/apache2/mods-enabled? I can see php5.conf, php5.load. I have been using a2enmod to enable modules. The output of phpbrew info can be found here: https://gist.github.com/sam452/7eaba7cdd129d020d8e7 But that's the phpbrew side, you seem to be asking about apache's config. I'm unsure of which config you're referring to? |
@sam452 your phpbrew setup looks correct, but you have to confirm that your apache loads the correct module. try |
Can you also try to grep under /etc/apache2 ?
And
|
Happy to provide this info: The grep returns: And I have no directory called /usr/lib/apache2/modules. This is new to me as I thought as part of apache's new module system they are enabled from the cli? my phpinfo output is here: https://gist.github.com/sam452/496b81dfec6eee876d5e |
Looks like your apache2 is running the php you installed via homebrew, not the one you installed from phpbrew. please see the line below:
|
Can you also post your build log file? e.g. |
Yes, happily: https://gist.github.com/dea3c9b70a4ac7d344b2. I was unaware I should have installed apache using phpbrew? Should I change the pointers you found? Unsure where you found it. Wait, my apache that I'm using on my Ubuntu VM was installed by apt-get, I believe. But there does seem to be a cross contamination. How to approach resolving this? |
no, you can't change it, it's just the settings you used for building php. I found the apxs2 detection failed in your build log:
Seems like you have a syntax error in /etc/apache2/apache2.conf so apxs2 failed to read your config file. |
The actual steps are:
|
Please also take a look at https://github.com/phpbrew/phpbrew/wiki/Cookbook#apache2-support |
Yes, I remember running which apxs2 in this php variant. => /usr/bin/apxs2. Perhaps I should reinstall php 5.4.34 with all the variants and see if the build error occurs again. Unless I should overwrite my ubuntu apache build and all its vhosts? Also I have no /opt/local/ on this Ubuntu install. |
Can you show me the line 74 of my mail: yoanlin93@{gmail} |
No you don't have to overwrite the whole apache, you just need the php5 module file. |
Hi Sam! I've found the cause, please take a look at: It seems that you need to source the apache envvars files to load the environment variables before running the build command:
You can validate the config by running:
Cheers, |
Yes, the envvars are sourced and the apxs2 appears to be found using the Apache 2.0 handler-module support via DSO. checking for LDAP support... yes, shared OK, running whereis ldap yields the following: Why do you suppose phpbrew is not finding this library unless the /usr/lib/ldap directory is empty? (It's not). Thx for reading this far, sam |
If you know where the header files of LDAP is, you can specify double dash to pass the configure options:
please note I am not familiar with LDAP so the option name might be wrong. you can use
|
Yes, for me in Ubuntu the correct command was found here: https://gist.github.com/kherge-old2/a7172c7102fbd738837d |
My phpbrew is 1.18.5, using php 5.4.34 as default and I'm encountering some behavior that I believe I've narrowed down to phpbrew. My SO post is here: http://serverfault.com/questions/692072/call-to-undefined-function-ldap-connect-in-ubuntu?noredirect=1#comment853351_692072
tl:dr; ldap extension is reported to be enabled for apache2 as evidenced by phpinfo() and in apache's mods-enabled.
However, when I run php -m in the command line it reports these: Core, ctype, curl, date, dom, ereg, filter, gd, gettext, hash, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, Phar, readline, Reflection, session, SimpleXML, soap, SPL, standard, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, zlib
ldap is not one of them.
I attempted to manually enable the extension using phpbrew config, but when restarting apache it returns that it cannot because the ldap module is already enabled.
phpldapadmin still reports that the extension is not enabled and php -m confirms it's not. What am I not understanding about this apparent disconnect? thx, sam
The text was updated successfully, but these errors were encountered: