4.2.1
Question:
Having issues installing using Scotchbox.
Cannot get around this date.timezone issue in the php.ini file. After changing it to the below code, and with single quotes, and with double quotes.
Have also restarted apache each time via:
vagrant@scotchbox:~$ sudo service apache2 restart
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/Phoenix
bauke
20 August 2018 13:30
2
you can try to put this in your _config.php file
date_default_timezone_set('America/Phoenix');
thank you ~ bauke
Hi, I just added that:
<?php
use SilverStripe\Security\PasswordValidator;
use SilverStripe\Security\Member;
// remove PasswordValidator for SilverStripe 5.0
$validator = PasswordValidator::create();
$validator->setMinLength(8);
$validator->setHistoricCount(6);
Member::set_password_validator($validator);
date_default_timezone_set('America/Phoenix');
Doesn’t seem to do anything.
The _config.php is in the /app/ folder but not the /app/_config/ folder.
Also ran:
vagrant@scotchbox:~$ sudo systemctl stop apache2.service
vagrant@scotchbox:~$ sudo systemctl start apache2.service
The above apache commands did nothing.
This is the php.ini file path. Is there another one with Scotch Box?
Your php.ini file is located at /etc/php/7.0/apache2/php.ini
Tim
20 August 2018 17:51
4
If you create a PHP info file (just a php file with phpinfo();
in it), it will show you all the ini files which are parsed, and also the current status of the setting. That way you can check that the ini file you’re editing is actually being read.
thank you DorsetDigital
finally figured out you could add the
phpinfo();
to the “end” of the install.php file, rather than create a new file! It has a long list of details:
|Configuration File (php.ini) Path |/etc/php/7.0/apache2|
|---|---|
|Loaded Configuration File |/etc/php/7.0/apache2/php.ini|
|Scan this dir for additional .ini files |/etc/php/7.0/apache2/conf.d|
the date area says:
date.timezone *no value* *no value*
Somehow it’s not reading the above php.ini file?