Skip to main content

Cronjob Reference an account's default ea-php

Comments

4 comments

  • David Colter
    Its real easy. cd /home/account/path to/ && php -q ./file.php
    Since the default version of the system is ea-php72, the file is executed with that. Incidentally, you can still use environmental variables and arguments like so: cd /home/account/path to/ && ENV=var php -q ./file.php argument1 "argument 2"
    0
  • cPanelMichael
    Hello David, Here's the document that explains how this works: EasyApache 4 and the ea-php-cli Package - EasyApache 4 - cPanel Documentation Let me know if this helps. Thank you.
    0
  • David Colter
    Thank you Michael! That"s good info. Which binary gets used if the command only contains "php"? (As I"ve used in today"s 8:45am post.)
    0
  • cPanelMichael
    Hello David, Here's the part of the document relevant to that question: [QUOTE] The system default php.conf file The system uses the /etc/cpanel/ea4/php.conf file to determine the system's default PHP version and the PHP handler that each PHP version uses. If a PHP file's PHP version is not explicitly set, the system uses the default entry in the /etc/cpanel/ea4/php.conf file to determine which version of PHP to use. Set the system's default PHP version and an individual domain's PHP version in WHM's /usr/local/cpanel/bin/rebuild_phpconf script. For more information, read our
    0

Please sign in to leave a comment.