example42 / puppet-php

A puppet module for php. According to Example42 NextGen spec.
Other
45 stars 62 forks source link

PHP PEAR could not evaluate invalid byte sequence in UTF-8 #68

Closed yamiko-ninja closed 9 years ago

yamiko-ninja commented 10 years ago

Im on a centos 6.5 x64 box with puppet 3.6.2. Ruby is installed with RVM and I get this error with 1.8.7, 1.9.3 and 2.1.2

modules are installed with librarian puppet.

In my set up file I have the below. The drush section give me Could not evaluate: invalid byte sequence in UTF-8

# drush
php::pear::module { 'Console_Table':
    repository => 'pear.php.net',
    alldeps => 'true',
    use_package => 'no',
}
php::pear::module { 'drush':
    repository => 'pear.drush.org',
    alldeps => 'true',
    use_package => 'no',
    require => Php::Pear::Module['Console_Table']
}

Here is more of the dump info

==> izanagi: Debug: /Stage[main]/Main/Node[default]/Php::Pear::Module[drush]/Php::Pear::Config[auto_discover]/Exec[pear-config-set-auto_discover]/unless: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/apc.so' - /usr/lib64/php/modules/apc.so: file too short in Unknown on line 0
==> izanagi: 
==> izanagi: Debug: /Stage[main]/Main/Node[default]/Php::Pear::Module[drush]/Php::Pear::Config[auto_discover]/Exec[pear-config-set-auto_discover]/unless: 1
==> izanagi: Debug: Exec[pear-drush](provider=posix): Executing check 'pear info pear.drush.org/drush'
==> izanagi: Debug: Executing 'pear info pear.drush.org/drush'
==> izanagi: Error: /Stage[main]/Main/Node[default]/Php::Pear::Module[drush]/Exec[pear-drush]: Could not evaluate: invalid byte sequence in UTF-8

Pear info returns some code that is causing this error.

pear info pear.drush.org/drush
yamiko-ninja commented 10 years ago

im not a sysadmin but perhaps there is a better way to check if the modules are available or they shouldn't be checked. If it doesn't check and the package doesn't exists I'm happy as long as puppet throws an error.

On the other hand maybe you can check with something like this pear search -c pear.drush.org drush

alvagante commented 10 years ago

@yamiko-ninja can you confirm if @feychenie 's fix does solve your issue? If so, please close the issue.

mscharley commented 9 years ago

@alvagante it may have, but you've recently reverted this patch so this is still an issue currently.

mscharley commented 9 years ago

Confirming #69 does solve this, but was reverted by #78.