Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature to add custom .so modules #107

Closed
fe3dback opened this issue Aug 9, 2017 · 8 comments
Closed

Add feature to add custom .so modules #107

fe3dback opened this issue Aug 9, 2017 · 8 comments

Comments

@fe3dback
Copy link

fe3dback commented Aug 9, 2017

Some my project require ioncube-loader extension. So now i copy it to docker by hands and rebuild image with this extension.

So will be good if in devilbox users can just copy our extension in folder, and add custom ini config with loader.

devilbox/modules/ioncube_loader_lin_7.0.so
devilbox/config/php-fpm-7.0/00-ioncube-loader.ini:

zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_7.0.so
@cytopia cytopia self-assigned this Aug 11, 2017
@cytopia
Copy link
Owner

cytopia commented Aug 11, 2017

Good idea, I will add that feature

@eortega
Copy link

eortega commented Aug 11, 2017

This feature will be really helpful !

@cytopia
Copy link
Owner

cytopia commented Aug 12, 2017

@fe3dback @eortega
I made a few quick changes to allow custom modules.

How to (Example for PHP 7.0 and module ioncube_loader_lin_7.0.so)

  1. Copy your custom *.so modules to: ./cfg/php-fpm-7.0/ioncube_loader_lin_7.0.so
  2. Create your config to load this module
cat cat cfg/php-fpm-7.0/01-ioncube.ini
zend_extension = /usr/lib64/php/custom-modules/ioncube_loader_lin_7.0.so

Note: The config file name needs to begin with 01-* or similar low number as ioncube needs to be loaded before any other PHP Zend extensions. Configuration files are loaded in alphabetical order.

I just gave it a try and it works.

Please check out the above listed branch and give it a try.

Before merging I will also have to update the documentation

@cytopia
Copy link
Owner

cytopia commented Aug 13, 2017

@fe3dback @eortega I have also added documentation now. Let me know if it is sufficient, clear and understandable:

https://github.com/cytopia/devilbox/blob/bcfa689fab5280b76f86a89873c49a0017838134/docs/Configure.md#425-custom-php-modules

cytopia added a commit that referenced this issue Aug 16, 2017
DVL-012 #107 Allow to load custom PHP modules
@cytopia
Copy link
Owner

cytopia commented Aug 16, 2017

Its been documented, tested and merged.

https://github.com/cytopia/devilbox/blob/master/docs/Configure.md#425-custom-php-modules

@cytopia cytopia closed this as completed Aug 16, 2017
Cezarion added a commit to Cezarion/devilbox that referenced this issue Nov 20, 2017
* upstream/master:
  DVL-012 Documentation: Customize bash and vim
  DVL-012 be able to customize bash config files
  DVL-012 Name correct required Docker version in documentation
  DVL-012 cytopia#112 Fixes wrong docker-compose var for BIND
  DVL-012 Fix ToC on README.md
  DVL-012 Fix ToC
  DVL-012 Add documentation for awesome-ci
  DVL-012 Documentation: Add ToC for FAQ section
  DVL-012 Documentation: How to load custom PHP modules
  DVL-012 cytopia#107 Allow to load custom PHP modules
  DVL-012 Fix cytopia#97 Devilbox UI footer overlaps embedded tools
@Stepa4man
Copy link

Does it work only for nginx? ./cfg/php-fpm-7.0/
Or apache also can use fpm?

@cytopia
Copy link
Owner

cytopia commented Oct 31, 2018

@Stepa4man Apache or Nginx are only the webservers, they don't care what backend technology is used (e.g. PHP-FPM). Use whatever webserver in whatever version, they all make their calls to PHP-FPM

@franzose
Copy link

Hello, @cytopia!

Its been documented, tested and merged.

https://github.com/cytopia/devilbox/blob/master/docs/Configure.md#425-custom-php-modules

The link is outdated. Could you, please, provide the current one?

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

No branches or pull requests

5 participants