PHP Applications
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Applications

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old March 26th, 2007, 10:19 PM
augirl augirl is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: australia
Posts: 5 augirl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
login admin problem

Operating system Linux
PHP version 4.3.11
MySQL version 4.1.21-standard-log

Can someone help me with this error please

Debug: query = SELECT * FROM users WHERE users_username = 'augirl' AND users_password = '773b7e36725de39b8c3e626f3ef6680c'

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/morethan/public_html/demo/responder/include/db_mysql.php:115) in /home/morethan/public_html/demo/responder/do_login.php on line 34

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/morethan/public_html/demo/responder/include/db_mysql.php:115) in /home/morethan/public_html/demo/responder/do_login.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at /home/morethan/public_html/demo/responder/include/db_mysql.php:115) in /home/morethan/public_html/demo/responder/include/functions.php on line 6

Thank you

Reply With Quote
  #2  
Old March 27th, 2007, 01:43 AM
vg vg is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Fortaleza, CE, Brazil
Posts: 88 vg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 29 sec
Reputation Power: 3
RE: login admin problem

Something is sending headers before you start the session. Post the code before session_start()!

Reply With Quote
  #3  
Old March 27th, 2007, 03:27 AM
augirl augirl is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: australia
Posts: 5 augirl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: login admin problem

Hi VG

Not sure what you mean so here is the code for page can you tell me exactly what it is.

<?php
require("include/globals.php");
require("include/db_mysql.php");
require("include/template.php");
require("include/functions.php");
require("include/validation.php");

// verificam daca userul si parola sunt valide
// vin "augirl" si "7Q3y2u5S4w"

$db = new DB_Sql;

// obtinem variabilele de login
// $username = str_replace("'", "''", $username);
AssumeIsNotEmpty($username, "augirl");

$md5password = md5($password);

$query = "SELECT *
FROM users
WHERE users_username = '$username' AND users_password = '$md5password'";
$db->query($query);

if ($db->num_rows() == 0)
{
// utilizator invalid
// redirectare catre formularul de login
redirect("index.php");
}
else
{
// utilizator valid
// incepem o sesiune si inregistram variabile de sesiune
session_start();
$db->next_record();

session_register("UserID");
$UserID = $db->f("users_id");

// redirectare catre pagina principala (de lucru)
redirect("controlpanel.php");
}
?>

Thank you

Reply With Quote
  #4  
Old March 27th, 2007, 08:47 AM
decodephp decodephp is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 81 decodephp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 30 m 12 sec
Reputation Power: 3
RE: login admin problem

Read up on headers

http://www.decodephp.com/2007/02/25/php-the-headers-already-sent-error-a-brief-look-at-headers/

Reply With Quote
  #5  
Old March 27th, 2007, 08:48 AM
decodephp decodephp is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 81 decodephp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 30 m 12 sec
Reputation Power: 3
RE: login admin problem

The debug output from your query is sending the headers, stop that and it will be all good

Reply With Quote
  #6  
Old March 27th, 2007, 02:40 PM
augirl augirl is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: australia
Posts: 5 augirl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: login admin problem

I am sorry but I am not a programmer
I know a little about changing code
but it is limited so I really need someone
to tell me exactly what I need to change

Thank you

Reply With Quote
  #7  
Old March 27th, 2007, 07:55 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 25
RE: login admin problem

"The debug output from your query is sending the headers, stop that and it will be all good"
Learn.

google "php debug"
stop the debug

The price of getting is doing.

Reply With Quote
  #8  
Old March 27th, 2007, 09:45 PM
decodephp decodephp is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 81 decodephp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 30 m 12 sec
Reputation Power: 3
RE: login admin problem

in case you are not a coder and just want to get over with this.. stick ob_start(); on top of the page before the includes like this

php Code:
Original - php Code
  1.  
  2. <?php
  3. require("include/globals.php");
  4. require("include/db_mysql.php");
  5. ....
  6.  



Reply With Quote
  #9  
Old March 28th, 2007, 02:21 PM
augirl augirl is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: australia
Posts: 5 augirl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: RE: login admin problem


Quote:
in case you are not a coder and just want to get over with this.. stick ob_start(); on top of the page before the includes like this

php Code:
Original - php Code
  1.  
  2. <?php
  3. require("include/globals.php");
  4. require("include/db_mysql.php");
  5. ....
  6.  




Hi decodephp

Thank you for all your help I can login now
but I would just like to know what this means
Debug: query = SELECT * FROM users WHERE users_id = '1'
Debug: query = select * from users where users_id='1'

Thank you

Reply With Quote
  #10  
Old March 28th, 2007, 02:32 PM
decodephp decodephp is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 81 decodephp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 30 m 12 sec
Reputation Power: 3
RE: login admin problem

The function call where the db query is sent , is printing the query , this is done to see if the query going to db is correct or not .this must be a setting in the library the programmer is using for database.

Reply With Quote
  #11  
Old March 28th, 2007, 03:00 PM
augirl augirl is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: australia
Posts: 5 augirl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: login admin problem

Hi decodephp

Thank you for explaining this and all your
help.

Take Care

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Applications > login admin problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 9 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek