The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED Could not open input file:

Discussion in 'General Discussion' started by ammad, Aug 3, 2017.

  1. ammad

    ammad Registered

    Joined:
    Aug 3, 2017
    Messages:
    2
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    hyd
    cPanel Access Level:
    Website Owner
    i am using cpanel and get error:Could not open input file:
    how to solve it me command is
    /usr/local/bin/php -q safe_mode=Off /home/rankingsolution/public_html/my.php
    any body please help
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,399
    Likes Received:
    52
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    What output do you get without safemode? Can you share a screenshot of the error?
    /usr/local/bin/php -q /home/rankingsolution/public_html/my.php
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You must use the "d" flag to define PHP environment variables when calling it via the command line. EX:

    Code:
    /usr/bin/php -q -d safe_mode=Off /path/to/test.php
    Keep in mind the "safe mode" option is removed as of PHP 5.4:

    PHP: Safe Mode - Manual

    Thank you.
     
  4. ammad

    ammad Registered

    Joined:
    Aug 3, 2017
    Messages:
    2
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    hyd
    cPanel Access Level:
    Website Owner
    Thanks for asking but problem has been solved.
     
    cPanelMichael likes this.
Loading...

Share This Page