Trouble when I run session_start()
Posted: Thu May 31, 2012 6:47 pm
Hi all and thanks for looking at my post>
when I upload and run this very short file ( my file contains nothing but the below php) on my linux shared hosting account:
<?php
session_start();
$_SESSION['username'] = 'admin';
?>
I get the following errors
Warning: session_start() [function.session-start]: open(/var/chroot/home/content/17/6372417/tmp/sess_n5f5h2u94h0dkfg24johvs15v7, O_RDWR) failed: No such file or directory (2) in /home/content/17/6372417/html/admin_login_process.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/17/6372417/html/admin_login_process.php:3) in /home/content/17/6372417/html/admin_login_process.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/17/6372417/html/admin_login_process.php:3) in /home/content/17/6372417/html/admin_login_process.php on line 3
Warning: Unknown: open(/var/chroot/home/content/17/6372417/tmp/sess_n5f5h2u94h0dkfg24johvs15v7, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0
Do I need to add a php.ini file to my root directory? Currently there is none. I have no access to any php.ini files under the structrure of shared hosting. Still there must be a way to get sessions to work.
Thanks for any help or advice in advance,
JT
when I upload and run this very short file ( my file contains nothing but the below php) on my linux shared hosting account:
<?php
session_start();
$_SESSION['username'] = 'admin';
?>
I get the following errors
Warning: session_start() [function.session-start]: open(/var/chroot/home/content/17/6372417/tmp/sess_n5f5h2u94h0dkfg24johvs15v7, O_RDWR) failed: No such file or directory (2) in /home/content/17/6372417/html/admin_login_process.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/17/6372417/html/admin_login_process.php:3) in /home/content/17/6372417/html/admin_login_process.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/17/6372417/html/admin_login_process.php:3) in /home/content/17/6372417/html/admin_login_process.php on line 3
Warning: Unknown: open(/var/chroot/home/content/17/6372417/tmp/sess_n5f5h2u94h0dkfg24johvs15v7, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0
Do I need to add a php.ini file to my root directory? Currently there is none. I have no access to any php.ini files under the structrure of shared hosting. Still there must be a way to get sessions to work.
Thanks for any help or advice in advance,
JT