Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Deploy Software doesn't work - PHP Warning

Hi Everyone, first of all I apologyze for my english. I hope you guys can understand my problem.

I've try to deploy software, but always had same error (and i'm not sure if others error can be show up later)

the SSL_error_log show this:

[Thu Oct 07 13:46:29.769623 2021] [php7:warn] [pid 8238] [client xx.xx.xx.xx:58428] PHP Warning:  fclose() expects parameter 1 to be resource, bool given in /usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/ms_teledeploy/ms_tele_activate.php on line 94, referer: https://ocsinventario:8443/ocsreports/index.php?function=tele_activate&active=1633625174

I have installed php 7.4 (and before, 7.3 with the same problem)

And status for deploy still on "Waiting notification".
I think is the version of PHP, but i don't know what version of PHP doesn't have this error.

Or maybe is something else?

PS: Just in case, ms_tele_activate.php(line 94):

 65     $opensslOk = function_exists("openssl_open");

 66

 67     if ($opensslOk) {

 68         $httpsOk = @fopen("https://" . $protectedPost["HTTPS_SERV"] . "/" . $protectedGet["active"] . "/info", "r");

 69     } else {

 70         $error = "WARNING: OpenSSL for PHP is not properly installed. Your https server validity was not checked !<br>";

 71     }

 72

 73     if (!$httpsOk) {

 74         $error .= $l->g(466) . " https://" . $protectedPost["HTTPS_SERV"] . "/" . $protectedGet["active"] . "/<br>";

 75     } else {

 76         fclose($httpsOk);

 77     }

 78

 79     if ($protectedPost['choix_activ'] == "MAN") {

 80         $reqFrags = "SELECT fragments FROM download_available WHERE fileid='" . $protectedGet["active"] . "'";

 81         $resFrags = mysqli_query($_SESSION['OCS']["readServer"], $reqFrags);

 82         $valFrags = mysqli_fetch_array($resFrags);

 83         $fragAvail = ($valFrags["fragments"] > 0);

 84         if ($fragAvail) {

 85             $fragOk = @fopen("http://" . $protectedPost["FILE_SERV"] . "/" . $protectedGet["active"] . "/" . $protectedGet["active"] . "-1", "r");

 86         } else {

 87             $fragOk = true;

 88         }

 89     } else {

 90         $fragOk = true;

 91     }

 92

 93     if ($fragAvail) {

 94         fclose($fragOk);

 95     }


Regards

in OCS Inventory NG server for Unix by (120 points)
edited by

Please log in or register to answer this question.

 
Powered by Question2Answer
...