surfrock66 / torque

A set of tools used with the Torque app for Android to store OBD2 data in MySQL, view GPS data from Torque on a map in real time using the Google Maps JavaScript API, plot OBD2 data in time series charts, and export the data to CSV or JSON.
Other
43 stars 23 forks source link

Use mysqli instead of mysql #12

Closed smasher816 closed 7 years ago

smasher816 commented 7 years ago
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/torque/db.php:7 Stack trace: #0 /srv/http/torque/session.php(7): require_once() #1 {main} thrown in /srv/http/torque/db.php on line 7

http://php.net/manual/en/migration55.deprecated.php

surfrock66 commented 7 years ago

Huh, what's your OS and php level? Mine is still working, but it seems there's a need to migrate...I don't know when I'm gonna get to finishing this as my coding time is 0 right now, if you want to patch it I'll certainly accept it.

surfrock66 commented 7 years ago

It looks like most of the commands in torque can just be straight replaced with the "i" equivalent...if I can get the baby to sleep tonight I'll test a patch.

surfrock66 commented 7 years ago

OK, I think this is fixed in these 2 commits:

https://github.com/surfrock66/torque/commit/05f76edce95bec5f3331a3913ccb10c406f3b47f https://github.com/surfrock66/torque/commit/44bc4606d01c69faaf474c7816268776773eb056

It was a big pain in the ass...the i variants require a different order of arguments for no reason. I scrubbed everything I could find. Please help test.