Jump to content
xisto Community
xboxrulz1405241485

Php Configuration Error?

Recommended Posts

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:

 

Posted Image

 

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

Share this post


Link to post
Share on other sites

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:

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

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites

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)

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:

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.
Edited by faulty.lee (see edit history)

Share this post


Link to post
Share on other sites

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().

 

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

Share this post


Link to post
Share on other sites
ERROR IN CONFIGURATIONPhp Configuration Error?Hi guys I need some help, I am not a techy person so I'll be explaining my problem in a "laymans term". When my brother was trying to connect to the internet using our laptop connected to a modem he encountered a problem. The cursor turning into an hourglass(Reading I suppose..) then the page said "ERROR IN CONFIGURATION" we tried restarting the laptop but we encountered the same problem. What do you think guys could go wrong. HELP PLEASE...-reply by apple

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.