Why is O_RDWRfailed available when php4 uses session?
Source: Internet
Author: User
Article Title: Why O_RDWRfailed occurs when PHP 4 uses session ?. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The session function in php4 can be said to be quite perfect. it fixes many bugs in previous versions and is convenient to use. Unlike sessions in asp, php4 stores session values on web servers rather than clients. In general, it is in the mp Directory. if this directory does not exist, the following error will occur:
?? Warning: open (mpsess_3a1118cbf345a4950254946fc8e5935e, O_RDWR) failed: m (2)
?? You can add this directory to the php running directory.
?? You can also modify session. save_path = under [session] in the php. ini file.
?? You can also specify the path by adding session_save_path (""); to the running file.
?? Next, you can perform session operations such:
?? ?? Session_save_path ("temp ");
?? Session_start ();
?? If (! Session_is_registered ($ asd )){
?? Session_register ("asd ");}
?? If (isset ($ asd) & $ asd! = ""){
?? Session_register ("asd ");}
?? If ($ pwd! = $ Asd) & ($ pwd! = "") {$ Asd = $ pwd ;}
???>
?? Save $ asd in the temp directory specified by the session and change the value of $ asd in the session through $ asd = $ pwd. The definition of a session can only be performed in advance. the use of session variables is not limited, but must be defined before use.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service