Session-start error

Status
Not open for further replies.

berty

New Member
Messages
11
Reaction score
0
Points
0
Hello, I already posted in the spanish forum, but they didn't find a solution to my issue, so here it goes:

I have INTERMEDIATE php version in my hosting account.

I have a contact form with a CAPTCHA image generator called securimage (website: http://www.phpcaptcha.org/ ). It has always worked perfectly in all other hosting services, and it also works perfectly in my computer (with apache 2.2 and php 5.2.5 installed) with no errors whatsoever showing up.

Well, when I execute the script from x10hosting, this error comes up:
Code:
[B]Warning[/B]:  session_start() [function:session-start]: Cannot send session cache limiter - headers already sent (output started at /*/*/*/encabezado.php:7) in [B]/*/*/*/securimage/securimage.php[/B] on line [B]422[/B]
The coding of securimage.php is too long to copy here (about 12000 chars), but you can download it from here: http://www.phpcaptcha.org/latest.zip

encabezado.php has this coding:
PHP:
<?php 
$titulo="Website title" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title><?php echo $titulo ?> - <?php echo $pagina ?></title>
<link rel="stylesheet" type="text/css" href="/estilos.css" media="screen"/>
<?php include("encabezado2.html");//It is just the header of my website. ?>

Thanks in advance ;)
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
It is telling you that you are sending output before the session. Starting the session like session_start(); Must go at the top of the file, you can not have any HTML or code that outputs something before it.

-Corey
 

berty

New Member
Messages
11
Reaction score
0
Points
0
THANK YOU VEY MUCH Corey!
It now works perfectly!

I just changed the place where the contact form included encabezado.php(just after the securimage.php did the session-start) and it worked , no errors!
 
Status
Not open for further replies.
Top