Bebopgeo Posted December 31, 2009 Share Posted December 31, 2009 I'm using dreamweaver cs4 and I am using links relative to "site root" and when I add a recordset to the page it crate a database connections that looks like this <?php virtual('/SearchersLogIt/Connections/Slidb.php'); ?> and when I look at the page in the browser I get this Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\wamp\www\SearchersLogIt\LoginFolder\Login.php:1) in C:\wamp\www\SearchersLogIt\LoginFolder\Login.php on line 47 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\wamp\www\SearchersLogIt\LoginFolder\Login.php:1) in C:\wamp\www\SearchersLogIt\LoginFolder\Login.php on line 47but when I use links relative to "Document" it crate a database connections that looks like this <?php require_once('../Connections/Slidb.php'); ?> and my pages work fine in the browser so is there a fix so I can use the virtual database connections? Link to comment Share on other sites More sharing options...
justsomeguy Posted December 31, 2009 Share Posted December 31, 2009 Using a virtual include causes Apache to terminate and flush all buffers and send all headers, so if you use a virtual include you cannot use any other function that sends a header, such as session_start or setcookie. You need to use those functions before including the file, or you can use a regular include instead. There are several variables in the $_SERVER array that will tell you what the document root is set to if you want to include a file relative to that. There's more information about the header errors here:http://w3schools.invisionzone.com/index.php?showtopic=12509 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.