Ok, trying to understand this is getting pretty tedious. In ColdFusion it's VERY easy to set a session variable. What am I doing wrong?
Code:
<?php
session_start();
?>
// query a database works correctly
// try to set a session var to a value from the recordset
$_SESSION['sv_userID'] = $row_Recordset1['subid'];
I get the following error in the browser:
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\inetpub\wwwroot\test\MemberLogin.php:8) in c:\inetpub\wwwroot\test\MemberLogin.php on line 12
I have all 6 of my PHP books open and am still can't get it figured out.
WinXP, PHP Version 4.3.2, IIS 5.1
session
Session Support enabled
Registered save handlers files user
Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path C:\PHP\sessiondata C:\PHP\sessiondata
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off
Any help in figuring this out would be greatly appreciated. It just shouldn't be this difficult.
Thanks,
James