Jump to content

PHP Login Error


ColinHarbut

Recommended Posts

I am wrapping php scripts around another .php file like this:  http://www.calpropertysearch.com/buy.php

And its working just fine except on the "login.php" where I get an error when I throw it into another php document.  The file with the error can be seen here:

 

http://calpropertysearch.com/login2.php

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /usr/www/users/charbut/calpropertysearch/login2.php:7) in /usr/www/users/charbut/calpropertysearch/login-script.php on line 2

 

Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/charbut/calpropertysearch/login2.php:7) in /usr/www/users/charbut/calpropertysearch/login-script.php on line 59

 

 

I was really hoping to keep the login.php file inside of my template with the links across the top.

 

Right now it is here without the template:    http://www.calpropertysearch.com/login.php

 

If I remove the session_start(); in the login-script.php document when trying to use the template, the error goes away, it appears in the template just fine, but I can't login!

Any suggestions?

 

Link to comment
https://forums.phpfreaks.com/topic/41656-php-login-error/
Share on other sites

<?php

session_start();

require_once('Connections/myconn.php');

?>

 

this is my login-script.php, where if I remove the session_start(); the error doesnt occur but I can't login.

I'm not sure what to replace with that code with to prevent that error message from showing. 

 

Read what stickies?  This code doesn't work:

 

<?php

ob_start();

?>

 

 

If you need more of my login-script.php code please let me know...

Thank you

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/41656-php-login-error/#findComment-201893
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.