Cron Job Errors


#1

Hey…
This isn’t exactly directly related to PHP, but sorta! :roll: Anyway,
I created a script and when I run it through a browser it runs great, but when the cron job runs it says

Fatal Error: Call to undefined function imap_open() blah blah blah…

Is there limitation as to what functions a cron job can run and what it can’t?

I already tossed an email to my site host to see if they have any ideas, but I am sure I won’t get a great response from them.

Just thought maybe someone else had had more experience with cron jobs or knew of some great places to look. Well, back to search the net until I hear something!

Thanks -
Ragster


#2

Well, I know next to nothing about cron jobs, but it sounds like your webserver software does know where the function imap_open() has been defined, and your cron job doesn’t. I presume imap_open() is a function embedded in some module or dll? Your cronjob might simply not be able to locate or include it.

If this is the problem, you could try using the dl() function, if it is enabled in php.ini, but that’s really all I’d try before posting on a forum :roll:


#3

Good suggestion, I tried that and no such luck. I am guessing I would need the full path to the .dll and its not my server so I have no clue as to where it would be.

It came back with the error Unable to load dynamic link library. Like I said, probably wrong path. Anyways, if anyone has any other suggestions that would be of great help.

Thanks! :)

Still trying other things - So I will let you all know if I get anything.


#4

Is there a way to actually figure out the absolute path? Like: generate a PHP error on the webserver? Perhaps a trace of an error in imap_open() or somethin could help you get the absolute path of the dll.