What's new

Welcome to the forum 👋, Guest

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.

WHMCS security settings

WHMCS security settings

* webby *

* webby *

Noobie
Webmaster
Join
Jan 27, 2025
Messages
62
Reaction score
25
Points
18
Location
Russia
encountered such a problem. I can't secure the "Crons" directory ((
I did everything according to this documentation.
It didn't work. When I run the cron command I get an error:
root$ /opt/php81/bin/php -q /var/www/root/data/www/billing-crons/cron.php
Unable to communicate with the WHMCS installation.

Please verify the path configured within the crons directory config.php file.

For more information, please see Move the Cron Directory

Please verify the path configured within the crons directory config.php file.

My path is like this:
Code:
You must log in to view
(1 lines)

In the configuration.php file, I entered it like this:
Code:
You must log in to view
(1 lines)


I named the directory billing-crons for extra security. I thought that was the problem. But I also tried with the crons directory and got the same error((
Code:
You must log in to view
(6 lines)


What could I have missed?
 
It looks like WHMCS is unable to locate your main installation directory from the cron job. This usually happens due to a misconfigured path in configuration.php or an incorrect $whmcspath setting. Let's troubleshoot:

Make sure the $whmcspath in your crons configuration.php file points exactly to the main WHMCS installation folder. Based on your setup, try setting:



$whmcspath = '/var/www/root/data/www/'
If WHMCS is installed in a subdirectory, include that:




$whmcspath='/var/www/root/data/www/whmcs/'
After updating, restart PHP-FPM and clear any cache:




BASH:
You must log in to view
(1 lines)

 
It looks like WHMCS is unable to locate your main installation directory from the cron job. This usually happens due to a misconfigured path in configuration.php or an incorrect $whmcspath setting. Let's troubleshoot:

Make sure the $whmcspath in your crons configuration.php file points exactly to the main WHMCS installation folder. Based on your setup, try setting:



$whmcspath = '/var/www/root/data/www/'
If WHMCS is installed in a subdirectory, include that:




$whmcspath='/var/www/root/data/www/whmcs/'
After updating, restart PHP-FPM and clear any cache:




BASH:
You must log in to view
(1 lines)

Thank you very much for the advice and attempt to help.
Let me explain:
I have WHMCS installed not in a subdirectory but in the root:
Code:
You must log in to view
(1 lines)
Accordingly, the crons directory is located here:
Code:
You must log in to view
(1 lines)
I moved it outside the root, to the date directory:
Code:
You must log in to view
(1 lines)
.
After data I have WWW (sites are located here:
Code:
You must log in to view
(1 lines)
etc.) In this WWW directory. I also placed crons, and it doesn't work for me either. ((
It only works by default -
Code:
You must log in to view
(1 lines)
((
My brain is already smoking... ))
 
Similar threads Most view View more
Back