Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #31  
Old November 28th, 2002, 08:12 PM
nosta nosta is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 9 nosta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Great Thx

Reply With Quote
  #32  
Old November 28th, 2002, 10:30 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Ive got no idea why it happened either?

Reply With Quote
  #33  
Old November 29th, 2002, 02:53 PM
nosta nosta is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 9 nosta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ah ...

hi again ! until now i could fix some problems. i can login, the data stored in the tables is correct now so everything works fine.

the problem is :
when i log in, i got the confirmation i'm logged in but when i visit 'index.php' i still am considered as a guest.

i'm lost any ideas ? i'dreally appreciate, thanks a lot !

Mike

Last edited by nosta : November 29th, 2002 at 03:03 PM.

Reply With Quote
  #34  
Old November 29th, 2002, 06:19 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Mike,

This is due to your server and not the script this time.

The reason why this is happening is because your sessions arnt working correctly? are you using IIS?


Theres an option in the php.ini file to auto start session ids, you will need to turn this on, as its the only solution i know of to fix the problem

Reply With Quote
  #35  
Old November 29th, 2002, 08:38 PM
nosta nosta is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 9 nosta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for replying.

I think i got a session id added to the url when i used the code in the article and not the one in the support file, not sure ... i'll have a look at it and let you know ...

got this kinda links in my IE history :
/index.php?PHPSESSID=5d11961bcab266a3e93d2e26489c2d c7



I got phpShop running and it processes sessions the same way right ? (guess)

I'll be back later when I fixed it



(not using IIS)

Last edited by nosta : November 29th, 2002 at 09:11 PM.

Reply With Quote
  #36  
Old November 29th, 2002, 09:30 PM
nosta nosta is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 9 nosta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Could anyone send me a working login.php page please ? Or post it

ah i need a break, getting nervous here

Reply With Quote
  #37  
Old December 7th, 2002, 04:11 PM
AmericanD AmericanD is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 81 AmericanD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
there is a problem

when i try to login it logs me in but when i go to index.php specified in article 2/6 , it still asks me to register


maybe the server is not supporting sessions/cookies, so how do i go about doing it ?
__________________
Hungry for Code

Programming works best with a team over one single person

Last edited by AmericanD : December 7th, 2002 at 04:19 PM.

Reply With Quote
  #38  
Old December 7th, 2002, 04:17 PM
AmericanD AmericanD is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 81 AmericanD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
even so that when i login , it says 'you have logged in' and when i refresh that same login.php page after logging in, it logs me out .. hmm

Reply With Quote
  #39  
Old December 8th, 2002, 12:03 AM
AmericanD AmericanD is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 81 AmericanD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
one more question.

when we create users table, we say `users` and when we create sessions table, we just say sessions. why is that ?

Reply With Quote
  #40  
Old December 8th, 2002, 01:14 AM
AmericanD AmericanD is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 81 AmericanD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
ok my scripts started working now.. its just that table names weren't specified........ and it wasn't even mentioned in the article !!!

Reply With Quote
  #41  
Old December 8th, 2002, 05:20 PM
Dart Dart is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 4 Dart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
hi all

thanks for the aouther of this article

i've just finished coding a class with the same idea

i so this class

it's good

but i think there is a problem in login.php

in line ( about 106 or nearby )

you used mysql_fetch_row

while you should use mysql_fetch_array

that's why the session where recorded to the database with

out the info of ( username , userid , auth , firstname , lastname )



thanks to you at all


Reply With Quote
  #42  
Old December 8th, 2002, 09:36 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
AmericanD, wernt the field names the default names specified in the security function?? if there not please let me know, and im very sorry to all who got confused by this,

im only human, (i think)

Reply With Quote
  #43  
Old December 9th, 2002, 11:35 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
OK OK OK, well ive finally opened a thread regarding the issues with my article, if you find a bug in my code (please make sure you havent made the mistake) please post the problem and where it is wrong in the article here: URL

Once i get a chance i will fix up the article,

Reply With Quote
  #44  
Old December 10th, 2002, 12:07 AM
AmericanD AmericanD is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 81 AmericanD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Quote:
Originally posted by Ben Rowe
AmericanD, wernt the field names the default names specified in the security function?? if there not please let me know, and im very sorry to all who got confused by this,

im only human, (i think)


Lemme tell u what was wrong.

In the first article 1/6 the code did not have proper table names in class security file. the select statements couldn't write into the session table anything BUT the sessionid. so thats the only problem

but in your 2/6 article where you showed how to make tables, you had the other login page which was perfect since you had referenced the tables in it.

i just copied and pasted but since you advised me to read the support material and do it, i learnt a lot.. so it was good for me .. no copying pasting in the future blindly

Reply With Quote
  #45  
Old December 10th, 2002, 08:12 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Ahh thankyou, ill make these changes once ive put up the next article.

Reply With Quote
  #46  
Old December 11th, 2002, 12:07 AM
AmericanD AmericanD is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 81 AmericanD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
and the logout button

Reply With Quote
  #47  
Old December 18th, 2002, 10:27 PM
mrl14 mrl14 is offline
1 Month Free Hosting!
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 15 mrl14 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation typos

It seems many of the errors people are running into are types. I found one as well.

if($result)
{

// Write to the log file
$strLog = "Login OK: {$result[1]}, {$result[3]}, {$result[4]}, {$_SERVER['REMOTE_ADDR']}, " . date("d/m/Y h:i:m A");
$dtlsSecurity->AddLog($strLog);

if($dtlsSecurity->StoreSession($result[‘userId ‘], $result[‘username’], $result[‘level’], "{$result[‘firstname’]},{$result[‘lastname’]}"))
{

that code is unmodified. The problem resides here:

if($dtlsSecurity->StoreSession($result[‘userId ‘],

it should be

if($dtlsSecurity->StoreSession($result[‘userId’],

As you can see there was a space and the wrong single quote was placed there. Why not stick to basic quotes instead of curly quotes?

Anyways that fixes one of serveral issues I had and I will post those later tonite since I gotta go out right now.

Anyhow great article, this is just what I needed to add to my site =)


Edit:

oh yeah one more thing, I got confused when I got to what I believe was login.php page. The article never states what to call this page and I didn't know if it was to go on the registration.php page or on a new page...after some thinking i decided to call it login.php...hope I was right =)

Edit 2:

Why is the login page and registration pages NOT included in the support files? copying and pasting code just increases our change of errors. My editor supports regular quotes and curly quotes (using BBEdit) and that sometimes is messing up the code when I copy it. Not to mention you reiterate code to explain (which is great) but it's in the same colour yellow, thus confusing the readers that it needs to be included in the page.

Last edited by mrl14 : December 19th, 2002 at 08:40 PM.

Reply With Quote
  #48  
Old December 20th, 2002, 09:46 AM
VLE79E VLE79E is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 1 VLE79E User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The Registration.php does not work. When I Press Join nothing happens, the same registration page comes on again. I tried to add this line to the registration page but no output. Anyway?

echo $_POST['what'];

Reply With Quote
  #49  
Old December 20th, 2002, 11:41 AM
mrl14 mrl14 is offline
1 Month Free Hosting!
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 15 mrl14 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0