PDA

View Full Version : get your graph on


masland
08-23-2005, 05:30 PM
I wrote up some instructions for using the PostgreSQL graphing tool... I hope they make sense.. PLEASE reply with any suggestions or modifications to the instructions. I'll update them for everyone.

=============================



Install PostgreSQL 8.0
Follow the instructions here http://www.pokertracker.com/pgsqlinstall.html to install PostgreSQL 8.0

Convert Database
After PostgreSQL is installed, in Poker Tracker, open the Utilities/PostgreSQL Settings window and enter your user name and password information.

Utilities -> PostgreSQL Settings…

Next, convert your Access database(s) to PostgreSQL.

Utilities -> Convert Database…

PLEASE NOTE: The conversion process could take a while depending on the size of your Access database.

Install Apache 2
Download Apache 2 and install it. It can be downloaded here http://httpd.apache.org/download.cgi When installing it, keep the default settings and enter whatever you like for the domain name, email address, and other information. Once Apache is installed, you should see a new icon on your system tray. This icon shows the status of your Apache server, and allows you to quickly stop, start, and restart the server as needed.

Assuming you kept the default Apache settings go to the following directory:

C:\Program Files\Apache Group\Apache2\htdocs

This is your web root directory. Enter 127.0.0.1 into your web browser, and you should see a page that says the following:

If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page.
________________________________________
Seeing this instead of the website you expected?
This page is here because the site administrator has changed the configuration of this web server. Please contact the person responsible for maintaining this server with questions. The Apache Software Foundation, which wrote the web server software this site administrator is using, has nothing to do with maintaining this site and cannot help resolve configuration issues.
________________________________________
The Apache documentation has been included with this distribution.
You are free to use the image below on an Apache-powered web server. Thanks for using Apache!

Install PHP
Download PHP 4.4 from here (http://www.php.net/get/php-4.4.0-Win32.zip/from/a/mirror) and install it using the default settings. It will install to c:\PHP by default. When asked what type of webserver you will be using, select Apache 2. The installation will state that it failed to configure itself in Apache, which is fine.

Open C:\PHP\sapi and copy the file php4apache2.dll to c:\PHP

Open C:\Program Files\Apache Group\Apache2\conf\httpd.conf

Add the following lines to the top of the file, httpd.conf

LoadModule php4_module "c:/php/php4apache2.dll"
AddType application/x-httpd-php .php

Save the file, close it and restart the apache server. If you receive any errors restarting the server, something is wrong with the lines you just added to the httpd.conf

PHP should now be working. To test it, create a file named test.php in the folder: C:\Program Files\Apache Group\Apache2\htdocs

Cut and paste the following into test.php:

<?php

phpinfo();

?>

Save it, close the file, and type: http://127.0.0.1/test.php

If the page works, you have now gotten PHP installed.

Enable GD and PGSQL

To enable GD and PGSQL open c:\windows\php.ini

Search for the line:

extension_dir = "./"

change it to:

extension_dir = "c:/php/extensions"

Now, search for the line:

;extension=php_pgsql.dll

change it to:

extension=php_pgsql.dll

Now, search for the line:

;extension=php_gd2.dll

change it to:

extension=php_gd2.dll

Save php.ini, close the file, restart the Apache server and run http://127.0.0.1/test.php
If you search test.php for GD and PGSQL you should see info about both of them. If this works , congratulations, you’ve gotten GD and PGSQL enabled.

Download & extract jbgraph

Download jbgraph package from http://www.aditus.nu/jpgraph/index.php and extract the files to a folder named jbgraph. Now move the jbgraph folder to C:\Program Files\Apache Group\Apache2\htdocs\

You should now have paths like this….

C:\Program Files\Apache Group\Apache2\htdocs\jpgraph\src

Configure php graphing script

Download the php graph generation file from http://www.hiddenroomgraphics.com/ptgraphphp/ptgraphphp-0.14.phps

The best way to do this is simply open the link, select all, copy, create a new file in
C:\Program Files\Apache Group\Apache2\htdocs named ptgraph.php and paste the info into that file.

Change the info in line 7 of ptgraph.php to the following:

$conn = pg_connect("dbname=xyz port=5432 user=postgres password=123");

Substitute xyz for the name of your pokertracker db, and insert the username/password that you configured earlier in pokertracker. Now, check if the graph works by entering

http://127.0.0.1/ptgraph.php

if anyone has problems or suggestions for these instructions….feel free to add to this thread and I will update it. Thanks.

kross
08-23-2005, 06:07 PM
I can't comment on the instructions since I already had Apache and PHP already installed on my Linux box, along with PostgreSQL. My db also lives on my Linux box.

Previously I was using the Poker Grapher program. I had to create an empty Access database, and link all the pgsql tables to it, to get it to work. This is much easier.

Of course, it isn't as featureful as Poker Grapher, but it's a very good start. And the source is out in the open, in case you drop off the face of the earth, like the author of Poker Grapher.

Anyway, I noticed one problem. It listed my primary screen name 4 times, along with all my aliases (the aliases ony showed once). I just selected them all, didn't seem to cause any problems.

Thanks!
-- Kevin

masland
08-23-2005, 06:10 PM
please note that I am not the author of the script. The original thread can be found here:

http://www.pokertracker.com/forum/viewtopic.php?t=6451

kross
08-23-2005, 06:16 PM
Okay, thanks. I'll post my comments in that thread.

-- Kevin

krubban
08-31-2005, 09:47 AM
Is there any smart guy out there who could make a graphing tool that isn't quite this cumbersome? I would love to be able to graph my results but this might be a tad complicated for me /images/graemlins/smile.gif

I would happily donate a coin to the coder who wraps this up in one program /images/graemlins/smile.gif

MrMoo
08-31-2005, 11:33 AM
While I appreciate you providing these instructions, I'm a little worried about whats involved. Installing Apache and PHP without understanding what your doing can very possibly open up some security issues. At a minimum I'd suggest binding apache to localhost only in httpd.conf.

TheIrishThug
08-31-2005, 12:24 PM
[ QUOTE ]
Previously I was using the Poker Grapher program. I had to create an empty Access database, and link all the pgsql tables to it, to get it to work. This is much easier.


[/ QUOTE ]

i found a thread on the pt forum that had a guy describing how to link via access. but he was basicly doing it from memory and was not clear. can u describe how to link the tables thru a access file for me. i have no knowledge of how access or PostgreSQL work so keep it as simple as u can.

thanks in advance

smartalecc5
08-31-2005, 04:51 PM
[ QUOTE ]
While I appreciate you providing these instructions, I'm a little worried about whats involved. Installing Apache and PHP without understanding what your doing can very possibly open up some security issues. At a minimum I'd suggest binding apache to localhost only in httpd.conf.

[/ QUOTE ]

I thought that was assumed /images/graemlins/crazy.gif /images/graemlins/confused.gif

IHateKeithSmart
08-31-2005, 07:37 PM
Are we just trying to recreate poker grapher now that it's no longer available? I've used it in a limited fashion, but since the pt schema is open (isn't it) I imagine this would be pretty simple. I would be willing to help out on this kind of project.

SoCalRugger
09-01-2005, 04:30 AM
Any ideas on why I can graph other people's results using this program, but my own username doesn't appear in the Player Name list?

09-10-2005, 11:57 PM
[ QUOTE ]
Are we just trying to recreate poker grapher now that it's no longer available? I've used it in a limited fashion, but since the pt schema is open (isn't it) I imagine this would be pretty simple. I would be willing to help out on this kind of project.

[/ QUOTE ]

Feel free to help out!

The author of the original Poker Grapher program (known on the forums as Vern) has consented to having his software maintained and hosted on overcards.com (http://overcards.com) as an open source project.

The "Array boundry exceeded error" has been fixed.

To download the 1.3.6 version of the application, go to the overcards.com Downloads (http://overcards.com/dl.php) page.

Bugs reported in the overcards.com Poker Grapher bug reports (http://overcards.com/forum/forumdisplay.php?f=17) forum will get attention. That doesn't mean they'll get fixed, but they'll get attention.