-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
PHP7 Support #162
Comments
I think you can easily use PHP7 with override attributes and packages but beware if you use fpm. There are many attributes to this to change and maybe the provider need to be update. I wish PHP7 from this cookbook too 👍 |
+1 :) |
👍 |
At the moment there isn't work being done to prep for PHP7. Why you might ask? Well we're a fairly small team working on a several year backlog of work. At the moment we're doing work on the Tomcat, etcd, and docker cookbooks. I personally expect to be hitting PHP soon and I plan to evaluate a large scale refactor that would do away with the mess of attributes we have right now and would also include support for additional PHP versions. |
Thanks @tas50 for the update. I hope I didn't come off demanding with my question, I just didn't want to get started on a PR for php7 support and find out some work had already been started on another branch. |
👍 to PHP7, it's significantly faster. Looking forward to the refactor. |
The cookbook can currently be used to install php7 using custom package repositories and a minor patch. In your custom recipe setup the ppa before including the php cookbook: apt_repository 'ondrej-php' do
uri 'ppa:ondrej/php'
distribution node['lsb']['codename']
only_if { node['php']['version'] >= '7' }
end
...
include_recipe 'php'
"override_attributes": {
"php": {
"version": "7.0",
"conf_dir": "/etc/php/7.0/cli",
"packages": [
"php7.0-cgi",
"php7.0",
"php7.0-dev",
"php7.0-cli",
"php7.0-json",
"php7.0-curl",
"php-pear"
],
"mysql": {
"package": "php7.0-mysql"
},
"fpm_package": "php7.0-fpm",
"fpm_pooldir": "/etc/php/7.0/fpm/pool.d",
"fpm_service": "php7.0-fpm",
"fpm_default_conf": "/etc/php/7.0/fpm/pool.d/www.conf"
}
} If you wish to give it a spin, you can find the full setup here: |
I'm more referring to the LWRP.
Will run |
I've created a PR that will bring support for Ubuntu 16.04 (which will default to PHP7) and allow for PHP7 to be supported on Ubuntu 14.04, as well. |
Any movement on this? We're working to get our environments prepared for Ubuntu 16.04 and PHP7 support is a step in the process. |
Is there any status update for the PR? |
PHP7 support is going to require us to start testing on 16.04, and we currently lack GM docker boxes for Travis CI testing and GM bento boxes for testing locally. Once the final 16.04 release comes out and we have a testing infrastructure in place we'll move forward with PHP7 support. |
@tas50 is there any possibility of parameterizing just the enable_mod and disable_mod that @ThatGerber submitted? With that change alone I was able to install PHP7 by overriding the other parameters as needed. This would not need to install PHP7 by default or even "officially" claim support of PHP7, but would allow those adventurous enough to be able to do it. |
I would be open to adjusting the commits or splitting it into multiple PRs while we wait for official boxes. I have no desire to maintain my own fork of the PHP cookbook so I'd like to get some of these changes merged back if they feel it's a fit for the cookbook. |
Ubuntu 16.04 boxes are out so we can test this and get it out. I've added 16.04 testing to this repo, which is why it's currently failing. I'll see what I can do tomorrow. |
I think that modularizing the FPM portions a bit would make supporting PHP7 or alternate repos much easier. Instead of the php-fpm install being taken care of in the provider, I think it'd be better to just do |
@tas50 I written fixes for the PR that I will push once sous-chefs/mysql#421 is merged. There is a bug in that repository that is causing "source-install-ubuntu-1604" install to fail dealing with the mysql client install. |
I rebased the php7/16.04 branch on top current changes and pushed up the latest fixes for Ubuntu. Builds are passing now. |
Merged and about to ship |
Out of curiosity, why are the default values changed to install PHP 7 only for Ubuntu 16.04? |
@danbuchal There are multiple reasons to leave it be.
That was my reasoning when writing the pull request. If you'd like to try getting PHP7 installed on 14.04, you could try installing a PHP PPA Ondřej Surý's PPA is spoken of highly and overwriting the default PHP packages before running the recipe. You might need to make additional changes to the PHP attributes, however, but the ability to get php7 installed and running should be there. |
My intention with the question wasn't about earlier versions of Ubuntu necessarily... but other distributions altogether. RHEL, etc. It seems this cookbook now has different default functionality based on what distribution you are using. I can easily enough override those for say a CentOS install, but I wanted to point out this discrepancy. Maybe part of these solution is to spell out those differences (if they are intentional) in the readme. |
I guess the reasoning then is the maintainers didn't have the time to work together a PR for the functionality and I did so I contributed what I could. The main push for PHP7 on my end was to support 16.04, within which the default PHP version ( |
@ThatGerber I understand, and believe me I thank you for moving on this since now I can officially kill the fork I was having to maintain to make this work. This is just a suggestion for the official maintainers. Thanks again! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I haven't seen any threads about this so I thought I would ask the question: Is any work being done to prepare for PHP7? I would like to try and piggy-back on work already being done before starting it myself.
There's a few spots here and there (e.g. https://github.com/chef-cookbooks/php/blob/master/providers/pear.rb#L174) that need to be fixed to support PHP7, but for the most part it seems to be just changes to attributes and packages.
The text was updated successfully, but these errors were encountered: