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

osherdo's avatar

Cannot run php artisan commands

Hello I have tried to run few php artisan commands and i was unable to do so. it has started since I was following the instructions from the documentation of BrainSocket , and then when done and trying to run 'php artisan list' command, I get the following error:

[Symfony\Component\Debug\Exception\FatalErrorException] App\Providers\RouteServiceProvider::App\Providers{closure}(): Failed openi ng required 'C:\Users\Osher\Desktop\laravel\SportsApp\app/Http/routes.php' (include_path='C:\Users\Osher\Desktop\laravel\SportsApp\vendor/phpunit/php- text-template;C:\Users\Osher\Desktop\laravel\SportsApp\vendor/phpunit/php-t imer;.;C:\php\pear')

Could anyone give me a lead on this one?

Thanks in advance.

0 likes
5 replies
andy's avatar
andy
Best Answer
Level 8

Not really sure but try:

  • changing permissions on your log file to Read and Write
  • making sure that the routes file exits
  • is this normal behaviour for windows? "SportsApp\app/Http" ? Back and forward slash in the same path ...

Are you running a vagrant or wamp box?

osherdo's avatar

Hi andy first of all thank you for replying.

It seems to be that the lack of the routes file in the project folder was the problem. i am now able to see the list of commands. :)

i can't find the log file. could your direct me to it for further usage of me?

Well it looks a bit odd when you see both back and forward slash but still runs well as i see it now.Cannot figure out where it reads the path since i am still quite new to Laravel. Anyway thank you really for your help! :)

andy's avatar

Laravel does a lot of work for you to magically set things up. the biggest problem is setting up your host file so that it points the public directory properly. After that it is just making sure that your permissions are set properly.

Laravel 5/5.1.x

the log file should be: app (laravel.com) / storage / logs / laravel.log Also watch out for the the cache directory in the bootstrap folder. I had to change permissions on it which I never had to do before 5.1.

If you get a white screen or other errors, many times it is because of permissions ;) That is if you don't consider a mistake in your code.

The other thing to watch for is properly namespacing your files.

<?php

namespace App\Modules\XYZModule\Http\Controllers;


class ModulesController extends Controller {

The namespace after the opening tag for php helps laravel to find your files. So, you don't have to have a big file like registry to call all your includes.

Laravel is really fun after you start to get to understand it. Also, you will become a better php programmer after you have used it for a while :)

osherdo's avatar

thank you for the tips! - very useful.

May you know by chance where's the app/start/global.php file is?

I have searched for it on both the root folder and project folder and couldn't find it.

There is no start folder and also global php exist in multiple paths across laravel folders (both root and project folder)

Thanks..

osherdo's avatar

btw I am using windows 7 on virtualbox .

Please or to participate in this conversation.