• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • 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

OpenLiteSpeed install cron setup issue

chevereto-mark

Chevereto Member
Hi,

I installed Chevereto via OpenLiteSpeed process on ubuntu 20.04 on AWS ec2. Setup external S3 storage. Was initially having image rendering issues which led to the additional problem of noticing external storage images not being deleted, but this post helped with the image rendering leading me to turn off https for S3 storage (I am using custom domain with CNAME). Not ideal, but that part working for now in http.

This post lead me to the cron job (I confirmed chv_queues has a bunch of pending deletes) requirement. The cron setup instructions there seem to for a different install or OS type, but still attempted to adjust things for the OpenLiteSpeed install process. The results are below. litespeed is run as nobody which may or may not be an issue for running the cron command. The install Chevereto step missing from OpenLiteSpeed install process but I found it here and adjusted for the path and account on the OpenLiteSpeed process, I am thinking that should not be an issue.

Not sure what I missed in the setup. Any thoughts?

root@chevereto:/usr/local/lsws/logs# sudo -u nobody IS_CRON=1 /usr/bin/php /usr/local/lsws/chevereto.srmstar.org/html/cron.php
PHP Fatal error: Uncaught Error: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' in /usr/local/lsws/chevereto.srmstar.org/html/lib/G/classes/class.db.php:79
Stack trace:
#0 /usr/local/lsws/chevereto.srmstar.org/html/lib/G/classes/class.db.php(110): G\DB->__construct()
#1 /usr/local/lsws/chevereto.srmstar.org/html/app/loader.php(66): G\DB::getInstance()
#2 /usr/local/lsws/chevereto.srmstar.org/html/cron.php(23): include_once('/usr/local/lsws...')
#3 {main}
thrown in /usr/local/lsws/chevereto.srmstar.org/html/lib/G/classes/class.db.php on line 79

root@chevereto:~# /usr/bin/php -version
PHP 7.4.3 (cli) (built: Oct 6 2020 15:47:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies
root@chevereto:~#
 
The cron setup instructions there seem to for a different install or OS type
The instructions are made for Debian-like systems, you have to adapt it to make it work for your environment. Just make sure to understand the context. Rather than "nobody" you should be passing the right user with permissions, the user that Apache/Nginx uses when doing www.

Also, note that cron runs PHP CLI so your PHP "web" settings and extensions must exists also in CLI mode. What I can see is that you lack PDO MySQL in CLI.
 
The instructions are made for Debian-like systems, you have to adapt it to make it work for your environment. Just make sure to understand the context. Rather than "nobody" you should be passing the right user with permissions, the user that Apache/Nginx uses when doing www.

Also, note that cron runs PHP CLI so your PHP "web" settings and extensions must exists also in CLI mode. What I can see is that you lack PDO MySQL in CLI.

The cron instuctions refer to the /dashboard for the cron to install. I adjusted the file redirect to see the output. The cron instuctions here shows running the cron as the webserver user. I trying both with the same result. Following the OpenLightSpeed, "nobody" is the account the webserver runs as. It appears the Openlightspeed install procedure on the website does not appear to be vetted. Instead of looking into the PDO suggestion, I may try to rebuilding the image following another install process on the website.

root@chevereto:~# crontab -l
* * * * * IS_CRON=1 /usr/bin/php /usr/local/lsws/chevereto.srmstar.org/html/cron.php >> /tmp/chevereto-cron.log 2>&1

root@chevereto:~# cat /tmp/chevereto-cron.log | tail -7
PHP Fatal error: Uncaught Error: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' in /usr/local/lsws/chevereto.srmstar.org/html/lib/G/classes/class.db.php:79
Stack trace:
#0 /usr/local/lsws/chevereto.srmstar.org/html/lib/G/classes/class.db.php(110): G\DB->__construct()
#1 /usr/local/lsws/chevereto.srmstar.org/html/app/loader.php(66): G\DB::getInstance()
#2 /usr/local/lsws/chevereto.srmstar.org/html/cron.php(23): include_once('/usr/local/lsws...')
#3 {main}
thrown in /usr/local/lsws/chevereto.srmstar.org/html/lib/G/classes/class.db.php on line 79

root@chevereto:~# ss -plnt | egrep ':80|:443'
LISTEN 0 4096 0.0.0.0:80 0.0.0.0:* users:(("litespeed",pid=807,fd=22),("litespeed",pid=806,fd=22),("litespeed",pid=669,fd=22))
LISTEN 0 4096 0.0.0.0:443 0.0.0.0:* users:(("litespeed",pid=807,fd=23),("litespeed",pid=806,fd=23),("litespeed",pid=669,fd=23))

root@chevereto:~# ps -ef | grep "80[7]"
nobody 807 669 0 Jan03 ? 00:00:28 openlitespeed (lshttpd - #02
 
Back
Top