I have compiled php-4.0.6 from source with --enable-track-vars and
--enable-trans-sid options (--with-mysql and --with-apxs).

I use RH7.1 and mysql-3.23.41.

In my /usr/local/test/connect.inc I use the following code
    <?php
          $login = $HTTP_SESSION_VARS["login"];
            $passwd = $HTTP_SESSION_VARS["passwd"];
            $hostlink = msyql_connect("xxx", $login, $passwd) or die ---

            $dblink =  mysql_select_db ("yyy", $hostlink);
    ?>

This file is invoked in all my script files. (The system works without
session variables.)

In my login file (main.html) I do a
<?php
        session_start();
        session_register("login");
        session_register("passwd");
        print ("<form action=login.html method=POST>");

        print("<input type=text name=login size=20><input type=password
name=passwd size=20>");
print ("<input type=submit value=login>");
    print("</form>");
?>
--

In my login.html script file I start the links to other database
utilities, where the /usr/local/test/connect.inc file is invoked.

When I run main.html, I get the following error message :
Warning : Cannot send session cookie - headers already sent by (output
started at /var/www/html/main.html: 10) in /var/www/html/main.html on
line 11

Warning : Cannot send session cache limiter - headers already sent
(output (- etc etc like the one earlier))

(These are the lines containing session_start(); and
session_register("login"); in the main.html file)

In my phpinfo(), I find that
session.auto_start=ON
session.cookie_limiter i=nocache
session.cache_expire=180
session.save_path=/tmp
session.serialize_handler=php

Where could I be wrong ?

Raju



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to