Skip to content
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 / Ubuntu 16.04 & PHP-FPM Pool Listen User/Group #169

Merged
merged 4 commits into from May 12, 2016

Conversation

chriswgerber
Copy link
Contributor

This pull request adds support for PHP7 by moving around the order of operations for setting attributes to take into account settings in the upcoming Ubuntu 16.04, moving a few system calls into variables from the LWRP, and updating package names for php in the upcoming Ubuntu LTS 16.04. It also fixes a few foodcritic warnings.

This PR also pulls changes from #155, with updates. It creates a few extra pool configuration variables, allowing the pool listener to differ from the owner, and group to differ from the user. However, attributes have been set to mimic old behavior by default.

@chriswgerber chriswgerber mentioned this pull request Apr 4, 2016
Maks3w added a commit to StartupBootstrap/xdebug-cookbook that referenced this pull request Apr 26, 2016
Christopher Gerber added 3 commits May 11, 2016 15:59
Refactors attributes and LWRPs to support PHP7. Attributes are set "cascading" beginning at one value and eventually being set to the correct one for the platform and version.
Adds additional config to allow for separate listen users and groups for the pool.

Code from PR#155 (https://github.com/chef-cookbooks/php/pull/155/files)
def whyrun_supported?
true
end

action :discover do
unless exists?
Chef::Log.info("Discovering pear channel #{@new_resource}")
execute "#{node['php']['pear']} channel-discover #{@new_resource.channel_name}" do
r = execute "#{node['php']['pear']} channel-discover #{@new_resource.channel_name}" do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need to do any of the updated_by_last action mess if you use inline resources. The inline resource method handles bubbling up the notifications

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know. I'll remove the updated by last action code.

* Adds package to help make find correct libraries for compilation in Ubuntu 16.04.
* Fixes missing gmp.h file from compilation in Ubuntu 14.04 and 16.04
* Fixes fpm service error for resource.
@jamescorkran
Copy link

jamescorkran commented Feb 16, 2017

@ThatGerber
Forgive me for necroing this, but I had a question. I am currently attempting to implement this cookbook to install PHP7 on our Ubuntu 16.04 machines. However, it seems that before chef makes its way down the attributes it begins to check for PHP5 directories and errors with this:

Recipe: php::ini
  * template[/etc/php5/apache2/php.ini] action create
    * Parent directory /etc/php5/apache2 does not exist.
    ================================================================================
    Error executing action `create` on resource 'template[/etc/php5/apache2/php.ini]'
    ================================================================================

    Chef::Exceptions::EnclosingDirectoryDoesNotExist
    ------------------------------------------------
    Parent directory /etc/php5/apache2 does not exist.

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/php/recipes/ini.rb

     21: template "#{node['php']['conf_dir']}/php.ini" do
     22:   source node['php']['ini']['template']
     23:   cookbook node['php']['ini']['cookbook']
     24:   unless platform?('windows')
     25:     owner 'root'
     26:     group node['root_group']
     27:     mode '0644'
     28:   end
     29:   variables(directives: node['php']['directives'])`

My question is: Do I need to have php5 installed in order to install php7?
At the top of the attributes/default.rb file it seems to default to php5, but further down you've a case in place to check for platform version. It does not reach this due to the default set at the start.

Am I missing something here?

@daften
Copy link

daften commented Oct 20, 2017

@jamescorkran Did you find an answer to your question here?

@lock
Copy link

lock bot commented Apr 25, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants