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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.