View Full Version : New to MySQL- Need help installing Power PHLogger
webmeister
10-28-03, 01:29 AM
I just checked out the Power PHLogger site and am interested in setting this up on my website to run a stats program. I have setup a MySql database, but am new to MySql. I hope I haven't gotten in over my head. Do you think you could help me set this up on my site? The installation instructions from the Power PHLogger site didn't make much sense. Is there another tutorial on how to do this somewhere?
Should I load the Power PH Logger files that I unzipped into the powweb ftp server, or should I load them into the MySql database? I feel stupid asking this question, because common sense tells me to load them into the MySQL database., however my password doesn't seem to work- I have to check on this. Is it because I'm trying to log in from an ftp program?
Please don't think I'm crazy for trying this. I know I can do it! Any help from anyone would be greatly appreciated.
HalfaBee
10-28-03, 03:53 AM
Sorry, haven't looked at phlogger.
Most of the files would probably have to be uploaded to a folder in htdocs using your ftp server, found in http://ops.powweb.com.
If it doesn't automatically install the mysql tables there is most likely a .sql file which will need to be executed by a mysql client like mysql_front or phpmyadmin.
HalfaBee
This applies to PPHLogger 2.2.4, I hope my instructions are clear:
Before you start, make sure you have the following information:
The name of the server where your database is located.
The name of the database.
The user name that will be used to access your database.
The password.
Here are the basic steps to install PPHLogger on your PowWeb web site:
1. Download PPHLogger and unzip the file on your computer.
2. After you unzip the file, open the folder and you will see a folder named “pphlogger.” That folder contains all of the folders and files for the application.
3. Open the pphlogger folder and locate the file named “config.inc.php.”
4. Find the following lines in the file and change localhost to the name of your server, your_db to the name of your database, your_username to the user name, and your_pw to the password. Do not remove the single quotes ( ' ):
define('PPHL_DB_HOST' , 'localhost'); // MySQL server hostname
define('PPHL_DB_NAME' , 'your_db'); // name of your database
define('PPHL_DB_USER' , 'your_username'); // username
define('PPHL_DB_PWD' , 'your_pw'); // password
5. Use an ftp program to upload to your ftp space the folder named “pphlogger” and all of its contents. You should upload the “pphlogger” folder into the “htdocs” folder on your ftp server.
6. After you have uploaded the files to your ftp space, use your web browser to navigate to: www.yourdomain.com/pphlogger/admin/setup.php
Of course, change ‘yourdomain’ to your domain name.
This starts the PPHLogger installation and setup.
7. Proceed through the next few pages entering the requested information:
On page 1, enter the location of your PPHLogger installation: http://www.yourdomain.com/pphlogger/
Enter the admin e-mail address that you want to use (any valid e-mail that pphlogger can use to communicate with you or to identify you to other users if you allow more than one user).
Enter the admin name and password you want to use.
The system time zone is PowWeb’s time zone (Pacific Time)
Administrator time zone is where ever you are.
If you want to allow other websites to sign up and use this stats application to monitor their web site, then set “enable user self-signup” to true, otherwise leave it as false.
Click save when you’re done.
On page 2, you can leave everything set to its default value, unless you feel you need to change anything to suit your specific needs.
8. Click save and you’re done with this part of the set up. On the next page, click on the administration link and create at least one user to begin using PPHLogger.
9. Read the file doc.html located at: http://www.yourdomain.com/pphlogger/doc/doc.html
That file explains how to prepare your html pages to make calls to pphlogger. Basically, it entails placing a script on each of your pages. If you don't perform this step, you won't have any stats to look at.
10. To view your stats on PPHLogger, navigate your browser to http://www.yourdomain.com/pphlogger/
Enter the username and password you created when you created the user in step 8.
11. To perform admin activities on PPHLogger, navigate to: http://www.yourdomain.com/pphlogger/admin/
12. VERY IMPORTANT:
Protect the admin folder using htaccess or anyone will be able to access your PPHLogger application as the administrator and do all kinds of bad things!
webmeister
10-28-03, 06:37 PM
Thanks Nino for taking the time to help. I will try to follow your steps. They seem to be very clear. I will let you know the results.
Just one other thing: How do you use htaccess? Can you fill me in a bit more on this?
Originally posted by webmeister
Thanks Nino for taking the time to help. I will try to follow your steps. They seem to be very clear. I will let you know the results.
Just one other thing: How do you use htaccess? Can you fill me in a bit more on this?
You're welcome.
PowWeb has a very good tutorial on how to use htaccess. You can find it here:
http://help.powweb.com/tutorials/htaccess/passprotect.php
webmeister
10-29-03, 08:48 PM
Nino
I cant' get past this error message when I try to go to www.mydomainname.com/pphlogger/admin/setup.php
unable to connect to database on 'mysql03.powweb.com' with user 'this is where my user name is'
(1045) Access denied for user: 'my user name@www09.powweb.com' (Using password: YES)
Please check your settings in config.inc.php !
Any ideas?
I have the pphlog file in the htdocs directory.
Make sure your spelling is correct for the username and the password, and make sure they match exactly regarding the case of the letters.
If you must, sign into ops and delete the database user.
Then recreate the user using all lower case or all caps (makes it easier to remember and helps to avoid errors related to typos).
Do the same thing with the password.
Then make the changes to the config.inc.php file so that they match. Make sure you have single quotes around your username and password as I mentioned in the earlier post.
Without seeing and knowing that information myself, I can only guess that these errors are related to typos. The MySql server is denying access to the user you indicated in the config.inc.php file. If you think it through logically it can only be for a small number of reasons:
Does the user exist? Is the username spelled correctly? Is the user's password spelled correctly? etc. etc.
When ever I run into problems in my own efforts, 99% of the time it's because of a typo. That's why that is my first thought when someone runs into a problem.
Originally posted by webmeister
Nino
I cant' get past this error message when I try to go to http://www.keithswinneyband.com/pphlogger/admin/setup.php
unable to connect to database on 'mysql03.powweb.com' with user 'this is where my user name is'
(1045) Access denied for user: 'my user name@www09.powweb.com' (Using password: YES)
Please check your settings in config.inc.php !
Any ideas?
I have the pphlog file in the htdocs directory.
webmeister
10-29-03, 09:31 PM
It must have been an upper-lower case thing. Thanks again. I got to to the setup page. However I didn't go any further yet. Instead I uploaded my .htaccess .htpassword files. Now I can't get past the username/password when I try to log onto the page. I have loaded the .htaccess file into the main pphlogger file and the .htpassword file into the main directory with the cgi, htdoc etc folders. Are these in the wrong place? As far as I know I have configured the files correctly and removed the .txt from them. I did have the password encrypted as suggested in the .htaccess tutorial. Could the encryption be the problem?
I would not do anything with htaccess until you are finished installing the application, otherwise I think you will just be complicating things for yourself.
Originally posted by webmeister
It must have been an upper-lower case thing. Thanks again. I got to to the setup page. However I didn't go any further yet. Instead I uploaded my .htaccess .htpassword files. Now I can't get past the username/password. I have loaded the .htaccess file into the main pphlogger file and the .htpassword file into the main directory with the cgi, htdoc etc folders. Are these in the wrong place? As far as I know I have configured the files correctly and removed the .txt from them. I did have the password encrypted as suggested in the .htaccess tutorial. Could the encryption be the problem?
webmeister
10-29-03, 09:36 PM
Ok. But, I may need to go back to that question......
flowersthailand
10-29-03, 10:18 PM
What sql database?
I dont know sql how I can make database for phlogger?
I just want to make it work easily why dont they give a database.
Can i copy someones database?
Thanks
webmeister
10-29-03, 10:39 PM
Ive got it set up now & have added code to my main page to test it out, but for some reason it is not registering. The code reads:
<script language="JavaScript" type="text/javascript" src="pphlogger.js"></script>
<noscript><img alt="" src="http://www.your_domain.com/pphlogger/pphlogger.php?id=your_username&st=img"></noscript>
i placed this in the body of my page. my pphlogger.js file is in mt htdocs folder.
I added my domain name in place of www.your_domain.com and replaced user_name with my username that I created after setup. Any ideas on what I have done incorrectly?
webmeister
10-29-03, 10:44 PM
Originally posted by flowersthailand
What sql database?
I dont know sql how I can make database for phlogger?
I just want to make it work easily why dont they give a database.
Can i copy someones database?
Thanks
I created my database in my ops.powweb.com area by clicking on packages, then I believe it was the billing/plan header. If you go all the way to the bottom of that page you will find that you are allowed one free mysql database. You set it up here.
flowersthailand
10-29-03, 10:46 PM
Why cant Poweb set this up for us as webalizer is useless and has a major security flaw. Users can just go to your domain/webstat and get all your stats!
Pretty bad i's say, Also this phplog is free right?
If you followed the instructions in my previous post then you should have a user set up within the phlogger application (step 8).
Use the user name you created to replace the "your_username" part in between those script tags.
Then open up the "pphlogger.js" file and follow the instructions at the top. It tells you to set id = the same user name as before.
Originally posted by webmeister
Ive got it set up now & have added code to my main page to test it out, but for some reason it is not registering. The code reads:
<script language="JavaScript" type="text/javascript" src="pphlogger.js"></script>
<noscript><img alt="" src="http://www.your_domain.com/pphlogger/pphlogger.php?id=your_username&st=img"></noscript>
i placed this in the body of my page. my pphlogger.js file is in mt htdocs folder.
I added my domain name in place of www.your_domain.com and replaced user_name with my username that I created after setup. Any ideas on what I have done incorrectly?
webmeister
10-29-03, 11:19 PM
Nino- I have already done all of that. It has to be something else....
Before installing phlogger to your web site you tried activating an account with http://www.nmsdesigns.com/webstats/pphlogger.php
And you will find this link all throughout the file pphlogger.js that you are trying to use. That’s because you are not using the pphlogger.js file that is created by your own phlogger application, but you are using the one from http://www.nmsdesigns.com
So, delete your pphlogger.js file (or rename it) and then do the following:
1. Log in to your phlogger application.
2. Click on the “settings” in the middle of the link bar.
3. Look in the html box in the middle of the page.
4. There is a part that says: ”If you have lost your pphlogger.js-file, download it here: “
5. Download that file and then change the id like you did before.
6. Upload that file to your root directory.
See if that works for you.
Originally posted by webmeister
Nino- I have already done all of that. It has to be something else....
webmeister
10-30-03, 12:36 AM
Nino-
I just did what you told me & I'm still getting no stats. When you say change ID after downloading the .js file- where would this be? It looks like everything has been put in for me automatically when I downloaded it.
Originally posted by webmeister
Nino-
I just did what you told me & I'm still getting no stats. When you say change ID after downloading the .js file- where would this be? It looks like everything has been put in for me automatically when I downloaded it.
I was wrong on that one. When you download the script from your own site it comes pre-set with the correct variables.
I looked at your html and I looked at your .js file.
It looks correct to me now and it should be working.
Since I accessed your web site a moment ago, do you now see an entry in the "logs" area of pphlogger?
webmeister
10-30-03, 01:07 AM
Bingo-
Thanks for all your help. I thought I had it set to count myself. It's working now. From what I understand, that same code will work for all pages with no changes.....
Cool!
Originally posted by webmeister
Bingo-
Thanks for all your help. I thought I had it set to count myself. It's working now. From what I understand, that same code will work for all pages with no changes.....
Cool!
WooHoo!!! :D
I was beginning to get worried :)
webmeister
10-30-03, 02:47 PM
Nino-
When I looked at the pphlogger demo, it looked like site paths were being tracked. There was a page that had different color coded "page icons" in the order where the visitors went on the site. I see where there's a button that says site path off site path on. I've tried both of these at both settings, but haven't seen anything like I saw in the demo. Does this program log site paths? If so, what am I doing wrong here?
You've been a big help!
Originally posted by webmeister
Nino-
When I looked at the pphlogger demo, it looked like site paths were being tracked. There was a page that had different color coded "page icons" in the order where the visitors went on the site. I see where there's a button that says site path off site path on. I've tried both of these at both settings, but haven't seen anything like I saw in the demo. Does this program log site paths? If so, what am I doing wrong here?
You've been a big help!
Yes it does track paths and those page icons represent the pages that are visited.
In the "logs" section, if you see the link "visitors path on" then click on it. If it says "visitors path off" do not click on it.
Also, you will need to place those several lines of script that you placed on your index page on each page that you want to track.
And you will not see your own hits if you selected not to have your own browser counted as a visitor.
webmeister
11-1-03, 03:22 PM
Now back to the .htaccess .htpassword.....
These are not working. I get a window that pops up, but it's not letting me get any further. I have uploaded the .htaccess into my pphlogger folder (which is in htdocs)The installation instructions tells you to put the .htaccess file in the htdocs folder, but I already have a file with that name in this folder.
I have tried the .htpassword file in two different places. One in the htdocs folder and one in the main directory with the htdocs folder, cgi-bin, and the etc folder.
Any ideas?
Originally posted by webmeister
Now back to the .htaccess .htpassword.....
These are not working. I get a window that pops up, but it's not letting me get any further. I have uploaded the .htaccess into my pphlogger folder (which is in htdocs)The installation instructions tells you to put the .htaccess file in the htdocs folder, but I already have a file with that name in this folder.
I have tried the .htpassword file in two different places. One in the htdocs folder and one in the main directory with the htdocs folder, cgi-bin, and the etc folder.
Any ideas?
The .htaccess file can go anywhere within the directory tree for the htdocs folder and you can place it in more than one folder. That means it can go directly inside htdocs or inside any of it's subfolders. Whatever code is inside the .htaccess file will apply to the folder that it resides in and all it's subfolders.
The .htpassword file should be placed outside of the htdocs folder at the same level as the htdocs and cgi-bin folders.
When you get the password prompt, remember it is case sensitive.
I tried accessing your admin folder a few minutes ago and the password prompt came up, now the password prompt does not come up. I guess your working on it?
webmeister
11-1-03, 05:30 PM
I took it off for now, because when I accessed my website, it asked for a password on every page that I clicked on. Weird huh?
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.