incorrect php.ini settings causing date function errors
I'm still learning so many thing I've done wrong may be user error, but I have noticed a few things that crop up repeatedly, that I think WA might consider fixing in future versions of eCart.
Quite often, after setting up a new cart (with all the necessary wizards) on final checkout steps (clicking the last button) I get errors like this:
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /Users/me/Sites/mysite/webassist/email/mail_php.php on line 198
Often seen in conjunction with lines like this:
Warning: Cannot modify header information - headers already sent by (output started at /Users/me/Sites/mysite/Connections/local.php:9) in /Users/me/Sites/mysite/confirm.php on line 344
It always complains about line 198 in mail_php.php, and usually another line in confirm.php (I think it's line 244).
I've been able to remove the error by replacing date() functions with date_default_timezone_set()
$mailHeader .= "Date: ". date_default_timezone_set('r (T)').$lineEnd;
Often many of the "Cannot modify header information" errors disappear after the date fix.
I'm using Max OS X Snow Leopard, with various combination of "MAMP" and OS X's built in apache for a web server (and mysql of course)