php scripts cannot see or access binary files

TechBill

Well-Known Member
Aug 7, 2011
51
4
58
I had a video cms script on a website that uses ffmpeg and some other binaries to encode video into a web friendly format. It stopped working so I went to look at the web backend and it give me a warning that it cannot locate the ffmpeg binary even the path /usr/bin/ffmpeg is correct.

I ssh'ed in and I was able to encode videos using ffmpeg from shell so did cpanel add some type of security preventing the php script to use binary files ?

How do I adjust the setting to allow some binaries to be executed by php scripts?

I own the host and have full WHM / Shell access

Please advise

Thank you
 

TechBill

Well-Known Member
Aug 7, 2011
51
4
58
I just turn off the PHP-FPM and now it see the binary files.

I am not sure what is PHP-FPM
 

TechBill

Well-Known Member
Aug 7, 2011
51
4
58
I read the doc and enabled the PHP-FPM but I tried to configure it to allow php to exec some binary files however it still could not see the binary file. I assume that PHP-FPM just put it in garden or jail?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello @TechBill,

The following resource explains how you can modify php.ini directives when using PHP-FPM:

Tutorial - Managing php.ini directives with PHP-FPM

The information under the Caveat - PHP_INI_SYSTEM mode section is important to know if you're attempting to override the values for the disable_functions directive.

Thank you.