Hi there,
A WordPress plugin I’m using is asking for ffmpeg to be installed on the server.
I’ve gone into trellis/roles/common/defaults and added the following:
apt_packages_custom:
ffmpeg: "{{ apt_package_state }}"
This works well, except that the binary can’t be used by PHP because of open_basedir.
I get the following:
Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/ffprobe) is not within the allowed path(s): (/srv/www/:/tmp) …
It looks like open_basedir is configured to allow the web root and the /tmp directory.
Ways I can think of are:
create a symbolic link fromcopy/move the binaries to /tmp or the web root- install the package as the web user somehow, to a different path somehow (like /usr/local/bin or some such)
- edit open_basedir to include the binaries’ current path (insecure?)
- after install, copy/move/
symlinkthe files to be inside the www/shared directory
Is there an established way for binaries to be accessed by PHP at run time that I should follow? I can’t see one yet; the closest is wp-cli but that’s still designed to be run as the user and not the PHP process, which means open_basedir doesn’t apply.
Any help much appreciated!