Comment 5 for bug 1581207

Revision history for this message
Lucas Brescia (lbrescia) wrote : Re: [Bug 1581207] Re: Export data hardware empty

Ron,

I just change MYSQL_ASSOC to MYSQLI_ASSOC and working great, tks so much
for your help...

2016-06-03 12:10 GMT-03:00 Ron <email address hidden>:

> 1) Either change MYSQL_ASSOC to MYSQLI_ASSOC or remove it - it is an
> optional parameter.
>
> Line 114 of ms_cvs.php, changed this
>
> while( $cont = mysqli_fetch_array($result,MYSQL_ASSOC) ) {
>
> to that: while( $cont = mysqli_fetch_array($result) ) {
>
> After this, export works, but still error on line 86 in this file.
>
> Change this:
>
> while( $cont = mysqli_fetch_array($result,MYSQL_ASSOC) ) {
>
> to that:
>
> while( $cont = mysqli_fetch_array($result) ) {
>
> Now, export should work and error should vanish from apache2 error.log
>
> Please also note that according to the developers, ocsinventory is not
> supposed to support php7.0 - it has improved php 5.5 support so be
> ready to run into errors with php 7 ...
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1581207
>
> Title:
> Export data hardware empty
>
> Status in OCS Inventory: OCSReports:
> New
>
> Bug description:
> When a try to export data in link donwload the system export empty
> informotions, i look in log o apache and the same said this error:
>
> Version ocs inventory: 2.2 Linux , Debian.
>
> [Thu May 12 16:27:55.349295 2016] [:error] [pid 41987] [client
> 192.168.99.139:49280] PHP Warning: mysqli_fetch_array() expects
> parameter 2 to be integer, string given in /usr/share/ocsinventory-
> reports/ocsreports/plugins/main_sections/ms_export/ms_csv.php on line
> 114
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1581207/+subscriptions
>

--
           Lucas Brescia de Moura