Comments (25)
The cookbook can currently be used to install php7 using custom package repositories and a minor patch.
Here is how i manage to set it up for ubuntu 14.04:
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 the following default attributes:
"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:
https://github.com/sergiuionescu/lamp
from php.
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.
from php.
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.
from php.
@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.
from php.
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.
from php.
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 π
from php.
+1 :)
from php.
π
from php.
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.
from php.
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.
from php.
π to PHP7, it's significantly faster. Looking forward to the refactor.
from php.
I'm more referring to the LWRP.
php_pear "XML_RPC" do
version "1.5.4"
action :install
end
Will run /usr/sbin/php5enmod XML_RPC
instead of phpenmod XML_RPC
, adding it as a php5 module instead of php7. A problem that can be easily solved when I have time to create the pull request, but also other cases like that might need to be taken into account.
from php.
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.
from php.
Is there any status update for the PR?
from php.
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.
from php.
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 include_recipe 'php::fpm'
if users want the default package, else they can install from remi or a ppa or whatever, and use the LWRP to manage the FPM pools.
from php.
@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.
from php.
I rebased the php7/16.04 branch on top current changes and pushed up the latest fixes for Ubuntu. Builds are passing now.
from php.
Merged and about to ship
from php.
Out of curiosity, why are the default values changed to install PHP 7 only for Ubuntu 16.04?
from php.
@danbuchal There are multiple reasons to leave it be.
- There is no Debian/Ubuntu maintained package for PHP7 on 14.04. Any choice as for a package to install would come from a PPA or a build from source, and it's hard to support that as the default setting.
- PHP5 has been the default install on 14.04 for 2 years. It would be in slightly bad taste to change the default from PHP5 to PHP7 and break with the system default for all users. It's best to allow people to opt-in deliberately to changes like that when it could break backwards compatibility, rather than default to assuming that people will approve.
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.
from php.
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.
from php.
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 (apt-get install php
) installs PHP7. In order to support 16.04, the repository also needed to support PHP7. There was no intent to make the cookbook functionally different, but because distributions and versions are different, they are functionally different by necessity.
from php.
@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!
from php.
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.
from php.
Related Issues (20)
- Not working in Debian Jessie HOT 3
- Pecl module installed but not activated HOT 3
- incompatible with chef chef 12.16.42 HOT 2
- Cookbook 'seven_zip' version '3.1.0' depends on chef version [">= 13.0"], but the running chef version is 12.21.12 HOT 1
- Custom Resource Rewrite
- Remove distro-specific php.ini templates HOT 1
- shell_out() without { default_env: false } param causes pecl install to fail HOT 1
- Dangerfile should use failure instead of fail
- Remove .rubocop.yml with Dangerfile HOT 1
- Update Changelog
- Run latest cookstyle HOT 1
- Update builds to be parallel HOT 1
- Authenticated Channel Support
- Priority of extensions ignored
- How can i install php 7.2 on amazonlinux2? HOT 2
- Answer prompted questions when installing pecl HOT 2
- Default recipe pulls in Apache on Ubuntu 20.04 HOT 1
- Dependency Dashboard
- Php image updated MySQL HOT 1
- XSS help
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php.