D-Trox Posted January 25 Posted January 25 Hello, Recently, IPS detected that cron was no longer completing tasks. After some research, I discovered with the logs that the problem came from init.php line 565 mb_internal_encoding() After several searches, they all said that php mbstring was required, which was already installed. However, I still tried to reinstall mbstring and did the updates along the way. Today, cron returns this error in the logs: <!DOCTYPE html> <html lang="en"> <head> <title>Error</title> <style type='text/css'> body { background: #f9f9f9; margin: 0; padding: 30px 20px; font-family: "Helvetica Neue", helvetica, arial, sans-serif; } #error { max-width: 800px; background: #fff; margin: 0 auto; } h1 { background: #151515; color: #fff; font-size: 22px; font-weight: 500; padding: 10px; } h1 span { color: #7a7a7a; font-size: 14px; font-weight: normal; } #content { padding: 20px; line-height: 1.6; } #reload_button { background: #151515; color: #fff; border: 0; line-height: 34px; padding: 0 15px; font-family: "Helvetica Neue", helvetica, arial, sans-serif; font-size: 14px; border-radius: 3px; } </style> </head> <body> <div id='error'> <h1>An error occurred <span>(500 Error)</span></h1> <div id='content'> We're sorry, but a temporary technical error has occurred which means we cannot display this site right now. <br><br> You can try again by clicking the button below, or try again later. <br><br> <button onclick="window.location.reload();" id='reload_button'>Try again</button> </div> </div> </body> Any idea how to fix and get cron working? Thank you
Marc Posted January 25 Posted January 25 Have you checked you are running the same PHP version as you changed mbstring on, for your cron jobs?
D-Trox Posted January 25 Author Posted January 25 Hello Marc, Yea i isntall PHP 8.1 , apt-get install php8.1-mbstring i also try apt-get install php-mbstring And the ACP - Get Support - php version , mbstring is enable
Daniel F Posted January 25 Posted January 25 1 minute ago, D-Trox said: Hello Marc, Yea i isntall PHP 8.1 , apt-get install php8.1-mbstring i also try apt-get install php-mbstring And the ACP - Get Support - php version , mbstring is enable Is mbstring also shown when you run php -i from CLI ? And last but not least, have you updated the path to the new php binary for the IPS4 cron job?
D-Trox Posted January 25 Author Posted January 25 (edited) With php -i , i receive php version 8.3.2 But in the adminCP - php info , is 8.1.27 Quote And last but not least, have you updated the path to the new php binary for the IPS4 cron job? In the cron job , i put in the crontad -e the text gived in the admincp , if is that you mean ? Edited January 25 by D-Trox
teraßyte Posted January 25 Posted January 25 (edited) The site's account on the server and CLI can use different PHP versions. Based on your post, CLI is using PHP 8.2 instead of 8.1. You need to manually indicate CLI to use the 8.1 path. For example, instead of: php script.php You might need: /opt/alt/php81/usr/bin/php script.php The exact path depends on your server's configuration. Edited January 25 by teraßyte D-Trox and Randy Calvert 1 1
D-Trox Posted January 25 Author Posted January 25 35 minutes ago, teraßyte said: The site's account on the server and CLI can use different PHP versions. Based on your post, CLI is using PHP 8.2 instead of 8.1. You need to manually indicate CLI to use the 8.1 path. For example, instead of: php script.php You might need: /opt/alt/php81/usr/bin/php script.php The exact path depends on your server's configuration. Is work , :) Thank you very much
Recommended Posts