snipe-it-docker-compose icon indicating copy to clipboard operation
snipe-it-docker-compose copied to clipboard

PHP timezone?

Open sekroots opened this issue 2 years ago • 0 comments

Hello,

I am running snipeit from your docker-compose and I got some errors about permission on /var/www/html/storage/laravel.log

The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied The exception occurred while attempting to log: UnexpectedValueException: The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied The exception occurred while attempting to log: UnexpectedValueException: The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied The exception occurred while attempting to log:

Accessing app:

Illuminate\Database\QueryException SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'locale' (SQL: alter table users add locale varchar(5) null default 'en # you should change this for the desired language')

Running php artisan from docker console:

root@2550a21cb778:/var/www/html# php artisan config:clear PHP Notice: date_default_timezone_set(): Timezone ID 'Europe/London # you should change this to your timezone' is invalid in /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php on line 49 Configuration cache cleared! root@2550a21cb778:/var/www/html# php artisan migrate PHP Notice: date_default_timezone_set(): Timezone ID 'Europe/London # you should change this to your timezone' is invalid in /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php on line 49


  • Application In Production!     *
    

Do you really wish to run this command? (yes/no) [no]:

yes

Migrating: 2016_03_10_133849_add_locale_to_users

Illuminate\Database\QueryException

SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'locale' (SQL: alter table users add locale varchar(5) null default 'en # you should change this for the desired language')

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:712 708▕ // If an exception occurs when attempting to run a query, we'll format the error 709▕ // message to include the bindings with SQL, which will make this exception a 710▕ // lot more helpful to the developer instead of just the database's errors. 711▕ catch (Exception $e) { ➜ 712▕ throw new QueryException( 713▕ $query, $this->prepareBindings($bindings), $e 714▕ ); 715▕ } 716▕ }

  +9 vendor frames

10 database/migrations/2016_03_10_133849_add_locale_to_users.php:17 Illuminate\Support\Facades\Facade::__callStatic()

  +22 vendor frames

33 artisan:35 Illuminate\Foundation\Console\Kernel::handle() root@2550a21cb778:/var/www/html#

How do I solve it? Thanks

sekroots avatar Feb 17 '23 16:02 sekroots