[chef] phpmyadmin chef-php pear mysql fail


Chronological Thread 
  • From: Sachin Sagar Rai < >
  • To: " " < >
  • Subject: [chef] phpmyadmin chef-php pear mysql fail
  • Date: Thu, 31 Jan 2013 14:02:44 +0545


Ohai!

I'm trying to install phpmyadmin using the http://community.opscode.com/cookbooks/phpmyadmin cookbook.
Since, it depends on https://github.com/priestjim/chef-php, I have that as well.

But the one thing I'm running into is that the phpmyadmin requires at least mysql and mcrypt extensions.

Looking at the https://github.com/priestjim/chef-php/blob/master/README.md, I tried:

node['phpmyadmin']['version'] = '3.5.6'

include_recipe "php::fpm"
include_recipe "php::module_mysql"
include_recipe "php::module_mcrypt"
include_recipe "phpmyadmin"

# install the mysql pecl
php_pear "mysql" do
  action :install
end
php_pear "mcrypt" do
  action :install
end

phpmyadmin_db 'Test DB' do
  host node['mysql']['bind_address']
  port node['mysql']['port']
  username 'root'
  password app['mysql_root_password'][node.chef_environment]
  hide_dbs %w{ information_schema mysql phpmyadmin performance_schema }
end

prefix = "phpmyadmin"
server_name = "#{prefix}.#{app['domain'][node.chef_environment]}"

nginx_config_path = "#{node['nginx']['dir']}/sites-enabled/phpmyadmin.conf"
template nginx_config_path do
  source "nginx_vhost.conf.erb"
  mode "0644"
  variables({
    :server_name => server_name,
    :docroot => node['phpmyadmin']['home'],
    :socket => node['phpmyadmin']['socket']
  })
  notifies :reload, "service[nginx]"
end

nginx_site "phpmyadmin" do
  config_path nginx_config_path
  action :enable
end

service "php5-fpm" do
  action :restart
end

But the chef-client run errors out with:

Error executing action `install` on resource 'php_pear[mysql]'
================================================================================

Errno::ENOENT
-------------
No such file or directory - pear -d preferred_state=stable search mysql

Cookbook Trace:
---------------
/var/chef/cache/cookbooks/php/providers/pear.rb:243:in `pecl?'
/var/chef/cache/cookbooks/php/providers/pear.rb:99:in `load_current_resource'

Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/phpmyadmin_nginx/recipes/default.rb

 17: php_pear "mysql" do
 18:   action :install
 19: end
 20: php_pear "mcrypt" do

====

Here is the backtrace https://gist.github.com/4681229

Am I using the php cookbook wrong way?

-------------------------------------------
@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.com
Sent with Sparrow



  • [chef] phpmyadmin chef-php pear mysql fail, Sachin Sagar Rai, 01/31/2013

Archive powered by MHonArc 2.6.16.

§