Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

egghead77's avatar

HELP!! 500: Server Error (Laravel) with zero information on why its not working...

Just following the laravel tutorials and saw the tutor created a new project pretty easily with no issues...but I'm having alot of problems...

I also created a new project by typing in "laravel new project". I then did everything described in the tutorials but I'm getting a 500 server error.

The template Laravel site doesnt even show up.

The .env file has the following:

APP_NAME=Laravel

APP_ENV=local

APP_KEY=base64:vvtXwSCKyJHXO1vh3ZKPasX/q+5qG5fsCd9rkIqBuSA=

APP_DEBUG=true

APP_URL=http://localhost

LOG_CHANNEL=stack

DB_CONNECTION=mysql

DB_HOST=127.0.0.1

DB_PORT=3306

DB_DATABASE=mydb

DB_USERNAME=root

DB_PASSWORD=

apache error log had the following: [Thu Feb 28 04:02:53.207352 2019] [mpm_winnt:notice] [pid 1436:tid 748] AH00456: Apache Lounge VC15 Server built: Nov 21 2018 11:51:35 [Thu Feb 28 04:02:53.207352 2019] [core:notice] [pid 1436:tid 748] AH00094: Command line: 'c:\wamp64\bin\apache\apache2.4.37\bin\httpd.exe -d C:/wamp64/bin/apache/apache2.4.37' [Thu Feb 28 04:02:53.209863 2019] [mpm_winnt:notice] [pid 1436:tid 748] AH00418: Parent: Created child process 12056 [Thu Feb 28 04:02:53.486000 2019] [mpm_winnt:notice] [pid 12056:tid 720] AH00354: Child: Starting 64 worker threads.

**The details in this are correct. But dont know why I'm getting the 500 error. There's literally no information to assist. Just "500: server error". Maybe it messed up after I created a new laravel project. But that' shouldnt be happening...

tried changing the 5th line of the .env file to APP_URL = "http://127.0.0.1:8000" but it didnt fix the problem.**

and i have APP_DEBUG=true

0 likes
6 replies
Dalma's avatar

Have you configured Wamp's Apache server to host your site and respond on port 8000 or are you attempting to use the small server included with laravel which is started via

php artisan serve

As the php server responds on port 8000 I suspect that this is the server that you are attempting to hit and it may not be running unless you issued the command above.

Cronix's avatar

Did you look at the error log? /storage/logs

egghead77's avatar

@CRONIX - Yes. I looked at it before. I dont really understand it. Not sure if its relevant but:

in my env. file I had no APP_KEY so I generated one and pasted that in.

Also in the bootstrap>cache>config.php file the database array had some other database in there (forge) and not the database I had in the .env file. I also changed that to have the correct database too.

I dont know if those two things messed things up but I doubt it, because I was having the 500 error before I made those changes and I only made those changes to see if they would fix the error.

BTW: There's no issues with the database side of things (There are no problems with migrations etc).

The error log is as follows:

#1 D:\project\vendor\laravel\framework\src\Illuminate\Encryption\EncryptionServiceProvider.php(48): tap(NULL, Object(Closure))

#2 D:\project\vendor\laravel\framework\src\Illuminate\Encryption\EncryptionServiceProvider.php(24): Illuminate\Encryption\EncryptionServiceProvider->key(Array)

#3 D:\project\vendor\laravel\framework\src\Illuminate\Container\Container.php(791): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}(Object(Illuminate\Foundation\Application), Array)

#4 D:\project\vendor\laravel\framework\src\Illuminate\Container\Container.php(671): Illuminate\Container\Container->build(Object(Closure))

#5 D:\project\vendor\laravel\framework\src\Illuminate\Container\Container.php(619): Illuminate\Container\Container->resolve('encrypter', Array)

#6 D:\project\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(757): Illuminate\Container\Container->make('encrypter', Array)

#7 D:\project\vendor\laravel\framework\src\Illuminate\Container\Container.php(929): Illuminate\Foundation\Application->make('encrypter')

#8 D:\project\vendor\laravel\framework\src\Illuminate\Container\Container.php(857): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))

#9 D:\project\vendor\laravel\framework\src\Illuminate\Container\Container.php(822): Illuminate\Container\Container->resolveDependencies(Array)

#10 D:\project\vendor\laravel\framework\src\Illuminate\Container\Container.php(671): Illuminate\Container\Container->build('App\\Http\\Middle...')

#11 D:\project\vendor\laravel\framework\src\Illuminate\Container\Container.php(619): Illuminate\Container\Container->resolve('App\\Http\\Middle...', Array)

#12 D:\project\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(757): Illuminate\Container\Container->make('App\\Http\\Middle...', Array)

#13 D:\project\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(215): Illuminate\Foundation\Application->make('App\\Http\\Middle...')

#14 D:\project\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(189): Illuminate\Foundation\Http\Kernel->terminateMiddleware(Object(Illuminate\Http\Request), Object(Illuminate\Http\Response))

#15 D:\project\public\index.php(60): Illuminate\Foundation\Http\Kernel->terminate(Object(Illuminate\Http\Request), Object(Illuminate\Http\Response))

#16 D:\project\server.php(21): require_once('D:\\project\\publ...')

#17 {main} "}

Cronix's avatar

run php artisan config:clear

It sounds like you cached the config, which should really only be done in production, not development. If you do it in development, you will need to run that command any time you change your .env file, because once the config is cached, it uses those values and totally ignores .env. You'd also need to do that on production, but usually you only do that once during a deployment.

https://laravel.com/docs/5.8/configuration#configuration-caching

egghead77's avatar

@CRONIX - @CRONIX - I ran php artisan config:clear

It still gives a 500 error...

I just did a "new laravel" command and started a new project from scratch and I dont get the 500 error for that project.

Please or to participate in this conversation.