Erreur de chemin sur une tache cron
... / Erreur de chemin sur une ...
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

Erreur de chemin sur une tache cron

by
Michael Magoga

Bonjour,

J'ai une tache cron très simple, sur moon hébergement qui appelle un script bash :

cd /homez.542/magogafrwf/Heroic/
/usr/local/php8.2/bin/php /homez.542/magogafrwf/Heroic/bin/cake.php maj_quotidien

Or, lorsque la tache se déclenche elle provoque une erreur, dans le log je vois :

 /homez.542/magogafrwf/Ut/majquotidien.sh: line 4: /usr/local/php8.2/bin/php: No such file or directory

Alors même que depuis mon ssh, l'appel à   "/usr/local/php8.2/bin/php" fonctionne très bien ??


2 Replies ( Latest reply on 2025-07-01 07:32:39 by
Michael Magoga
)

Bizarre, ça, 

Sur cluster013 à l'instant: (et on remarquera que ioncube semble absent en PHP 8.3 et 8.4)

 

$ /usr/local/php8.1/bin/php --version
PHP 8.1.32 (cli) (built: May 14 2024 12:20:00) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.32, Copyright (c) Zend Technologies
    with the ionCube PHP Loader v13.0.4, Copyright (c) 2002-2024, by ionCube Ltd.
    with Zend OPcache v8.1.32, Copyright (c), by Zend Technologies

$ /usr/local/php8.2/bin/php --version
PHP 8.2.28 (cli) (built: May  7 2025 09:00:00) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.28, Copyright (c) Zend Technologies
    with the ionCube PHP Loader v13.0.4, Copyright (c) 2002-2024, by ionCube Ltd.
    with Zend OPcache v8.2.28, Copyright (c), by Zend Technologies

$ /usr/local/php8.3/bin/php --version
PHP 8.3.21 (cli) (built: May  9 2025 09:00:00) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.21, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.21, Copyright (c), by Zend Technologies

$ /usr/local/php8.4/bin/php --version
PHP 8.4.7 (cli) (built: May  9 2025 09:28:21) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.7, Copyright (c) Zend Technologies
    with Zend OPcache v8.4.7, Copyright (c), by Zend Technologies

En effet, pour l'instant je m'en tire en le lancant  à la main tous les matins, mais c'est peu pratique :) .

Mais oui, ca marche en ligne de commande, pas en cron :(..

 

Mick