Link to home
Start Free TrialLog in
Avatar of doctorbill
doctorbillFlag for United Kingdom of Great Britain and Northern Ireland

asked on

php

When I use the attached "login.php" file I get the following error message:
-------------------------------------
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /web1/user36636/website/site/admin/users.php:2) in /web1/user36636/website/site/admin/login.php on line 15

Warning: Cannot modify header information - headers already sent by (output started at /web1/user36636/website/site/admin/users.php:2) in /web1/user36636/website/site/admin/login.php on line 18
------------------------------------
This page works perfectly on my local system (localhost) but gives this error when the site has been uploaded to a webhosting server

Any ideas?
login.php
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

The error is that 'user.php' has already sent output.  You'll have to look at that file to see why.
SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of doctorbill

ASKER

I am not at my computer at the moment but I can give you an idea of the workflow:

The user clicks on a page called admin_links.php
this has a php include at the top of the page to check.php
The check.php page checks to see if username and password sessions are set
If not set, there is a redirection to the login page (attached) where username and password are entered
Once the username and password are entered in the login page, the login page redirects to the admin_links.php page again

questions:
1. could it be that the initial reference to the admin_links.php page has caused headers to already be submitted for this page and a later reference to the same page causes the problem
2. why does the page work perfectly on my local system, ?
3. I have already tried putting session_start(); at the top of the page- no difference
Show us the code, then we can tell you.  And we don't know the differences between your 'local system' and your hosted system.  Are they running the same versions of PHP and MySQL?  Are they running the same operating system?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ray - I take your point.
Is there a download of all the php pages so that I can start working with them?
Where can I edit the look of the login page
Ray
Disregard my last two comments. I have had a chance to study and implement the files on my test server and all work
I just need to use the access control on a real live page on my ISP site
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This has to be one of the most concise, clear and functional set of web pages and tutorial I have seen - works perfectly !!!!
Thanks so much for this