Marcel van Dorp wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Ryan,
> 
> I am trying to setup a poker-server/-network/-client/-bot, to actually
> play some poker with relatives spread across the world. Just for fun!
> 
> I am a network specialist, and maintain a few linux servers, but I am
> not a real programmer (played a bit with perl and php, but only for my
> personal use). I do know how to troubleshoot, though (experience from a
> former job, repairing electronics, using the same strategies in network
> problems).
> 
> As you've stated on the mailinglist, the standard pokerweb is fairly
> useless. The software is pretty hostile to newcomers because of the lack
> of documentation.
> 
> I've installed the standard packages for debian-etch. I use apache2 +
> php5 (with mysql mod) + mysql5 (and poker-network, pokerweb and poker2d
> obviously). All dependencies are solved. The code starts fine.
> 
> I've checked out your pokerweb, and placed it under the documentroot.
> 
> I can access the page, and see the login screen.
> 
> Whatever I supply for credentials, I keep getting 'access denied'
> messages. I did configure config.php with the correct values.

Sorry when you say access denied is it a MySQL connection error (ie 
conecting to the db)? see #1 or is it my error message for the username 
and password loggin into the program? see #2


1.

It will connect to the db with the values defined in
$cfg['DBUser']
&
$cfg['DBPass']

Also try using the db root user to connect.

OR

2.

The user must be in the database in the 'users' table, and to be admin 
(they must have a privilege level equal to the number defined in the 
config file "USER_L_ADMIN" (default is 2).

At the moment you have to enter the data via phpmyadmin as all you can 
do is login at the moment..

My next task is to do the adding of money, and rewrite the login so its 
OO, and more hack resistant.

> I've looked at your code, and started stripping the '@' from the
> mysql-function calls in your class.
> 
> I worked my way up, starting at the error message back to the db connect.
> 
> It appears your script tries to connect to the db as 'www-data', the
> user the webserver is running as.

No it dosen't. See above..

www-data is generally a user with no privs (on the linux box) for the 
web server to run and generally you need to have your files with either 
the owner or group as www-data.

chown -R www-data:www-data <locataion of pokerweb>

My files may not have this as default as i develop them under a windows 
machine for convience, although the fact you get as far as the login 
prompt indicates this is not likely the problem.

> I added a print statement in the constructor of your class, but that
> doesn't output anything. In my (humble) opinion, it appears the
> constructor is never executed, thus leaving all the variables empty.
> This causes the sql-routines to revert to the defaults, ie. the user the
> program is run as.
> 
> If I understand correctly, the constructor should be executed once, with
> every new object being created, right?

The constructor is run at the point in the code:
"$db = new clsDBMySQL($cfg);"

$cfg is populated from the config file.

> I know a bit of theory about OOP, and did some basic "hello world"
> programs, but I do not know the details (Perhaps it is not possible to
> output something from a constructor, I just don't know).
> 
> Can/Will you help?
> 
> Regards,
> 
> Marcel
> 
> - --
> - ---------------------------------------------------------------
> ing. Marcel van Dorp (CCDP, CCNP, CCSP)      http://www.wiwo.nl
> WiWo Support                                 tel. 071-523 77 91
> Postbus 1098                                 fax  071-523 77 94
> 2340 BB Oegstgeest                           gsm  0653-50 77 76
> - ---------------------------------------------------------------
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFGRsV7IA1+xqauveoRAu6uAJ9lnJDwRG7UetT8WtlCiMfeB5CYeACfbeQX
> c5+9I+NUXf7rrazESqT40AA=
> =Tn0o
> -----END PGP SIGNATURE-----


_______________________________________________
Pokersource-users mailing list
[email protected]
https://mail.gna.org/listinfo/pokersource-users

Reply via email to