Topic: [FIXED] Asset Transaction Reports - Error 0.20 Issue

When I try to run the Asset Transaction report I get the following error.
Line 365 is highlighted RED on the Error Screen.

Undefined index:  phpReportsLanguage
Error Type:   E_NOTICE

Rendered Page:   Click here to view contents able to be rendered

Source File:   /srv/www/htdocs/dynamite/includes/php/PHPReports/PHPReportsUtil.php     Line:   365

Line 360:                if(!$sMsg_)
Line 361:                    return;
Line 362:                if($_SESSION["phpReportsLanguage"])
Line 363:                    $sLang = $_SESSION["phpReportsLanguage"];
Line 364:                else
Line 365:                    $sLang = $GLOBALS["phpReportsLanguage"];
Line 366:                if(!$sLang)
Line 367:                    $sLang = "default";
Line 368:   
Line 369:                $sTitle    = $this->_aMsgs["OPS"][$sLang];
Line 370:                $sError    = $this->_aMsgs["ERROR"][$sLang];


Call Stack:

#0 /srv/www/htdocs/dynamite/includes/php/PHPReports/PHPReportsUtil.php(365): QcodoHandleError()
#1 /srv/www/htdocs/dynamite/includes/php/PHPReports/PHPReportMaker.php(98): PHPReportsErrorTr->showMsg()
#2 /srv/www/htdocs/dynamite/reports/asset_transaction_report.php(329): PHPReportMaker->PHPReportMaker()
#3 /srv/www/htdocs/dynamite/includes/qcodo/_core/qform/QFormBase.class.php(657): AssetTransactionListForm->btnGenerate_Click()
#4 /srv/www/htdocs/dynamite/includes/qcodo/_core/qform/QFormBase.class.php(774): QFormBase->TriggerMethod()
#5 /srv/www/htdocs/dynamite/includes/qcodo/_core/qform/QFormBase.class.php(242): QFormBase->TriggerActions()
#6 /srv/www/htdocs/dynamite/reports/asset_transaction_report.php(471): QFormBase::Run()

Re: [FIXED] Asset Transaction Reports - Error 0.20 Issue

Any resolution to this?

Re: [FIXED] Asset Transaction Reports - Error 0.20 Issue

Hi

I get the same error. Any resolution yet?

Re: [FIXED] Asset Transaction Reports - Error 0.20 Issue

Please can you help me im getting  the same error to i need to get this working by next week

Re: [FIXED] Asset Transaction Reports - Error 0.20 Issue

Could you test commenting out the offending lines of code? Lines 364 and 365 of includes/php/PHPReports/PHPReportsUtil.php.

Example:

function showMsg($sMsg_=null,$oParms_=null){
            if(!$sMsg_)
                return;
            if($_SESSION["phpReportsLanguage"])
                $sLang = $_SESSION["phpReportsLanguage"];
            //else
            //    $sLang = $GLOBALS["phpReportsLanguage"];
Justin Sinclair

Got Inventory? Get Tracmor.

Re: [FIXED] Asset Transaction Reports - Error 0.20 Issue

i have commented out line 364 and 365 this is the error im getting

Line 366 in Red

Line 361:                    return;
Line 362:                if($_SESSION["phpReportsLanguage"])
Line 363:                    $sLang = $_SESSION["phpReportsLanguage"];
Line 364:                //else
Line 365:                    //$sLang = $GLOBALS["phpReportsLanguage"];
Line 366:                if(!$sLang)
Line 367:                    $sLang = "default";
Line 368:   
Line 369:                $sTitle    = $this->_aMsgs["OPS"][$sLang];
Line 370:                $sError    = $this->_aMsgs["ERROR"][$sLang];
Line 371:                $sMsg        = $this->_aMsgs[$sMsg_][$sLang];

Re: [FIXED] Asset Transaction Reports - Error 0.20 Issue

dev1andy wrote:

i have commented out line 364 and 365 this is the error im getting

Line 366 in Red

Line 361:                    return;
Line 362:                if($_SESSION["phpReportsLanguage"])
Line 363:                    $sLang = $_SESSION["phpReportsLanguage"];
Line 364:                //else
Line 365:                    //$sLang = $GLOBALS["phpReportsLanguage"];
Line 366:                if(!$sLang)
Line 367:                    $sLang = "default";
Line 368:   
Line 369:                $sTitle    = $this->_aMsgs["OPS"][$sLang];
Line 370:                $sError    = $this->_aMsgs["ERROR"][$sLang];
Line 371:                $sMsg        = $this->_aMsgs[$sMsg_][$sLang];


I was able to get by this by commenting out line number 366.. however after that i get an error as follows

Invalid argument supplied for foreach()
Error Type:   E_WARNING   
Rendered Page:   Click here to view contents able to be rendered
Source File:   C:\wamp\www\tracmor\reports\asset_transaction_report.php         Line:   337   

Line 332:              //some data to show in the report
Line 333:              $sSql = AssetTransaction::LoadArrayBySearch(true, $this->.....snipped..
Line 334:              $strXmlColNameByCustomField = "";
Line 335:              $strXmlFieldByCustomField = "";
Line 336:              $intCustomFieldCount = 0;
Line 337:              foreach ($this->chkCustomFieldArray as $chkCustomField) {
Line 338:                if ($chkCustomField->Checked) {
Line 339:                  $strXmlColNameByCustomField .= "<COL CELLCLASS='report_column_header'>".$chkCustomField->Text."</COL>";
Line 340:                  $strXmlFieldByCustomField .= "<COL TYPE='FIELD' CELLCLASS='report_cell'>__".$chkCustomField->ActionParameter."</COL>";
Line 341:                  $intCustomFieldCount++;
Line 342:                }

Re: [FIXED] Asset Transaction Reports - Error 0.20 Issue

Thanks for the information.  It looks like this is in fact a bug (maybe two different bugs).  I am not yet sure about the phpReportsLanguage error,  but the one reported by RobH can be resolved by creating an Asset custom field.  An issue has been created for this bug here.

Justin Sinclair

Got Inventory? Get Tracmor.

Re: [FIXED] Asset Transaction Reports - Error 0.20 Issue

Thank you for your reply

i have commenting out line number 364 ,365 ,366 i now get a error

OOOOPS, THERE'S AN ERROR HERE.

There is no XSLT processor available. Check if you compiled PHP with --enable-xslt and the Sablotron library (for PHP4) or with --enable-xsl (for PHP5).

This error message was generated by phpReports.

Re: [FIXED] Asset Transaction Reports - Error 0.20 Issue

I have installed the PHP XSL and the asset Transaction report are now working

Thanks for all you help

Re: [FIXED] Asset Transaction Reports - Error 0.20 Issue

hi

I have install xsl looks beter now - don't get the failure anymore, but now I get a blank page with a "could not connect" error when i run the report

any ideas?

Last edited by matt (2009-07-15 04:37:13)

Re: [FIXED] Asset Transaction Reports - Error 0.20 Issue

Any fixes for this problem yet. I still get the "could not connect " error after installing the PHP XSL

Re: [FIXED] Asset Transaction Reports - Error 0.20 Issue

I am running RHEL 5 with Apache and MySql installed.  In order to resolve this issue, I had to install the XML module for PHP.  To do this I ran the following command

yum install php-xml

After restarting the httpd service I was able to generate reports.

Re: [FIXED] Asset Transaction Reports - Error 0.20 Issue

Had the same problem generating reports in Ubuntu Lucid. (Undefined index:  phpReportsLanguage
Error Type:   E_NOTICE).  The following solved the problem:

apt-get install php5-xsl

thumbs up!  Thanks forum!

Re: [FIXED] Asset Transaction Reports - Error 0.20 Issue

I was getting the phpReportsLanguage Error

I installed php5-xsl

Now I get:

Error in PHP Script
/reports/asset_transaction_report.php     PHP Version: 5.3.2-1ubuntu4.9;  Zend Engine Version: 2.3.0;  Qcodo Version: 0.3.32 (Qcodo Beta 3)
Application: Apache/2.2.14 (Ubuntu);  Server Name: 10.224.3.47
HTTP User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0

Call-time pass-by-reference has been deprecated
Error Type:   Unknown

Source File:   /var/www/includes/php/PHPReports/PHPReportMaker.php(273) : eval()'d code     Line:   295


Call Stack:

#0 /var/www/includes/php/PHPReports/PHPReportMaker.php(273): QcodoHandleError()
#1 /var/www/includes/php/PHPReports/PHPReportMaker.php(273): PHPReportMaker::run()
#2 /var/www/reports/asset_transaction_report.php(426): PHPReportMaker->run()
#3 /var/www/includes/qcodo/_core/qform/QFormBase.class.php(657): AssetTransactionListForm->btnGenerate_Click()
#4 /var/www/includes/qcodo/_core/qform/QFormBase.class.php(774): QFormBase->TriggerMethod()
#5 /var/www/includes/qcodo/_core/qform/QFormBase.class.php(242): QFormBase->TriggerActions()
#6 /var/www/reports/asset_transaction_report.php(475): QFormBase::Run()


Any ideas?

Last edited by jadobbins (2011-07-26 11:40:59)

Re: [FIXED] Asset Transaction Reports - Error 0.20 Issue

jadobbins wrote:

Call-time pass-by-reference has been deprecated
Error Type:   Unknown

Source File:   /var/www/includes/php/PHPReports/PHPReportMaker.php(273) : eval()'d code     Line:   295


Call Stack:

#0 /var/www/includes/php/PHPReports/PHPReportMaker.php(273): QcodoHandleError()
#1 /var/www/includes/php/PHPReports/PHPReportMaker.php(273): PHPReportMaker::run()
#2 /var/www/reports/asset_transaction_report.php(426): PHPReportMaker->run()
#3 /var/www/includes/qcodo/_core/qform/QFormBase.class.php(657): AssetTransactionListForm->btnGenerate_Click()
#4 /var/www/includes/qcodo/_core/qform/QFormBase.class.php(774): QFormBase->TriggerMethod()
#5 /var/www/includes/qcodo/_core/qform/QFormBase.class.php(242): QFormBase->TriggerActions()
#6 /var/www/reports/asset_transaction_report.php(475): QFormBase::Run()


Any ideas?

This is kind of a quick fix I used on my install, YMMV. I set allow_call_time_pass_reference to On in my php.ini, and restarted Apache. Got rid of the depreciated error for me.

Also it might help to know that I am running PHP 5.3.2 on Centos 6.

Hope this helps!

Last edited by smiller (2011-07-28 08:25:52)