0

I just simply want to trigger a php script that coded as cron job. When I tried to trigger it from Terminal as follows, I keep getting this error.

I've been searching for a while about this error. But still, I couldn't get the reason why ...

Any opinions ? I'm stucked.

/usr/bin/php /Users/somethingunusual/IdeaProjects/local/secure/cron/payment/listing/return/job.cron.php 

logFor=LOCAL_DB errorMessage=[Error message: extension mysql is not compiled into PHP]
 code=-4 type=MDB2_Error level=1024 mode=1 query=SET NAMES LATIN5
logFor=LOCAL_DB errorMessage=[Error message: extension mysql is not compiled into PHP]
 code=-4 type=MDB2_Error level=1024 mode=1 query=SET NAMES LATIN5
logFor=LOCAL_DB errorMessage=[Error message: extension mysql is not compiled into PHP]
 code=-4 type=MDB2_Error level=1024 mode=1 query=SET NAMES LATIN5
logFor=LOCAL_DB errorMessage=[Error message: extension mysql is not compiled into PHP]
 code=-4 type=MDB2_Error level=1024 mode=1 query=SELECT paramValue FROM xx.sysparameters WHERE paramId = 'LISTING'
logFor=LOCAL_DB errorMessage=[Error message: extension mysql is not compiled into PHP]
 code=-4 type=MDB2_Error level=1024 mode=1 query=SELECT * xx.tmp_list WHERE RETURNED IN('0', '3') LIMIT 100
logFor=LOCAL_DB errorMessage=[Error message: extension mysql is not compiled into PHP]
 code=-4 type=MDB2_Error level=1024 mode=1 query=UPDATE xx.tmp_list SET RETURNED = '2' WHERE ID IN()
logFor=LOCAL_DB errorMessage=[Error message: extension mysql is not compiled into PHP]
 code=-4 type=MDB2_Error level=1024 mode=1 query=SELECT COUNT(*) AS COUNT, RETURNED FROM xx.tmp_list GROUP BY RETURNED
Shadow
  • 33,525
  • 10
  • 51
  • 64
  • *Any opinions ?* - [Why shouldn't I use mysql_* functions in PHP?](https://stackoverflow.com/questions/12859942/why-shouldnt-i-use-mysql-functions-in-php) – Nigel Ren Sep 21 '19 at 18:00
  • Hm.. I'm aware of this. The thing is, I'm responsible of a cron job at the office. It has many business details going between mysql and php parts that I dont want to be involved. I guess changing my php version to older versions might help in a short term – somethingunusual Sep 21 '19 at 18:16

2 Answers2

0

It looks like you do not have mysql extensions for PHP installed.

It is usually called 'php-mysql' or something similar, depending on the system/distribution you are using.

0

You don't have the mysql extension in your ext directory of the server. However, Using mysql is deprecated in PHP and no longer supported in recent PHP variants. You can use mysqli instead.

mysql extension is deprecated and no longer available from php v5.5.X anymore. Head over to Official Docs

Use mysqli instead of mysql extension. Before using it, make sure it's enabled in php.ini file. remove ; prefix of extension=mysqli.so in php.ini and restart the server if not enabled.

Kiran Maniya
  • 8,453
  • 9
  • 58
  • 81