• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Cron job error

evil

Chevereto Member
👉Hi, I am having problems with cron jobs, all jobs are in "pending" status and images are not physically deleted from the server.
When the cron job wasn't implemented, everything was fine with deleting images.

External storage
API: FTP
HTTPS: Enabled

▶🚶‍Reproduction steps
  1. Delete any image
😢Unexpected result
  • The image is deleted from the site (only in the route system), but not from the external storage (in my case from the FTP server)
  • Then this delete job goes to the your DB in `chv_queues` and gets "queue_status" as "pending" and remains forever
  • You can still reach this image using the "direct link"

📃Error log message
Cron test
sudo -u www-data IS_CRON=1 /usr/bin/php /home/www/public_html/i/cron.php

PHP Warning: Undefined array key "session.save_path" in /home/www/public_html/i/lib/G/G.php on line 86
PHP Stack trace:
PHP 1. {main}() /home/www/public_html/i/cron.php:0
PHP 2. include_once() /home/www/public_html/i/cron.php:23
PHP 3. require_once() /home/www/public_html/i/app/loader.php:38
PHP Deprecated: Required parameter $subject follows optional parameter $delimiter in /home/www/public_html/i/lib/G/functions.php on line 1613
PHP Stack trace:
PHP 1. {main}() /home/www/public_html/i/cron.php:0
PHP 2. include_once() /home/www/public_html/i/cron.php:23
PHP 3. require_once() /home/www/public_html/i/app/loader.php:38
PHP Deprecated: Required parameter $filename follows optional parameter $method in /home/www/public_html/i/lib/G/functions.php on line 2164
PHP Stack trace:
PHP 1. {main}() /home/www/public_html/i/cron.php:0
PHP 2. include_once() /home/www/public_html/i/cron.php:23
PHP 3. require_once() /home/www/public_html/i/app/loader.php:38
PHP Warning: Undefined array key "error_reporting" in /home/www/public_html/i/lib/G/G.php on line 119
PHP Stack trace:
PHP 1. {main}() /home/www/public_html/i/cron.php:0
PHP 2. include_once() /home/www/public_html/i/cron.php:23
PHP 3. require_once() /home/www/public_html/i/app/loader.php:38
PHP Deprecated: Required parameter $values_array follows optional parameter $exception in /home/www/public_html/i/app/lib/functions.php on line 81
PHP Stack trace:
PHP 1. {main}() /home/www/public_html/i/cron.php:0
PHP 2. include_once() /home/www/public_html/i/cron.php:23
PHP 3. require_once() /home/www/public_html/i/app/loader.php:38
PHP Deprecated: Required parameter $item follows optional parameter $tpl in /home/www/public_html/i/app/lib/functions.render.php on line 396
PHP Stack trace:
PHP 1. {main}() /home/www/public_html/i/cron.php:0
PHP 2. include_once() /home/www/public_html/i/cron.php:23
PHP 3. require_once() /home/www/public_html/i/app/loader.php:38
PHP Deprecated: Required parameter $template follows optional parameter $tpl in /home/www/public_html/i/app/lib/functions.render.php on line 396
PHP Stack trace:
PHP 1. {main}() /home/www/public_html/i/cron.php:0
PHP 2. include_once() /home/www/public_html/i/cron.php:23
PHP 3. require_once() /home/www/public_html/i/app/loader.php:38
PHP Deprecated: Required parameter $tools follows optional parameter $tpl in /home/www/public_html/i/app/lib/functions.render.php on line 396
PHP Stack trace:
PHP 1. {main}() /home/www/public_html/i/cron.php:0
PHP 2. include_once() /home/www/public_html/i/cron.php:23
PHP 3. require_once() /home/www/public_html/i/app/loader.php:38
PHP Warning: A non-numeric value encountered in /home/www/public_html/i/lib/G/functions.php on line 1422
PHP Stack trace:
PHP 1. {main}() /home/www/public_html/i/cron.php:0
PHP 2. include_once() /home/www/public_html/i/cron.php:23
PHP 3. G\get_ini_bytes($size = '256M') /home/www/public_html/i/app/loader.php:44
PHP 4. G\get_bytes($size = '256M', $cut = -1) /home/www/public_html/i/lib/G/functions.php:1434
PHP Warning: Undefined array key "crypt" in /home/www/public_html/i/app/loader.php on line 51
PHP Stack trace:
PHP 1. {main}() /home/www/public_html/i/cron.php:0
PHP 2. include_once() /home/www/public_html/i/cron.php:23
PHP Fatal error: Uncaught Error: Undefined constant PDO::MYSQL_ATTR_INIT_COMMAND in /home/www/public_html/i/lib/G/classes/class.db.php:79
Stack trace:
#0 /home/www/public_html/i/lib/G/classes/class.db.php(110): G\DB->__construct()
#1 /home/www/public_html/i/app/loader.php(66): G\DB::getInstance()
#2 /home/www/public_html/i/cron.php(23): include_once('...')
#3 {main}
thrown in /home/www/public_html/i/lib/G/classes/class.db.php on line 79
 

Attachments

  • db.jpg
    db.jpg
    56.5 KB · Views: 6
Ok, I already know what's wrong.
It depends on what version of php you are using, in my case server is running PHP-FPM7.4, so the cron job should look like this:

* * * * * IS_CRON=1 /usr/bin/php7.4 /home/www/public_html/i/cron.php >/dev/null 2>&1

and then everything works fine.
 
Last edited:
Back
Top