Installing problems
Closed this issue · 2 comments
Hi, I not able to install S4 beta1, I install it via composer and I have tried it on my local windows lamp stack and on a Debian 8 droplet and I have tried it with php5.6 & 7.1 on both system but I’m getting the same error all the time.
am I doing something wrong?
Installing SilverStripe...
I am now running through the installation steps (this should take about 30 seconds)
If you receive a fatal error, refresh this page to continue the installation
Setting up 'mysite/_config.php'...
Setting up E:\Dropbox\root\www\s4beta/mysite/_config.php
Setting up 'mysite/_config/config.yml'
Setting up E:\Dropbox\root\www\s4beta/mysite/_config/config.yml
Setting up '.htaccess' file...
Setting up E:\Dropbox\root\www\s4beta/.htaccess
Building database schema...
[Warning] Creating default object from empty value
POST /install.php
Line 233 in E:\Dropbox\root\www\s4beta\framework\src\Dev\Install\Installer.php
Source
224 $dbAdmin = new DatabaseAdmin();
225 $dbAdmin->setRequest($request);
226 $dbAdmin->pushCurrent();
227 $dbAdmin->doInit();
228 $dbAdmin->doBuild(true);
229
230 // Create default administrator user and group in database
231 // (not using Security::setDefaultAdmin())
232 $adminMember = DefaultAdminService::singleton()->findOrCreateDefaultAdmin();
233 $adminMember->Email = $config['admin']['username'];
234 $adminMember->Password = $config['admin']['password'];
235 $adminMember->PasswordEncryption = Security::config()->get('encryption_algorithm');
236
237 try {
238 $this->statusMessage('Creating default CMS admin account...');
239 $adminMember->write();
Trace
Monolog\ErrorHandler->handleError(2,Creating default object from empty value,E:\Dropbox\root\www\s4beta\framework\src\Dev\Install\Installer.php,233,Array)
Installer.php:233
SilverStripe\Dev\Install\Installer->SilverStripe\Dev\Install{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure,SilverStripe\Control\HTTPRequest)
HTTPApplication.php:66
SilverStripe\Control\HTTPApplication->SilverStripe\Control{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest,Closure)
HTTPApplication.php:67
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest,Closure,1)
Installer.php:249
SilverStripe\Dev\Install\Installer->install(Array)
install5.php:270
include(E:\Dropbox\root\www\s4beta\framework\src\Dev\Install\install5.php)
install.php:27
include(E:\Dropbox\root\www\s4beta\framework\src\Dev\Install\install.php)
install.php:15
Creating default CMS admin account...
[Emergency] Uncaught Error: Call to undefined method stdClass::write()
POST /install.php
Line 239 in E:\Dropbox\root\www\s4beta\framework\src\Dev\Install\Installer.php
Source
230 // Create default administrator user and group in database
231 // (not using Security::setDefaultAdmin())
232 $adminMember = DefaultAdminService::singleton()->findOrCreateDefaultAdmin();
233 $adminMember->Email = $config['admin']['username'];
234 $adminMember->Password = $config['admin']['password'];
235 $adminMember->PasswordEncryption = Security::config()->get('encryption_algorithm');
236
237 try {
238 $this->statusMessage('Creating default CMS admin account...');
239 $adminMember->write();
240 } catch (Exception $e) {
241 $this->statusMessage(
242 sprintf('Warning: Default CMS admin account could not be created (error: %s)', $e->getMessage())
243 );
244 }
245
Trace
SilverStripe\Dev\Install\Installer->SilverStripe\Dev\Install{closure}(SilverStripe\Control\HTTPRequest)
call_user_func(Closure,SilverStripe\Control\HTTPRequest)
HTTPApplication.php:66
SilverStripe\Control\HTTPApplication->SilverStripe\Control{closure}(SilverStripe\Control\HTTPRequest)
HTTPMiddlewareAware.php:65
SilverStripe\Control\HTTPApplication->callMiddleware(SilverStripe\Control\HTTPRequest,Closure)
HTTPApplication.php:67
SilverStripe\Control\HTTPApplication->execute(SilverStripe\Control\HTTPRequest,Closure,1)
Installer.php:249
SilverStripe\Dev\Install\Installer->install(Array)
install5.php:270
include(E:\Dropbox\root\www\s4beta\framework\src\Dev\Install\install5.php)
install.php:27
include(E:\Dropbox\root\www\s4beta\framework\src\Dev\Install\install.php)
install.php:15
Sorry, this issue is known and fixed, but is awaiting a new release. We hope to get beta2 out with a patch.
posting workaround here for anyone else who has experienced this particular error (those who installed beta1)
create a .env
file in your project root and create some default admin credentials, should look something like this:
SS_DEFAULT_ADMIN_USERNAME="admin"
SS_DEFAULT_ADMIN_PASSWORD="password"
NOTE: maybe change the username and password to something you're more comfortable with