Quote:
quote:
Parse error: parse error, expecting `'{'' in /usr/local/www/common_db.inc on line 12
|
Means that PHP expects an opening curly brace.. I would review the code to see that you haven't inadvertaently missed including a curly brace, which is a common typo.
Quote:
quote:
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /usr/local/www/common_db.inc:12) in /usr/local/www/user_auth.php on line 57
|
session_start(); automagically sends out a cookie upon being called. The session_start(); function must be called before any headers are outputted to the browser because this cookie is sent within the responding HTTP headers and this must happen before your script generates any output.
See also:
http://us3.php.net/manual/en/function.session-start.php
That means that there cannot be any whitespace before the opening '<?php' delimiter and it also means that your script cannot have any output before this function call is made, i.e., echo or print statements sending opening HTML tags, anything at all!
If you want your script such that you may include session_start(); pretty much anywhere that you like, call this function as the very first statement:
# output buffer start
ob_start();
and this function as the very last
# flush and send the output buffer
flush();
These two functions will create an output buffer so that your script does not output any data until the flush(); function call is made making it just fine to call on setcookie() or session_start(); or header(); ect. anywhere that you like within a script as long as the call is between these two functions.
See also:
http://us3.php.net/manual/en/ref.outcontrol.php
: )
Rich
:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::