Gagetboy1 Posted May 11, 2013 Posted May 11, 2013 i have a login and register page but it is not working. i checked the codes seems to be alreight.still shows an error "[function.mysql-connect]: Access denied for user 'gagetboy'@localhost'(using password:yes)" the login and register page code can be found on http://www.html-form-guide.com/php-form/php-registration-form.html PLS HELP ME!
wolstech Posted May 11, 2013 Posted May 11, 2013 That looks like a user or permission issue. Did you create an SQL user called gadgetboy? Did you add that user to the database you are using for the login system? Is the password correct for that user in the php script?
Gagetboy1 Posted May 11, 2013 Author Posted May 11, 2013 i did create a user called gagetboy,no coz it creates it automatically when the infomation is entered on register page and the password is correct checked it many times!Register Page: http://ix-c.heliohost.org/register.phpLogin Page: http://ix-c.heliohost.org/login.php
wolstech Posted May 11, 2013 Posted May 11, 2013 You need a database user. It sounds like you're confusing database users with the user accounts that people will create through your website. They are entirely different. I can't tell if you did this or not so try this: Visit http://ix-c.heliohost.org:2082/frontend/x3/sql/index.html (log in with your cpanel username and password). Create a user on that screen called gadgetboy if it doesn't already exist. Then add the gadgetboy user to the database using the form at the bottom of that screen. Make sure the password for the user you create there matches the one in the PHP file. If you did this already and are still seeing the error, something might just be wrong with that registration system.
Gagetboy1 Posted May 12, 2013 Author Posted May 12, 2013 is this code is correct?{{{{{<?PHPrequire_once("./include/fg_membersite.php"); $fgmembersite = new FGMembersite(); //Provide your site name here$fgmembersite->SetWebsiteName('ix-c.heliohost.org'); //Provide the email address where you want to get notifications$fgmembersite->SetAdminEmail('zigzag@ix-c.heliohost.org'); //Provide your database login details here://hostname, user name, password, database name and table name//note that the script will create the table (for example, fgusers in this case)//by itself on submitting register.php for the first time$fgmembersite->InitDB(/*hostname*/'ix-c.heliohost.org', /*username*/'gagetboy', /*password*/'**************', /*database name*/'gagetboy_ix-c', /*table name*/'fgusers3'); ?>}}}}}}}}}}}
wolstech Posted May 12, 2013 Posted May 12, 2013 Assuming that there's a DB called gadgetboy_ix-c and an SQL user added to it called gadgetboy, then yes. I looked at the code for that reg system last night...it's not you I don't think. The registration system isn't the best out there...it took me an hour to get it working, and then I managed to break it easily. I didn't bother testing it, but a quick look reveals a lack of protection against a variety of attacks as well (not sure how secure you need this to be). I'd go find a different registration system rather than try to get this one working...
Shinryuu Posted May 12, 2013 Posted May 12, 2013 One quick thing I notice is you're using a bad username, a database user will also take the form <accountuser>_<dbuser>. Also if you're running the script on our servers you need to use localhost for the hostname, otherwise it should be fine.
Gagetboy1 Posted May 12, 2013 Author Posted May 12, 2013 thanks but which would be the best login and registration system?
wolstech Posted May 12, 2013 Posted May 12, 2013 One quick thing I notice is you're using a bad username, a database user will also take the form _. Also if you're running the script on our servers you need to use localhost for the hostname, otherwise it should be fine. Totally missed the username here. If you make a DB user called ix-c and your HH account is gagetboy, it will look like "gagetboy_ix-c". The password will be the DB user's password, not your Heliohost password. The hostname...I didn't even pay attention to it since his original error showed "gagetboy@localhost". Oops. thanks but which would be the best login and registration system? :)/> Honestly, I can't recommend one since I ended up making my own. I faced a similar issue back when I developed my site. I started with a very basic (as in, so basic it was 3 files, and like 4 functions) system from the net for a framework and coded a bunch of things to fix the major security issues. If you do what Shinryuu suggests and fix host and username, it should work. You can get away with using this one as long as you don't use it to protect anything that's very sensitive.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now