Re: [mapserver-users] how to disappear Warning: session_start() in the page?

2010-08-25 Thread elisabeth theresia
Hello All Mr.

Already works... Thanks for you advices, yesterday i did some changes in coding 
and no more error message. ~~Horray !!~~
I don't use index_cobacham.phtml anymore. just change in the coding for 
template.

in the template for map i put: 

html
headx/head

body
form
//css

//code HTML...~bla...bla.bla~

body onLoad=CWC2OnLoadFunction()


table border=0 cellpadding=2 cellspacing=0
tr
td colspan=3 align=center
CWC2 TYPE=MapDHTML
VISIBLE=true
WIDTH=384
HEIGHT=204
ALLOWRESIZE=true
MARQUEECOLOR=#FF
MARQUEEWIDTH=2
MINSCALE=1/

CWC2 TYPE=Title
VISIBLE=true
LABEL=Aplikasi Web-based GIS
LABELCLASS=CWCHelpTitle1 /

 CWC2 TYPE=Scale VISIBLE=true /
 
 CWC2 TYPE=LegendTemplate
 VISIBLE=true
ENABLED=true
EMBEDDED=false
POPUPWIDTH=500
POPUPHEIGHT=250

TEMPLATE=./legend_template_widget2.html/

   CWC2 TYPE=ZoomIn
   VISIBLE=true
IMAGETIP=Zoom In: box atau klik
TOOLSET=Navigation
IMAGEWIDTH=24
IMAGEHEIGHT=24
IMAGE STATE=normal
IMAGE=images/tool_zoomin_off.gif/
IMAGE STATE=hover
IMAGE=images/tool_zoomin_over.gif/
IMAGE STATE=selected
IMAGE=images/tool_zoomin_on.gif/ 
 /CWC2 
 bZoom In/bbr
 
 CWC2 TYPE=Recenter
 VISIBLE =true
IMAGETIP=Menggeser Tampilan Peta
   TOOLSET=Navigation
IMAGEWIDTH=24
IMAGEHEIGHT=24
IMAGE=images/tool_pan_off.gif/
/CWC2
bPan/Recenter/bbr

cwc2 TYPE=PanMap
VISIBLE=true
IMAGETIP=Menggeser: drag
TOOLSET=Navigation
IMAGEWIDTH=24
IMAGEHEIGHT=24
IMAGE=images/tool_pan_off.gif/
 /cwc2
 b Pan/Drag/bbr
 
 CWC2 TYPE=Zoomout
 VISIBLE=true
IMAGETIP=Memperkecil Tampilan Peta
TOOLSET=Navigation
IMAGEWIDTH=24
IMAGEHEIGHT=24
IMAGE=images/tool_zoomout_off.gif/
  /CWC2 
  bZoom Out/bbr
  
  CWC2 TYPE=ZoomAllLayers
  ENABLED=true
VISIBLE=true
IMAGETIP=Zoom Full Extent
TOOLSET=Navigation
IMAGEWIDTH=24
IMAGEHEIGHT=24
IMAGE=images/tool_zoomfull_off.gif/
  /CWC2
  
  bFull Extent/bbr

cwc2 TYPE=CursorPos
axis=X
label=Bujur :
labelposition=8
labelvalign=middle
labelclass=label
widgetclass=inputbox/

cwc2 TYPE=CursorPos
axis=Y
label=Lintang:
labelposition=8
labelvalign=middle
labelclass=label
widgetclass=inputbox/

 cwc2 TYPE=Query
 VISIBLE= true
IMAGETIP=Identifikasi Unsur
TOOLSET=Navigation
IMAGEWIDTH=20
IMAGEHEIGHT=20
IMAGE=images/icon_query.gif
POPUPWIDTH=400
POPUPHEIGHT=200
RADIUS=3
MAXFEATURES=15
  /cwc2
  bQuery/bbr
  
 cwc2 TYPE=UpdateMap
 VISIBLE=true
IMAGETIP=Meng-update/Refresh tampilan Peta
IMAGE=images/icon_update.gif
LABEL=Redraw Map
IMAGEWIDTH=90
IMAGEHEIGHT=22
 /cwc2
   /td
   /tr
   /table
   
   CWC2 TYPE=ErrorReport
   POPUPWIDTH=500
POPUPHEIGHT=400
TOOLBAR=false
STATUS=false
MENUBAR=false
VISIBLE=false
IMAGE=images/icon_error.png IMAGEWIDTH=18

Re: [mapserver-users] how to disappear Warning: session_start() in the page?

2010-08-19 Thread Peter

Im not familiar with the code you are talking about, but i can tell you briefly 
when this errro occurs: an http response consists of two parts a header and the 
body. Attempts to write a http header when one has already been written and the 
body started will cause an error. A common cause of this (other than just plain 
writing a header in the wrong place) is that one of the libs in your package has 
stray whitespace in it, eg even a single space char after the closing ? tag

Where to look in your case?

  I:\ms4w\apps\appweb\htdocs\common\session\session.php on line 509 is
   trying to send a session control header.

Theres where the header is attempted.

  headers already sent (output started at
   I:\ms4w\apps\appweb\htdocs\index_spatialphtml.phtml:6)

Theres were the unexpected http body chars were found. Thats where id be 
looking.

If its not whitespace, then you need a programmer. Good luck.

Peter


elisabeth theresia wrote:

*From:* elisabeth theresia dbee_ka...@yahoo.com
*To:* mapserv forumlist mapserver-users@lists.osgeo.org
*Sent:* Thu, August 19, 2010 9:04:43 AM
*Subject:* Re: [mapserver-users] how to disappear Warning:
session_start() in the page?

Thanks Mr. Carlos,

But, the session_start() already embedded by Chameleon Framework and
also no HTML or PHP code before that.

so how to fix it?

Thanks

-Elisabeth cheers from Indonesia :D too


*From:* Carlos Ruiz boolean10...@yahoo.com
*To:* elisabeth theresia dbee_ka...@yahoo.com;
mapserver-users@lists.osgeo.org
*Sent:* Thu, August 19, 2010 3:51:43 AM
*Subject:* Re: [mapserver-users] how to disappear Warning:
session_start() in the page?

Elisabeth,

It's quite as simple as the session handling. You can split your code
into many files or keep it in one single file,
the only thing you have to know is that PHP's session_start() function
call must be the first thing wrote, no
HTML or PHP code before that.

Cheers from México

IC Carlos Ruiz


*From:* elisabeth theresia dbee_ka...@yahoo.com
*To:* mapserver-users@lists.osgeo.org
*Sent:* Wed, August 18, 2010 2:48:58 PM
*Subject:* Re: [mapserver-users] how to disappear Warning:
session_start() in the page?

Hello Mr. Sumariva, i already did wht u said, but there's new error:
*error*: Call to undefined function: on_get_contens() in
*I:\ms4w\apps\appweb\htdocs\index_cobacham.phtml* on line *2

here i put the cobachanphtml.phtml:
*?php
$html=on_get_contens();
ob_end_clean();

include(./chameleon.php);
$szTemplate=./template_werror.html;
$szMapFile=../map/kelur_cobacham.map;
class SampleApp extends Chameleon //SampleApp merupakan turunan dari
Chameleon
{
..bla bla coding*

So, what should i do?
Thanks a lot for the attention, sorry reply not direct.
*


*From:* Cristiano Sumariva sumar...@gmail.com
*To:* elisabeth theresia dbee_ka...@yahoo.com
*Sent:* Tue, August 17, 2010 12:34:39 AM
*Subject:* Re: [mapserver-users] how to disappear Warning:
session_start() in the page?

Well, you can turn the things by other way.
Put at top of HTML file in the ob_start() function to tell PHP to buffer
all output.
Change your your index_cobachan by adding
$html = ob_get_contens();
ob_end_clean();

Now all the content that would be sent to browser is available at $html
string variable.
After the includes in your index_cobachan print the contents of $html var.
Now do your application logic.
THen append the rest of HTML file.


Another option is to turn your HTML file into a template and add a
special mark to signal template engine to replace some content but this
would be another aproach.

2010/8/13 elisabeth theresia dbee_ka...@yahoo.com
mailto:dbee_ka...@yahoo.com

Thanks Mr.Sumariva for the advice but, session_start() in the page
already embed in Chameleon framework at its folder in
\htdocs\common\session

the coding at line 509 (that shown error in the page):

//start the session
session_start();
register_shutdown_function( session_write_close );


// set IP if a new session
if ( $bNewSession ) $_SESSION[gszRemoteAdd] = $_SERVER[REMOTE_ADDR];

/*

* Check IP to see if it is the same
*
=
*/

// check if the IP has been set and validate
if ( isset( $_SESSION[gszRemoteAdd] ) 
strlen(trim($_SESSION[gszRemoteAdd]))  0 )
{
// check if IP matches current client
if ( trim( $_SESSION[gszRemoteAdd] ) !=
trim( $_SERVER[REMOTE_ADDR] ) )
{
// possible security breach void session
/* if the session address is the loopback interface then it is
* likely that the application was configured to use an external
* address but someone is trying to test locally using

Re: [mapserver-users] how to disappear Warning: session_start() in the page?

2010-08-18 Thread elisabeth theresia
Hello Mr. Sumariva, i already did wht u said, but there's new error: error:  
Call to undefined function:  on_get_contens() in 
I:\ms4w\apps\appweb\htdocs\index_cobacham.phtml on line 2

here i put the cobachanphtml.phtml: 
?php
$html=on_get_contens();
ob_end_clean();

include(./chameleon.php);
$szTemplate=./template_werror.html;
$szMapFile=../map/kelur_cobacham.map;
class SampleApp extends Chameleon //SampleApp merupakan turunan dari 
Chameleon
{
function SampleApp() //Nama fungsi
{
parent::Chameleon(); //Menjalankan konstruktor class Chameleon
$this-moMapSession=new MapSession_RW; //Mbwt instance obj map 
session
$this-moMapSession-setTempDir 
(getSessionSavePath()); //Mendefinisikan dir temporer yg akn digunk olh 
obj map 
session
}
}

$oApp= new SampleApp(); //Membut instance obj SampleApp
$oApp-registerSkin('skins/sample'); //mendefinisikan skin utk obj SampleApp
$oApp-CWCInitialize($szTemplate, $szMapFile); //MEnginisialisasi obj Lat01 
dg file template dan file 
.map
$oApp-CWCExecute(); //Menjalankan app dg memangil fs CWCExecute

?

So, what should i do?
 Thanks a lot for the attention, sorry reply not direct.





From: Cristiano Sumariva sumar...@gmail.com
To: elisabeth theresia dbee_ka...@yahoo.com
Sent: Tue, August 17, 2010 12:34:39 AM
Subject: Re: [mapserver-users] how to disappear Warning: session_start() in the 
page?

Well, you can turn the things by other way.
Put at top of HTML file in the ob_start() function to tell PHP to buffer all 
output.
Change your your index_cobachan by adding
$html = ob_get_contens();
ob_end_clean();

Now all the content that would be sent to browser is available at $html string 
variable.
After the includes in your index_cobachan print the contents of $html var.
Now do your application logic.
THen append the rest of HTML file.


Another option is to turn your HTML file into a template and add a special mark 
to signal template engine to replace some content but this would be another 
aproach.


2010/8/13 elisabeth theresia dbee_ka...@yahoo.com

Thanks Mr.Sumariva for the advice but, session_start() in the page already 
embed 
in Chameleon framework at its folder in \htdocs\common\session

the coding at line 509 (that shown error in the page):

//start the session
session_start();
register_shutdown_function( session_write_close );

  
// set IP if a new session
if ( $bNewSession ) $_SESSION[gszRemoteAdd] = $_SERVER[REMOTE_ADDR];

/* 
 * Check IP to see if it is the same
 *  = 
*/

// check if the IP has been set and validate
if ( isset( $_SESSION[gszRemoteAdd] ) 
   strlen(trim($_SESSION[gszRemoteAdd]))  0 
)
{
// check if IP matches current client
if ( trim( $_SESSION[gszRemoteAdd] ) !=
   trim( $_SERVER[REMOTE_ADDR] ) 
)
{
// possible security breach void session
/* if the session address is the loopback interface then it is
 * likely that the application was configured to use an external
 * address but someone is trying to test locally using localhost
 */
if ($_SESSION['gszRemoteAdd'] != '127.0.0.1')
{
$bSessionOK = false;
}
}
}
else
{
// possible security breach void session
$bSessionOK = false;
}

// return success or failure and set global so we
// know session has been inited.
if ($bSessionOK)
{
$GLOBALS['session_started'] = true;
}


return $bSessionOK;

// end intializeSession() function
}

function getSessionSavePath()
{
$szReturn  = ini_get(session.save_path)./sess_.session_id()./;
$szReturn = str_replace( \\, /, $szReturn );
return $szReturn;
}


Really need advice again Mr. 
Thanks



From: Cristiano Sumariva sumar...@gmail.com
To: elisabeth theresia dbee_ka...@yahoo.com
Sent: Sat, August 14, 2010 8:57:29  AM
Subject: Re: [mapserver-users] how to disappear Warning: session_start() in 
the 
page?


You should break your file in 2 files.
Put the session_start function at first and add it to the top of your .phtml 
file.

The second file will contain all remaining code.

When using session in pages they have to be sent before any other thing.
This is a requirement in HTTP protocol.


2010/8/13 elisabeth theresia dbee_ka...@yahoo.com

Hi all, i got message (for preview- i attached the page in 
attachment-sessionerror2.jpg) :  


Warning:  session_start() [function.session-start]:  Cannot

Re: [mapserver-users] how to disappear Warning: session_start() in the page?

2010-08-18 Thread Peter

Theres a typo. get_contens() should be ob_get_contents().

Peter



elisabeth theresia wrote:

Hello Mr. Sumariva, i already did wht u said, but there's new error:
*error*: Call to undefined function: on_get_contens() in
*I:\ms4w\apps\appweb\htdocs\index_cobacham.phtml* on line *2

here i put the cobachanphtml.phtml:
*?php
$html=on_get_contens();
ob_end_clean();

include(./chameleon.php);
$szTemplate=./template_werror.html;
$szMapFile=../map/kelur_cobacham.map;
class SampleApp extends Chameleon //SampleApp merupakan turunan dari
Chameleon
{
function SampleApp() //Nama fungsi
{
parent::Chameleon(); //Menjalankan konstruktor class Chameleon
$this-moMapSession=new MapSession_RW; //Mbwt instance obj map session
$this-moMapSession-setTempDir
(getSessionSavePath()); //Mendefinisikan dir temporer yg akn digunk olh
obj map session
}
}

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] how to disappear Warning: session_start() in the page?

2010-08-18 Thread Carlos Ruiz
Elisabeth,

It's quite as simple as the session handling. You can split your code into many 
files or keep it in one single file, 

the only thing you have to know is that PHP's session_start() function call 
must 
be the first thing wrote, no 

HTML or PHP code before that.

Cheers from México

IC Carlos Ruiz





From: elisabeth theresia dbee_ka...@yahoo.com
To: mapserver-users@lists.osgeo.org
Sent: Wed, August 18, 2010 2:48:58 PM
Subject: Re: [mapserver-users] how to disappear Warning: session_start() in the 
page?


Hello Mr. Sumariva, i already did wht u said, but there's new error: error:  
Call to undefined function:  on_get_contens() in 
I:\ms4w\apps\appweb\htdocs\index_cobacham.phtml on line 2

here i put the cobachanphtml.phtml: 
?php
$html=on_get_contens();
ob_end_clean();

include(./chameleon.php);
$szTemplate=./template_werror.html;
$szMapFile=../map/kelur_cobacham.map;
class SampleApp extends Chameleon //SampleApp merupakan turunan dari 
Chameleon
{
function SampleApp() //Nama fungsi
{
parent::Chameleon(); //Menjalankan konstruktor class Chameleon
$this-moMapSession=new MapSession_RW; //Mbwt instance obj map 
session
 $this-moMapSession-setTempDir 
(getSessionSavePath()); //Mendefinisikan dir temporer yg akn digunk olh 
obj map 
session
}
}

$oApp= new SampleApp(); //Membut instance obj SampleApp
$oApp-registerSkin('skins/sample'); //mendefinisikan skin utk obj SampleApp
$oApp-CWCInitialize($szTemplate, $szMapFile); //MEnginisialisasi obj Lat01 
dg  file template dan file 
.map
$oApp-CWCExecute(); //Menjalankan app dg memangil fs CWCExecute

?

So, what should i do?
 Thanks a lot for the attention, sorry reply not direct.





From: Cristiano Sumariva sumar...@gmail.com
To: elisabeth theresia dbee_ka...@yahoo.com
Sent: Tue, August 17, 2010 12:34:39 AM
Subject: Re: [mapserver-users] how to disappear Warning: session_start() in the 
page?

Well, you can turn the things by other way.
Put at top of HTML file in the ob_start() function to tell PHP to buffer all 
output.
Change your your index_cobachan by adding
$html = ob_get_contens();
ob_end_clean();

Now all the content that would be sent to browser is available at $html string 
variable.
After the includes in your index_cobachan print the contents of $html var.
Now do your application logic.
THen append the rest of HTML file.


Another option is to turn your HTML file into a template and add a special mark 
to signal template engine to replace some content but this would be another 
aproach.


2010/8/13 elisabeth theresia dbee_ka...@yahoo.com

Thanks Mr.Sumariva for the advice but, session_start() in the page already 
embed 
in Chameleon framework at its folder in \htdocs\common\session

the coding at line 509 (that shown error in the page):

//start the session
session_start();
register_shutdown_function( session_write_close );

  
// set IP if a new session
if ( $bNewSession ) $_SESSION[gszRemoteAdd] = $_SERVER[REMOTE_ADDR];

/* 
 * Check IP to see if it is the same
 *  = 
*/

// check if the IP has been set and validate
if ( isset( $_SESSION[gszRemoteAdd] ) 
   strlen(trim($_SESSION[gszRemoteAdd]))  0 
)
{
// check if IP matches current client
if ( trim( $_SESSION[gszRemoteAdd] ) !=
   trim( $_SERVER[REMOTE_ADDR] ) 
)
{
// possible security breach void session
/* if the session address is the loopback interface then it is
 * likely that the application was configured to use an external
 * address but someone is trying to test locally using localhost
 */
if ($_SESSION['gszRemoteAdd'] != '127.0.0.1')
{
$bSessionOK = false;
}
}
}
else
{
// possible security breach void session
$bSessionOK = false;
}

// return success or failure and set global so we
// know session has been inited.
if ($bSessionOK)
{
$GLOBALS['session_started'] = true;
}


return $bSessionOK;

// end intializeSession() function
}

function getSessionSavePath()
{
$szReturn  = ini_get(session.save_path)./sess_.session_id()./;
$szReturn = str_replace( \\, /, $szReturn );
return $szReturn;
}


Really need advice again Mr. 
Thanks



From: Cristiano Sumariva sumar...@gmail.com
To: elisabeth theresia dbee_ka...@yahoo.com
Sent: Sat, August 14, 2010 8:57:29  AM
Subject: Re: [mapserver

Re: [mapserver-users] how to disappear Warning: session_start() in the page?

2010-08-18 Thread elisabeth theresia
sorry Mr.  Petermy previous message iamnot purposely enter button Send. i 
just  want to say, Thanks correct me in the coding, but i still got that  
message again after corrected the coding typo.

Warning:  session_start() [function.session-start]:  Cannot send session cache 
limiter - headers already sent (output  started at 
I:\ms4w\apps\appweb\htdocs\index_spatialphtml.phtml:6) in 
I:\ms4w\apps\appweb\htdocs\common\session\session.php on line 509

Thanks, what should i do?

-dbee





From: Peter web...@pl.net
To: elisabeth theresia dbee_ka...@yahoo.com
Cc: mapserver-users@lists.osgeo.org
Sent: Thu, August 19, 2010 4:02:59 AM
Subject: Re: [mapserver-users] how to disappear Warning: session_start() in the 
page?

Theres a typo. get_contens() should be ob_get_contents().

Peter



elisabeth theresia wrote:
 Hello Mr. Sumariva, i already did wht u said, but there's new error:
 *error*: Call to undefined function: on_get_contens() in
 *I:\ms4w\apps\appweb\htdocs\index_cobacham.phtml* on line *2

 here i put the cobachanphtml.phtml:
 *?php
 $html=on_get_contens();
 ob_end_clean();

 include(./chameleon.php);
 $szTemplate=./template_werror.html;
 $szMapFile=../map/kelur_cobacham.map;
 class SampleApp extends Chameleon //SampleApp merupakan turunan dari
 Chameleon
 {
 function SampleApp() //Nama fungsi
 {
 parent::Chameleon(); //Menjalankan konstruktor class Chameleon
 $this-moMapSession=new MapSession_RW; //Mbwt instance obj map session
 $this-moMapSession-setTempDir
 (getSessionSavePath()); //Mendefinisikan dir temporer yg akn digunk olh
 obj map session
 }
 }



  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] how to disappear Warning: session_start() in the page?

2010-08-18 Thread elisabeth theresia
From: elisabeth theresia dbee_ka...@yahoo.com

To: mapserv forumlist mapserver-users@lists.osgeo.org
Sent: Thu, August 19, 2010 9:04:43 AM
Subject: Re: [mapserver-users] how to disappear Warning: session_start() in the 
page?


Thanks Mr. Carlos,

But, the session_start() already embedded by Chameleon Framework and also no 
HTML or PHP code before that.

so how to fix it?

Thanks

-Elisabeth cheers from Indonesia :D too





From: Carlos Ruiz boolean10...@yahoo.com
To: elisabeth theresia dbee_ka...@yahoo.com; mapserver-users@lists.osgeo.org
Sent: Thu, August 19, 2010 3:51:43 AM
Subject: Re:  [mapserver-users] how to disappear Warning: session_start() in 
the 
page?


Elisabeth,

It's quite as simple as the session handling. You can split your code into many 
files or keep it in one single file, 

the only thing you have to know is that PHP's session_start() function call 
must 
be the first thing wrote, no 

HTML or PHP code before that.

Cheers from México

IC Carlos Ruiz





From: elisabeth theresia dbee_ka...@yahoo.com
To: mapserver-users@lists.osgeo.org
Sent: Wed, August 18, 2010 2:48:58 PM
Subject: Re: [mapserver-users] how to disappear Warning: session_start() in the 
page?


Hello Mr. Sumariva, i already did wht u said, but there's new error: error:  
Call to undefined function:  on_get_contens() in 
I:\ms4w\apps\appweb\htdocs\index_cobacham.phtml on line 2

here i put the cobachanphtml.phtml: 
?php
$html=on_get_contens();
ob_end_clean();

include(./chameleon.php);
$szTemplate=./template_werror.html;
$szMapFile=../map/kelur_cobacham.map;
class SampleApp extends Chameleon //SampleApp merupakan turunan dari 
Chameleon
{
   ..bla bla coding

So, what should i do?
 Thanks a lot for the attention, sorry reply not direct.





From: Cristiano Sumariva sumar...@gmail.com
To: elisabeth theresia dbee_ka...@yahoo.com
Sent: Tue, August 17, 2010 12:34:39 AM
Subject: Re: [mapserver-users] how to disappear Warning: session_start() in the 
page?

Well, you can turn the things by other way.
Put at top of HTML file in the ob_start() function to tell PHP to buffer all 
output.
Change your your index_cobachan by adding
$html = ob_get_contens();
ob_end_clean();

Now all the content that would be sent to browser is available at $html string 
variable.
After the includes in your index_cobachan print the contents of $html var.
Now do your application logic.
THen append the rest of HTML file.


Another option is to turn your HTML file into a template and add a special mark 
to signal template engine to replace some content but this would be another 
aproach.


2010/8/13 elisabeth theresia dbee_ka...@yahoo.com

Thanks Mr.Sumariva for the advice but, session_start() in the page already 
embed 
in Chameleon framework at its folder in \htdocs\common\session

the coding at line 509 (that shown error in the page):

//start the session
session_start();
register_shutdown_function( session_write_close );

  
// set IP if a new session
if ( $bNewSession ) $_SESSION[gszRemoteAdd] = $_SERVER[REMOTE_ADDR];

/* 
 * Check IP to see if it is the same
 *  = 
*/

// check if the IP has been set and validate
if ( isset( $_SESSION[gszRemoteAdd] ) 
   strlen(trim($_SESSION[gszRemoteAdd]))  0 
)
{
// check if IP matches current client
if ( trim( $_SESSION[gszRemoteAdd] ) !=
   trim( $_SERVER[REMOTE_ADDR] ) 
)
{
// possible security breach void session
/* if the session address is the loopback interface then it is
 * likely that the application was configured to use an external
 * address but someone is trying to test locally using localhost
 */
if ($_SESSION['gszRemoteAdd'] != '127.0.0.1')
{
$bSessionOK = false;
}
}
}
else
{
// possible security breach void session
$bSessionOK = false;
}

// return success or failure and set global so we
// know session has been inited.
if ($bSessionOK)
{
$GLOBALS['session_started'] = true;
}


return $bSessionOK;

// end intializeSession() function
}

function getSessionSavePath()
{
$szReturn  = ini_get(session.save_path)./sess_.session_id()./;
$szReturn = str_replace( \\, /, $szReturn );
return $szReturn;
}


Really need advice again Mr. 
Thanks



From: Cristiano Sumariva sumar...@gmail.com
To: elisabeth theresia dbee_ka...@yahoo.com
Sent: Sat, August 14, 2010 8:57:29  AM
Subject: Re: [mapserver-users] how to disappear Warning: session_start() in 
the 
page?


You should break your

[mapserver-users] how to disappear Warning: session_start() in the page?

2010-08-13 Thread elisabeth theresia
Hi all, i got message (for preview- i attached the page in 
attachment-sessionerror2.jpg) :  


Warning:  session_start() [function.session-start]:  Cannot send session cache 
limiter - headers already sent (output  started at 
I:\ms4w\apps\appweb\htdocs\index_spatialphtml.phtml:6) in 
I:\ms4w\apps\appweb\htdocs\common\session\session.php509 on line 


i have mapfile and template that already could show in the initialize page 
named 
index_cobacham.phtml

Then my html + php = index_spatialphtml.phtml
i put ?php include (index_cobacham.phtml)? above the syntax html.

So, what should i do?

Thanks :)


here the index_spatialphtml.phtml

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
titleindex/title
style type=text/css
!--
body {
font: 100% Verdana, Arial, Helvetica,  sans-serif;
 background: #66;
margin: 0; /* it's good practice to zero the margin and padding of the body 
element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The 
text is then set to the left aligned default in the #container selector */
color: #00;
background-image: url(./images/Background.gif);
}
.oneColElsCtr #container {
width: 46em;
background: #FF;
margin: 0 auto; /* the auto margins (in conjunction with a width) center 
the 
page */
border: 1px solid #00;
text-align: left; /* this overrides the text-align: center on the body 
element. */
}
.oneColElsCtr #mainContent {
padding: 0 20px; /* remember that padding is the  space inside the div box 
and margin is the space outside the div box */
}
.style1 {color: #FF}
a:link {
color: #96711D;
text-decoration: none;
}
a:visited {
color: #A99559;
text-decoration: none;
}
a:hover {
color: #99;
text-decoration: underline;
}
a:active {
color: #00;
text-decoration: none;
}
.style2 {color: #00}
--
/style/head

body class=oneColElsCtr

div id=container
  div id=mainContent
table width=713 border=1
  tr background=./images/Background.gif
th width=709 scope=col align=centerp class=style1PETA  
SPASIAL PENYEBARAN PENYAKIT DBD/p
p class=style1 KOTA SURAKARTA/p/th
  /tr
/table
table width=717 border=1 cellpadding=0 cellspacing=0
  tr
th width=138 scope=coldiv align=centera 
href=index.htmlBeranda/a/div/th
th width=171 scope=coldiv align=centera 
href=peta.htmlPeta 
Surakarta/a/div/th
th width=127 scope=coldiv align=centera 
href=berita.htmlBerita/a/div/th
th width=147  scope=coldiv align=centera 
href=tentang.htmlBuku Tamu/a/div/th
th width=122 scope=coldiv align=centera href=tentang.html 
target=_blank class=style2Tentang/a/div/th
  /tr
/table

?php 
   include (./index_cobacham.phtml); ?


/body
/html


  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] how to disappear Warning: session_start() in the page?

2010-08-13 Thread elisabeth theresia


this is the attached picture-sessionerror2.jpg


  attachment: sessionerror2.JPG___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] how to disappear Warning: session_start() in the page?

2010-08-13 Thread elisabeth theresia
Thanks Mr.Sumariva for the advice but, session_start() in the page already 
embed 
in Chameleon framework at its folder in \htdocs\common\session

the coding at line 509 (that shown error in the page):

//start the session
session_start();
register_shutdown_function( session_write_close );

  
// set IP if a new session
if ( $bNewSession ) $_SESSION[gszRemoteAdd] = $_SERVER[REMOTE_ADDR];

/* 
 * Check IP to see if it is the same
 * = */

// check if the IP has been set and validate
if ( isset( $_SESSION[gszRemoteAdd] ) 
   strlen(trim($_SESSION[gszRemoteAdd]))  0 )
{
// check if IP matches current client
if ( trim( $_SESSION[gszRemoteAdd] ) !=
   trim( $_SERVER[REMOTE_ADDR] ) )
{
// possible security breach void session
/* if the session address is the loopback interface then it is
 * likely that the application was configured to use an external
 * address but someone is trying to test locally using localhost
 */
if ($_SESSION['gszRemoteAdd'] != '127.0.0.1')
{
$bSessionOK = false;
}
}
}
else
{
// possible security breach void session
$bSessionOK = false;
}

// return success or failure and set global so we
// know session has been inited.
if ($bSessionOK)
{
$GLOBALS['session_started'] = true;
}


return $bSessionOK;

// end intializeSession() function
}

function getSessionSavePath()
{
$szReturn  = ini_get(session.save_path)./sess_.session_id()./;
$szReturn = str_replace( \\, /, $szReturn );
return $szReturn;
}


Really need advice again Mr. 
Thanks



From: Cristiano Sumariva sumar...@gmail.com
To: elisabeth theresia dbee_ka...@yahoo.com
Sent: Sat, August 14, 2010 8:57:29 AM
Subject: Re: [mapserver-users] how to disappear Warning: session_start() in the 
page?

You should break your file in 2 files.
Put the session_start function at first and add it to the top of your .phtml 
file.

The second file will contain all remaining code.

When using session in pages they have to be sent before any other thing.
This is a requirement in HTTP protocol.


2010/8/13 elisabeth theresia dbee_ka...@yahoo.com

Hi all, i got message (for preview- i attached the page in 
attachment-sessionerror2.jpg) :  


Warning:  session_start() [function.session-start]:  Cannot send session cache 
limiter - headers already sent (output  started at 
I:\ms4w\apps\appweb\htdocs\index_spatialphtml.phtml:6) in 
I:\ms4w\apps\appweb\htdocs\common\session\session.php509 on line 


i have mapfile and template that already could show in the initialize page 
named 
index_cobacham.phtml

Then my html + php = index_spatialphtml.phtml
i put ?php include (index_cobacham.phtml)? above the syntax html.

So, what should i do?

Thanks :)


here the index_spatialphtml.phtml

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
titleindex/title
style type=text/css
!--
body {
font: 100% Verdana, Arial, Helvetica,  sans-serif;
 background: #66;
margin: 0; /* it's good practice to zero the margin and padding of the 
 body 
element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The 
text is then set to the left aligned default in the #container selector */
color: #00;
background-image: url(./images/Background.gif);
}
.oneColElsCtr #container {
width: 46em;
background: #FF;
margin: 0 auto; /* the auto margins (in conjunction with a width) center 
 the 
page */
border: 1px solid #00;
text-align: left; /* this overrides the text-align: center on the body 
element. */
}
.oneColElsCtr #mainContent {
padding: 0 20px; /* remember that padding is the  space inside the div box 
and margin is the space outside the div box */
}
.style1 {color: #FF}
a:link {
color: #96711D;
text-decoration: none;
}
a:visited {
color: #A99559;
text-decoration: none;
}
a:hover {
color: #99;
text-decoration: underline;
}
a:active {
color: #00;
text-decoration: none;
}
.style2 {color: #00}
--
/style/head

body class=oneColElsCtr

div id=container
  div id=mainContent
table width=713 border=1
  tr background=./images/Background.gif
th width=709 scope=col align=centerp class=style1PETA  
SPASIAL PENYEBARAN PENYAKIT DBD/p
p class=style1 KOTA SURAKARTA/p/th
  /tr
/table
table width=717 border=1 cellpadding=0 cellspacing=0
  tr
th width=138 scope=coldiv align=centera 
href