PHP: how to fix the error: Warning: session_start() failed: No such file or directory


If you get the error like:

Warning: session_start(): open(C:/Users/ADMINI~1/AppData/Local/Temp/1\sess_6pqmrio6jmecjddsdovm281q82, O_RDWR) failed: No such file or directory (2) in C:\AppServ\www\tutorialspots.com\functions.php on line 5

error session start

How to fix it? It’s simple, you must only edit file php.ini

Step 1: Open file php.ini

Step 2: Find the line

session.save_path = ...

Ex:

session.save_path = "C:/Users/ADMINI~1/AppData/Local/Temp/1"

Step 3: Change to the correct path

Ex:

session.save_path = "C:/Users/ADMINI~1/AppData/Local/Temp/2"

Step 4: restart Apache

Done

Leave a Reply