Wordpress: Warning: date_default_timezone_set():

Hi i can't access my website:

Warning: mysqli_real_connect(): 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/html/wp-includes/wp-db.php on line 1531

Fatal error: mysqli_real_connect(): Timezone database is corrupt - this should never happen! in /var/www/html/wp-includes/wp-db.php on line 1531

4 Replies

And what's stopping you from SSHing in and fixing it?

This is what I'm getting from the error

if ( WP_DEBUG ) {
mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
} else {
@mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );

        if ( $this->dbh->connect_errno ) {
            $this->dbh = null;

             * It's possible ext/mysqli is misconfigured. Fall back to ext/mysql if:
             *  - We haven't previously connected, and
             *  - WP_USE_EXT_MYSQL isn't set to false, and
             *  - ext/mysql is loaded.
            $attempt_fallback = true;

This is my php.ini

; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone =; http://php.net/date.default-latitude
;date.default_latitude = 31.7667

; http://php.net/date.default-longitude
;date.default_longitude = 35.2333

; http://php.net/date.sunrise-zenith
;date.sunrise_zenith = 90.583333

; http://php.net/date.sunset-zenith
;date.sunset_zenith = 90.583333

I believe its a PHP server problem


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct