[Corrigé 3.2.30] Erreur tâche cron avec OAUTH
Posté : sam. 22 oct. 2022 22:46
Bonjour,
Suite à la mise en place du connecteur en OAUTH les tâches cron dans mon environnement OVH ont été désactivés suite à des erreurs.
Lorsque l'on lance en mode mail2ticket.php?token= ça fonctionne.
J'ai quelque log cron, cella donne une erreur 255 ce qui correspond visiblement à une erreur de chemin relatif...
Je ne peux pas reproduire en webdemo bien entendu
[2022-10-21 10:51:02] ## OVH ## END - 2022-10-21 10:51:04.344264 exitcode: 255
[2022-10-21 11:54:02] ## OVH ## START - 2022-10-21 11:54:02.337867 executing: /usr/local/php8.1/bin/php /homez.196/securlittd/www/prod/gestsup/mail2ticket.php
[2022-10-21 11:54:02] GESTSUP IMAP CONNECTOR v3.2.29
[2022-10-21 11:54:02]
[2022-10-21 11:54:02] DATE : 2022-10-21 11:54:02
[2022-10-21 11:54:02] SERVER : outlook.office365.com
[2022-10-21 11:54:02] MODE : single
[2022-10-21 11:54:02] AUTHENTICATION TYPE : oauth_azure
[2022-10-21 11:54:02] OAUTH GENERATE ACCESS TOKEN : eyJ0eXAiOiJKV1QiLCJub25j*****************
[2022-10-21 11:54:02] OAUTH UPDATE REFRESH TOKEN : 0.AV8A3vFlLpJFZ0yddwYmlP*****************
[2022-10-21 11:54:02] OAUTH CONNEXION : OK
[2022-10-21 11:54:02] ADDRESS : gestsup@xxx.com
[2022-10-21 11:54:02] UNSEEN MAIL : 1
[2022-10-21 11:54:02]
[2022-10-21 11:54:02] [gestsup@xxx.com] [mail 1] mail data : subject="test7" from="xxx@xxx.com" date="2022-10-21 10:43:06" body_type="html"
[2022-10-21 11:54:02] [gestsup@xxx.com] [mail 1] find gestsup user id : find 7 for address xxx@xxx.com
[2022-10-21 11:54:02] [gestsup@xxxx.com] [mail 1] create new ticket
[2022-10-21 11:54:02] [gestsup@xxx.com] [mail 1] ticket created : 2264
[2022-10-21 11:54:02] [gestsup@xxx.com] [mail 1] add attachment : image001.png
[2022-10-21 11:54:02] [gestsup@xxx.com] [mail 1] add attachment : image002.jpg
[2022-10-21 11:54:02] [gestsup@xxx.com] [mail 1] add attachment : image003.gif
[2022-10-21 11:54:02] <b>SMTP SERVER :</b><br />
[2022-10-21 11:54:02] Warning: require_once(vendor/autoload.php): Failed to open stream: No such file or directory in /home/securlittd/www/prod/gestsup/core/mail.php on line 470
[2022-10-21 11:54:02]
[2022-10-21 11:54:02] Fatal error: Uncaught Error: Failed opening required 'vendor/autoload.php' (include_path='.:/usr/local/php8.1/lib/php') in /home/securlittd/www/prod/gestsup/core/mail.php:470
[2022-10-21 11:54:02] Stack trace:
[2022-10-21 11:54:02] #0 /home/securlittd/www/prod/gestsup/core/imap_oauth.php(527): include()
[2022-10-21 11:54:02] #1 /home/securlittd/www/prod/gestsup/mail2ticket.php(159): require('/home/securlitt...')
[2022-10-21 11:54:02] #2 {main}
[2022-10-21 11:54:02] thrown in /home/securlittd/www/prod/gestsup/core/mail.php on line 470
[2022-10-21 11:54:02]
[2022-10-21 11:54:02] ## OVH ## END - 2022-10-21 11:54:04.147542 exitcode: 255
Suite à la mise en place du connecteur en OAUTH les tâches cron dans mon environnement OVH ont été désactivés suite à des erreurs.
Lorsque l'on lance en mode mail2ticket.php?token= ça fonctionne.
J'ai quelque log cron, cella donne une erreur 255 ce qui correspond visiblement à une erreur de chemin relatif...
Je ne peux pas reproduire en webdemo bien entendu
[2022-10-21 10:51:02] ## OVH ## END - 2022-10-21 10:51:04.344264 exitcode: 255
[2022-10-21 11:54:02] ## OVH ## START - 2022-10-21 11:54:02.337867 executing: /usr/local/php8.1/bin/php /homez.196/securlittd/www/prod/gestsup/mail2ticket.php
[2022-10-21 11:54:02] GESTSUP IMAP CONNECTOR v3.2.29
[2022-10-21 11:54:02]
[2022-10-21 11:54:02] DATE : 2022-10-21 11:54:02
[2022-10-21 11:54:02] SERVER : outlook.office365.com
[2022-10-21 11:54:02] MODE : single
[2022-10-21 11:54:02] AUTHENTICATION TYPE : oauth_azure
[2022-10-21 11:54:02] OAUTH GENERATE ACCESS TOKEN : eyJ0eXAiOiJKV1QiLCJub25j*****************
[2022-10-21 11:54:02] OAUTH UPDATE REFRESH TOKEN : 0.AV8A3vFlLpJFZ0yddwYmlP*****************
[2022-10-21 11:54:02] OAUTH CONNEXION : OK
[2022-10-21 11:54:02] ADDRESS : gestsup@xxx.com
[2022-10-21 11:54:02] UNSEEN MAIL : 1
[2022-10-21 11:54:02]
[2022-10-21 11:54:02] [gestsup@xxx.com] [mail 1] mail data : subject="test7" from="xxx@xxx.com" date="2022-10-21 10:43:06" body_type="html"
[2022-10-21 11:54:02] [gestsup@xxx.com] [mail 1] find gestsup user id : find 7 for address xxx@xxx.com
[2022-10-21 11:54:02] [gestsup@xxxx.com] [mail 1] create new ticket
[2022-10-21 11:54:02] [gestsup@xxx.com] [mail 1] ticket created : 2264
[2022-10-21 11:54:02] [gestsup@xxx.com] [mail 1] add attachment : image001.png
[2022-10-21 11:54:02] [gestsup@xxx.com] [mail 1] add attachment : image002.jpg
[2022-10-21 11:54:02] [gestsup@xxx.com] [mail 1] add attachment : image003.gif
[2022-10-21 11:54:02] <b>SMTP SERVER :</b><br />
[2022-10-21 11:54:02] Warning: require_once(vendor/autoload.php): Failed to open stream: No such file or directory in /home/securlittd/www/prod/gestsup/core/mail.php on line 470
[2022-10-21 11:54:02]
[2022-10-21 11:54:02] Fatal error: Uncaught Error: Failed opening required 'vendor/autoload.php' (include_path='.:/usr/local/php8.1/lib/php') in /home/securlittd/www/prod/gestsup/core/mail.php:470
[2022-10-21 11:54:02] Stack trace:
[2022-10-21 11:54:02] #0 /home/securlittd/www/prod/gestsup/core/imap_oauth.php(527): include()
[2022-10-21 11:54:02] #1 /home/securlittd/www/prod/gestsup/mail2ticket.php(159): require('/home/securlitt...')
[2022-10-21 11:54:02] #2 {main}
[2022-10-21 11:54:02] thrown in /home/securlittd/www/prod/gestsup/core/mail.php on line 470
[2022-10-21 11:54:02]
[2022-10-21 11:54:02] ## OVH ## END - 2022-10-21 11:54:04.147542 exitcode: 255