Welcome Guest ( Log In | Register )




                Web Hosting

 
Reply to this topicNew Topic
Php Configuration Error?
xboxrulz
post Oct 23 2008, 05:24 PM
Post #1


Colonel Panic
Group Icon

Group: [MODERATOR]
Posts: 2,939
Joined: 25-March 05
From: Toronto, Ontario, Canada
Member No.: 3,233
myCENTs:32.22


Hey guys,

I'm trying to set up a dummy server on a virtual machine. PHP, HTML, MySQL are all working. However, I ran into a slight PHP error as shown below:



Nexenta Core 1.0.1 (OpenSolaris 20080311, b85)
PHP 5.1.2
MySQL 5.0.22
Quicksilver Forums 1.4.2

Any help will be appreciated.

xboxrulz
Go to the top of the page
 
+Quote Post
yordan
post Oct 23 2008, 06:12 PM
Post #2


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 2,292
Joined: 16-August 05
Member No.: 7,896
myCENTs:99.39


could you please post the error text ? It's difficult to read it from your screen shot.
Go to the top of the page
 
+Quote Post
xboxrulz
post Oct 23 2008, 06:15 PM
Post #3


Colonel Panic
Group Icon

Group: [MODERATOR]
Posts: 2,939
Joined: 25-March 05
From: Toronto, Ontario, Canada
Member No.: 3,233
myCENTs:32.22


QUOTE
strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 had to select 'UTC' because your platform doesn't provide functionality for the guessing algorithm


PHPINFO gives me this error:
QUOTE

Warning: phpinfo() [function.phpinfo]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 had to select 'UTC' because your platform doesn't provide functionality for the guessing algorithm in /var/www/info.php on line 3



Thanks,
xboxrulz
Go to the top of the page
 
+Quote Post
yordan
post Oct 23 2008, 06:22 PM
Post #4


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 2,292
Joined: 16-August 05
Member No.: 7,896
myCENTs:99.39


So, it's clearly a date timezone problem definition somewhere. Is your day/time correct ? Seems to be a solaris system, if you type "date" in a shell window, is the answer correct ?
Go to the top of the page
 
+Quote Post
faulty.lee
post Oct 23 2008, 06:27 PM
Post #5


Super Member
Group Icon

Group: [HOSTED]
Posts: 500
Joined: 5-November 06
Member No.: 17,016
myCENTs:79.88


Putting this as the first line of your php file will fix the problem. Or you can configure your php.ini as per php's manual (see below)
CODE
date_default_timezone_set('Asia/Kuala_Lumpur');


You can set to your time zone.

If you refer to php's manual http://my.php.net/date_default_timezone_set
it says:
QUOTE
Note: Since PHP 5.1.0 (when the date/time functions were rewritten), every call to a date/time function will generate a E_NOTICE if the timezone isn't valid, and/or a E_STRICT message if using the system settings or the TZ environment variable.

Instead of using this function to set the default timezone in your script, you can also use the INI setting date.timezone to set the default timezone.


So by configuring your php.ini, you can also solve this problem.

This post has been edited by faulty.lee: Oct 23 2008, 06:28 PM
Go to the top of the page
 
+Quote Post
xboxrulz
post Oct 23 2008, 06:27 PM
Post #6


Colonel Panic
Group Icon

Group: [MODERATOR]
Posts: 2,939
Joined: 25-March 05
From: Toronto, Ontario, Canada
Member No.: 3,233
myCENTs:32.22


date is correct since the date is drawn from my Linux host. I'm using VirtualBox and I guess it set the date/time for me already.

I think the quote below something of interest from phpinfo().

QUOTE

date/time support enabled
Timezone Database Version 2005.18
Timezone Database internal
Default timezone UTC

Directive Local Value Master Value
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.583333 90.583333
date.sunset_zenith 90.583333 90.583333
date.timezone no value no value


Edit: I'm searching for my php.ini ... it's not in /usr/local ....

xboxrulz
Go to the top of the page
 
+Quote Post
xboxrulz
post Oct 23 2008, 06:44 PM
Post #7


Colonel Panic
Group Icon

Group: [MODERATOR]
Posts: 2,939
Joined: 25-March 05
From: Toronto, Ontario, Canada
Member No.: 3,233
myCENTs:32.22


ok, fixed it, had to change the date.timezone setting in my php.ini

I changed it to America/Toronto and it fixed it.

Thanks guys,
xboxrulz
Go to the top of the page
 
+Quote Post

Reply to this topicNew Topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   5 derouge 1,536 30th November 2008 - 07:16 AM
Last post by: iG-Rev.Keith Ratliff
No New Posts   2 xboxrulz 232 3rd November 2008 - 12:00 AM
Last post by: xboxrulz
No New Posts   6 Gollum 1,287 13th October 2008 - 04:05 PM
Last post by: Mordent
No New Posts   5 skedad 373 12th October 2008 - 05:24 AM
Last post by: skedad
No New Posts   0 khalilov 203 5th September 2008 - 08:14 PM
Last post by: khalilov
No New Posts   6 Eggie 1,164 24th August 2008 - 10:12 PM
Last post by: Guest
No New Posts   2 mingkus 197 21st August 2008 - 06:20 PM
Last post by: wutske
No New Posts   2 Gr33nN1nj4 290 20th August 2008 - 01:25 AM
Last post by: Gr33nN1nj4
No New Posts   0 rahulappe 326 1st August 2008 - 08:48 AM
Last post by: rahulappe
No New Posts   8 hihihihi88 1,843 30th July 2008 - 09:48 PM
Last post by: Guest
No New Posts   5 LuPPy 972 22nd July 2008 - 11:37 AM
Last post by: Guest
No New Posts 6 ajayshivaa 1,550 19th July 2008 - 01:58 AM
Last post by: Guest
No New Posts   7 LacrosseMS 792 4th July 2008 - 09:12 PM
Last post by: TavoxPeru
No New Posts   5 Miles 937 3rd July 2008 - 02:46 PM
Last post by: tansqrx
No New Posts   14 vicky99 1,786 31st May 2008 - 02:47 PM
Last post by: iGuest