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

Install custom extension for php #57

Open
chalist opened this issue Aug 23, 2021 · 2 comments
Open

Install custom extension for php #57

chalist opened this issue Aug 23, 2021 · 2 comments

Comments

@chalist
Copy link

chalist commented Aug 23, 2021

How I can install custom extension like ioncube?
Thank you.

@chalist chalist closed this as completed Aug 23, 2021
@chalist chalist reopened this Aug 23, 2021
@yakuter
Copy link

yakuter commented Nov 13, 2021

I just did it @chalist with the following steps.

Learn you PHP container id or label and replace containerid with the places i wrote ın this answer
docker ps
Example : {containerid} -> yakuter_php_1

Download ioncube:
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

Extract it:
tar xvfz ioncube_loaders_lin_x86-64.tar.gz

Find the suitable .so file with your PHP version in ioncube folder:
Example: ioncube_loader_lin_7.4.so

Learn the extensions folder of PHP image:
docker-compose exec php php -i | grep extension_dir
Example: /usr/local/lib/php/extensions/no-debug-non-zts-20131226

Copy the extension file in to the image extension dir:
docker cp ioncube_loader_lin_7.4.so {containerid}:/usr/local/lib/php/extensions/no-debug-non-zts-20131226

Then create a file outside and add this line in it:
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20131226/ioncube_loader_lin_7.4.so

Save file with this name:
docker-php-ext-ioncube.ini

Learn the ini files location with this command:
docker-compose exec php php -i | grep 'additional .ini files'
Example: /usr/local/etc/php/conf.d

Copy your new ini file into the image:
docker cp docker-php-ext-ioncube.ini {containerid}:/usr/local/etc/php/conf.d

Then:
docker-compose stop
docker-compose start

To check ioncube enter this command:
docker-compose exec php php -m

The last line for me is:
the ionCube PHP Loader + ionCube24

@yakuter
Copy link

yakuter commented Nov 13, 2021

I think this extension installation process can be handled with make file @zanematthew @mkamranpk @phambanhan

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

No branches or pull requests

2 participants