Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel migrate error

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.

like image 262
Soufiane Touil Avatar asked Nov 07 '22 12:11

Soufiane Touil


1 Answers

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.
like image 108
1000Nettles Avatar answered Nov 15 '22 12:11

1000Nettles