+ Reply to Thread
Results 1 to 2 of 2

Thread: Login script not working on x10 but works on home server

  1. #1
    Chris S's Avatar
    Chris S is offline Retired Chris S is an unknown quantity at this point
    Join Date
    Mar 2005
    Posts
    1,036

    Login script not working on x10 but works on home server

    I have this login script here:
    http://ituneslibrary.x10hosting.com/highlight.php

    and yes there is a database file included just its edited out for reasons. I am wondering if anybody can spot what is wrong because it will not load anything but a blank page. no errors or anything. so if anybody sees anything wrong can they please tell me.

    I would love to change the world, but they won't give me the source code

  2. #2
    Xenon Design's Avatar
    Xenon Design is offline x10Hosting Member Xenon Design is an unknown quantity at this point
    Join Date
    May 2006
    Location
    Behind your couch!
    Posts
    80

    Re: Login script not working on x10 but works on home server

    PHP Code:
    echo "Error, your account cannot be found.";
    //Redirect wont work...echo writes headers
    header("Location: ../../login.php?problem=notfound"); 
    You cannot redirect after headers have been written! So that part is borked. The rest looks ok to me. The Session vars are a bit hacky to me. Maybe look into a uniqid generated function...but thats just me :P

    ---
    EDIT:
    I just read up on ob functions. So then the above is ok BUT with x10 running Apache/1.3.37 (Unix) PHP/5.2.0 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a

    It may not have ob working or whatever. Ill keep looking through your code.
    ---

    Also do an ereg replace on the username POST field. Its like a hack waiting to happen!
    PHP Code:
    $username2 ereg_replace('[^A-Za-z0-9]'''$_POST['username']);
    //This will replace every thing (including whitespace...u can make it not to) thats not A-Z or a-z or 0-9 
    Hopefully that will fix the problem

    ---
    EDIT:
    FOUND THE PROBLEM (I hope)!! The mysql_num_rows returns as an integer and NOT a string. So change:
    PHP Code:
    if (($num) == '0'){ 
    To:
    PHP Code:
    if ($num 1){ 
    And see if that works
    ---
    Last edited by Xenon Design; 01-03-2007 at 01:45 AM.

    Website under construction -- Ask me anything about Web 2.0

+ Reply to Thread

Similar Threads

  1. Secure login script question
    By cetutnx1 in forum Free Hosting
    Replies: 0
    Last Post: 05-01-2006, 05:40 PM
  2. Replies: 0
    Last Post: 11-14-2005, 08:22 PM
  3. Cant login to my news script
    By SecureStealth in forum Free Hosting
    Replies: 0
    Last Post: 09-08-2005, 05:47 PM
  4. PHP login script
    By xunhandmex in forum Scripts & 3rd Party Apps
    Replies: 8
    Last Post: 05-26-2005, 07:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers