• 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

cli.php not running

nuohei

Chevereto Member
  • CLI:/www/wwwroot/honker.org/cli.php
  • Cron last ran:0000-00-00 00:00:00 UTC — not running
Running sudo - U root PHP /www/wwwroot/honker.org/cli.php - C cron command gets the following error
📃 Error log message

  • Processing deleteExpiredImages
  • Processing checkHtaccess
  • Enforce .htaccess files

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

** errorId #9c04c93d547c81a1 **
> ErrorException [0]: file_put_contents(app/.htaccess): Failed to open stream: No such file or directory
At /www/wwwroot/honker.org/app/htaccess-enforce.php:33

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

You are getting this issue because PHP doesn't have write permission to write the missing file at app/.htaccess. You need to fix the permissions in your filesystem, and if you can't do that you can always re-upload the app/.htaccess file from the main download, here: https://chevereto.com/panel/downloads

Let me know if that helps.

Cheers,
Rodolfo.
 
Hi again,

I can confirm that this is a bug present in the software and that it will get patched in V3.20.15.

You can try with the code below at app/htaccess-enforce.php.

PHP:
<?php
/* --------------------------------------------------------------------
  Chevereto
  https://chevereto.com/
  @author   Rodolfo Berrios A. <http://rodolfoberrios.com/>
            <inbox@rodolfoberrios.com>
  Copyright (C) Rodolfo Berrios A. All rights reserved.
  BY USING THIS SOFTWARE YOU DECLARE TO ACCEPT THE CHEVERETO EULA
  https://chevereto.com/license
  --------------------------------------------------------------------- */
if (!defined('access') or !access) {
    die('This file cannot be directly accessed.');
}
echo "* Enforce .htaccess files\n";
$apacheDir = G_APP_PATH . 'apache/';
$checksumFile = $apacheDir . 'checksums.php';
$checksums = include $checksumFile;
$changed = false;
foreach($checksums as $file => $md5) {
    $absoluteFile = G_ROOT_PATH . $file;
    $md5File = file_exists($absoluteFile)
        ? md5_file($absoluteFile)
        : null;
    if($md5File != $md5) {
        if(file_exists($absoluteFile) && !is_writable($absoluteFile)) {
            echo "Unable to write $absoluteFile file\n";
            die(255);
        }
        file_put_contents($absoluteFile, file_get_contents($apacheDir . $md5));
        $changed = true;
        echo '  - Checksum enforced for ' . $file  . "\n";
    }
}
$changedMessage = !$changed ? ' (everything OK)' : '';
echo "✅ [DONE] Enforce completed$changedMessage\n";
 
Back
Top