• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

'PHP Warning: date() driving me nuts

shogunswb

Basic Pleskian
I have a Centos server with Plesk, one domain with Magento 1.9.0.1 installed with demo data just to test as I am quite new to this.
All was OK until I tried to get into Magento backend & couldn't so went to change the Plesk admin password & got this error when I tried to save:

Error: Failed to update application settings: Non-zero exit status returned by script.

I then went back up a level to Magento & this warning was there:

Warning: The app was not configured: Non-zero exit status returned by script. Output stream: 'PHP Warning: 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/London' for 'BST/1.0/DST' instead in /usr/local/psa/var/apspackages/apscatalogt4m5y2.zipded5053a-02ca-6f/cache/scripts/env-parser.php on line 229 '. Error stream: 'PHP Warning: 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/London' for 'BST/1.0/DST' instead in /usr/local/psa/var/apspackages/apscatalogt4m5y2.zipded5053a-02ca-6f/cache/scripts/env-parser.php on line 229 '

Now every time I try to change the magenta settings this message just repeats down the page.

I have set the system time & set it to look at a network time server, I have edited etc/php.ini & put date.timezone =Europe/London with & without "" with & without a space before Europe/London, restarted apache, mysql, the server

If I do php -info via ssh & look at the date settings they are:

date

date/time support => enabled
"Olson" Timezone Database Version => 0.system
Timezone Database => internal
Default timezone => Europe/London

Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => no value => no value

Which shows correct default timezone but where is it getting the details below from i.e. latitude, longitude & why is date.timezone => no value => no value

Should also mention the demo website is working fine I just can't access the backend.
 
Hello,

Can you please check your timezone setting in php.ini file with the following command.


Code:
cat /etc/php.ini | grep date.timezone
 
The php.ini timezone was Europe/London but I realised that the problem only occurred if I used the Magento one click install in Plesk Applications.
I eventually deleted the one click install & downloaded the files directly onto the server & it went through the installation when I first logged onto the website & now no problems.
 
Back
Top