"undefined function exif_read_data()" error only via Cron - php

I am facing trouble running a PHP script via Cron. When I execute the same script from a browser, it works just fine.
The Cron service outputs this error:
PHP Fatal error: Call to undefined function exif_read_data() in /homessd/xxx/my-functions.php on line 88

As suggested by jotik, i have checked with my hosting provider and found that a different php was being used via cron which was creating the problem. After fixing the path to correct php, the problem is solved.

Related

PHP - Interbase - Call to undefined function ibase_connect()

I'm trying to connect to a Firebase Database server but I'm getting:
PHP Fatal error: Uncaught Error: Call to undefined function ibase_connect()
It was working good, but today it started to throw that error. I've been for the last hours searching on the internet in every page, even in Portuguese, but nothing helps.
Almost in every post they are dealing with W/L/XAMPP, but that doesn't help.
I'm trying this on a valueserver shared host (I don't even know which company is that). PHP Version: 7.2.1
The file is running via cron job.
This is what I'd tried:
Verify in php.ini that interbase is uncommented.
Look for server errors (none).
Please I don't know what to do.

Facing file get html error

I am getting the below error while triggering the file with crone jobs, while it doesn't show any error with manual triggering. Please help whats the logic behind this error. Thanks
Fatal error: Call to a member function find() on a non-object in /home/afghannewscom/public_html/auto/MainProject.php on line 35
Look at the file MainProject.php on line 35 (in editor) and see whats the problem.
the variable $OuterLink is not an object. you may have a look at its definition line.
I also had a similar issue with cronjobs (PHP errors in cronjobs only, running file via browser was fine). The error was caused by incorrect server configuration (it was a shared server, so I couldn't change it). In my case, the fix was pretty easy - I changed cronjob from "php -q /some_file.php" to "curl http://somedomain.com/some_file.php" (you can also use lynx or wget command instead of curl)

PHP Fatal error: Class 'OAuth' not found in /var/www/html/twitters/TwitterAutoReply.php on line 24

I was setting up a Twitter auto reply bot on my VPS. When I ran the PHP script it gave me an error. Yes, obviously I installed the PECL OAuth extension, added the code to the php.ini file & even checked it to see if it was enabled by creating a phpinfo.php file. Still, nothing.
So I'm really confused here. I even rebooted the server & restarted apache but with no success. So what should I do? Here's the output when I run the script:
PHP Fatal error: Class 'OAuth' not found in
/var/www/html/twitters/TwitterAutoReply.php on line 24
root#Graffocp:/var/www/html/twitters#
Thanks for your help :)

"Fatal error: Call to undefined function" resulting in particular local server, but ran well in others'

I'm developing a PHP application which generating reports to PDF
Right now I'm facing some troubles
I'm working from my own computer with XAMPP Server and the code ran well
But when I copied the codes to my office's WAMP5 Version 1.6.5 Server I got errors
Fatal error: Call to undefined function array_fill_keys() in D:\wwwroot\tcpdf\include\tcpdf_fonts.php on line 1848
I went to that troubled line and removed it, but another Fatal error: Call to undefined function occured
Is there something wrong with my WAMP5 configuration?
Thanks
Your version of php is to old... as Royal Bg suspected.
Either upgrade to 1.6.6 for php 5.2. But if there is no reason to use such an old version switch to something less than 7 years old :)
see:
http://sourceforge.net/p/wampserver/news/?source=navbar

snmp_set_enum_print undefined?

I have A really simple PHP script that is failing. When I run it, I am getting this message in my apache error log:
PHP Fatal error:  Call to undefined function snmp_set_enum_print()
Here is the full PHP script:
<?php
snmp_set_enum_print(0);
?>
I upgraded my Net-SNMP libraries to v5.5 and I am still getting this error. What am I missing?
The problem was that I had to update the /etc/rc.d/rc.snmptrapd to accept unauthorized v3 traps.

Categories