• 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

cron on nginx

sirfpsycho

Chevereto Member
Hello, I am using cron on nginx based server. I have added cron with this command:
/www/server/php/74/bin/php /www/wwwroot/data/domain.com/cli.php -C cron

I don't know above command is ok or not. In whmcs when I use cron then there is -q after php like this:
/www/server/php/74/bin/php -q /www/wwwroot/xxx/pip.php

so is it necessary to add -q here too or it is fine without it?

++++++ After executing cron it gives below log:

  • Processing removeDeleteLog
  • Processing storageDelete
  • Processing tryForUpdates
  • Processing checkHtaccess
  • Enforce .htaccess files

Aw, snap! Internal Server Error [debug @ error_log] - https://chv.to/v3debug

** errorId #1d6ae7738b417438 **
> ErrorException [0]: file_put_contents(app/.htaccess): failed to open stream: No such file or directory
At /www/wwwroot/data/domain.com/app/htaccess-enforce.php:33

Stack trace:
#0 unknown file(unknown line): G\errorsAsExceptions()
#1 /www/wwwroot/data/domain.com/app/htaccess-enforce.php(33): file_put_contents()
#2 /www/wwwroot/data/domain.com/app/cron.php(112): include('/www/wwwroot/data/domain.com/app/htaccess-enforce.php')
#3 /www/wwwroot/data/domain.com/app/cron.php(32): checkHtaccess()
#4 /www/wwwroot/data/domain.com/app/loader.php(233): require_once('/www/wwwroot/data/domain.com/app/cron.php')
#5 /www/wwwroot/data/domain.com/cli.php(36): include_once('/www/wwwroot/data/domain.com/app/loader.php')


Here I replaced my domain with domain.com
As I am using nginx so there is no htaccess and in this log there is htaccess word and other error too. Are these error ignorable?
 
so is it necessary to add -q here too or it is fine without it?
The -q flag is for quiet-mode. 👉 http://man.he.net/?topic=php&section=all

Quiet-mode. Suppress HTTP header output (CGI only).

I don't know if is needed.

** errorId #1d6ae7738b417438 **
At /www/wwwroot/data/domain.com/app/htaccess-enforce.php:33
Make sure you uploaded all the system files, including app/.htaccess and that permissions in that path enable .php to write files there.
 
Make sure you uploaded all the system files, including app/.htaccess and that permissions in that path enable .php to write files there.
which path and files needs which permission? app folder has 755 and htaccess has 644. and I am using nginx so htaccess is not usable in nginx.
 
Simply provide the file at app/.htaccess and it should work for you. Sadly, at CLI there's no "server" so we can't detect nginx there. There's a setting key to disable the htaccess enforcement but we haven't documented it yet.

PHP:
$settings['htaccess_enforce'] = false;
 
Back
Top