Link to home
Start Free TrialLog in
Avatar of Leo
LeoFlag for Australia

asked on

Install Piwik

Hi, i am new to this, i have installed WampServer, now i am trying to install Piwik, localhost:8080, works fine, i have placed Piwik unzipped files under WampServer directory, is there anything i am missing, it seems to be not working, i am getting a blank page when i type in: localhost:8080/piwik.php, what should i do?
Avatar of Anastasia D. Gavanas
Anastasia D. Gavanas
Flag of Greece image

You should check the use of the port.  Skype is known to cause such problems.
The problem is due to the fact that Skype uses port 80 as alternative port.
Try any of these possible solutions for a fast fix (if you have skype using the same port)

1 Choose between Wamp or Skype
2 Disable Skype (go to Tools-> Options, Connections tab uncheck Use port 80 and 443 as an alternative).
3Either change the httpd.conf
E.g use the 4616 port
So change the line
*
Listen 80
by
Listen 4616
and
ServerName localhost: 80
by
ServerName localhost: 4616

Note that, in this case, your address will always begin with
http://localhost:4616,</code> instead of
http://localhost.</code>

If you still have problems, consider that not only skype will cause the problem, all other software that using port 80 will cause the same problem such as anti-virus, online movie player... if you want to know how to check which software is using port 80, and how to delete it. Please follow the 7 steps that shown on this blog : http://ye5.blogspot.com/2011/01/wamp-server-localhost-shows-blank-page.html
Avatar of Leo

ASKER

i can access local website on port 8080, i have already changed that in the config, my issue is not with the port, i need instruction on how to install Piwik, i have read from their website, but that didnt help me.
SOLUTION
Avatar of Graham N.
Graham N.
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Leo

ASKER

Thanks, i was able to start the installation wizard for piwik, but i am getting this message..

"Error while trying to connect to the database server:
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)"

so even if i try username as admin, which have admin rights it doesnt allow it.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Leo

ASKER

i created a different username and db, granted him all the access, but still getting the same error :-(

Error while trying to connect to the database server:
SQLSTATE[HY000] [1045] Access denied for user 'piwik'@'localhost' (using password: YES)

in the sample.config.ini i also changed the username, password and table name....
Before continuing,

1) What is your experience level in terms of running Apache under Windows environment?

2) Do you have other PHP scripts running that can access MySQL database?

3) What is the reason for you using port 8080? (It would be better to run WAMP under a standard port 80)

4) Did you reload the MySQL privileges after adding the PIWIK user?

The answers to the above may help better craft the answers given here.
Avatar of Leo

ASKER

1) I have basic understanding of running Apache under windows.
2) I have just installed Wamp, so before that one of my colleagues tried to install wamp and piwik, but he was not able to do it, so he uninstalled wamp and piwik.
3) this server is also running sharepoint intraned, which is using port 80, when it was intially installed, its was defaulted to port 80, so it wamp was not running at all, when i changed it to port 8080, it was happy.....

4) i restarted the server after adding the user and db.....would that be ok or do i have to reload MYSQL privileges? if yes how can i do it.....

thanks.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Leo

ASKER

i was able to make it run, can you please assist, how can i access it on another computer across the network?
You would access it like any other "website" using either a domain or the server's IP address, for instance:

http://192.168.1.2:8080/piwik

As for recording analytics, you have to insert the small Javascript code snippet (that you will find in your Piwik under the "wesbites" tab - click show code), obviously you have to change where Piwik loads its Javascript (piwik.js) from before placing it in the site you want to record.

Additionally, the Piwik code snippet needs to be present in all pages of the target website that you want to include in the analytics.
Avatar of Leo

ASKER

I am getting this message when i am trying to access it on any other computer.

"Unable to display page  
 
It has not been possible to display the page you requested for the following reason:
Access Denied
Contact your system administrator if you continue to experience difficulties.  "
Avatar of Leo

ASKER

on the server which i have installed, if i put http://localhost:8080/piwik, it works, but if i will put http://IP Address:8080/piwik, its not able to resolve the IP address.
If you used WAMP download to install Apache then the Apache HTTP.CONF file is probably restricting access to "localhost" only (or maybe 127.0.0.1).

By default WAMP installs in what it calls "offline" mode - meaning connections are restricted to localhost only.

You need to place WAMP in to what they call "Online" status to be able to access Apache (and thus Piwik) from other IP addresses.

To do this, right click on the WAMP icon in the task bar, and towards the bottom of the options listed you should see "Put WAMP Online" - click that and I believe it restarts Apache after changing the HTTP.CONF file.

Then try accessing PIWIK from the other IP addresses

One word of caution, if this is a production (live/public) server then be careful enabling Apache without checking various other security aspects!
Avatar of Leo

ASKER

ok, i did that, now i am getting the error attached.
piwik.jpg
Avatar of Leo

ASKER

when i click on access Piwik safely, it redirects itself into local host website.
This is because you did the configuration under "localhost".

Follow the directions to enter the below in to the config.ini.php file (located in the config directory of your Piwik installation)

enable_trusted_host_check=0;
Avatar of Leo

ASKER

I have pasted the config file, kindly let me know where to insert that line and should it be;
enable_trusted_host_check = "0"

Config File

; <?php exit; ?> DO NOT REMOVE THIS LINE
; file automatically generated or modified by Piwik; you can manually override the default values in global.ini.php by redefining them in this file.
[database]
host = "127.0.0.1"
username = "admin"
password = "password!"
dbname = "local"
tables_prefix = "piwik_"
charset = "utf8"
enable_trusted_host_check=0;

[superuser]
login = "admin"
password = "125e68dbfa112d145ef619daf8338b0a"
email = "user@domain.com.au"
salt = "f4f5bbd9040783de4afcf682330268e7"

[General]
trusted_hosts[] = "localhost:8080"

[PluginsInstalled]
PluginsInstalled[] = "Login"
PluginsInstalled[] = "CoreAdminHome"
PluginsInstalled[] = "UsersManager"
PluginsInstalled[] = "SitesManager"
PluginsInstalled[] = "Installation"
PluginsInstalled[] = "CorePluginsAdmin"
PluginsInstalled[] = "CoreHome"
PluginsInstalled[] = "Proxy"
PluginsInstalled[] = "API"
PluginsInstalled[] = "Widgetize"
PluginsInstalled[] = "Transitions"
PluginsInstalled[] = "LanguagesManager"
PluginsInstalled[] = "Actions"
PluginsInstalled[] = "Dashboard"
PluginsInstalled[] = "MultiSites"
PluginsInstalled[] = "Referers"
PluginsInstalled[] = "UserSettings"
PluginsInstalled[] = "Goals"
PluginsInstalled[] = "SEO"
PluginsInstalled[] = "UserCountry"
PluginsInstalled[] = "VisitsSummary"
PluginsInstalled[] = "VisitFrequency"
PluginsInstalled[] = "VisitTime"
PluginsInstalled[] = "VisitorInterest"
PluginsInstalled[] = "ExampleAPI"
PluginsInstalled[] = "ExamplePlugin"
PluginsInstalled[] = "ExampleRssWidget"
PluginsInstalled[] = "Provider"
PluginsInstalled[] = "Feedback"
PluginsInstalled[] = "CoreUpdater"
PluginsInstalled[] = "PDFReports"
PluginsInstalled[] = "UserCountryMap"
PluginsInstalled[] = "Live"
PluginsInstalled[] = "CustomVariables"
PluginsInstalled[] = "PrivacyManager"
PluginsInstalled[] = "ImageGraph"
PluginsInstalled[] = "DoNotTrack"
Avatar of Leo

ASKER

i have just added this line...enable_trusted_host_check=0;  in config file it was not there before....is that the correct space to insert that line...
Avatar of Leo

ASKER

I have added this line under [General] ...enable_trusted_host_check=0; on the server i can access it by http://ipaddress:8080/piwik/; but when i try to access on any other machine, i get this error;

Unable to display page  
 
It has not been possible to display the page you requested for the following reason:
Access Denied
Contact your system administrator if you continue to experience difficulties
Avatar of Leo

ASKER

we are sitting behind a proxy server, so in the config file i have added these lines...


[proxy]
host = ip address of proxy server
port = 3182

would this be ok?
Avatar of Leo

ASKER

I have added that, still cant see it on another computer :-(
First, move the `enable_trusted_host_check` in to the [GENERAL] section of your config file, and make sure the format of the statement is the same as the rest of the config file.

Second, remove the line `trusted_hosts[] = "localhost:8080"`

Also, remove anything you added for proxy handling - this refers to reverse proxy use not forward proxy

Next, you need to establish if you can actually reach Apache on 8080 on that server from another IP address in your local network. It is possible that your internal proxy s blocking sites accessed by IP address, or non standard ports.

Create a "Hello World" PHP script in the Apache root folder, and then try to access that from the IP address you are trying to access Piwik from. If it loads OK, then after making the changes above, try accessing Piwik again.

If the `Hello World` does not load, then either your proxy is blocking 8080 or sites accessed by IP address.

You have already established Piwik is running, so troubleshooting access needs to start at accessing Apache from another IP address first, then progress to Piwik.
Avatar of Leo

ASKER

ok will do, where should i save the Hello World file, under:

C:\wamp\www\piwik\config ?


And when i will access it on another computer...should i put this address....

http://serverip:8080/hellowworld.php?
No, put the `Hello World` in the root of your Apache server.

Assuming you have

\
\piwik\

You would place it above piwik, so that when on the server you type:

                http://localhost:8080/helloworld.php

and on the other PCs you would type

                http://serveripaddress:8080/helloworld.php
Avatar of Leo

ASKER

ok i have done that, when i try to access the file on the localhost, i get the page which i have attached, but when i try to access it on any other machine, i get error message :-(

Unable to display page  
 
It has not been possible to display the page you requested for the following reason:
Access Denied
Contact your system administrator if you continue to experience difficulties.
PHP-Version-5.docx
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Leo

ASKER

It worked :-)

I just had to allow the IP address in the safe web list, under internet options....

Just a last quick question before i close this, if i want to see how many users have gone to sub links of a main link, how can i found that out. Example,

Lets say we have a Finance pages under intranet, and under that we have 4 more pages and under that we have forms for clients to fill them out.....how we would know how many users click on which form? can that be found out on Piwik?

thanks for all your help....
Provided you place the PIWIK Javascript tracking code snippet in all the pages you want to track you will be able to see all activity, by either the page "Title" or actual URL (under the Visitors & Actions sections of PIWIK).

Additionally, for forms, you can use "Goals" and have them trigger either automatically based on a specific page/url load or trigger them using Javascript  (read the PIWIK documentation online about "Goals")
Avatar of Leo

ASKER

which file you are referring to? where i can find the PIWIK javascript tracking code file? and where do i have to place it?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial