Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3044 7 December 2018. See the Wiki for download

ImportCumulusFile_v2-3.php

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

Moderator: daj

Post Reply
Dennisdg
Posts: 124
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Win 7 Ultimate
Location: Camberley
Contact:

ImportCumulusFile_v2-3.php

Post by Dennisdg » Mon 26 Feb 2018 6:25 pm

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://www.g4glp.co.uk

Davis Vantage PRO2
Windows 7 Pro

User avatar
PaulMy
Posts: 1731
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: ImportCumulusFile_v2-3.php

Post by PaulMy » Mon 26 Feb 2018 7:04 pm

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

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: ImportCumulusFile_v2-3.php

Post by mcrossley » Mon 26 Feb 2018 7:51 pm

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: 124
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Win 7 Ultimate
Location: Camberley
Contact:

Re: ImportCumulusFile_v2-3.php

Post by Dennisdg » Mon 26 Feb 2018 8:45 pm

Thanks both.
Dennis

https://www.g4glp.co.uk

Davis Vantage PRO2
Windows 7 Pro

Dennisdg
Posts: 124
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Win 7 Ultimate
Location: Camberley
Contact:

Re: ImportCumulusFile_v2-3.php

Post by Dennisdg » Thu 01 Mar 2018 12:53 pm

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://www.g4glp.co.uk

Davis Vantage PRO2
Windows 7 Pro

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: ImportCumulusFile_v2-3.php

Post by mcrossley » Thu 01 Mar 2018 2:31 pm

I really need to see the server error log to determine what has gone wrong there. Error 500 could be anything. :(

Dennisdg
Posts: 124
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Win 7 Ultimate
Location: Camberley
Contact:

Re: ImportCumulusFile_v2-3.php

Post by Dennisdg » Thu 01 Mar 2018 3:41 pm

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://www.g4glp.co.uk

Davis Vantage PRO2
Windows 7 Pro

sfws
Posts: 462
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Customised mix of Fine Offset
Operating System: Tempermental Win. 10 PC
Location: UK

Re: ImportCumulusFile_v2-3.php

Post by sfws » Thu 01 Mar 2018 4:13 pm

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 http://sandaysoft.com/forum/viewtopic.p ... 16#p129269, have you read that exchange?

Dennisdg
Posts: 124
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Win 7 Ultimate
Location: Camberley
Contact:

Re: ImportCumulusFile_v2-3.php

Post by Dennisdg » Thu 01 Mar 2018 4:43 pm

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

https://www.g4glp.co.uk

Davis Vantage PRO2
Windows 7 Pro

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: ImportCumulusFile_v2-3.php

Post by mcrossley » Thu 01 Mar 2018 5:10 pm

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: 124
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Win 7 Ultimate
Location: Camberley
Contact:

Re: ImportCumulusFile_v2-3.php

Post by Dennisdg » Thu 01 Mar 2018 5:15 pm

Thank you.
Dennis

https://www.g4glp.co.uk

Davis Vantage PRO2
Windows 7 Pro

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: ImportCumulusFile_v2-3.php

Post by mcrossley » Thu 01 Mar 2018 5:50 pm

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: 124
Joined: Tue 07 Feb 2012 9:42 am
Weather Station: Davis Vantage PRO2
Operating System: Win 7 Ultimate
Location: Camberley
Contact:

Re: ImportCumulusFile_v2-3.php

Post by Dennisdg » Thu 01 Mar 2018 6:25 pm

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

https://www.g4glp.co.uk

Davis Vantage PRO2
Windows 7 Pro

Post Reply