0

I have added the following lines to my laravel/homestead after.sh in an attempt to install and enabling ioncube when provisioning the box.

wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

tar xvfz ioncube_loaders_lin_x86-64.tar.gz

sudo cp ioncube/ioncube_loader_lin_5.6.so /usr/lib/php/20131226

cron='zend_extension = "/usr/lib/php/20131226/ioncube_loader_lin_5.6.so"'

sudo echo "$cron" > /etc/php/5.6/fpm/conf.d/00-ioncube.ini

sudo systemctl restart nginx
sudo systemctl restart php5.6-fpm.service

however upon provisioning I keep getting permission denied errors on the sudo echo "$cron" > /etc/php/5.6/fpm/conf.d/00-ioncube.ini line.

I have tried changing the way that I write to the file (using cat ) but all report the same error. I have checked and it is reporting that the user is 'vagrant' which if I run the commands via CLI run correclty with permissions.

What do I need to do?

0

the following now works for me

sudo -i

wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

tar xvfz ioncube_loaders_lin_x86-64.tar.gz

sudo cp ioncube/ioncube_loader_lin_5.6.so /usr/lib/php/20131226

sudo bash -c "echo 'zend_extension = \"/usr/lib/php/20131226/ioncube_loader_lin_5.6.so\"' > /etc/php/5.6/fpm/conf.d/00-ioncube.ini"

sudo systemctl restart nginx
sudo systemctl restart php5.6-fpm.service

not sure if the sudo -i is necessary at the start

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.