Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

PHP version #16

Closed
ghost opened this issue May 18, 2013 · 10 comments
Closed

PHP version #16

ghost opened this issue May 18, 2013 · 10 comments
Assignees

Comments

@ghost
Copy link

ghost commented May 18, 2013

The "Use PHP 5.4" option doesn't seem to work. PHP 5.3.10 has install for me when I run "php -v"

@jtreminio
Copy link
Member

Sean,

Can you paste your default.pp file?

On Sat, May 18, 2013 at 5:40 PM, Sean Downey notifications@github.comwrote:

The "Use PHP 5.4" option doesn't seem to work. PHP 5.3.10 has install for
me when I run "php -v"


Reply to this email directly or view it on GitHubhttps://github.com//issues/16
.

@ghost
Copy link
Author

ghost commented May 18, 2013

Sure

I manually added the php modules as they were blank - I put a comment in on another ticket about that.

Thanks

exec { 'apt-get update':
command => 'apt-get update',
path => '/usr/bin/',
timeout => 60,
tries => 3,
}

class { 'apt':
always_apt_update => true,
}

package { ['python-software-properties']:
ensure => 'installed',
require => Exec['apt-get update'],
}

file { '/home/vagrant/.bash_aliases':
source => 'puppet:///modules/puphpet/dot/.bash_aliases',
ensure => 'present',
}

package { ['build-essential', 'vim', 'curl']:
ensure => 'installed',
require => Exec['apt-get update'],
}

class { 'apache': }

apache::dotconf { 'custom':
content => 'EnableSendfile Off',
}

apache::module { 'rewrite': }
apache::module { 'expires': }

apache::vhost { 'www.example.org':
server_name => 'www.example.org',
serveraliases => [],
docroot => '/var/www/example/public/',
port => '80',
env_variables => [],
priority => '1',
}

apt::ppa { 'ppa:ondrej/php5': }

class { 'php':
service => 'apache',
require => Package['apache'],
}

php::module { 'php5-cli': }
php::module { 'php5-curl': }
php::module { 'php5-intl': }
php::module { 'php5-mcrypt': }
php::module { 'php5-common': }
php::module { 'php5-gd': }
php::module { 'php5-fpm': }
php::module { 'php5-mysql': }

class { 'php::devel':
require => Class['php'],
}

class { 'php::pear':
require => Class['php'],
}

class { 'xdebug': }

xdebug::config { 'cgi': }
xdebug::config { 'cli': }

class { 'php::composer': }

php::ini { 'default':
value => [
'date.timezone = America/Chicago',
'display_errors = On',
'error_reporting = -1'
],
target => 'error_reporting.ini',
}

class { 'mysql':
root_password => 'secure_not',
}

@jtreminio
Copy link
Member

I've tested this several times on local and on prod, both work correctly. Maybe you got one of my earlier buggy releases.

Care to try again?

@ghost
Copy link
Author

ghost commented May 20, 2013

@jtreminio I got the same again 5.3.10. I used Ubuntu Precise 64 Bit (12.04.2 LTS) in case that was the issue?

@frastel
Copy link
Contributor

frastel commented May 20, 2013

@jtreminio Seems that in this case the provisioning installs PHP first before the ppa is registered.

This should do the trick:

apt::ppa { 'ppa:ondrej/php5':
  before => Class['php'],
}

@jtreminio
Copy link
Member

Actually I see what happened - I had this before:

class { 'apache' :
    require => Apt::Ppa['ppa:ondrej/php5'],
}

but removed it in a previous commit. It was the only way I found I could get the PPA to install, run apt-get update, then install php5.4

@frastel I'll see if your code does the same!

@jtreminio
Copy link
Member

Thanks @frastel, per documentation that's what I should have been using. I had tried to use it before, but I had been doing backwards!

@seandowney it should work now. Try again?

@jtreminio
Copy link
Member

Fixed in 46bfada

@ghost
Copy link
Author

ghost commented May 20, 2013

Cool, I added that in manually and trying again.

@ghost
Copy link
Author

ghost commented May 20, 2013

That did the trick - nice one.

Thank you both

@ghost ghost closed this as completed May 20, 2013
@ghost ghost assigned jtreminio May 20, 2013
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants