0

I recently inherited a project based on the laravel framework, which after I have set up, installed all requirements by composer and run php artisan migrations on, will not run via php artisan serve.

When I researched possible causes for this, I came across the following on SO: laravel5: chdir(): No such file or directory (errno 2) Using artisan serve after changing the public folder name

When I follow the suggested solution in the second one of adding the lines ''' $app = new Illuminate\Foundation\Application( realpath(DIR . '/../') ); '''

to bootstrap/app.php I get the same exact error.

Is there a configuration file somewhere I need to update? Most of the suggested solutions I've found like changing files under vendor seem to be rather hacky? I'm really stuck on this and any help would be greatly appreciated - thanks!

Coati
  • 21
  • 5
  • What's the full error? – aynber Sep 13 '17 at 20:45
  • [ErrorException] chdir(): No such file or directory (errno 2) – Coati Sep 13 '17 at 20:48
  • Where is you public folder located? is it still at project/public/? if so, make sure you have a index.php file in it. – inet123 Sep 13 '17 at 23:19
  • The person I inherited the project from removed the public folder and put all the files in the base directory, there is an index.php in the base directory and I added the lines mentioned above to point to the base project directory but it wont run :( – Coati Sep 14 '17 at 16:47

2 Answers2

0

check the configuration of your Homestead.yalm folder, there you can specity where your project is in the folders->map section.

0

It may the error from composer so try

Composer dump-autoload -o
Haithem DISSEM
  • 74
  • 3
  • 12