env file keeps disapeering when starting
treii28 opened this issue · comments
After a new install, whenever I try to start the server using artisan serve, the .env disapeers.
To Reproduce
New install. copy env example to a .env file, fill in mysql information and set AWS settings
run artisan serve in the root directory.
Expected behavior
server starts
Desktop (please complete the following information):
Ubuntu 22.04, php 8.3, mysql 8.0.35
WARN PHP Deprecated: Optional parameter $fields declared before required parameter $type is implicitly treated as a required parameter in vendor/s-cart/core/src/Library/Helpers/custom_field.php on line 9.
ErrorException
filemtime(): stat failed for /usr/src/scottw/finao/laravel/finao-s-cart/.env
at vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php:99
95▕ }
96▕
97▕ if (! $this->option('no-reload') &&
98▕ $hasEnvironment &&
➜ 99▕ filemtime($environmentFile) > $environmentLastModified) {
100▕ $environmentLastModified = filemtime($environmentFile);
101▕
102▕ $this->newLine();
103▕
+13 vendor frames
14 artisan:35
Illuminate\Foundation\Console\Kernel::handle()
$ ls -a
. composer.lock .env.example package.json 'S-Cart DB Schema.svg' vite.config.js
.. composer.phar .gitattributes phpunit.xml SECURITY.md
app config .gitignore public storage
artisan _config.yml .idea readme.md .styleci.yml
bootstrap database lang resources tests
composer.json .env_bk LICENSE routes vendor
@treii28 Thank you for your information. Logical conflict, error occurs when you install automatic via use php artisan serve. Everything is normal when we use vhost configuration or manual installation. We will check again.
@treii28
Please delete or rename the .env file before installing s-cart using php artisan serve. The .env file will be automatically created while you install s-cart.
If you want to install manually, read the instructions https://github.com/s-cart/s-cart?tab=readme-ov-file#installation--configuration