i had this script working a few months ago, then read about some php5 upgrades (not sure if added on my server) but could be the problem since i never took the time to see if anything changed in php5 yet.
code line 1 2 3
<?php
session_start();
?>
then some html
then some more <?php
?>
but problems are on session_start();
Warning: session_start(): open(C:\PHP\sessiondata\sess_f449f5ddd4eb8c78ecf1ad68f387d10a, O_RDWR) failed: Permission denied (13) in C:\webspace\aspweb\po2admin\po2.net\www\update.php on line 2
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\webspace\aspweb\po2admin\po2.net\www\update.php:2) in C:\webspace\aspweb\po2admin\po2.net\www\update.php on line 2
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\webspace\aspweb\po2admin\po2.net\www\update.php:2) in
session start problems?
Moderator: General Moderators
-
psychotomus
- Forum Contributor
- Posts: 487
- Joined: Fri Jul 11, 2003 1:59 am
For php sessions to work, php must be able to access the folder where sessions are saved. If the current folder has an owner/group different to the php uid, create a folder with mkdir($path, 0755); and use that. Since php created the folder, it will have the php owner/group.
A phpinfo(); will show you the current session save path - edit in php.ini.
Setting a folder to 777 makes it accessible to anything regardless of uid - and that's exactly why you don't want to leave it set to 777, except possibly for a quick test to confirm what's going on.
You can read owner/groups (and modes) for files & folders by connecting with an ftp program and doing a dirinfo or similar.
The header error occurs because an error message has been output to the browser before the session (header) call.
A phpinfo(); will show you the current session save path - edit in php.ini.
Setting a folder to 777 makes it accessible to anything regardless of uid - and that's exactly why you don't want to leave it set to 777, except possibly for a quick test to confirm what's going on.
You can read owner/groups (and modes) for files & folders by connecting with an ftp program and doing a dirinfo or similar.
The header error occurs because an error message has been output to the browser before the session (header) call.