Skip to content

Conversation

@bbs2web
Copy link

@bbs2web bbs2web commented Oct 28, 2020

Changed mysql_ calls depreciated in PHP 7 to mysqli_

Signed-off-by: bbs2web bbs2web@hotmail.com

Signed-off-by: bbs2web <bbs2web@hotmail.com>
@bbs2web
Copy link
Author

bbs2web commented Oct 28, 2020

The above patches fix issues with running A2Billing on PHP 7, specifically the CSV and XML export functionality which generated the following errors:

[Tue Oct 27 10:53:59.619955 2020] [php7:error] [pid 23279] [client 41.79.23.231:55804] PHP Fatal error:  Uncaught Error: Call to undefined function mysql_pconnect() in /usr/local/src/a2billing/common/lib/iam_csvdump.php:218\nStack trace:\n#0 /usr/local/src/a2billing/common/lib/iam_csvdump.php(272): iam_csvdump->_db_connect_mysql('a2billing', 'a2billing', 'secret', 'localhost')\n#1 /usr/local/src/a2billing/common/lib/iam_csvdump.php(454): iam_csvdump->_generate_csv_mysql('SELECT t1.start...', 'a2billing', 'a2billing', 'secret', 'localhost')\n#2 /usr/local/src/a2billing/admin/Public/export_csv.php(62): iam_csvdump->dump('SELECT t1.start...', 'Dump_2020-10-27', 'csv', 'a2billing', 'a2billing', 'secret', 'localhost', 'mysql')\n#3 {main}\n  thrown in /usr/local/src/a2billing/common/lib/iam_csvdump.php on line 218, referer: https://a2billing.site.local/admin/Public/call-log-customers.php?s=1&t=0&order=t1.starttime&sens=DESC&current_page=0

[Wed Oct 28 14:16:32.134663 2020] [php7:error] [pid 18627] [client 41.79.23.231:47821] PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_field_name() in /usr/local/src/a2billing/common/lib/iam_csvdump.php:396\nStack trace:\n#0 /usr/local/src/a2billing/common/lib/iam_csvdump.php(376): iam_csvdump->_generate_msqlxml(Object(mysqli_result))\n#1 /usr/local/src/a2billing/common/lib/iam_csvdump.php(462): iam_csvdump->_generate_xml_mysql('SELECT t1.start...', 'a2billing', 'a2billing', 'secret', 'localhost')\n#2 /usr/local/src/a2billing/admin/Public/export_csv.php(66): iam_csvdump->dump('SELECT t1.start...', 'Dump_2020-10-28', 'xml', 'a2billing', 'a2billing', 'secret', 'localhost', 'mysql')\n#3 {main}\n  thrown in /usr/local/src/a2billing/common/lib/iam_csvdump.php on line 396, referer: https://a2billing.site.local/admin/Public/call-log-customers.php?s=1&t=0&order=t1.starttime&sens=DESC&current_page=4&entercustomer_num=&posted=1&Period=&frommonth=&fromstatsmonth=&tomonth=&tostatsmonth=&fromday=true&fromstatsday_sday=28&fromstatsmonth_sday=2020-10&today=true&tostatsday_sday=28&tostatsmonth_sday=2020-10&dsttype=1&srctype=1&clidtype=&channel=&resulttype=min&dst=&src=&clid=&terminatecauseid=ANSWER&choose_calltype=-1&entercustomer=1&enterprovider=&entertrunk=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants