If you are running an older version of WHMCS (like v7.10.3) on a modern DirectAdmin server, you might encounter issues with the default PHP version. To ensure your automation and support tickets work flawlessly, you must specify the correct PHP binary path.
Here is a step-by-step guide to configuring your Cron Jobs and Email Piping.
1. Setting up the Automation Cron Job
To handle recurring tasks, invoices, and currency updates, you need to set up a Cron Job in DirectAdmin.
The Command: Instead of using a generic php -q command, you must use the absolute path to the PHP 7.4 binary to avoid version conflicts with the server’s primary PHP.
Correct Command:
/usr/local/php74/bin/php -q /home/username/domains/whmcsdomain.com/crons/cron.php >/dev/null 2>&1
Note: Make sure to replace username and whmcsdomain.com with your actual server details.
2. Configuring Email Piping for Support Tickets
Email piping allows your clients to reply to tickets directly via email. If you are setting this up for your Sales department, follow these steps:
Step A: Navigate to Forwarders
-
Log in to your DirectAdmin Dashboard.
-
Go to E-Mail Manager > Forwarders.
-
Click on Create E-Mail Forwarder.
Step B: Create the Pipe
-
Forwarder Name: Enter
sales(for sales@whmcsdomain.com). -
Add Destination: From the dropdown menu, select Pipe.
-
Pipe Command: Enter the following path:
/usr/local/php74/bin/php -q /home/username/domains/whmcsdomain.com/crons/pipe.php >/dev/null 2>&1
⚠️ Critical Troubleshooting Tips for DirectAdmin Users
-
Avoid Double Pipe Symbols: Do not manually add the pipe symbol (
|) at the beginning of your command in the DirectAdmin input field. DirectAdmin automatically prepends a pipe symbol upon submission. Adding one yourself will result in a double pipe (||), making the command invalid. -
No Quotation Marks: Do not wrap your command in double quotes (
" "). Including quotes will cause the execution to fail as an invalid path. -
Use the Full Binary Path: Simply using
php -qor/usr/local/php74 -qwill not work. You must use the full path to the binary:/usr/local/php74/bin/php. -
Optional Forwarding: Under “Add Destination,” you can also include a standard email address by clicking “+ADD” if you want a copy of the incoming email to be delivered to a secondary mailbox alongside the WHMCS ticket system.
Conclusion By following these specific pathing rules, you can keep your “Lifetime” WHMCS installation running smoothly on a newer server environment without the need for expensive upgrades.
