• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Cron job Issue

M. Ahmed

New Pleskian
I have Plesk Onyx installed on top of CloudLinux. I have installed WHMCS 7.1 for one of my clients. WHMCS requires a cron job to run every 5 minutes.
"*/5 * * * * php -q /var/www/vhosts/username/httpdocs/crons/cron.php"

Whenever I am trying to run this cron through Plesk, I am getting this error:

Task "php -q /var/www/vhosts/username/httpdocs/crons/cron.php" completed with error in 0 seconds, output:

PHP Fatal error:
The file /var/www/vhosts/username/httpdocs/crons/cron.php was encoded
with the PHP 5.6 ionCube Encoder and requires PHP 5.6 to be installed.
in Unknown on line 0


Really don't know what the problem is? Different php versions are already installed in plesk.
 
Cause: When you run "php", not the PHP-builds delivered with Plesk, but your OS PHP is used. That is normally a lower release version.

Solution to use 5.6 instead:
1) # /usr/local/psa/bin/php_handler --list
Identify the line with PHP 5.6, e.g.
Code:
      plesk-php56-cgi               5.6.29         5.6.29       5.6      cgi   /opt/plesk/php/5.6/bin/php-cgi  /opt/plesk/php/5.6/bin/php  /opt/plesk/php/5.6/etc/php.ini     true disabled
  plesk-php56-fastcgi

2) Instead of using the command
Code:
*/5 * * * * php -q /var/www/vhosts/username/httpdocs/crons/cron.php
use the PHP interface that you have identified in step (1), for example
Code:
*/5 * * * * /opt/plesk/php/5.6/bin/php -q /var/www/vhosts/username/httpdocs/crons/cron.php
 
Info:
if you use the 8.2 PHP Version then use this command ,
/opt/plesk/php/8.2/bin/php -q /var/www/vhosts/domain.com/httpdocs/whmcs/crons/pop.php
Do not forget the domain.com to your Domain Name.
 
Back
Top