inviqa / chef-php-extra Goto Github PK
View Code? Open in Web Editor NEWObsolete, please use php cookbook instead
Obsolete, please use php cookbook instead
yum >=3.0.0
no longer includes the ius
recipe. ius
is now its own cookbook.
yum-ius
requires Chef 11 or higher so making this a dependency would break bc with projects using older versions of Chef.
Locking the version at < 3
potentially causes issues with other cookbooks that require yum > 3
(runit, memcached etc.)
Im not sure what best approach to resolve this is. I would probably say depend on yum > 3
and yum-ius
but not sure what versions of Chef this cookbook is aimed at supporting.
From here
zend_extension=<%= `find /usr -name "xdebug.so" | tr -d "\n"` %>
leads to the config path being broken if there are other PHP versions installed:
root@ns508593:~# grep -rn "php5\.5" /etc/php5/conf.d/
/etc/php5/conf.d/xdebug.ini:2:zend_extension=/usr/local/php5.6/lib/php/extensions/xdebug.so/usr/local/php5.3/lib/php/extensions/xdebug.so/usr/local/php5.5/lib/php/extensions/xdebug.so/usr/lib/php5/20090626/xdebug.so
These lines are probably out of date:
chef-php-extra/recipes/PHPUnit.rb
Lines 33 to 35 in 8c8cbf4
At least in my experimenting, it makes the chef run fail.
going to http://pear.phpunit.de explains it a bit more.
Posting the issue in case anyone else bumps into it.
I get the following error when "starting" Vagrant with this cookbook's default PHPUnit version (3.6.11):
[2013-03-14T10:01:25+01:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: chef-php-extra_pear[PHPUnit] (chef-php-extra::PHPUnit line 37) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of echo -e "\r" | pear -d preferred_state=stable install -a pear.phpunit.de/PHPUnit-3.6.11 ----
STDOUT: Duplicate package channel://pear.phpunit.de/Text_Template-1.1.3 found
Duplicate package channel://pear.phpunit.de/Text_Template-1.1.2 found
install failed
STDERR:
---- End output of echo -e "\r" | pear -d preferred_state=stable install -a pear.phpunit.de/PHPUnit-3.6.11 ----
Ran echo -e "\r" | pear -d preferred_state=stable install -a pear.phpunit.de/PHPUnit-3.6.11 returned 1
When configuring it with PHPUnit 3.7.18 (latest) it works fine. I guess setting the defaults to 3.7.x should solve this. I am super new to Vagrant/Chef, so not sure if there could be another reason for this to fail
chef-php-extra is listing itself as a dependency, which creates a very high degree of probability that anything using it will break. For example, it breaks berks install
which breaks vagrant up --provision
and vagrant provision
.
If there are a small number of items in the Berksfile it may not fail, and the failing point is non-deterministic. Here is an example Berksfile that will demonstrate the problem.
source "http://api.berkshelf.com"
cookbook 'php'
cookbook 'apt'
cookbook 'build-essential'
cookbook 'memcached'
cookbook 'mysql'
cookbook 'postgresql', git: 'git://github.com/phlipper/chef-postgresql'
cookbook 'openssl'
cookbook 'postfix'
cookbook 'chef-php-extra', git: 'git://github.com/inviqa/chef-php-extra'
cookbook 'phpunit', git: 'git://github.com/escapestudios/chef-phpunit'
cookbook 'redisio'
cookbook 'ruby'
cookbook 'beanstalkd', git: 'git://github.com/escapestudios/chef-beanstalkd'
cookbook 'npm', git: 'git://github.com/balbeko/chef-npm'
cookbook 'laravel', git: 'git://github.com/MiniCodeMonkey/chef-laravel'
cookbook 'beanstalk_console', git: 'git://github.com/MiniCodeMonkey/chef-beanstalk_console'
cookbook 'apache2', git: 'git://github.com/MiniCodeMonkey/apache24'
When running the chef-php-extra::development
recipe, I get this error from chef-client. This is on an Ubuntu 12.04 32-bit VM.
[Fri, 03 Aug 2012 01:43:26 +0000] FATAL: Mixlib::ShellOut::ShellCommandFailed: php_pear_channel[pear.pdepend.org] (chef-php-extra::PHP_PMD line 27) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of pear channel-info pear.pdepend.org ----
STDOUT: Unknown channel "pear.pdepend.org"
STDERR:
---- End output of pear channel-info pear.pdepend.org ----
Hi,
When I include the chef-php-extra::development recipe I'm getting the error FATAL: NameError: Cannot find a resource for chef_php_extra_pear_channel above.
Is there anything that I'm missing? I'm including your cookbook via Berkshelf....
Thanks,
Matt
The current set up installs PHP 5.3.3 from the redhat / centos repository - however this is out of date. It's my opinion that we would always be better installing the latest stable release from IUS (as we do on RH/CentOS 5).
https://github.com/inviqa/chef-php-extra/blob/master/metadata.rb
Has the following dependencies:
depends "git", ">= 1.0.0"
depends "yum", ">= 0.8.0"
depends "apt", ">= 1.8.4"
depends "php", "= 1.1.8"
I think it should be:
depends "php", ">= 1.1.8"
With the old 1.1.8 chef librarian leads to unresolvable deps
Hi, I have no idea to use this with librarian chef and Vagrantfile. Any good example ?
The XDebug configuration for PHP is missing the source file for the zend_extension parameter, meaning that XDebug does not get loaded.
This needs to be fixed in the /etc/php.d/xdebug.ini file
Just saw this a lot of times while running the recipe, thought I'd mention it as an "issue"
[2013-10-22T11:29:17+00:00] INFO: Discovering pear channel chef-php-extra_pear_channel[pear.phpmd.org]
[2013-10-22T11:29:17+00:00] INFO: execute[pear channel-discover pear.phpmd.org] ran successfully
[2013-10-22T11:29:18+00:00] INFO: Installing chef-php-extra_pear[PHP_PMD] version 1.3.3
[2013-10-22T11:29:24+00:00] WARN: Chef::Exceptions::ShellCommandFailed is deprecated, use Mixlib::ShellOut::ShellCommandFailed
[2013-10-22T11:29:24+00:00] WARN: Called from:
/tmp/vagrant-chef-1/chef-solo-2/cookbooks/chef-php-extra/providers/pear_channel.rb:86:in `rescue in exists?'
/tmp/vagrant-chef-1/chef-solo-2/cookbooks/chef-php-extra/providers/pear_channel.rb:83:in `exists?'
/tmp/vagrant-chef-1/chef-solo-2/cookbooks/chef-php-extra/providers/pear_channel.rb:28:in `block in class_from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/provider/lwrp_base.rb:138:in `instance_eval'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.