PDA

View Full Version : Need urgent help: Cannot send session cache limiter - header


kangarootaz
29th July 2004, 11:49 AM
Works fine sofar but when a affiliate link comes to the index.phh page it looks like it will give probs withe the cookies ?

Cannot send session cache limiter - headers already sent (output started at /home/www/web01 .....



Warning: Cannot modify header information - headers already sent by (output started at /home/www/b01/html/index.php:2) in /home/www/b01/html/australien_affiliate/affiliate.php on line 5

Warning: Cannot modify header information - headers already sent by (output started at /home/www/b01/html/index.php:2) in /home/www/b01/html/australien_affiliate/affiliate.php on line 6

Warning: Cannot modify header information - headers already sent by (output started at /home/www/b01/html/index.php:2) in /home/www/b01/html/australien_affiliate/affiliate.php on line 7

Warning: Cannot modify header information - headers already sent by (output started at /home/www/web01/html/index.php:2) in /home/www/b01/html/australien_affiliate/affiliate.php on line 8

Warning: Cannot modify header information - headers already sent by (output started at /home/www/web01/html/index.php:2) in /home/www/web01/html/australien_affiliate/affiliate.php on line 9

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/www/b01/html/index.php:2) in /home/www/b01/html/australien_affiliate/affiliate.php on line 11




this is my affiliate.php:
<?php

if($_GET['ref'])
{
SetCookie ("ref",$_GET['ref']);
SetCookie ("ref",$_GET['ref']);
SetCookie ("ref",$_GET['ref']);
SetCookie ("ref",$_GET['ref']);
SetCookie ("ref",$_GET['ref']);

session_start();
$_SESSION['ref'] = $_GET['ref'];

include "./australien_affiliate/affconfig.php";

mysql_connect($
server, $db_user, $db_pass)
or die ("Database CONNECT Error (line 17)");
mysql_db_query($database, "INSERT INTO clickthroughs VALUES ('".$_GET['ref']."', '$clientdate', '$clienttime', '$clientbrowser', '$clientip', '$clienturl', '')");
}
?>

an this the index.php:

<html><?PHP include "australien_affiliate/affiliate.php"; ?>
................................

so i have no ideas about that issue ??

mark
29th July 2004, 11:54 AM
Hi,

It has to be included BEFORE any content is generated, otherwise setting cookies doesn't work and you'll receive this message.

So you have to include affiliate.php in the very beginning of your file, before HTML tag, such as:

<?PHP include "australien_affiliate/affiliate.php"; ?><html>


regards,

mark

kangarootaz
29th July 2004, 12:11 PM
thx mark for this quick response but now i have other errors .. the cookie prob is ok:

Warning: main() [function.main]: open_basedir restriction in effect. File(/usr/share/php/affconfig.php) is not within the allowed path(s): (/home/www/b01/) in /home/www/b01/html/australien_affiliate/affiliate.php on line 14

Warning: main(affconfig.php) [function.main]: failed to create stream: Operation not permitted in /home/www/b01/html/australien_affiliate/affiliate.php on line 14

Warning: main() [function.main]: Failed opening 'affconfig.php' for inclusion (include_path='.:/usr/share/php') in /home/www/b01/html/australien_affiliate/affiliate.php on line 14

Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'wwwrun@localhost' (Using password: NO) in /home/www/b01/html/australien_affiliate/affiliate.php on line 16
Database CONNECT Error (line 17

i relay have no idea pathes looks ok for me ?

kangarootaz
29th July 2004, 01:16 PM
ok works so far, was my misstake

but the affiliates didn't get any money.

the clicks are counted, but thats it.

i inserted the links like this :
<?PHP include "http://www.australia-oz-test.com.au/australien_affiliate/dfgd456wrtt.php";
?>
<html>

which complete domain should not be a prob.

but i can not find any cookies ?

are ther known issues ?

i also changed: SetCookie ("ref",$_GET['ref'], 0, '/');

but with no result.

any ideas ?

kangarootaz
29th July 2004, 05:19 PM
no ideas ? :?: