Automatically detect PHP extension directory#4
Conversation
|
This is an interesting idea. Unfortunately, the php-config command is provided by the php-devel package on RHEL, meaning that many servers won't have it available (mine don't, I keep devel packages off of production systems). And the default you set if the fact isn't present is 64bit specific, which is something best avoided. How would you make the fact more robust? Fall back to iterating through known directories until one is found, when the php-config command is unavailable? |
|
Good points. I made the fact architecture-aware and independent from php-devel. Of course, the most reliable output is from |
|
Sorry for taking soooooooooooo long. I'm still not entirely convinced about this change, but I would be okay to include it with a minor clean up : There currently are two separate fallbacks, one in the fact and the other in I think just removing the fallback in |
When adding, for instance, the XDebug module, one currently has to write:
With this PR it becomes easier to include Zend extensions like XDebug:
In this case, the PHP extension directory is automatically detected through a Puppet fact. If you need to override the module directory, you can still do so by supplying a string for the
zendproperty: