CRON: no php.ini loaded by CLI

Discussion in 'Installation/Configuration' started by Valeren, Jan 4, 2024.

  1. Valeren

    Valeren New Member

    Hi,
    when I create a CRON (user: web20, not root) it gets created fine and runs.
    The issue is that it doesn't load either php.ini or any other .ini from conf.d
    phpinfo():

    ***************
    Server API => Command Line Interface
    Virtual Directory Support => disabled
    Configuration File (php.ini) Path => /etc/php/8.2/cli
    Loaded Configuration File => (none)
    Scan this dir for additional .ini files => /etc/php/8.2/cli/conf.d
    Additional .ini files parsed => (none)
    ***************

    I tried anything, from replacing the php.ini from php-fpm to restarting both apache and the server.
    I haven't been able to find the cause of the issue, and I need CRON to load the extensions because I'll have to run many tasks that will always include RW to a database with mysqli.

    Could you please point me to a setting that I missed, or to a configuration to edit?
     

Share This Page