Forum Moderators: coopster
had a simple skinning script thta was running by choosing css files. my host updated teh php and all of a sudden im getting these warnings...
Warning: session_start(): open(/var/lib/php/session/sess_045fa8dd77d74364c16cb915688a7a8c, O_RDWR) failed: Permission denied (13) in /mnt/home2/k/ku/kumar/public_html/index.php on line 2
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /mnt/home2/k/ku/kumar/public_html/index.php:2) in /mnt/home2/k/ku/kumar/public_html/index.php on line 2
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /mnt/home2/k/ku/kumar/public_html/index.php:2) in /mnt/home2/k/ku/kumar/public_html/index.php on line 2
Warning: Unknown(): open(/var/lib/php/session/sess_045fa8dd77d74364c16cb915688a7a8c, O_RDWR) failed: Permission denied (13) 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 (/var/lib/php/session) in Unknown on line 0
can anyone tell me what this all means, please....?
my session code on TOP of all pages is like this:
<?php
session_start();
//session code for skins
//header('Cache-control: private'); //IE 6 Fix
if ( isset($_SESSION['skin']) ) {
$skin = $_SESSION['skin'];
}
else {
$skin = "flyaway_yellow3.css";
}
//end session code
thanks
k
Session Support enabled
Registered save handlers files user
DirectiveLocal ValueMaster Value
session.auto_startOffOff
session.bug_compat_42OffOff
session.bug_compat_warnOnOn
session.cache_expire180180
session.cache_limiternocachenocache
session.cookie_domainno valueno value
session.cookie_lifetime00
session.cookie_path//
session.cookie_secureOffOff
session.entropy_fileno valueno value
session.entropy_length00
session.gc_divisor10001000
session.gc_maxlifetime14401440
session.gc_probability11
session.namePHPSESSIDPHPSESSID
session.referer_checkno valueno value
session.save_handlerfilesfiles
session.save_path/var/lib/php/session/var/lib/php/session
session.serialize_handlerphpphp
session.use_cookiesOnOn
session.use_only_cookiesOffOff
session.use_trans_sidOffOff
i see that session.auto_start is set to OFF. does this have anything todo with the problem...im assuming so..and how do i work around it?
k
<?php
echo 'Dear Host,<br />
Some moron on webmasterworld's php forum told me sending this information to you might help out my sessions problem.<br />
Sessions directory is set to: /var/lib/php/session/ <br />
file owner: '.fileowner(/var/lib/php/session).'<br />
file group: '.filegroup(/var/lib/php/session).'<br />
file permissions: '.fileperms(/var/lib/php/session).'<br />
current script user: '.getmyuid().' group: '.getmygid().'<br />'
<br /><br />Cheers!<br />Kumar
?>
These 'permissions' are in numerical format - first a number you can probably ignore, then owner, group, and file permissions numbers - your php scripts will be running under a certain 'user' and 'group', and if neither user nor group has permissions to do something with a file (read it or write it), they won't be allowed to and you get permissions errors. The numbers correspond to:
0 = Nothing
1 = Execute
2 = Write
3 = Execute & Write (2 + 1)
4 = Read
5 = Execute & Read (4 + 1)
6 = Read & Write (4 + 2)
7 = Execute & Read & Write (4 + 2 + 1)
Your host will probably have to re-set the permissions on this directory (or else change the apache user you're running).