DragonPrime - LoGD Resource Community

Game Administration, Installation and Configuration => Installation and Configuration Assistance => Topic started by: Daenerys on December 28, 2018, 09:10:07 PM



Title: Accounts not saving to db
Post by: Daenerys on December 28, 2018, 09:10:07 PM
Wow, nostalgic moment as I haven't done much with LOGD in FOREVER!  Letting that sink in for a moment ...

  Okay, so I installed the recommended big fixed version of LOGD using PHP 5.6. I can get through all the steps, but it's not creating any accounts, and it doesn't look like the admin account has been created during set up.  So it's a new game with no accounts.
What should I do?
Thanks for feedback.


Title: Re: Accounts not saving to db
Post by: Aeolus on December 29, 2018, 04:47:07 AM
In the code where the creation of a character is executed, debug the error output and post the results.


Title: Re: Accounts not saving to db
Post by: Daenerys on December 29, 2018, 09:38:55 AM
Sorry, How do I do this?  Is there a log on the server itself since I cannot log in as admin given that account isn't even created.


Title: Re: Accounts not saving to db
Post by: Anharat on December 29, 2018, 02:25:07 PM
Have you tried running the installation process again? And do you get any error messages there? If not you can check your servers php and mysql error logs, their location and existence depends on your configuration and operating system. Check google in that case.

Can you create normal characters? If so you could just create one and apply superuser privileges through the database.


Title: Re: Accounts not saving to db
Post by: Daenerys on December 30, 2018, 07:58:39 AM
Okay, here's the log:
[30-Dec-2018 04:38:58 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136
[30-Dec-2018 04:39:05 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136
[30-Dec-2018 04:39:12 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136
[30-Dec-2018 04:39:15 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136
[30-Dec-2018 04:40:00 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136
[30-Dec-2018 04:40:17 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136
[30-Dec-2018 04:40:24 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136


The annoying part is I entered a db username, password, db name, etc, and during the installation, it was able to connect and do it's thing, and I got passes in all of them.
But it seems that that information was not saved correctly?
What do I do from here.
Thanks.


Title: Re: Accounts not saving to db
Post by: Sunday on December 30, 2018, 01:00:33 PM
Okay, here's the log:
[30-Dec-2018 04:38:58 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136
[30-Dec-2018 04:39:05 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136
[30-Dec-2018 04:39:12 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136
[30-Dec-2018 04:39:15 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136
[30-Dec-2018 04:40:00 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136
[30-Dec-2018 04:40:17 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136
[30-Dec-2018 04:40:24 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136


The annoying part is I entered a db username, password, db name, etc, and during the installation, it was able to connect and do it's thing, and I got passes in all of them.
But it seems that that information was not saved correctly?
What do I do from here.
Thanks.
Looks like your dbconnect.php file may exist but it is all blank. Open it up with a text editor and edit it, or delete it and restart the installation process.


Title: Re: Accounts not saving to db
Post by: Daenerys on December 30, 2018, 01:44:58 PM
I've tried that. the dbconnect file is not blank, and I've tried reinstalling it multiple times.


Title: Re: Accounts not saving to db
Post by: Anharat on December 30, 2018, 02:56:17 PM
And is the content of your dbconnect file valid? When trying to install again, did you delete the dbconnect file before that? If not you should do so.
Also, did you check that all database tables were created during installation?


Title: Re: Accounts not saving to db
Post by: Daenerys on December 30, 2018, 05:19:32 PM
Yes the info on the DBconnect file is valid. Yes I deleted the dbconnect file when I reinstall.
  I've installed it successfully before, but it was a long time ago, and on another server.  That's what makes this so annoying.
When I looked at the log during installation, it said that it was creating tables.
  Just checked with PHPMyAdmin and tables are there.

  I've installed other applications that use php and mysql and have not had this issue.


Title: Re: Accounts not saving to db
Post by: Anharat on January 01, 2019, 06:22:09 AM
Is the installed game working? Can you create a new - normal user - account? Or do you get the same error there?


Title: Re: Accounts not saving to db
Post by: Daenerys on January 01, 2019, 10:05:36 AM
I cannot create any users. When I try everything seems to work like normal, but when I try to log in, it says that my username and password is is invalid, same as it does when I try to log into admin account.
  My error log is full of this sort of thing:
[31-Dec-2018 15:26:16 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136
 
  So it seems that the info in the dbconnect file is maybe not being read by that php file in /lib?  I don't know much about php any more, so maybe I'm wrong.


Title: Re: Accounts not saving to db
Post by: TGTarheel on January 02, 2019, 01:16:25 AM
I cannot create any users. When I try everything seems to work like normal, but when I try to log in, it says that my username and password is is invalid, same as it does when I try to log into admin account.
  My error log is full of this sort of thing:
[31-Dec-2018 15:26:16 UTC] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/feedmy5/logd.worldofarda.net/lib/dbwrapper_mysql.php on line 136
 
  So it seems that the info in the dbconnect file is maybe not being read by that php file in /lib?  I don't know much about php any more, so maybe I'm wrong.


Not sure but I saw something about mysql_connect needing to be changed to db_connect.  Let me look...

Yes, thought so.  From anther topic....



Replace all mysql_ functions with db_ in the dbwrapper files.


Title: Re: Accounts not saving to db
Post by: Anharat on January 02, 2019, 11:04:27 AM
db_connect is just a lotgd wrapper method, internally mysql_connect is used unless you modify the files for another database server - which seems not to be the case.

Try debuging the common.php file where the database connection is established and if the variables $DB_HOST, $DB_USER, $DB_PASS are set (probably not). Then the issue must be as line 101: require_once("dbconnect.php"); where these variables should be set.


Title: Re: Accounts not saving to db
Post by: TGTarheel on January 02, 2019, 06:55:08 PM
Interesting stuff.  Please report back, Daenerys if what Anharat said solves your problem.

I often learn things myself by watching threads like this...which is where I also picked up the db_connect thing.

I'm self-taught, and learn more or less by trial and error.  Probably not the most efficient way for most, and probably not a way to learn really clean and proper code, but it is the way that seems to work best for ME to learn things.

I just have to get hands-on or I don't learn...manuals tend to not help very much for me.

So, I'd be interested to know the final outcome here.


Title: Re: Accounts not saving to db
Post by: Daenerys on January 18, 2019, 09:58:18 AM
Sorry, I'm a bit of a newbie when it comes to playing inside PHP files. I'm still confused on what exactly you're wanting me to do.
  Can you be more specific?  Right now, I've got the LOGD that is recommended by the site, so I'm not using the old code, if that makes sense. 


Title: Re: Accounts not saving to db
Post by: Anharat on January 18, 2019, 10:52:14 AM
Well, if you say that the db connect file exists and is valid then the issue must be when reading the file to get the variables and that happens in the common.php file. Try printing the variables there and if the values are null / undefined you know that there is an issue with reading the file, not really sure how to solve that then, haven't worked with php and lotgd codebase for quite some time.

© 2019 DragonPrime - LoGD Resource Community
Email Talisman: talisman -at- gmail.com
&oeXs)2U7=V BmܲV.U e=;p\}eG )Jj} C5EH7ˤH=j } mo|*Ŋw{drV_@IV>/- TFQJ׀̀Ve}l1,V O iNYx͘$e$;
Forums: Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines