DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • March 21, 2019, 04:32:48 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2   Go Down
  Print  
Author Topic: Accounts not saving to db  (Read 1132 times)
0 Members and 1 Guest are viewing this topic.
Daenerys
Militia
**
Offline Offline

Posts: 35


View Profile
« 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.
Logged
Aeolus
Mod God
*****
Offline Offline

Posts: 1923


You're welcome.


View Profile WWW
« Reply #1 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.
Logged

Daenerys
Militia
**
Offline Offline

Posts: 35


View Profile
« Reply #2 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.
Logged
Anharat
Codemeister
****
Offline Offline

Posts: 282



View Profile
« Reply #3 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.
Logged
Daenerys
Militia
**
Offline Offline

Posts: 35


View Profile
« Reply #4 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.
Logged
Sunday
Codemeister
****
Offline Offline

Posts: 404


So meme'd up.


View Profile
« Reply #5 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.
Logged

Slowly progressing fork with PHP 7 support: https://github.com/stephenKise/Legend-of-the-Green-Dragon
Cheap VPS Hosting (10$ credit!): https://m.do.co/c/acde75b086c5

A new server in the making...
Daenerys
Militia
**
Offline Offline

Posts: 35


View Profile
« Reply #6 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.
Logged
Anharat
Codemeister
****
Offline Offline

Posts: 282



View Profile
« Reply #7 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?
Logged
Daenerys
Militia
**
Offline Offline

Posts: 35


View Profile
« Reply #8 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.
Logged
Anharat
Codemeister
****
Offline Offline

Posts: 282



View Profile
« Reply #9 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?
Logged
Daenerys
Militia
**
Offline Offline

Posts: 35


View Profile
« Reply #10 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.
Logged
TGTarheel
Mod God
*****
Offline Offline

Posts: 516


View Profile
« Reply #11 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.
« Last Edit: January 02, 2019, 01:24:01 AM by TGTarheel » Logged
Anharat
Codemeister
****
Offline Offline

Posts: 282



View Profile
« Reply #12 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.
Logged
TGTarheel
Mod God
*****
Offline Offline

Posts: 516


View Profile
« Reply #13 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.
Logged
Daenerys
Militia
**
Offline Offline

Posts: 35


View Profile
« Reply #14 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. 
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
37 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search