johnnyk Posted August 2, 2006 Share Posted August 2, 2006 Weird problem:I have a file that I include on every page of my site that looks like this:[code]<?phpdate_default_timezone_set('US/Eastern');//functions and variables and what not?>[/code]When I require() that file from a page, it loads fine. But when I require() that file from /cron/main.php (outside the public directory), I get an error that says something like "Call to undefined function date_default_timezone_set()".If it means anything, main.php is run by a...you guessed it...cron. main.php also require()s two other files, and they get included fine.Any idea?(Yay formatting!) Quote Link to comment Share on other sites More sharing options...
ronverdonk Posted August 2, 2006 Share Posted August 2, 2006 In some other form I saw the following tip:[quote]I did come across the putenv function $timeZone = "TZ=US/Eastern";putenv( $timeZone );seems to work for php date/time and sql statements.[/quote]Worth a try?Ronald 8) Quote Link to comment Share on other sites More sharing options...
johnnyk Posted August 3, 2006 Author Share Posted August 3, 2006 I read that putenv() has some problems or something. But why isn't d_d_t_s() working with the cron? Quote Link to comment 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.