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.5 available

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

Update to OCSNG_UNIX_SERVER-2.3RC

Hello,

After update from OCSNG_UNIX_SERVER-2.1.2  to OCSNG_UNIX_SERVER-2.3RC page http://oscinventory-server/ocsreports is blank.

Apache error log:

[Wed Jan 04 12:57:02 2017] [error] [client 10.62.0.213] PHP Parse error:  syntax error, unexpected '[' in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 410

To fix this error i comment this section in my /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php (on line 410) :

/** function formGroup($inputType, $inputName, $name, $size, $maxlength, $inputValue = "", $class = "", $optionsSelect = [], $arrayDisplayValues = [], $attrBalise = "", $groupAddon = ""){

        echo "<div class='form-group'>";

        echo "<label class='control-label col-sm-2' for='".$inputName."'>".$name."</label>";

        echo "<div class='col-sm-10'>";

        if($inputType == "select"){

                echo "<div class='input-group'>";

                echo "<select name='".$inputName."' id='".$inputName."' class='form-control ".$class."' ".$attrBalise.">";

                foreach ($optionsSelect as $option => $value){

                        echo "<option value='".$option."' ".($inputValue == $option ? 'selected' : '').">".($arrayDisplayValues[$option] ? $arrayDisplayValues[$option] : $option)."</option>";

                }

                echo "</select>";

                if($groupAddon != ""){

                    echo "<span class='input-group-addon' id='".$name."-addon'>".$groupAddon."</span>";    

                }

                echo "</div>";

        }

        else{

                echo "<div class='input-group'>";

                echo "<input type='".$inputType."' name='".$inputName."' id='".$inputName."' size='".$size."' maxlength='".$maxlength."' value='".$inputValue."' class='form-control ".$class."' ".$attrBalise.">";

                if($groupAddon != ""){

                        echo "<span class='input-group-addon' id='".$name."-addon'>".$groupAddon."</span>";

                }

                echo "</div>";

        }

        echo "</div>";

        echo "</div>";

}*/

After that the page is displayed.

Do you have any suggestion?

In the home page i have this warning message:“Your PHP installation is older than version 5.3.7 and will not be compatible with incoming versions (version :  5.3.3 )”

I have to upgrade my php installation?

(I have this packages installed:

php53-cli-5.3.3-26.el5_11

php53-mbstring-5.3.3-26.el5_11

php53-pdo-5.3.3-26.el5_11

php53-mysql-5.3.3-26.el5_11

php53-common-5.3.3-26.el5_11

php53-gd-5.3.3-26.el5_11

php53-5.3.3-26.el5_11

)

Thanks

Serena

asked in OCS Inventory NG server for Unix by (220 points)

4 Answers

0 votes
Hello, Thanks for your report.

yes you can upgrade your php version !
answered by (6.9k points)
0 votes
Hi,

Did you find a solution?

I'm facing the same issue and I've no solution yet.

Thank you
answered by (340 points)
0 votes

I have upgraded both my server and my php version. 

I have installed OCSNG_UNIX_SERVER-2.3RC to solve cpu problem

answered by (220 points)
0 votes

<!--[if gte mso 9]> 120 <![endif]--><!--[if gte mso 9]> Normal 0 21 false false false FR X-NONE X-NONE <![endif]--><!--[if gte mso 9]> <![endif]--><!--[if gte mso 10]>

<![endif]-->


change the declaration of array

function formGroup($inputType, $inputName, $name, $size, $maxlength, $inputValue = "", $class = "", $optionsSelect = [], $arrayDisplayValues = [], $attrBalise = "", $groupAddon = "")

in

function formGroup($inputType, $inputName, $name, $size, $maxlength, $inputValue = "", $class = "", $optionsSelect = array(), $arrayDisplayValues =array(), $attrBalise = "", $groupAddon = "")

and install curl library if error

<!--[if gte mso 9]> 120 <![endif]--><!--[if gte mso 9]> Normal 0 21 false false false FR X-NONE X-NONE <![endif]--><!--[if gte mso 9]> <![endif]--><!--[if gte mso 10]>

<![endif]-->PHP Fatal error:  Call to undefined function curl_init() in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 390

<!--[if gte mso 9]> 120 <![endif]--><!--[if gte mso 9]> Normal 0 21 false false false FR X-NONE X-NONE <![endif]--><!--[if gte mso 9]> <![endif]--><!--[if gte mso 10]>

<![endif]-->sudo apt-get install php5-curl
answered by (140 points)
 
Powered by Question2Answer
...