paul_97 Posted March 18, 2021 Share Posted March 18, 2021 Hello, I had updated from PHP 5.x to PHP 7.2. The issue is that my cron files are not running now. The sites based on php 5 code runs without any issues. The cron files when run from cmd are producing errors like to change to mysqli. Any solutions? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/312318-php-5-code-not-running-in-commandline-runs-in-browser-in-php-72/ Share on other sites More sharing options...
requinix Posted March 18, 2021 Share Posted March 18, 2021 If you have errors then the solution would be to fix those errors, wouldn't it? Quote Link to comment https://forums.phpfreaks.com/topic/312318-php-5-code-not-running-in-commandline-runs-in-browser-in-php-72/#findComment-1585179 Share on other sites More sharing options...
maxxd Posted March 19, 2021 Share Posted March 19, 2021 22 hours ago, paul_97 said: The cron files when run from cmd are producing errors like to change to mysqli. Perhaps consider changing to mysqli? Though, truth be told, PDO is easier... Quote Link to comment https://forums.phpfreaks.com/topic/312318-php-5-code-not-running-in-commandline-runs-in-browser-in-php-72/#findComment-1585209 Share on other sites More sharing options...
schwim Posted March 19, 2021 Share Posted March 19, 2021 Depending on the complexity of the script in question, it may simply be a case of renaming some of the functions to the mysql version. https://dzone.com/articles/convert-mysql-to-mysqli Quote Link to comment https://forums.phpfreaks.com/topic/312318-php-5-code-not-running-in-commandline-runs-in-browser-in-php-72/#findComment-1585211 Share on other sites More sharing options...
Barand Posted March 19, 2021 Share Posted March 19, 2021 That dzone link advocates some really bad practices. Ignore. Quote Link to comment https://forums.phpfreaks.com/topic/312318-php-5-code-not-running-in-commandline-runs-in-browser-in-php-72/#findComment-1585214 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.