Cron using wrong version of PHP

cPanel plugin for php selection
Post Reply
freedominternet
Posts: 0
Joined: Fri Nov 11, 2016 11:16 am

Cron using wrong version of PHP

Post by freedominternet »

I am trying to run a php script that has been encoded with IonCube. For the most part any files encoded in the folder I am accessing are working fine with IonCube however when Cron tries to run a script, it is bypassing the version selected by NTPHPSelector and using the default version of PHP which is 5.2.17 and the files are running in PHP 5.6.

Is there a way to get Cron in cPanel to use the version of PHP selected or do I need to force a change elsewhere in the server?



freedominternet
Posts: 0
Joined: Fri Nov 11, 2016 11:16 am

Re: Cron using wrong version of PHP

Post by freedominternet »

Solution Found :)

Just had to change the cron command from using: php -q

To: /opt/ntphp/php56/bin/php -q



Edward
Posts: 24
Joined: Mon May 04, 2015 10:16 am

Re: Cron using wrong version of PHP

Post by Edward »

Hi

Sorry for the delay. Glad you found a fix

We will be more active in the forum in the coming days and you are welcome to use this forum for asking general questions or doubts in future as well..


Edward N
Support Staff
Nixtree Solutions
Managed Backups || Server Management

https://www.nixtree.com

Edward
Posts: 24
Joined: Mon May 04, 2015 10:16 am

Re: Cron using wrong version of PHP

Post by Edward »

ntPHPselector version 4.1.0 RELEASED

New version of ntPHPselector with 5.3 support is released. It has a WHM module for recompilation of 5.3 and
listing the instances of custom php used.

URL : https://www.nixtree.com/nt-php-selector.php


Features

[+] Added 5.3 Support.
[+] WHM Interface available for listing the instances of custom PHP used.
[+] 5.3 Recompilation option available via WHM interface.
[+] Recompilation logs can be view from the WHM interface
[+] Compatible with Centos 6 and Centos 7.

The php version 5.3 successfully recompiled with Centos 6 and Centos
7 operating systems. Missing of some devel packages or any other
custom environments in the server may cause the failure of php
recompile. And we suggest to do the troubleshoot in recompilation with
the help of an experienced hand. For recompilation and installation
support, please open a ticket with our support
[https://nixtreesupport.com/].

The yearly subscription for the ntPHPselector plugin is increased to
$12 and you can upgrade to the new version by paying the rest of the
amount. If you need upgrade, please reply to this mail.

Thank you,
Nixtree Solutions - Plugins & Development
https://www.nixtree.com


Edward N
Support Staff
Nixtree Solutions
Managed Backups || Server Management

https://www.nixtree.com

Post Reply