How to Enable Date.timezone PHP on Plesk

Some changes if using codeigniter in php 5.3

If the error message

Deprecated: Assigning the return value of new by reference is deprecated in system\codeigniter\Common.php on line 130

change and edit the file on system\codeigniter\Common.php line 130

$objects[$class] =& new $name();

to

$objects[$class] =new $name();

If there is an error message:

Deprecated: Assigning the return value of new by reference is deprecated in \system\codeigniter\Common.php on line 136

Change and edit files on the system\codeigniter\Common.php line 136

$objects[$class] =& new $name();

to

$objects[$class] =new $name();

If there is an error message

Message: Function set_magic_quotes_runtime() is deprecated

change

set_magic_quotes_runtime(0);

to

@set_magic_quotes_runtime(0);

If there is an error message

A PHP Error was encountered Severity: 8192 Message: Assigning the return value of new by reference is deprecated Filename: libraries/Loader.php Line Number: 255

change and edit the file in libraries/Loader.php on line 255

$CI->dbutil =& new $class();

to

$CI->dbutil =new $class();

If there is an error message

A PHP Error was encountered Severity: 8192 Message: Assigning the return value of new by reference is deprecated Filename: database/DB.php Line Number: 133

Change and edit the file on database/DB.php line 133

$DB =& new $driver($params);

to

$DB =new $driver($params);

If there is an error message:

The url has disallowed Character

Change and edit the file on system/libraries/URI.php line 189

if ( ! preg_match("|^[".preg_quote($this->config->item('permitted_uri_chars'))."]+$|i", rawurlencode($str)))

Become

if ( ! preg_match("|^[".($this->config->item('permitted_uri_chars'))."]+$|i", rawurlencode($str)))

to error the date time function you must set the date in php.ini by enabling

date.timezone ='Asia/Jakarta';


Method 2

1. Login to Plesk

2. Go to Domain > example.com > PHP Settings.

3. Specify the time zone in the Additional configuration directions field. A list of supported time zones is available here. For example:

4. Apply the changes. Changes can be verified in the php.ini domain by clicking View phpinfo() page


Methode 3

1. Connect to the server via SSH

2. Run this command for a specific PHP handler, 7.4 in this example:


Good luck & Thank you.



Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.