5

I have a weird error when I lunch any migrate command (reset refresh rollback etc..), the error is :

  [ErrorException]
  session_start(): open({APACHEPATH}/sessions\sess_0pb5924dau2oehuo4h32lqnem3
  , O_RDWR) failed: No such file or directory (2)



PHP Fatal error:  Uncaught exception 'ErrorException' with message 'Unknown: ope
n({APACHEPATH}/sessions\sess_0pb5924dau2oehuo4h32lqnem3, O_RDWR) failed: No such
 file or directory (2)' in Unknown:0
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handle
Error(2, 'Unknown: open({...', 'Unknown', 0, Array)
#1 {main}
  thrown in Unknown on line 0
PHP Stack trace:
PHP   1. {main}() C:\UwAmp\www\project\artisan:0

The session id

sess_0pb5924dau2oehuo4h32lqnem3

differs is different each time, so I went to the apache sessions folder (C:\UwAmp\bin\apache\sessions) and that session id was not present. I should mention that this problem occurred while installing the Tracker package , somehow during the process i can't migrate anymore, any ideas ? Thank you.

Soufiane Touil
  • 803
  • 2
  • 8
  • 17
  • does it happen with other artisan commands too? for example, php artisan make:model TestModel? – Fatemeh Majd Dec 23 '17 at 13:34
  • @FatemehMajd No, only migrate commands, I made a fresh project and copied the advancement from the old one, couldn't figure out what the problem was – Soufiane Touil Dec 23 '17 at 13:57
  • can you explain more about those advancements? what exactly did you copy and how? did you use the command line or copy/past through file manager? – Fatemeh Majd Dec 23 '17 at 14:02
  • @FatemehMajd The advancements are my controllers, views, models etc .. I copied everything through the file manager, and did not install the Tracker package, since I believe (Not sure though) that something happened during the installing process – Soufiane Touil Dec 23 '17 at 14:22

1 Answers1

1

I definitely think your php.ini's session.save_path is not configured correctly, especially as I'm seeing a forward slash "/" in the path to the directory to save sessions in within your error message.

Try this:

  1. Create a new file within your Laravel install called info.php with just a call to phpinfo().

  2. Navigate to info.php. Under "Loaded Configuration File", find the path to the loaded php.ini file and open it in your favourite text editor.

  3. Add / change the following line: session.save_path = C:\wamp\temp\ - assuming that this is the correct path to the temp folder and it actually exists on your system. Do a bit of research to determine where this directory lives and adjust accordingly, and make sure that the path uses "\" and not any "/".
  4. Restart WAMP and try to run your migrations again.
1000Nettles
  • 2,314
  • 3
  • 22
  • 31