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!

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,789
    Likes Received:
    83
    Trophy Points:
    78
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,704
    Likes Received:
    1,791
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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

  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