ALL SYSTEMS OPERATIONALUPTIME 99.97%FLEET 18/18IN-MUM · US-LAX · EU-FSN EST. 2003 · +91 11 4998 4038

SAVOIR LES BASSES · ENVIRONNEMENT PHP

Comment configurer ou forcer des emplois Cron à utiliser une version PHP

Dernière mise à jour 2023-04-07

In all but our oldest servers, we have implemented a feature that allows you to set a version of PHP you want to use on your account. However, cron jobs running on a server will normally use the PHP version set for the server, and not the one specified by the PHP version tool. If your cron job needs to run with a different version of PHP, then you will need to specify it in your cron job command or script.

 

Le code de commande de l'échantillon cronjob est affiché ci-dessous sera exécuté en utilisant la version système PHP définie pour le serveur:

 

php -q /home/userna5/public_html/crondir/cronscript.php

 

 

Pour exécuter l'échantillon cronjob en utilisant une ligne de version PHP spécifique, veuillez indiquer la version 7.4 de PHP disponible via « Sélectionner une version PHP » ou PHP Selector, changez la commande en

 

/opt/alt/php74/usr/bin/php -q /home/userna5/public_html/crondir/cronscript.php

 

 

Pour exécuter le cron en utilisant PHP 5.6, remplacez le 74 de /opt/alt/php74/usr/bin/php par 56 pour formater l'échantillon de cron comme

 

/opt/alt/php56/usr/bin/php -q /home/userna5/public_html/crondir/cronscript.php

← Tous les articles de la base de connaissances

Dites-nous ce qui doit rester debout.

A short conversation with an engineer. No quote-bot, no callback queue. We'll tell you honestly if we're not the right fit.