Topic: Login page link is incorrect (Read 2452 times)
I love Pokemon
Posts: 13
86 credits Members referred : 0
« on: Aug 25, 2006, 10:36:09 pm »
Hello:
I have the scripts set up ok, database queries done, etc. I registered as the 'admin', did the email validation link, and arrived back at the login page, typed in the user/password I established at the initial registration (as admin) and when I click submit I get to this page:
I have the scripts set up ok, database queries done, etc. I registered as the 'admin', did the email validation link, and arrived back at the login page, typed in the user/password I established at the initial registration (as admin) and when I click submit I get to this page:
Obviously there's something missing and I can't spot anything in the db_config.php that points to this and the login form 'action' points to PHP_SELF.
So, where is this setting that I need to tweak in order for the login form to point to the right location? Thanks in advance!
what about this setting? define("START_PAGE", "/classes/access_user/example.php");
I love Pokemon
Posts: 13
86 credits Members referred : 0
« Reply #2 on: Aug 25, 2006, 10:48:18 pm »
That remains untouched as per the default setting. Here's the code snippet:
Code:
// variables (locations) standard pages (combine the pathes from the top or use your own) define("LOGIN_PAGE", CLASS_PATH."login.php"); define("START_PAGE", "/classes/access_user/example.php"); define("ACTIVE_PASS_PAGE", APPLICATION_PATH."activate_password.php"); define("DENY_ACCESS_PAGE", APPLICATION_PATH."deny_access.php"); define("ADMIN_PAGE", APPLICATION_PATH."admin_user.php"); // your path must be related to the site root.
The main paths area is as so:
Code:
// use this pathes and/or define the pathes for the "standard" pages define("CLASS_PATH", dirname($_SERVER['PHP_SELF'])."/"); // the location where the class is executed $sec_path = "/classes/access_user/"; // a second location where the scripts should be define("APPLICATION_PATH", $sec_path);
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #3 on: Aug 25, 2006, 10:53:45 pm »
you're example "http://login.php" doesn't match the settings, start with the class like provided inside the manual until you learned how you have to work with pathes in PHP. (if you can handle a class you're able to include files)
I love Pokemon
Posts: 13
86 credits Members referred : 0
« Reply #4 on: Aug 25, 2006, 11:06:07 pm »
That's what I can't figure out. The URL that the login page goes to is opposite of what the settings are. It should go to http://www.mydomain.com/login.php
It's omitting the domain name and adding a '/' on the end like it's looking for a folder.
I love Pokemon
Posts: 13
86 credits Members referred : 0
« Reply #5 on: Aug 26, 2006, 01:08:37 am »
Olaf, could you clarify what you're talking about, please. The db_config.php file is the default settings except for the database parameters.
I've set the files up in the public_html folder with the exception of the class files which are in
/classes /classes/access_user/ /classes/upload/
I'm assuming that this line:
Code:
define("CLASS_PATH", dirname($_SERVER['PHP_SELF'])."/"); // the location where the class is executed
Is the line controlling where the pages point to. I can't find any other settings regarding path variables. Please clarify. Thanks.
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #6 on: Aug 26, 2006, 08:27:32 am »
If you use this directory structure it must work, maybe you can upload the application somewhere?
EDIT: wait, are there two folders named "classes"?
I love Pokemon
Posts: 13
86 credits Members referred : 0
In regards to the login form and the double slashes, what you have there is what is shown when you View Source via your browser. The code looks like this:
I don't think so. All the other links work fine. It's after I register, confirm, and then try to log in. That's when the error occurs.
just check the value of the action attribute from you form, its not right to have there "//login.php" if you use the server var php_self, fix this first...
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=3819