Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

ImportCumulusFile_v2-3.php

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Dennisdg
Posts: 220
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 11 Pro 64 Bit
Location: Camberley

ImportCumulusFile_v2-3.php

Post by Dennisdg »

I have an error log on my hosting provider quote

[26-Feb-2018 00:11:50 UTC] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/*****/public_html/ImportCumulusFile_v2-3.php on line 234
Capture1.JPG
What should be changed from and to?

Thanks

I have changed msql to mysqli

Hope that corrects the error.
You do not have the required permissions to view the files attached to this post.
Dennis

https://g4glp.co.uk

Davis Vantage PRO2
Win 11 Pro 64 bit
User avatar
PaulMy
Posts: 3777
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: ImportCumulusFile_v2-3.php

Post by PaulMy »

Not sure if I am correct as I am just learning about the same thing when I changed to PHP version 7.x
Change mysql to mysqli

Enjoy,
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: ImportCumulusFile_v2-3.php

Post by mcrossley »

That's an old version of the script! Version 3.0 is in the wiki, it uses mysqli and a more efficient bulk insert scheme.
Dennisdg
Posts: 220
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 11 Pro 64 Bit
Location: Camberley

Re: ImportCumulusFile_v2-3.php

Post by Dennisdg »

Thanks both.
Dennis

https://g4glp.co.uk

Davis Vantage PRO2
Win 11 Pro 64 bit
Dennisdg
Posts: 220
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 11 Pro 64 Bit
Location: Camberley

Re: ImportCumulusFile_v2-3.php

Post by Dennisdg »

Mark

Request help please with ImportCumulusFile_3.0.php
Trying to test the import with my browser, http://www.g4glp.co.uk/ImportCumulusFil ... ayfile.txt
I get the following error
Error.JPG
Here are the edited changes to ImportCumulusFile_v3-0.php
3_0.JPG
The command for v2-3, http://www.g4glp.co.uk/ImportCumulusFil ... ayfile.txt
This is what I use in version 2_3
2_3.JPG
Version 2_3 currently populates the SQL db fine using but with the error message shown at the start of this thread.

Thanks in anticipation
You do not have the required permissions to view the files attached to this post.
Dennis

https://g4glp.co.uk

Davis Vantage PRO2
Win 11 Pro 64 bit
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: ImportCumulusFile_v2-3.php

Post by mcrossley »

I really need to see the server error log to determine what has gone wrong there. Error 500 could be anything. :(
Dennisdg
Posts: 220
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 11 Pro 64 Bit
Location: Camberley

Re: ImportCumulusFile_v2-3.php

Post by Dennisdg »

The server is responding its not able to capture errors for v3-0 just returning the error to my browser.

I've just tried both v2-3 and 3-0
Error log from server
error_log.txt
Only v2-3 shown

As v2-3 populates correctly please show me what to change to get msqli accepted.

Tks
You do not have the required permissions to view the files attached to this post.
Dennis

https://g4glp.co.uk

Davis Vantage PRO2
Win 11 Pro 64 bit
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: ImportCumulusFile_v2-3.php

Post by sfws »

I will leave Mark to decide if he wants to reply once more about his script since you have not provided the V3.0 information he requested, but earlier in this thread PaulMy made reference to similar problems he had that were discussed at https://cumulus.hosiene.co.uk/viewtopic.p ... 16#p129269, have you read that exchange?
Dennisdg
Posts: 220
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 11 Pro 64 Bit
Location: Camberley

Re: ImportCumulusFile_v2-3.php

Post by Dennisdg »

No I hadn't seen that thread. Thanks.
Dennis

https://g4glp.co.uk

Davis Vantage PRO2
Win 11 Pro 64 bit
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: ImportCumulusFile_v2-3.php

Post by mcrossley »

I haven't run that script in a long time, but just tried it on my Pi running PHP 7.0 and get an error 500 too. So I'll have look and see what can be done...
Dennisdg
Posts: 220
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 11 Pro 64 Bit
Location: Camberley

Re: ImportCumulusFile_v2-3.php

Post by Dennisdg »

Thank you.
Dennis

https://g4glp.co.uk

Davis Vantage PRO2
Win 11 Pro 64 bit
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: ImportCumulusFile_v2-3.php

Post by mcrossley »

Sent a test version via PM, it now works for me. Note that this version of the script does not need the "table" parameter, you set that within the script itself.
Dennisdg
Posts: 220
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Windows 11 Pro 64 Bit
Location: Camberley

Re: ImportCumulusFile_v2-3.php

Post by Dennisdg »

I've sent you a PM with my result!
Dennis

https://g4glp.co.uk

Davis Vantage PRO2
Win 11 Pro 64 bit
Sadgit
Posts: 192
Joined: Sun 04 Jan 2009 5:56 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Middlesbrough, England

Re: ImportCumulusFile_v2-3.php

Post by Sadgit »

old thread but best I could find and didn't want to start yet another one :)

I get 500 errors for all version 3's but not 2.8.
Mapantz
Posts: 1777
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: ImportCumulusFile_v2-3.php

Post by Mapantz »

I haven't used the import for a while as everything is tikiti-boo. I did run it back several months to see if it worked OK..

Running from web server
Script start: 27/04/20 - 15:34:25
Importing file: Data/Dec19log.txt, To table: Monthly ...
Connected to database OK.
Set MySQL TZ OK.
Processing monthfile...
Target table already exists.
Prepared SQL statement OK.
Inserting data...
Data insert done, 1 rows inserted
Script complete: 27/04/20 - 15:34:26
Execution time: 0.5 secs


That's version 3.2 on PHP v7.3.16

Looks all good?!
Image
Post Reply