PHP SESSION_START() FAILED NO SPACE LEFT ON DEVICE ERROR


Hey frnd's
Today i am going to share 1 of the my experience in Web Management .
i have many domains , and today i found 1 error on one of my domian .
the error is >> 
Warning: session_start() [function.session-start]: open(/tmp/sess_009d3afca81be6247b5879f26efdb132, O_RDWR) failed: No space left on device (28) in [file path to php script] on line 2.
this error can affect the function of website also this can cause the security issue , because this error display the full path of the server , it called FPD


so for resolving this issue i changed the storage path of sessions .

How to do this ?
i made a new directory named as tmp in my public_html directory .
then i added the following line in my php code .
we can do this by adding this line in our code 
session_save_path('/home/abcd/public_html/tmp');
Note : add this Line before this Line
session_start();
so in this way i am able to resolve this issue .
hope it will help full for you ! 





0 comments: