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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED php bound to OS version

Discussion in 'EasyApache' started by durangod, Jan 27, 2018.

  1. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    365
    Likes Received:
    17
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    Hi, i found out today when setting up a cron that it appears my 'php' command for cron could be bound to the default OS binary php install. To get my cron working i had to prepend the normal cron command with the full on location of my php install.


    for example: instead of

    php -q /path/to/config.php

    i had to use

    /opt/cpanel/ea-php56/root/usr/bin/php -q /path/to/config.php

    since i set up this server it would not surprise me one bit if i missed something along the way. Is this something i need to fix and how to fix it please?

    Thanks :)
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,722
    Likes Received:
    77
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    With multiple PHP install, it is obvious that you have to check what PHP version is supported for the script you are running via cron and based on this, you have to use the PHP binary and /opt/cpanel/ea-php** is the place where the PHP installation location is..
     
  3. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    365
    Likes Received:
    17
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    Thanks, i know that i have to add the direct path now but all these years running dif installs of cpanel i always use just php -q .....
    for cron and never had to use the direct path, it always just knew where to look putting just php. It must be something new i guess.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,734
    Likes Received:
    1,706
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  5. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    365
    Likes Received:
    17
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    Thank you :)
     
    cPanelMichael likes this.
Loading...

Share This Page