Glad to hear someone has made use of my code.
If I make any useful changes, I'll post back here, with a text file indicating what has changed, in which files.
One thing I did forget to include in the ZIP was the Javascript library I used with the non-Google graphing code.
I'd tried that before I settled on the Google library. But for anyone wanting a standalone package independent of the Internet, ie using it on their own local server, they might want that package, which is chartjs. https://www.chartjs.org/
Hello Ken
Thank you very much for putting together this PHP package.
I am having some troubles and believe you can easily point me in the right direction.
I'm pretty sure my problem is that im not getting things in the right place.
PHP code is new to me i'm mostly a Bash kinda programmer.
Here are my details.
I have a NFO Servers Web Host.
I have a SQL Database Named -->> bigcountry_STATION
Hostname: localhost (
for external connections, use STATION1.weather.site.nfoservers.com)
Port: not needed for localhost connections;
3306 for external connectionsOn my server I have -->> Copy the contents of the parent ws directory into my public_html directory.
The full path to the copied files is. -->> /usr/www/bigcountry/public/ws
The data path is copied to full path -->> /usr/www/bigcountry/public/data
I am sure the files are in the proper location.
I believe my problem is not know what to put where in the ws/classes/config.php
So if you can verify the following and let me know whats wrong it would be much appreciated.#1 ECOWITT.NET PASSWORD ?? LINE 13 & 14
public $kensId = 'xxx'; // ***
public $petesId = 'xxxyx'; // ***
Is this entry supposed to be my Ecowitt Login Name? Or my Ecowitt Password for logging into ecowitt.netYou said in one post
(the IDs in there are the Ecowitt passkey)So I think I only need 1 entry here or do i enter the same password i use to login to ecowitt.net for both?
------------------------------------------------------------------------------------------------------------------------
#2 public $dbhost = 'localhost';Do I Need to change this to
STATION1.weather.site.nfoservers.comOr due to the fact that the .php file is local on my server i can just use localhost?
-------------------------------------------------------------------------------------------------------------------------
#3 Figuring out what is what. public $dbname = 'waggies_ws'; // ***
public $dbtablenames = array('waggies', 'pete'); // ***
public $dbtablename = 'waggies'; // ***
public $dbpassword = 'xxx'; // ***
public $showInside = false;
public $authCookie = 'insider';
public $authPassword = 'xxx'; // ***
A) dbname -->> Is this the name of the database i created which is
bigcountry_STATION Or is this the username for logging into mysql.?
B) dbtablenames -->> Is this any name I choose and will end up being the name assigned to the table that is created?
Or is this the username for logging into mysql.?
C) dbtablename -->> Is this any name I choose and will end up being the name assigned to the table that is created?
Or is this the username for logging into mysql.? or Is this the name of the database i created which is
bigcountry_STATION D) dbpassword -->> I would expect that this is the password used to login to the database i created.
bigcountry_STATION E) authPassword -->> IS the the password i use to upload and download files through SFTP or SCP, ? Or is this where the ecowitt password goes and the
public $kensId = 'xxx'; // ***
public $petesId = 'xxxyx'; // ***
ARE actually supposed to be my ecowitt login name?
Can you please Label the variables with a comment so im not guessing?
This is the error i get when i try to run
http://station1.weather.site.nfoservers.com/ws/admin/setup.phpFatal error: Uncaught PDOException: SQLSTATE[HY000] [1044] Access denied for user 'bigcountry'@'localhost' to database 'bigcountry' in /usr/www/bigcountry/public/ws/classes/Db.php:18 Stack trace: #0 /usr/www/bigcountry/public/ws/classes/Db.php(18): PDO->__construct('mysql:dbname=bi...', 'bigcountry', 'mypassword') #1 /usr/www/bigcountry/public/ws/admin/setup.php(31): Db->__construct() #2 {main} thrown in /usr/www/bigcountry/public/ws/classes/Db.php on line 18
It seems to be calling
dbname 2 times.
Once as my sql username and then calling the database the same name.
it should be Access denied for user 'bigcountry'@'localhost' to database bigcountry_STATION
Not Access denied for user 'bigcountry'@'localhost' to database 'bigcountry'
Please Clarify and be easy on me. PHP is new to me, I'm more well versed in BASH.