Closed acobster closed 2 years ago
sigh I hate IonCube, but I suppose since Pantheon now allows it on 7.1+, we should allow the same 😦
I'd be happy to not allow it anywhere else though 😉
Yeah please don't. :p
There is a known compatibility issue between Drupal Console and IonCube. IonCube essentially breaks Drupal Console with the only known workaround being disabling the IonCube php extension.
@AaronFeledy thanks for pointing that out! le sigh I hate IonCube even more now...
I think it would be totally antithetical to Lando's core purpose to introduce this at the cost of something like drupal-console. I'd personally be fine with not including this in a devwithlando image and instead having documentation around how to do this with a custom image
in an overrides
block. The only viable alternative I see is maintaining a separate 7.1 image (plus any subsequently supported versions) that includes the extension, to keep it opt-in, not sure how y'all feel about that? If that's workable, I'd be happy to work on a PR.
The image I built is here on Docker Hub and if we go with the custom-image route I'd also be inclined open-source the Dockerfiles etc., pending any licensing discussions with our attorney (the only reason I didn't just release it outright, blech).
@acobster thanks for sharing your image. I also need to build a lando environment for a WP site with Memberium (and equally hate their use of ioncube).
Could you please provide an excerpt of your lando config or point me into the right direction of how to integrate? I would really appreciate that.
I have tried to figure it out myself, but couldn't find any info on how to do it.
@KimchaC this should work for Lando rc2+, but I haven't tested it.
services:
# use a custom image with the ionloader extension
appserver:
type: php:custom
overrides:
image: sitecrafting/lando-ionloader:pantheon-7.1-fpm
We also moved away from Memberium (praise be!), so I don't really have a use-case for this anymore. Good luck.
Thanks, your config worked indeed... But I also figured out how to use the build_as_root setting to make it work without a third-party image.
Here it is in case someone else needs to setup ioncube or memberium:
name: my-site
recipe: wordpress
config:
webroot: .
php: '7.3'
via: nginx
database: mariadb
services:
# Adjust DB user so that database import and export works
database:
creds:
user: test
password: test
database: test
appserver:
run:
- "wp config create --dbname=test --dbuser=test --dbpass=test --dbhost=database || :"
# Add support for ioncube
build_as_root:
- export PHP=7.3 && export IC_SO="ioncube_loader_lin_$PHP.so" && export PHP_EXT_DIR=`php-config --extension-dir` && cd /tmp && curl -o ioncube.tar.gz http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz && tar -xvvzf ioncube.tar.gz && mv "ioncube/$IC_SO" $PHP_EXT_DIR && rm -Rf ioncube.tar.gz ioncube && echo "zend_extension=$PHP_EXT_DIR/$IC_SO" > /usr/local/etc/php/conf.d/00_docker-php-ext-ioncube_loader.ini
thank you @KimchaC using:
build_as_root:
- export PHP=7.3 && export IC_SO="ioncube_loader_lin_$PHP.so" && export PHP_EXT_DIR=`php-config --extension-dir` && cd /tmp && curl -o ioncube.tar.gz http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz && tar -xvvzf ioncube.tar.gz && mv "ioncube/$IC_SO" $PHP_EXT_DIR && rm -Rf ioncube.tar.gz ioncube && echo "zend_extension=$PHP_EXT_DIR/$IC_SO" > /usr/local/etc/php/conf.d/00_docker-php-ext-ioncube_loader.ini
Worked perfectly for me to get a local WHMCS installation running using Lando!
@infused-kim @tripflex Thank you both for the notes to get it working.
It was working fine on my Intel MacBook Pro, but since transitioning to ARM I get this error:
Failed loading /usr/local/lib/php/extensions/no-debug-non-zts-20180731/ioncube_loader_lin_7.3.so: /usr/local/lib/php/extensions/no-debug-non-zts-20180731/ioncube_loader_lin_7.3.so: cannot open shared object file: No such file or directory
It doesn't make sense because the file definitely exists, and PHP is running version 7.3 and I'm using version 7.3 of the extension. Any ideas?
Sorry for jumping on an old thread, but I found this while trying to install ioncube on lando for use with the Setasign PDF components. The echo to a first load ini
worked perfectly.
Also, @roberttolton, not sure if you figured this out, but there is a separate build of the ioncube extension for arm-based linux, which is what you would need to run this in the container.
Feature Request
Per discussion in slack today, it would be great to get IonCube support into Lando's PHP 7.1+ builds. This would provide out-of-the-box support for things like the Memberium plugin.
https://www.ioncube.com/loaders.php