• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

PHP Date Function

CJZ

Basic Pleskian
After upgrading to Plesk Panel 10.3, each subscription running as a CGI or FastCGI module now gives a PHP error for the date handling.

Code:
Warning: 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 'America/New_York' for 'EST/-5.0/no DST' instead in /var/www/vhosts/.../httpdocs/libraries/joomla/utilities/date.php on line 198

The timezone is set in the server's php.ini. How can I fix this problem and still have the sites hosted as CGI?
 
Last edited:
Make sure that you have in php.ini:

session.auto_start = 0
 
The following is already indicated in the php.ini

Code:
; Initialize session on request startup.
session.auto_start = 0
 
I am running on a Centos 5 linux which seems to have the CGI /Apache/ FCGI all run from the same global php.ini (/etc/php.ini). I also have the following stated in the php.ini:
Code:
[Date]
; Defines the default timezone used by the date functions
date.timezone = America/New_York

Apache service has been rebooted after applying the time zone. The sites work running under apache, I need them to run under CGI.

Thanks.
 
Here are all the error codes that appear on my site(s) when they are running as a CGI or FCGI script.

Code:
arning: strtotime() [function.strtotime]: 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 'America/New_York' for 'EST/-5.0/no DST' instead in /var/www/vhosts/.../httpdocs/libraries/joomla/utilities/date.php on line 56

Warning: 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 'America/New_York' for 'EST/-5.0/no DST' instead in /var/www/vhosts/z.../httpdocs/libraries/joomla/utilities/date.php on line 198

Warning: 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 'America/New_York' for 'EST/-5.0/no DST' instead in /var/www/vhosts/.../httpdocs/libraries/joomla/utilities/date.php on line 198

I need help correcting this issue as soon as possible. Thank you.

Feel free to ask for more information on the server configuration if it'll help with the solution.


-->> EDIT <<--

After further searching, when they are running as a CGI/FCGI script they pull the php.ini from ../vhosts/.../etc/php.ini for each site. How can these easily be managed or have it stay pointed at the master php.ini?
Code:
Server API	CGI/FastCGI
Virtual Directory Support	disabled
Configuration File (php.ini) Path	/etc
Loaded Configuration File	/var/www/vhosts/z.../etc/php.ini

Also, the php.ini files are root:root so they cannot be modifies in the Plesk file manager for the users.
 
Last edited:
Back
Top