Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

php scripts cannot see or access binary files

Discussion in 'General Discussion' started by TechBill, Mar 21, 2019.

Tags:
  1. TechBill

    TechBill Member

    Joined:
    Aug 7, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    51
    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
     
  2. TechBill

    TechBill Member

    Joined:
    Aug 7, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    51
    I just turn off the PHP-FPM and now it see the binary files.

    I am not sure what is PHP-FPM
     
  3. TechBill

    TechBill Member

    Joined:
    Aug 7, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    51
    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?
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,530
    Likes Received:
    2,181
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice