This topic is locked
[SOLVED]

 Incerting 2 PHPRunner pages in one PHP page using 'include(string

6/10/2009 3:01:29 PM
PHPRunner General questions
P
pppichardo2002 author

Hi, I am trying to input 2 pages (login.php and newstable.php) created by PHPRunner 5.0 to one page manually created by me called index.php. I am using the include() command to accomplish this task but a get a two different errors. The errors are as follow:
ERROR #1 - Occurs when index.php loads and the include(login.php) command is executed. It appears right above the login box with the following error:
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\index.php:4) in C:\xampp\htdocs\include\dbcommon.php on line 33
I was able to fix this by editing the dbcommon.php file. I tagged the following line to be ignored by using "//" infornt of the line. This solved the issue for now. but every time i re-build the project it comes back and i have to perform this again. Any way to solve this using a different way that will fix it for good?
This is the line I ignore to fix this ERROR #1.

// header("Content-type: text/html; charset=".$cCharset);
ERROR #2_ - Occurs when index.php loads and the include(news_table.php.php) command is executed. I am not not sure what to do here because when i edit the dbcommon.php file and try to ignore "@session_start();" line stops the load of the login.php in the same page as well as any other pages talking to the database. What can I do to fix this issue?
Here is the ERROR that gets displayed after load of index.php.

PHP error happened
Technical information

Error type 8

Error description A session had already been started - ignoring session_start()

URL localhost/index.php?

Error file C:\xampp\htdocs\include\dbcommon.php

Error line 20

SQL query

Thanks for any help...I have been trying to solve this for a long time.

J
Jane 6/11/2009

Hi,
you need to remove following code in the second file:

ini_set("display_errors","1");

ini_set("display_startup_errors","1");

set_magic_quotes_runtime(0);

include("include/dbcommon.php");

header("Expires: Thu, 01 Jan 1970 00:00:01 GMT");

header("Pragma: no-cache");

header("Cache-Control: no-cache");

P
pppichardo2002 author 6/18/2009

Hi,

you need to remove following code in the second file:


Hi Jane,

I was able to find the following lines and ruled them out by putting a "//" in front of the lines and it worked. Thanks for your help.