Error with (date.timezone) in LiteSpeed

Razva

Active Member
#1
[SOLVED] Error with (date.timezone) in LiteSpeed

Hi folks,

I'm trying to setup a phpBB installation. All fine and dandy, till one big ugly error:

[phpBB Debug] PHP Notice: in file /index.php on line 86: 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 'Europe/Moscow' for 'MSD/4.0/DST' instead
After browsing the forums the general solution is:

Set the required setting (date.timezone) in php.ini and these messages will go away.
Note: I'm using PHP 5.3.6.

Well...the single problem is that LiteSpeed doesn't has any php.ini. So...how can I fix this?

Thanks!
 
Last edited:

webizen

Well-Known Member
#2
LSWS comes with a default php.ini (e.g. /usr/local/lsws/php/php.ini). Just copy it over and add timezone info if needed.
 

Razva

Active Member
#3
Added "date.timezone='America/Chicago' " in /opt/lsws/php/php.ini than "service lsws restart".

Still...same result...

Any other ideas? Should I switch to 5.2?
 

webizen

Well-Known Member
#4
you need to copy that php.ini file to the place that php5.3.6 can pick up.

do the following to find out where php 5.3.6 is looking for
Code:
/opt/lsws/fcgi-bin/lsphp5 -i | grep 'Configuration File'
 
Last edited:

Razva

Active Member
#5
[root@litespeed /]# /opt/lsws/fcgi-bin/lsphp5 -i | grep 'Configuration File'
Configuration File (php.ini) Path => /opt/lsws/lsphp5/etc
Loaded Configuration File => (none)
Should I copy php.ini to "/opt/lsws/lsphp5/etc"?

Note: "/opt/lsws/lsphp5/etc" doesn't exists. Should I create it?
 

Razva

Active Member
#8
Solved one thing...broke another...

I'm now trying to access my blog's /wp-admin but all I get is a...blank page...

The error.log is not stating anything suspicious.

Here's the Configuration - Server - Tunning:
- Max Connections: 3000
- Max Keep-Alive Requests: 1000

Please note that I'm currently importing some comments from WP to Disqus, so I suppose that the server has a lot of threads opened.

Still, when I access any link (check http://www.gadget.ro) everything works like a charm. But when I try to access http://www.gadget.ro/wp-admin/ ... I get a blank page.

This happened after moving the php.ini to /opt/lsws/lsphp5/etc.

Later edit: this happens with other pages also, just noticed. They load like...50 percent, and the rest is blank. It's like they load just a few "items" than stop.

Later edit 2: I've inserted JUST the "date.timezone" value in php.ini, and works like a charm again! :D

Later edit 3: Now, what's the recommended Max Connections and Max Keep-Alive Requests?
 
Last edited:

webizen

Well-Known Member
#9
should not have anything to do with Max Connections, etc.

looks like the /wp-admin redirects to login page. so it seems ok. can you confirm?
 
#12
OK, now I appear to be having this issue. I was able to load the php.ini file and now the date/time issue is gone. But much like the original poster I am getting only white pages when loading wp-admin.

Changed the date.timezone='America/Chicago' to just date.timezone and did a graceful restart. No go. Any other ideas?
 
Top