Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.
session_start(): open(C:\Windows\TEMP\sess_3ls3qdk77m9mhsf5tm1cdhrm05bi5kb1, O_RDWR) failed: Invalid argument (22)
in my php.ini file: session.save_path = "C:\temp\phpsessions"
Before it was working fine. So sudden it is showing an error.
anyone can assist with this please.
session_start() creates a session or resumes the current one based on a session identifier passed via a GET or POST request, or passed via a cookie. When session_start() is called or when a session auto starts, PHP will call the open and read session save handlers.
PHP $_SESSION is an associative array that contains all session variables. It is used to set and get session variable values. Example: Store information.
The PHP session which is accessible via the global variable $_SESSION is stored on the server as files by default. Also the reference to it (called session_id ) is stored on client side as browser cookies.
The browser sends a request to the server. PHP responds by sending a unique token that identifies the current session. This is known as the session ID. In all subsequent requests, the browser sends the session ID to say, "Hey, it's me again." All other data related to the session is stored on the web server.
As already stated by other, there is a chance that
there is no problem with your browser.
Double check the permissions on C:\Windows\Temp\ folder. I think IIS_IUSRS needs to have write access in order for files to be saved.
Consider moving the session folder out of C:\Windows\
Where ever you put the sessions, iis will need permissions to edit it.
PHP will not create this directory structure automatically. So make sure this C:\temp\phpsessions directory exist. If not, then you can use the script in the ext/session dir for that purpose or create that directory structure manually.
and then
You can change session save path by writing this line for created directory before session start also note here extra '\' because of escape character.
session_save_path("C:\\temp\\phpsessions");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With