• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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