Closed mdvhosting closed 10 years ago
Matt,
Some comments...
I do not, however, see an "ldap" module configuration section on the page even though php.ini has extension=ldap.so.
What do you mean by this exactly? When I enable the ldap plugin, I get a listing for it with phpinfo(). Do you see this?
"PHP_EXTENSIONS": [ "bz2", "zlib", "curl", "mcrypt", "ldap", "mysql", "snmp" ]
You don't need to include "mysql". This is compiled into the PHP build, no extension is required.
I also can't seem to use SNMP in PHP since php-snmp isn't in your Dropbox repository.
This module is not being built at the moment. I'll add it and see if I can rebuild the current versions of PHP.
How does one build PHP extensions/modules for the buildpack to understand and use properly?
These are the scripts that you need to build PHP so that it is compatible with the build pack.
https://github.com/dmikusa-pivotal/cf-php-buildpack-binary-build-scripts
They should be updated to build support for snmp soon. Once they're updated, you can run them on any Ubuntu 10.04 box (with the appropriate dependencies installed) and it'll produce a set of binaries. You can use the instructions here for setting up a HTTP server to host them.
https://github.com/dmikusa-pivotal/cf-php-build-pack/blob/master/docs/binaries.md
Hope that helps!
Dan
Hi Dan-
Thanks for such a prompt response!
Regarding LDAP, I mean that I don't see the listing in phpinfo() that you posted an example of. I only see the "with" options in the PHP configure options section, not an LDAP configuration/information section. Could a dependency be missing on the CF server itself causing a compilation issue or something?
Regarding MySQL, noted. I figured that was the case since mysqli was also showing up even though I didn't include it.
For SNMP, thanks! I think that's the only plugin I'm missing for my app so if you can build it, I should be all set! I did look through the build pack build scripts though and it's pretty cool! I think I see how I could custom compile everything including PHP itself using the scripts. I'd just have to get my hands on Ubuntu which is not always easy in a corporate environment.
Thanks for all your work on this, it's fantastic! :)
-Matt
Matt,
I've rebuild PHP 5.4.27 and PHP 5.5.11. Both now have the SNMP module. I tested it and the module loads OK (lists in phpinfo()). However I do see some output in the logs. It looks like messages from SNMP, but I'm not exactly sure what they mean. Hopefully you should be all set, but if you need anything else just let me know.
Dan
PS. Glad to hear that you are enjoying the build pack!!
As far as LDAP, what is the system that you are targeting?
I only test against PWS & my local Bosh-Lite install, both of which use an Ubuntu stack. If you're working against a private version of CF, I suppose that the environment could be different and it might be missing a library. Usually this would show up in the logs though. You'd see an error indicating which library failed to load. Did you see anything in the output of "cf logs --recent
Hi Dan-
Looks like the SNMP package worked, but I'm having an issue with it similar to my LDAP issue.
In my php.ini I see:
extension=bz2.so
extension=zlib.so
extension=curl.so
extension=mcrypt.so
extension=ldap.so
extension=snmp.so
So, the modules should be loading. But, in my phpinfo() I don't see an information block for either LDAP or SNMP. (And in my app I get function not defined errors for both LDAP and SNMP functions.)
So you know, we're using Stackato; I'm not sure if that matters. When I look through my app's logs, I don't see any errors related to modules or files not being found.
These are the log files I seem to have in my app and have access to:
logs/env.log
logs/php-fpm.log
logs/proc-man.log
logs/rewrite.log
logs/staging_task.log
logs/stderr.log
logs/stdout.log
I'm on the user/developer end of Stackato, so I don't have good visibility into the actual servers running the cloud. But, I do have a contact internally who is an admin for it who may be able to lend a hand if we can narrow down what the issue might be.
-Matt
Matt,
I haven't tested on Stackato, but it should work. You might run "cf stacks" and see what you get for output. For me it lists, "lucid64" (i.e. Ubuntu 10.04). It's possible that there is a different stack deployed.
As far as the logs, can you download them and attach them here? I'd like to take a look and see if anything jumps out.
Dan
Dan-
Our stack shows: ubuntu 12.04 LTS (which is "precise" I believe).
I did some more poking around online and found that Ubuntu may require a php5-ldap and php5-snmp module. Maybe to bridge from PHP to the system modules? I added the following to my stackato.yml:
requirements:
ubuntu:
- php5-snmp
- php5-ldap
Now, when I push my app, I see a ton of repository lists downloaded and then the php modules. But, sadly, I STILL don't see LDAP or SNMP in my phpinfo...
I'm a bit at a loss and sadly the logs aren't telling me much in terms of a php/module not found error. Maybe something is missing from my PATH?
I've also uploaded the logs for you: https://gist.github.com/mdvhosting/35d2026a12734bd54cbe
-Matt
Matt,
I'm not exactly sure what's going on here, there is nothing in the logs to indicate a problem. However the fact that you're running Ubuntu 12.04 is certainly a red flag. The binaries that I provide are compiled on Ubuntu 10.04, which is a full LTS behind so it's certainly possible that there are incompatibilities. Of the modules that I ship with the LDAP and SNMP modules have the most dependencies, so the potential for problems with these is certainly higher.
Because you're on a different release, we'll probably need a set of binaries specific for that release. I can compile a set of test binaries, so we can give this a try. No guarantees it's work, but it seems like a logical next step. I hope to have them up today, but it take me a little time because I don't have a VM setup for Ubuntu 12.04. If you'd like do this yourself, check out this link.
https://github.com/dmikusa-pivotal/cf-php-buildpack-binary-build-scripts
Dan
Dan-
That makes the most sense at this point. Unfortunately, I don't have access to an Ubuntu VM within our virtual developer portal; we only use RHEL. If you wouldn't mind compiling the test libraries for me, it would be much appreciated. I could also try to get an Ubuntu VM running at home in VMware and try messing with the binary build scripts there.
As always, your help is very much appreciated!
Thanks, -Matt
Matt,
I've given this a try. The packages all built OK on 12.04, but I don't have a CF install with a 12.04 stack, so I can't test them.
To give this a try, edit .bp-config/options.json
in your project and add "STACK": "precise"
. I've modified the default DOWNLOAD_URL to contain the STACK. This will allow you to switch between lucid
(the default) and precise
(the stack on your CF). When the build pack downloads the binaries, they should pull from a URL like this https://dl.dropboxusercontent.com/u/186123235/binaries/precise/...
and I hope that will correct the problem that you're seeing.
Let me know how things go.
Dan
Oh, I've also added a new index files if you want to download the binaries and host them locally. Here's the link.
https://github.com/dmikusa-pivotal/cf-php-build-pack/tree/master/binaries/precise
Hi Dan-
I followed your directions above and have what seems like a minor problem. The app stages without an issue but fails to start. I think it's because of this:
/home/stackato/app/httpd/bin/httpd: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory
I added libexpat1 to my requirements but that didn't seem to help. This is what I see during staging:
[staging] 2014-04-29T13:58:48.000Z: Setting up libexpat1 (2.0.1-7.2ubuntu1.1) ...
-- snip --
[staging] 2014-04-29T13:58:44.000Z: Unpacking replacement libexpat1 ...
[staging] 2014-04-29T13:58:44.000Z: Preparing to replace libexpat1 2.0.1-7.2ubuntu1 (using .../libexpat1_2.0.1-7.2ubuntu1.1_amd64.deb) ...
-- snip --
[staging] 2014-04-29T13:58:30.000Z: Get:11 http://mirrors.liquidweb.com/ubuntu/ precise-updates/main libexpat1 amd64 2.0.1-7.2ubuntu1.1 [131 kB]
-- snip --
[staging] 2014-04-29T13:58:17.000Z: 12 upgraded, 5 newly installed, 0 to remove and 273 not upgraded.
[staging] 2014-04-29T13:58:14.000Z: php5-imap php5-mcrypt php5-mysql php5-pgsql php5-readline php5-xmlrpc
[staging] 2014-04-29T13:58:14.000Z: libapache2-mod-php5 libexpat1 php5-cli php5-common php5-curl php5-gd
[staging] 2014-04-29T13:58:14.000Z: The following packages will be upgraded:
[staging] 2014-04-29T13:58:14.000Z: libsensors4 libsnmp-base libsnmp15 php5-ldap php5-snmp
[staging] 2014-04-29T13:58:14.000Z: The following NEW packages will be installed:
[staging] 2014-04-29T13:58:14.000Z: lm-sensors snmp-mibs-downloader
-- snip --
[staging] 2014-04-29T13:58:13.000Z: -----> sudo apt-get-install php5-snmp php5-ldap libexpat1
It doesn't seem to make a difference though as I still get the same apache error for that library. Maybe there's a version issue or specific version dependency for the library?
Any thoughts?
Matt,
Seems like an oversight on my end. That library is part of libapr-util, but it wasn't being packaged with my builds. I've fixed that. Updated HTTPD build should be up in a few minutes. Can you try again?
Thanks
Dan
Ok, it looks to be compiling properly now which is good. But, believe it or not, PHP is being weird now:
Doesn't look like the php.ini path is correct since it's not loading a .ini file. Weird...
-Matt
Matt,
First thing would be to check and make sure that the php.ini file exists. Can you run "cf files
Second thing to check would be that the full path is correct. i.e. /home/vcap/app/php/etc. Can you look at the output of "cf files
Lastly, if you set the BP_DEBUG
environment variable to True that should increase the logging of the build pack. Can you give this a try and include the output here? I'd like to double check the output.
Ex: manifest.yml
env:
BP_DEBUG: "True"
Dan
Hi Dan-
The php.ini does seem to exist and the contents of it look like what I would expect. Here's the files command output:
stackato > files lm-wims app/php/etc
php-fpm.conf 22.6K
php.ini 64.4K
I also checked the environment log and the home folder isn't what the buildpack is expecting:
HOME=/home/stackato/app
I'm pretty sure I didn't have this issue before using the precise binaries, but I could be wrong. A broken php.ini would certainly explain the modules not loading properly since php is using whatever defaults it comes with.
bp.log output:
2014-04-29 15:14:16,561 [INFO] cloudfoundry - CloudFoundry Initialized.
2014-04-29 15:14:16,636 [INFO] cache - Using [/tmp/cache] as cache directory.
2014-04-29 15:14:16,636 [INFO] builder - Installed build pack utils.
2014-04-29 15:14:16,975 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-2.4.9.tar.gz.sha1] to memory
2014-04-29 15:14:18,876 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-2.4.9.tar.gz] to [/tmp/httpd-2.4.9.tar.gz]
2014-04-29 15:14:18,896 [INFO] zips - Extracting [/tmp/cache/httpd-2.4.9.tar.gz] into [/tmp/staged/app/httpd]
2014-04-29 15:14:19,045 [INFO] builder - Installed [HTTPD] to [/tmp/staged/app/httpd]
2014-04-29 15:14:19,055 [INFO] utils - Rewriting configuration under [/tmp/staged/app/httpd/conf]
2014-04-29 15:14:19,062 [INFO] cache - Using [/tmp/cache] as cache directory.
2014-04-29 15:14:19,364 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_unixd-2.4.9.tar.gz.sha1] to memory
2014-04-29 15:14:19,798 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_unixd-2.4.9.tar.gz] to [/tmp/httpd-mod_unixd-2.4.9.tar.gz]
2014-04-29 15:14:19,799 [INFO] zips - Extracting [/tmp/cache/httpd-mod_unixd-2.4.9.tar.gz] into [/tmp/staged/app/httpd]
2014-04-29 15:14:20,088 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_setenvif-2.4.9.tar.gz.sha1] to memory
2014-04-29 15:14:20,453 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_setenvif-2.4.9.tar.gz] to [/tmp/httpd-mod_setenvif-2.4.9.tar.gz]
2014-04-29 15:14:20,455 [INFO] zips - Extracting [/tmp/cache/httpd-mod_setenvif-2.4.9.tar.gz] into [/tmp/staged/app/httpd]
2014-04-29 15:14:20,739 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_proxy-2.4.9.tar.gz.sha1] to memory
2014-04-29 15:14:22,239 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_proxy-2.4.9.tar.gz] to [/tmp/httpd-mod_proxy-2.4.9.tar.gz]
2014-04-29 15:14:22,241 [INFO] zips - Extracting [/tmp/cache/httpd-mod_proxy-2.4.9.tar.gz] into [/tmp/staged/app/httpd]
2014-04-29 15:14:22,536 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_dir-2.4.9.tar.gz.sha1] to memory
2014-04-29 15:14:22,922 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_dir-2.4.9.tar.gz] to [/tmp/httpd-mod_dir-2.4.9.tar.gz]
2014-04-29 15:14:22,923 [INFO] zips - Extracting [/tmp/cache/httpd-mod_dir-2.4.9.tar.gz] into [/tmp/staged/app/httpd]
2014-04-29 15:14:23,172 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_reqtimeout-2.4.9.tar.gz.sha1] to memory
2014-04-29 15:14:23,528 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_reqtimeout-2.4.9.tar.gz] to [/tmp/httpd-mod_reqtimeout-2.4.9.tar.gz]
2014-04-29 15:14:23,530 [INFO] zips - Extracting [/tmp/cache/httpd-mod_reqtimeout-2.4.9.tar.gz] into [/tmp/staged/app/httpd]
2014-04-29 15:14:23,938 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_log_config-2.4.9.tar.gz.sha1] to memory
2014-04-29 15:14:24,367 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_log_config-2.4.9.tar.gz] to [/tmp/httpd-mod_log_config-2.4.9.tar.gz]
2014-04-29 15:14:24,369 [INFO] zips - Extracting [/tmp/cache/httpd-mod_log_config-2.4.9.tar.gz] into [/tmp/staged/app/httpd]
2014-04-29 15:14:24,667 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_authz_core-2.4.9.tar.gz.sha1] to memory
2014-04-29 15:14:25,018 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_authz_core-2.4.9.tar.gz] to [/tmp/httpd-mod_authz_core-2.4.9.tar.gz]
2014-04-29 15:14:25,020 [INFO] zips - Extracting [/tmp/cache/httpd-mod_authz_core-2.4.9.tar.gz] into [/tmp/staged/app/httpd]
2014-04-29 15:14:25,290 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_mime-2.4.9.tar.gz.sha1] to memory
2014-04-29 15:14:25,714 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_mime-2.4.9.tar.gz] to [/tmp/httpd-mod_mime-2.4.9.tar.gz]
2014-04-29 15:14:25,716 [INFO] zips - Extracting [/tmp/cache/httpd-mod_mime-2.4.9.tar.gz] into [/tmp/staged/app/httpd]
2014-04-29 15:14:26,002 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_proxy_fcgi-2.4.9.tar.gz.sha1] to memory
2014-04-29 15:14:26,773 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_proxy_fcgi-2.4.9.tar.gz] to [/tmp/httpd-mod_proxy_fcgi-2.4.9.tar.gz]
2014-04-29 15:14:26,774 [INFO] zips - Extracting [/tmp/cache/httpd-mod_proxy_fcgi-2.4.9.tar.gz] into [/tmp/staged/app/httpd]
2014-04-29 15:14:28,112 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_remoteip-2.4.9.tar.gz.sha1] to memory
2014-04-29 15:14:28,472 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_remoteip-2.4.9.tar.gz] to [/tmp/httpd-mod_remoteip-2.4.9.tar.gz]
2014-04-29 15:14:28,473 [INFO] zips - Extracting [/tmp/cache/httpd-mod_remoteip-2.4.9.tar.gz] into [/tmp/staged/app/httpd]
2014-04-29 15:14:28,785 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_env-2.4.9.tar.gz.sha1] to memory
2014-04-29 15:14:29,181 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_env-2.4.9.tar.gz] to [/tmp/httpd-mod_env-2.4.9.tar.gz]
2014-04-29 15:14:29,182 [INFO] zips - Extracting [/tmp/cache/httpd-mod_env-2.4.9.tar.gz] into [/tmp/staged/app/httpd]
2014-04-29 15:14:29,449 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_mpm_event-2.4.9.tar.gz.sha1] to memory
2014-04-29 15:14:30,897 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_mpm_event-2.4.9.tar.gz] to [/tmp/httpd-mod_mpm_event-2.4.9.tar.gz]
2014-04-29 15:14:30,899 [INFO] zips - Extracting [/tmp/cache/httpd-mod_mpm_event-2.4.9.tar.gz] into [/tmp/staged/app/httpd]
2014-04-29 15:14:31,137 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_rewrite-2.4.9.tar.gz.sha1] to memory
2014-04-29 15:14:31,624 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_rewrite-2.4.9.tar.gz] to [/tmp/httpd-mod_rewrite-2.4.9.tar.gz]
2014-04-29 15:14:31,626 [INFO] zips - Extracting [/tmp/cache/httpd-mod_rewrite-2.4.9.tar.gz] into [/tmp/staged/app/httpd]
2014-04-29 15:14:31,871 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_authz_host-2.4.9.tar.gz.sha1] to memory
2014-04-29 15:14:32,231 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/httpd/2.4.9/httpd-mod_authz_host-2.4.9.tar.gz] to [/tmp/httpd-mod_authz_host-2.4.9.tar.gz]
2014-04-29 15:14:32,232 [INFO] zips - Extracting [/tmp/cache/httpd-mod_authz_host-2.4.9.tar.gz] into [/tmp/staged/app/httpd]
2014-04-29 15:14:32,526 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-5.4.27.tar.gz.sha1] to memory
2014-04-29 15:14:32,807 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-5.4.27.tar.gz] to [/tmp/php-5.4.27.tar.gz]
2014-04-29 15:14:32,809 [INFO] zips - Extracting [/tmp/cache/php-5.4.27.tar.gz] into [/tmp/staged/app/php]
2014-04-29 15:14:32,824 [INFO] builder - Installed [PHP] to [/tmp/staged/app/php]
2014-04-29 15:14:32,827 [INFO] utils - Rewriting configuration under [/tmp/staged/app/php/etc]
2014-04-29 15:14:32,833 [INFO] cache - Using [/tmp/cache] as cache directory.
2014-04-29 15:14:33,083 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-bz2-5.4.27.tar.gz.sha1] to memory
2014-04-29 15:14:33,508 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-bz2-5.4.27.tar.gz] to [/tmp/php-bz2-5.4.27.tar.gz]
2014-04-29 15:14:33,510 [INFO] zips - Extracting [/tmp/cache/php-bz2-5.4.27.tar.gz] into [/tmp/staged/app/php]
2014-04-29 15:14:33,765 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-fpm-5.4.27.tar.gz.sha1] to memory
2014-04-29 15:14:37,860 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-fpm-5.4.27.tar.gz] to [/tmp/php-fpm-5.4.27.tar.gz]
2014-04-29 15:14:37,990 [INFO] zips - Extracting [/tmp/cache/php-fpm-5.4.27.tar.gz] into [/tmp/staged/app/php]
2014-04-29 15:14:38,759 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-zlib-5.4.27.tar.gz.sha1] to memory
2014-04-29 15:14:39,167 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-zlib-5.4.27.tar.gz] to [/tmp/php-zlib-5.4.27.tar.gz]
2014-04-29 15:14:39,169 [INFO] zips - Extracting [/tmp/cache/php-zlib-5.4.27.tar.gz] into [/tmp/staged/app/php]
2014-04-29 15:14:39,600 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-snmp-5.4.27.tar.gz.sha1] to memory
2014-04-29 15:14:40,116 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-snmp-5.4.27.tar.gz] to [/tmp/php-snmp-5.4.27.tar.gz]
2014-04-29 15:14:40,122 [INFO] zips - Extracting [/tmp/cache/php-snmp-5.4.27.tar.gz] into [/tmp/staged/app/php]
2014-04-29 15:14:40,428 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-ldap-5.4.27.tar.gz.sha1] to memory
2014-04-29 15:14:40,854 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-ldap-5.4.27.tar.gz] to [/tmp/php-ldap-5.4.27.tar.gz]
2014-04-29 15:14:40,856 [INFO] zips - Extracting [/tmp/cache/php-ldap-5.4.27.tar.gz] into [/tmp/staged/app/php]
2014-04-29 15:14:41,171 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-mcrypt-5.4.27.tar.gz.sha1] to memory
2014-04-29 15:14:41,625 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-mcrypt-5.4.27.tar.gz] to [/tmp/php-mcrypt-5.4.27.tar.gz]
2014-04-29 15:14:41,629 [INFO] zips - Extracting [/tmp/cache/php-mcrypt-5.4.27.tar.gz] into [/tmp/staged/app/php]
2014-04-29 15:14:43,138 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-curl-5.4.27.tar.gz.sha1] to memory
2014-04-29 15:14:44,600 [INFO] downloads - Downloaded [https://dl.dropboxusercontent.com/u/186123235/binaries/precise/php/5.4.27/php-curl-5.4.27.tar.gz] to [/tmp/php-curl-5.4.27.tar.gz]
2014-04-29 15:14:44,602 [INFO] zips - Extracting [/tmp/cache/php-curl-5.4.27.tar.gz] into [/tmp/staged/app/php]
2014-04-29 15:14:44,629 [INFO] newrelic - Initializing
2014-04-29 15:14:44,629 [INFO] newrelic - NewRelic services not detected.
2014-04-29 15:14:44,786 [INFO] cloudfoundry - CloudFoundry Initialized.
Also, I want to point out that I removed php5-snmp and php5-ldap from my ubuntu build requirements to eliminate that variable. The php.ini still shows ldap.so and snmp.so though since they're listed as PHP_EXTENSIONS.
-Matt
Matt,
Interesting. I think I see the problem. When I build PHP, it is necessary to set the expected path for php.ini. I've defaulted this to "/home/vcap/app/php/etc" which is generally correct, but not correct in your case since HOME is different.
I thought that I was overriding this at runtime as well, but that does not seem to be the case. I've committed a fix that I believe should address this issue.
https://github.com/dmikusa-pivotal/cf-php-build-pack/commit/a265aca9cb67d4f662c33f2d768e9c4f2435b019
Can you try again?
Thanks
Dan
That looks to have fixed it! The pack builds properly now and the modules are showing in my phpinfo. I've only tested the LDAP module so far and am having a connectivity issue, so I've not been able to log into my app to test SNMP yet. (This is a firewall issue internally.)
I hope others benefit from this since I suspect others may be using Stackato and/or Ubuntu 12. :+1:
I cannot thank you enough for your help and for taking the time to build the custom binaries for me! I'll keep testing and let you know if anything else comes up.
-Matt
Matt,
Excellent, glad to hear it's working on Stackato! Thanks for your feedback and help testing! If you hit any other problems, just open up a new issue here.
Dan
Hi there-
I'm using the PHP build pack which is awesome, but I have a couple questions regarding additional PHP modules/extensions...
In options.json, I specify:
It looks like LDAP is being compiled with PHP as I see '--with-ldap=shared' '--with-ldap-sasl' in the phpinfo output. I do not, however, see an "ldap" module configuration section on the page even though php.ini has extension=ldap.so. In my app I see "Call to undefined function ldap_connect()" so I know the module isn't working properly.
I also can't seem to use SNMP in PHP since php-snmp isn't in your Dropbox repository. I see there's an option for PHP_DOWNLOAD_URL so I could download your modules and add my own and use a local URL. The issue and/or part where I get stuck is that I don't know how to build a php module for the buildpack to use...
So I suppose I have two questions:
(I'm using the latest Apache and have tried with both PHP 5.4.27 and 5.5.11.)
Thanks so much! -Matt