[php] Session start hulp.

Gestart doorPropje7 reacties34 weergaven

8 berichten · pagina 1 van 1

Propje

Lid · Topicstarter

Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallo ik heb dit?

De fout:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/propje/domains/jeurl.nl/public_html/martijn/login.php:6) in /home/propje/domains/jeurl.nl/public_html/martijn/config.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/propje/domains/jeurl.nl/public_html/martijn/login.php:6) in /home/propje/domains/jeurl.nl/public_html/martijn/config.php on line 2

config.php lijn 2:
session_start();

Iemand een oplossing?
0
Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Zorg dat je bij elk bestand de config op de 2de regel include.
Dus

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]


Want session_start(); moet boven aan de pagina.
0
Propje

Lid · Topicstarter

Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heb zeg maar nu dit?

[COLOR= #0000BB]<?php[/COLOR] 
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR] 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>


alleen krijg ik boven aan de zelfde error

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/propje/domains/propje.s2.one2xs.com/public_html/martijn/login.php:1) in /home/propje/domains/propje.s2.one2xs.com/public_html/martijn/config.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/propje/domains/propje.s2.one2xs.com/public_html/martijn/login.php:1) in /home/propje/domains/propje.s2.one2xs.com/public_html/martijn/config.php on line 2
0
Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Geef config.php eens
0
Propje

Lid · Topicstarter

Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
De config bestand:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$server[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"localhost"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Mysql server[/COLOR]
[COLOR= #0000BB]$database[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"propje_****"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Database[/COLOR]
[COLOR= #0000BB]$naam[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"propje_***"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// mysql ledennaam[/COLOR]
[COLOR= #0000BB]$wachtwoord[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"**********"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Mysql wachtwoord[/COLOR]
[COLOR= #0000BB]$mysql_conn[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_connect"]mysql_connect[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"$server"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"$naam"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"$wachtwoord"[/COLOR][COLOR= #007700])[/COLOR] OR [URL="http://www.php.net/DIE"]DIE[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Er ging iets fout : [/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/mysql_select_db"]mysql_select_db[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"$database"[/COLOR][COLOR= #007700])[/COLOR] OR [URL="http://www.php.net/DIE"]DIE[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]De databse licht plat : [/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
?>
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Geef anders de bestanden eens, ik denk dat je een onzichtbaar teken voor de code hebt staan.
0
Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$server[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"localhost"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Mysql server[/COLOR]
[COLOR= #0000BB]$database[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"propje_****"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Database[/COLOR]
[COLOR= #0000BB]$naam[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"propje_***"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// mysql ledennaam[/COLOR]
[COLOR= #0000BB]$wachtwoord[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"**********"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Mysql wachtwoord[/COLOR]
[COLOR= #0000BB]$mysql_conn[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_connect"]mysql_connect[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$server[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$naam[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$wachtwoord[/COLOR][COLOR= #007700])[/COLOR] OR [URL="http://www.php.net/DIE"]DIE[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Er ging iets fout : [/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/mysql_select_db"]mysql_select_db[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$database[/COLOR][COLOR= #007700])[/COLOR] OR [URL="http://www.php.net/DIE"]DIE[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]De database licht plat : [/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
?>


Hmm, die is wel gewoon goed, maar toch heb ik hem even verbeterd voor je.
0
Propje

Lid · Topicstarter

Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@rik

ik heb het bestand via pm verstuurd
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren