Hi! I have a cron job on cPanel calling a php script every 2 minutes, I'm using the following format on the command:
php -q /home/user/public_html/folder/my_script.php
The problem is that I get the following error:
PHP Fatal error: Call to undefined function json_last_error() in /home/user/public_html/my_script.php on line 724
I'm running on PHP Version 5.4.8 and JSON support is enabled, according to phpinfo(). And just before using this function in the code there is a json_decode call, and that one doesn't seem to have any trouble.
If I try to run the script calling it from a web explorer it runs perfectly, with no errors nor warnings. Last week I changed the file's permissions and it got working, but today is not working again, so I checked the permissions and found that they went back to 777 (maybe because some minor changes I did on the file), and tried to set it to 744 like I did before, but this time it didn't work.
Does somebody knows something about this?
I appreciate any help in advance.
php -q /home/user/public_html/folder/my_script.php
The problem is that I get the following error:
PHP Fatal error: Call to undefined function json_last_error() in /home/user/public_html/my_script.php on line 724
I'm running on PHP Version 5.4.8 and JSON support is enabled, according to phpinfo(). And just before using this function in the code there is a json_decode call, and that one doesn't seem to have any trouble.
If I try to run the script calling it from a web explorer it runs perfectly, with no errors nor warnings. Last week I changed the file's permissions and it got working, but today is not working again, so I checked the permissions and found that they went back to 777 (maybe because some minor changes I did on the file), and tried to set it to 744 like I did before, but this time it didn't work.
Does somebody knows something about this?
I appreciate any help in advance.