How to resolve this Session o_rdwr error?

Asked

Viewed 119 times

0

How can I fix this php session failed o_rdwr no such file or directory

The error occurs when I log in to the server, however, locally it does not give any error and usually someone could help me?

inserir a descrição da imagem aqui

1 answer

-1


Assign write permissions to the path specified in Session.

On Linux/Unix environment, permission 0777.

If you don’t have access to the directory, set up a proper path to a location where you have access to change the folder permissions.

Example:

<?php
ini_set('session.save_path','/aqui/caminho/completo/onde/as/sessoes/serão/salvas/');

session_start();
?>

You can also use the session_save_path function()

<?php       
session_save_path('/aqui/caminho/completo/onde/as/sessoes/serão/salvas/');

session_start();
?>

The permission need not necessarily be 0777. Just set a value that allows reading and writing. However, not to complicate too much, just set it to 0777.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.