I have written this code in get_ip_addr.php
[FONT=courier new]
<?php
session_start();
$DNSname = "M42329";
session_register("DNSname");
print $HTTP_SESSION_VARS["DNSname"];
?>
<html>
<head>
</head>
<body>
Please Wait..... Geting host name.
<script language="Javascript">
//window.navigate("index.php");
</script>
</body>
</html>
[/FONT]
when I run this script, server return warning message like this
[FONT=courier new]
Warning: Cannot send session cookie - headers already sent by (output started at C:\phpweb\stock_meeting\get_ip_addr.php:1) in C:\phpweb\stock_meeting\get_ip_addr.php on line 3
Warning: Cannot send session cache limiter - headers already sent (output started at C:\phpweb\stock_meeting\get_ip_addr.php:1) in C:\phpweb\stock_meeting\get_ip_addr.php on line 3
Warning: open(/tmp\sess_0c5f5f1d4a6be4fe9be7dde0ed7b8417, O_RDWR) failed: No such file or directory (2) in C:\phpweb\stock_meeting\get_ip_addr.php on line 3
Please Wait..... Geting host name.
Warning: open(/tmp\sess_0c5f5f1d4a6be4fe9be7dde0ed7b8417, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
[/FONT]
Who know what I need to do to correct this problem?
First time I use
$HTTP_SESSION_VARS["DNSname"] = "...";
and print it. It work. but in the other script cannot use $HTTP_SESSION_VARS["DNSname"] , it is empty.