close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


incorrect php.ini settings causing date function errors

Thread began 9/17/2010 4:42 pm by SaladoGuy | Last modified 9/17/2010 5:12 pm by Jason Byrnes | 1912 views | 3 replies |

SaladoGuyBeta Tester

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() []: 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()

For example:

$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)

Sign in to reply to this post

Jason ByrnesWebAssist

This is not a bug in the software, it is caused by a setting in your PHP.ini file.

in the php.ini file for php 5.3 there is a setting for :

if this is not set properly, you will get the error you are reporting.

The first error is causing the headers already sent error.

see the following page for details:

Sign in to reply to this post

SaladoGuyBeta Tester

Sure, that makes sense. I thought perhaps date_default_timezone_set() might be a beneficial improvement anyway.

Sign in to reply to this post

Jason ByrnesWebAssist

The date() function will yield the same result if you have the php.ini file set correctly.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...