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 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:
    441
    Likes Received:
    27
    Trophy Points:
    78
    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 :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,888
    Likes Received:
    90
    Trophy Points:
    78
    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..
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    441
    Likes Received:
    27
    Trophy Points:
    78
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    441
    Likes Received:
    27
    Trophy Points:
    78
    cPanel Access Level:
    Root Administrator
    Thank you :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    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