Basic Bridge Basic Bridge - 1 year ago 124
PHP Question

PHP Warning Permission denied (13) on session_start()

Possible Duplicate:

How can I fix the Permission error when I call session_start()?

I'm getting the following error:

PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: open(/tmp/sess_49a20cbe1ef09a2d0262b3f7eb842e7b, O_RDWR) failed: Permission denied (13) in /home/------/public_html/includes/libs/ on line 1

The problem doesn't happen all the time, but comes and goes.

This the code at line on 1 in

<?php session_start(); ?>

Answer Source

You don't appear to have write permission to the /tmp directory on your server. This is a bit weird, but you can work around it. Before the call to session_start() put in a call to session_save_path() and give it the name of a directory writable by the server. Details are here.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download