Video Screencast Help

Client inventory report broken due to deprecated PHP code?

Created: 22 Nov 2013 • Updated: 22 Nov 2013 | 12 comments
This issue has been solved. See solution.

Trying to create a Client Inventory Report, SEPM abruptly answers with an HTTP 500 error. In the Apache log (<SEPM>\apache\logs\reporting.logs) there were some error messages hinting at PHP errors:

[21-Nov-2013 22:45:04 UTC] PHP Fatal error:  Call-time pass-by-reference has been removed in C:\Programme\Symantec\Symantec Endpoint Protection Manager\Inetpub\Reporting\Inventory\inventoryreport6.php on line 9

The suspicious line 9 in inventoryreport6.php:

require("Include/common/connectdb.php"); connectnav(&$conn_id);

I'm not a PHP guy, however in the function call the culprit seemed to be the ampersand (&) in front of "$conn_id". So I removed the ampersand in line 9. Now PHP was complaining about line 909 in the same file. There I removed the ampersand  as well, and then the report worked fine.

Other php files in the Reporting\Inventory folder don't use the ampersand syntax.

OS: Windows Server 2003 SP2
SEPM 12.1.4 (upgraded from 12.1.3)
IE 7

In 12.1.3 (different testing machine, same OS) the client inventory report worked fine with ampersand syntax. After some googling, I found that this syntax for call-by-reference function calls is deprecated. Is it possible that 12.1.4 is using a newer PHP version that does not accept the ampersand method  anymore? And is it possible that the ampersands in Client inventory php file are just artefacts from older versions?

 

 

Operating Systems:

Comments 12 CommentsJump to latest comment

.Brian's picture

From the Reports page, are you just running:

Report type: Computer Status

Select a report: Client Inventory

and click Create Report?

If so, I was able to generate without issue

 

Please click the "Mark as solution" link at bottom left on the post that best answers your question. This will benefit admins looking for a solution to the same problem.

greg12's picture

Yep, that's what I did.

Did you see the ampersands in inventoryreport6.php?

I wonder whether it may be an installation/upgrading issue (but I have no indication for that).

.Brian's picture

The interesting thing is I don't have that file in my logs directory

Please click the "Mark as solution" link at bottom left on the post that best answers your question. This will benefit admins looking for a solution to the same problem.

greg12's picture

It's not in the logs folder:

C:\Program Files\Symantec\Symantec Endpoint Protection Manager\
   Inetpub\Reporting\Inventory\inventoryreport6.php
.Brian's picture

Yep, found it. Copied the line below.

Please click the "Mark as solution" link at bottom left on the post that best answers your question. This will benefit admins looking for a solution to the same problem.

.Brian's picture

Alright, I checked a different location and found it. Checked the same line and found:

require("Include/common/connectdb.php"); connectnav(&$conn_id);

Please click the "Mark as solution" link at bottom left on the post that best answers your question. This will benefit admins looking for a solution to the same problem.

greg12's picture

I checked my 12.1.4 and discovered that it is using PHP 5.4.16. SEPM 12.1.3 uses PHP 5.3.19. Following the PHP documentation, PHP 5.3 accepts the deprecated ampersand syntax, but PHP 5.4 does not.

PHP version is in <SEPM>\php\news.txt.

So why does your Client Inventory report work? Must be a bug cool

.Brian's picture

Alright, so, stupid me. I was on the wrong SEPM (12.1.3). I tried on my 12.1.4 SEPM and it still ran correctly. I checked the log file and found:

require("Include/common/connectdb.php"); connectnav($conn_id);

So maybe just a funky upgrade glitchy thingy cool

Please click the "Mark as solution" link at bottom left on the post that best answers your question. This will benefit admins looking for a solution to the same problem.

SOLUTION
greg12's picture

Sigh.

I thought it were a real bug and the discovery would make me immortal frown

Just a last question: Is your SEPM 12.1.4 a fresh installation or upgraded such as mine?

.Brian's picture

lol

It's been upgraded with each version since 11.0.6

Please click the "Mark as solution" link at bottom left on the post that best answers your question. This will benefit admins looking for a solution to the same problem.

greg12's picture

Just had a look in SEPM_INST.log and found that inventoryreport6.php wasn't replaced. For whatever reason, the upgrader detected that the file was modified, so it did not upgrade it.

Don't know why, perhaps corruption.

.Brian's picture

I would say run a repair but I wouldn't risk it since you've already fixed it. Just wonder if anything else may not be working...

Please click the "Mark as solution" link at bottom left on the post that best answers your question. This will benefit admins looking for a solution to the same problem.