server-status-project / server-status

Simple, modern looking server status page with administration and some nice features, that can run even on shared webhosting
https://demo.status.sajdl.com/
Apache License 2.0
394 stars 87 forks source link

Manually set admin user/password #138

Closed btsherid closed 3 years ago

btsherid commented 3 years ago

Hi,

I'm trying to do an automated install so I need to use config.php. I got it up and running by doing that, but I'm getting this:

Warning: Use of undefined constant admin - assumed 'admin' (this will throw an Error in a future version of PHP) in /opt/app-root/src/template.php on line 59

This also means I can't access the admin page. So is there a way I can manually set the admin username/password in the code? Trying to use the automated installer didn't work for how I'm trying to set it up.

Thank You, Brendan Sheridan

thnilsen commented 3 years ago

The user/password is stored in the db. Why not create a standard installation manually, then make a backup of the database and the config.php file and use that as a base for your automated install?

btsherid commented 3 years ago

Thanks. I was able to use the web installer to create the user/password in the db and then use it later in my manual install.