I’ve uploaded an app to my host but some datetimezone functions aren’t working.
On my local linux I have php 5.3 which works fine. My host (hostgator) has php 5.2.
Hostgator has an option to use 5.3 by putting this in .htaccess
# use php 5.3
Action application/x-hg-php53 /cgi-sys/php53
AddType application/x-httpd-php53 .php
but now I get this error
Warning: CDbConnection::createPdoInstance() [cdbconnection.createpdoinstance]: 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 /home/englandr/yii/framework/db/CDbConnection.php on line 388
Fatal error: Class 'PDO' not found in /home/englandr/yii/framework/db/CDbConnection.php on line 388
Their advice is to create a php.ini file with:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Etc/UTC
But I’m not sure where to put it? I’ve tried putting it in
/public_html/myapp/php.ini
and
/yii/myapp/php.ini
But it doesn’t appear to be picking it up.
Any ideas?
Thanks, Russ