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

Add bzip support for PHP to support phantomjs-installer #728

Closed
grasmash opened this issue Jun 13, 2016 · 7 comments
Closed

Add bzip support for PHP to support phantomjs-installer #728

grasmash opened this issue Jun 13, 2016 · 7 comments
Labels

Comments

@grasmash
Copy link

The default PHP bin on Drupal VM does not include bzip support. Adding it would require compiling PHP with bzip support, as it is not included by default. See http://php.net/manual/en/bzip2.installation.php.

This is currently required for use of https://github.com/jakoch/phantomjs-installer on Linux.

@geerlingguy
Copy link
Owner

For Xenial, you can install bzip support via php-bz2 for PHP 7 (http://packages.ubuntu.com/xenial/php/php-bz2)

For Trusty, maybe http://stackoverflow.com/a/24988534/100134 ?

For phantomjs in particular, I know others using Drupal VM have used phantom before without running into issues with extra required packages... so I wonder, is there another way to install that doesn't require the dep, or is this something that changed recently?

I haven't touched phantom inside of Drupal VM for about 6 months, so my memory is fuzzy.

@geerlingguy geerlingguy changed the title Add bzip support for PHP Add bzip support for PHP to support phantomjs-installer Jun 13, 2016
@joestewart
Copy link
Contributor

joestewart commented Jun 13, 2016

Trusty also now has php-bz2 for PHP 7

vagrant@example:~$ sudo apt-cache show php-bz2
Package: php-bz2
Source: php-defaults (41+donate.sury.org~trusty+1)
Priority: optional
Section: php
Installed-Size: 28
Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Architecture: all
Version: 1:7.0+41+donate.sury.org~trusty+1
Depends: php-common, php7.0-bz2
Filename: pool/main/p/php-defaults/php-bz2_7.0+41+donate.sury.org~trusty+1_all.deb
Size: 4576
MD5sum: 0dfcf358b69467a3f0a8dcb6334f3230
SHA1: d70036b6edb2527d519bc684a45f8bfe0ca0b533
SHA256: 02b9ae838303bce6f391f4633096541c933446c9f1f1b3e2c9e61c31d3604ac6
Description-en: bzip2 module for PHP [default]
 This package provides a bzip2 module for PHP.
 .
 PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used
 open source general-purpose scripting language that is especially suited
 for web development and can be embedded into HTML.
 .
 This package is a dependency package, which depends on Debian's default
 PHP version (currently 7.0).
Description-md5: 75a9a721e5078b739984a6df2b3bcb5f

@grasmash
Copy link
Author

@geerlingguy ok, I'm assuming this addition to config.yml will be sufficient to install the package:

extra_packages:
  - php-bz2

Will report back on outcome.

@geerlingguy
Copy link
Owner

@grasmash - Any luck? If that's all that's required, we could maybe add documentation in the Behat/Selenium guide http://docs.drupalvm.com/en/latest/extras/behat/

@grasmash
Copy link
Author

Works great for PHP7, but we will need a different solution for PHP5.*.

@geerlingguy
Copy link
Owner

Linking to acquia/blt#502 and acquia/blt#501

@geerlingguy
Copy link
Owner

I think we have a good enough solution here—if you're using Selenium and no PhantomJS, there's no issue. If you want to use PhantomJS with PHP 7 (default), you need to modify your php_packages and add php-bz2. If you want to use it with PHP 5.6, you can modify php_pecl_extensions in your config.yml and add bz2 to that list (see docs here: https://github.com/geerlingguy/ansible-role-php-pecl).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants