Author Topic: config.php  (Read 2763 times)

0 Members and 1 Guest are viewing this topic.

Offline andystorms

  • Member
  • *
  • Posts: 21
config.php
« on: May 14, 2015, 11:14:12 AM »
Hello all,

Can someone tell me what i put into the  Database settings please

i'm getting this error at the momment

Warning: mysqli::mysqli(): (HY000/2002): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /hermes/bosnaweb07a/b1840/ipg.andysuklightningdete/ MyBlitzortung/includes/classes/Db/Mysqli.class.php on line 26 Database: Connect ERROR (2002) Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Thank You
Andrew Gough
My Blitzortung Lightning Detector
Statistics of Blitzortung station Walsall,West Midlands

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4107
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: config.php
« Reply #1 on: May 14, 2015, 12:13:55 PM »
Have you gone through the procedure at Lightningmaps.org? After you log in, there is a MyBlitzortung PHP section. The "Installation" and "Configuration" instructions are the area to focus on.

Can you log into your SQL database with phpMyAdmin? If so, make sure that the lines in the config.php are correct for the SQL database that you set up. They may (or may not) be different from you Blitzortung ID and password, but the config.php entries for the database must agree with what you log in with.

Do you see something like this on the left stub when you log in using phpMyAdmin?

Quote
myblitzortungcities
myblitzortungconf
myblitzortungdensities
myblitzortungraw
myblitzortungstations
myblitzortungstations_stat
myblitzortungstations_strikes
myblitzortungstrikes
myblitzortunguser

Unfortunately, it has been a long time since I set this up....

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline Silversword

  • --Stan Y.
  • Forecaster
  • *****
  • Posts: 558
    • Up Country Maui Weather
Re: config.php
« Reply #2 on: May 14, 2015, 06:02:28 PM »
Hi,

I am kinda new at this also.  What does this do?  Guess I need to take a look and see how this might work with my weather web page.

Any suggestions, Greg or anyone?

Regards,

--Stan Y.
   Maui, Hawaii
Stan Y. - KH6HHG - Maui, Hawaii
 --- Blitzortung ID: 993
 --- FlightRadar24 ID: F-PHOG1

WDL 6.05
MS Windows 7 Pro
Dell Optiplex GX280-Intel Pentium 4 CPU 3.00GHz, 4 GB RAM
Davis Vantage Pro 2+ Wireless
Webcam: Axis 211

Offline andystorms

  • Member
  • *
  • Posts: 21
Re: config.php
« Reply #3 on: May 14, 2015, 09:01:40 PM »
Have you gone through the procedure at Lightningmaps.org? After you log in, there is a MyBlitzortung PHP section. The "Installation" and    "Configuration" instructions are the area to focus on.

Can you log into your SQL database with phpMyAdmin? If so, make sure that the lines in the config.php are   correct for the SQL database that you set up. They may (or may not) be different from you Blitzortung ID and password, but the config.php entries for the database must agree with what you log in with.   


Do you see something like this on the left stub when you log in using phpMyAdmin?


Quote
myblitzortungcities


myblitzortungconf
myblitzortungdensities
myblitzortungraw
myblitzortungstations
myblitzortungstations_stat
myblitzortungstations_strikes
myblitzortungstrikes
myblitzortunguser

Unfortunately, it has been a long time since I set this up....

Greg H.

Where do i find phpMyAdmin please.
Andrew Gough
My Blitzortung Lightning Detector
Statistics of Blitzortung station Walsall,West Midlands

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4107
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: config.php
« Reply #4 on: May 15, 2015, 08:32:47 AM »
Your web hosting service should provide this access to the database administration. It sounds like you did not set up the database. This would cause the issue you are having, since the scripts are trying to contact a non-existent database.

Contact your web host or go through their help pages to find how to access PHP. The configuration guidelines on lightningmaps.org offer examples on how to configure it and what it needs.

I access phpMyAdmin via my Cpanel for my hosted site. If you have Cpanel, you might find the login there. My old web host, e-rice had a separate login for phpMyAdmin, so it may vary at different hosts.

Stan, you can see the result of MyLightingDetection for my site at: http://www.rogerscityweather.com/myblitzortung/

I am by no means an expert at setting up these databases, but following the instructions I was able to get it to work after some  ](*,) effort. My waveform plots, are "broken" for some reason (they used to work), but since these are only visible after a log-in, I just use the lightningmaps.org version instead.

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline andystorms

  • Member
  • *
  • Posts: 21
Re: config.php
« Reply #5 on: May 15, 2015, 10:42:34 AM »
Your web hosting service should provide this access to the database administration. It sounds like you did not set up the database. This would cause the issue you are having, since the scripts are trying to contact a non-existent database.

Contact your web host or go through their help pages to find how to access PHP. The configuration guidelines on lightningmaps.org offer examples on how to configure it and what it needs.

I access phpMyAdmin via my Cpanel for my hosted site. If you have Cpanel, you might find the login there. My old web host, e-rice had a separate login for phpMyAdmin, so it may vary at different hosts.

Stan, you can see the result of MyLightingDetection for my site at: http://www.rogerscityweather.com/myblitzortung/

I am by no means an expert at setting up these databases, but following the instructions I was able to get it to work after some  ](*,) effort. My waveform plots, are "broken" for some reason (they used to work), but since these are only visible after a log-in, I just use the lightningmaps.org version instead.

Greg H.


i'm really confused do you put the files in your files manager or into the mysql  database?
Andrew Gough
My Blitzortung Lightning Detector
Statistics of Blitzortung station Walsall,West Midlands

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4107
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: config.php
« Reply #6 on: May 15, 2015, 11:29:10 AM »
Are you trying to run this on a web site or the PC option? I am referring to the website method. I have not tried it on the local PC and don't have any experience with that method.

Quote
On the own website

    Webspace with PHP >= 5 and MySQL
    At least 100MB of free space for the database and cache files (likely more!)

Important: If your page has a high vistitor count, displaying the strikes on the Google map can put heavy load on your web server (CPU and Database) ! The dynamic map can also be disabled. You can also integrate only parts of MyBlitzortung.
Or: Local installation on a Windows PC

    XAMPP
    MyBlitzortung Update by Daniel Verschueren (LR)

If you are using the website method, did you follow these steps? The web installer should configure your database if it is set up correctly.

Quote
Step 1: Download and unpack

Download the ZIP file and put the contents to a folder on your PC. Now copy these files into a separate folder on your website. As an example we will use http://www.example.com/mylightningdetection in the following steps.

Step 2: Accessing the Installer

The installation script will help you when creating the configuration and subsequently set up the database. The URL would be http://www.example.com/mylightningdetection/install .

Step 2 a)

At first, the necessary data for the database and the blitzortung.org user data has to be set up. For this, the configuration file config.php has to be created and edited by yourself in the folder /mylightningdetection/config.php.

Step 2 b)

In the next the database connection will be tested and after that the necessary tables will be created. If no error messages appeared, then everything worked just fine!

Step 2 c)

Now follows a test run, in which the first data is imported from blitzortung.org. After that, you will see more information for the next steps..

Greg H.



Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline andystorms

  • Member
  • *
  • Posts: 21
Re: config.php
« Reply #7 on: May 15, 2015, 12:23:49 PM »
Are you trying to run this on a web site or the PC option? I am referring to the website method. I have not tried it on the local PC and don't have any experience with that method.

Quote
On the own website

    Webspace with PHP >= 5 and MySQL
    At least 100MB of free space for the database and cache files (likely more!)

Important: If your page has a high vistitor count, displaying the strikes on the Google map can put heavy load on your web server (CPU and Database) ! The dynamic map can also be disabled. You can also integrate only parts of MyBlitzortung.
Or: Local installation on a Windows PC

    XAMPP
    MyBlitzortung Update by Daniel Verschueren (LR)

If you are using the website method, did you follow these steps? The web installer should configure your database if it is set up correctly.

Quote
Step 1: Download and unpack

Download the ZIP file and put the contents to a folder on your PC. Now copy these files into a separate folder on your website. As an example we will use http://www.example.com/mylightningdetection in the following steps.

Step 2: Accessing the Installer

The installation script will help you when creating the configuration and subsequently set up the database. The URL would be http://www.example.com/mylightningdetection/install .

Step 2 a)

At first, the necessary data for the database and the blitzortung.org user data has to be set up. For this, the configuration file config.php has to be created and edited by yourself in the folder /mylightningdetection/config.php.

Step 2 b)

In the next the database connection will be tested and after that the necessary tables will be created. If no error messages appeared, then everything worked just fine!

Step 2 c)

Now follows a test run, in which the first data is imported from blitzortung.org. After that, you will see more information for the next steps..

Greg H.


iv done that but i still get this error message


Warning: mysqli::mysqli(): (HY000/2002): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /hermes/bosnaweb07a/b1840/ipg.andysuklightningdete/mylightningdetctor/includes/classes/Db/Mysqli.class.php on line 26 Database: Connect ERROR (2002) Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Andrew Gough
My Blitzortung Lightning Detector
Statistics of Blitzortung station Walsall,West Midlands

Offline Silversword

  • --Stan Y.
  • Forecaster
  • *****
  • Posts: 558
    • Up Country Maui Weather
Re: config.php
« Reply #8 on: May 15, 2015, 03:22:03 PM »
Thanks Greg for the reply.

Will take a look and see what the instructions bring and see if I can make things work when my time permits.

Still need to put up my E-field system up.  Got all assembled but just need some time to run cables and mount the antenna outside.  Working outside is the issue since it rains almost every day.

Thanks again for all.

Regards,

--Stan Y.
   Maui, Hawaii
Stan Y. - KH6HHG - Maui, Hawaii
 --- Blitzortung ID: 993
 --- FlightRadar24 ID: F-PHOG1

WDL 6.05
MS Windows 7 Pro
Dell Optiplex GX280-Intel Pentium 4 CPU 3.00GHz, 4 GB RAM
Davis Vantage Pro 2+ Wireless
Webcam: Axis 211

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4107
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: config.php
« Reply #9 on: May 15, 2015, 04:24:23 PM »
This might be helpful: http://stackoverflow.com/questions/19712307/mysql-localhost-127-0-0-1

You might try changing "localhost" in the config file to "127.0.0.1".

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline andystorms

  • Member
  • *
  • Posts: 21
Re: config.php
« Reply #10 on: May 15, 2015, 08:43:01 PM »
This might be helpful: http://stackoverflow.com/questions/19712307/mysql-localhost-127-0-0-1

You might try changing "localhost" in the config file to "127.0.0.1".

Greg H.
[/quote
Thank you for your help I got the data base working by putting my server name into where it said localhost.

Many thanks to Greg also for your time and help.

Thanks to all.
Andrew Gough
My Blitzortung Lightning Detector
Statistics of Blitzortung station Walsall,West Midlands

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4107
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: config.php
« Reply #11 on: May 15, 2015, 09:54:42 PM »
That is great news.  \:D/

Greg H.



Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline andystorms

  • Member
  • *
  • Posts: 21
Re: config.php
« Reply #12 on: May 16, 2015, 05:35:56 AM »
Does anyone know why i'm getting this error message.

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Andrew Gough
My Blitzortung Lightning Detector
Statistics of Blitzortung station Walsall,West Midlands