Simple Invoices logo
    • CommentAuthormttvnst
    • CommentTimeJan 12th 2008 edited
     permalink
    Hello,
    I have been getting the following error when attempting to generate reports:

    setUser($db_user); $oRpt->setPassword($db_password); $oRpt->setConnection($db_host); $oRpt->setDatabaseInterface("mysql"); // set as $db_server in trunk $oRpt->setDatabase($db_name); ?>
    Fatal error: Call to a member function setXML() on a non-object in C:\wamp\www\simpleinvoices\modules\reports\report_sales_customers_total.php on line 11


    System info:
    Win XP
    WampServer 2.0 (release 11/21/07)
    Apache: 2.2.6
    MySQL: 5.0.45
    PHP: 5.2.5
    Simple Invoices 12-31-07

    Have never used PHP or Apache or MySQL.

    Thanks in advance for any help.
    • CommentAuthorjustin
    • CommentTimeJan 13th 2008 edited
     permalink
    Hey Mttvnst,

    are you using Simple Invoices from the last release ( on sourceforge) or from svn?

    Cheers

    Justin
    • CommentAuthorjustin
    • CommentTimeJan 13th 2008 edited
     permalink
    also mttvnst

    you may have to enable the php extension xsl in your wamp configuration, im not infornt of a winxp machine at the moment so can;t tell you exactly how to do it

    can anyone else with winxp let mttvnst know how to enable xsl?

    Cheers
    • CommentAuthormttvnst
    • CommentTimeJan 13th 2008 edited
     permalink
    Simpleinvoices version is latest downloaded from Sourceforge.

    I have already enabled php_xsl in Wampserver and I am able to export an invoice in XSL format and open it in Microsoft excel. The extension php_xmlrpc is also enabled.

    -----
    The error references the function on line 11 of the php file, that line is as follows:

    $oRpt->setXML("./modules/reports/report_sales_customers_total.xml");

    A similar error occurs for all report generation requests, just references a different function.

    Thanks,
    mttvnst
    • CommentAuthorapmuthu
    • CommentTimeJan 14th 2008 edited
     permalink
    • CommentAuthormicoots
    • CommentTimeJan 16th 2008 edited
     permalink
    • CommentAuthormicoots
    • CommentTimeJan 16th 2008 edited
     permalink
    Hi,

    Further to my comment below:


    I've upgraded from simpleinvoices-20070525.zip to simpleinvoices_20071231.zip and am getting the error above. Note that the reports all worked fine before my upgrade.

    No matter which report I choose it fails with:

    setUser($db_user); $oRpt->setPassword($db_password); $oRpt->setConnection($db_host); $oRpt->setDatabaseInterface("mysql"); // set as $db_server in trunk $oRpt->setDatabase($db_name); ?>

    I'm using:

    System info:
    LAMP Xen VM
    Apache: 2.0.59
    MySQL: 5.0.45
    PHP: 5.2.5
    Simple Invoices 12-31-07

    Should I take your recommendation and patch to the SVN?

    Thanks.

    Michael.


    I upgraded to the SVN version and still get the error:

    setUser($db_user); $oRpt->setPassword($db_password); $oRpt->setConnection($db_host); $oRpt->setDatabaseInterface("mysql"); // set as $db_server in trunk $oRpt->setDatabase($db_name); ?>

    when attempting to access a report.

    Anything I can do to help trouble-shoot this problem please let me know.

    Michael.
    • CommentAuthormicoots
    • CommentTimeJan 16th 2008 edited
     permalink
    Hi,

    Just a little more detail to this:


    setUser($db_user); $oRpt->setPassword($db_password); $oRpt->setConnection($db_host); $oRpt->setDatabaseInterface("mysql"); // set as $db_server in trunk $oRpt->setDatabase($db_name); ?>


    My ssl_error_log shows:

    [Wed Jan 16 23:15:10 2008] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/html/billing/include/sql_queries.php on line 3, referer: https://example.domain.com/billing/index.php?module=payments&view=manage />[Wed Jan 16 23:15:10 2008] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/html/billing/include/sql_queries.php on line 28, referer: https://example.domain.com/billing/index.php?module=payments&view=manage />[Wed Jan 16 23:15:10 2008] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/html/billing/include/sql_queries.php on line 28, referer: https://example.domain.com/billing/index.php?module=payments&view=manage />[Wed Jan 16 23:15:10 2008] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined variable: defaults in /srv/www/html/billing/include/sql_patches.php on line 563, referer: https://example.domain.com/billing/index.php?module=payments&view=manage />[Wed Jan 16 23:15:10 2008] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined variable: defaults in /srv/www/html/billing/include/sql_patches.php on line 567, referer: https://example.domain.com/billing/index.php?module=payments&view=manage />[Wed Jan 16 23:15:10 2008] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined variable: defaults in /srv/www/html/billing/include/sql_patches.php on line 571, referer: https://example.domain.com/billing/index.php?module=payments&view=manage />[Wed Jan 16 23:15:10 2008] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined variable: defaults in /srv/www/html/billing/include/sql_patches.php on line 575, referer: https://example.domain.com/billing/index.php?module=payments&view=manage />[Wed Jan 16 23:15:10 2008] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined variable: defaults in /srv/www/html/billing/include/sql_patches.php on line 579, referer: https://example.domain.com/billing/index.php?module=payments&view=manage />[Wed Jan 16 23:15:10 2008] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined variable: defaults in /srv/www/html/billing/include/sql_patches.php on line 583, referer: https://example.domain.com/billing/index.php?module=payments&view=manage />[Wed Jan 16 23:15:10 2008] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined variable: defaults in /srv/www/html/billing/include/sql_patches.php on line 587, referer: https://example.domain.com/billing/index.php?module=payments&view=manage />[Wed Jan 16 23:15:10 2008] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/html/billing/include/sql_queries.php on line 28, referer: https://example.domain.com/billing/index.php?module=payments&view=manage />[Wed Jan 16 23:15:10 2008] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined variable: oRpt in /srv/www/html/billing/modules/reports/report_biller_total.php on line 7, referer: https://example.domain.com/billing/index.php?module=payments&view=manage />[Wed Jan 16 23:15:10 2008] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Call to a member function setXML() on a non-object in /srv/www/html/billing/modules/reports/report_biller_total.php on line 7, referer: https://example.domain.com/billing/index.php?module=payments&view=manage />
    and this is for _one_ request for a report.

    Regards,

    Michael.
    • CommentAuthorjustin
    • CommentTimeJan 18th 2008 edited
     permalink
    Hey Michael/mttvnst,

    reports have got some problems - been lots of mods recently

    i'm going to blow them up soon and redo it so it all works all nice - no timeframe as yet - but it will happen soon - stay tuned

    Cheers

    Justin
    • CommentAuthorjustin
    • CommentTimeJan 18th 2008 edited
     permalink
    worst case scenario if you need reports asap is to grab an older version of Simple Invoices and give it a go - the reports should run fine
    • CommentAuthorapmuthu
    • CommentTimeJan 19th 2008 edited
     permalink
    Patch to the latest SVN and see that the LOGGING variable exists in the system defaults table and is commented out in the config.inc.php
    Use all the default data in the sql tables. Hope you have set the variables correctly in the config/config.inc.php
    The upgrade should be a total wipe out and full upload. Also see that the cache folder is writeable by the webserver process. In windows it should generally be a non-issue.
    • CommentAuthormicoots
    • CommentTimeJan 21st 2008 edited
     permalink
    Hi,

    I'm testing this now:


    Patch to the latest SVN and see that the LOGGING variable exists in the system defaults table and is commented out in the config.inc.php
    Use all the default data in the sql tables. Hope you have set the variables correctly in the config/config.inc.php
    The upgrade should be a total wipe out and full upload. Also see that the cache folder is writeable by the webserver process. In windows it should generally be a non-issue.


    Checking LOGGING variable in the "si_system_defaults" table:

    21 logging 0

    Checking the config.php:

    //To turn logging on set the below to true - not needed as it is set in System Defaults
    #define("LOGGING",false);
    #define("LOGGING",true);

    cache folder writeable by the web server process:

    drwxrwxrwx 2 apache apache 4096 Jan 21 11:23 cache

    I'm not sure what you mean by "The upgrade should be a total wipe out and full upload.". I downloaded the latest SVN patch and copied across the files to the si web directory. I then logged into SI and ran the "Options -> Database Upgrade Manager".

    When I go to any report I get:

    setUser($db_user); $oRpt->setPassword($db_password); $oRpt->setConnection($db_host); $oRpt->setDatabaseInterface("mysql"); // set as $db_server in trunk $oRpt->setDatabase($db_name); ?>

    Regards,

    Michael.
    • CommentAuthorapmuthu
    • CommentTimeJan 21st 2008 edited
     permalink
    I have placed the entire current release's SVN 1167 fileset temporarily here - 5.68MB
    Kindly download and setup the ./config/config.inc.php and make the ./cache and ./database_backups folders writeable by the webserver process.
    I would like to get to the bottom of this issue. It could be an issue with your register globals setting in php.ini.
    If you provide me putty / radmin / vnc access into the machine I can see what is wrong.
    • CommentAuthorapmuthu
    • CommentTimeJan 21st 2008 edited
     permalink
    Moved the SVN 1467 Full File Set here.
    • CommentAuthorapmuthu
    • CommentTimeJan 21st 2008 edited
     permalink
    In the file ./include/reportlib.php you will find that we need to make a php.ini setting change. Incase your PHP installation does not allow you to dynamically make a temporary (script scope) php.ini parameter change, you will get this error.

    In the reportlib.php file temporarily replace line 10
    require_once("PHPReportMaker.php");withrequire_once("./library/phpreports/PHPReportMaker.php");


    and see if you get any different errors. If so, it will mean that your php.ini file settings are not overrideable. In that case, locate the include path setting in the php.ini file in your server installation and hard code it to include the above path.
    • CommentAuthorryth
    • CommentTimeJan 23rd 2008 edited
     permalink
    Hi Mttvnst
    I experienced the exact same problem using Wamp on WinXP with the SF 20071231 download.
    The hint lingered in that the unparsed code from the preceding include, 'reportlib.php', which is printed in the output.
    A bit of casual poking around and adding the missing 'php' to the script opening tag, '<?' {also then the same thing in 'reportrunlib.php'}, resolved the issue...
    The reason for this, be it errata or other, may be worth pondering :-)
    Hope this helps.
    -r
    • CommentAuthorjustin
    • CommentTimeJan 23rd 2008 edited
     permalink
    Hey Ryth

    awesome!!! - will test it out

    Cheers

    Justin
    • CommentAuthorjustin
    • CommentTimeJan 23rd 2008 edited
     permalink
    just loaded up wamp on a windows box and tested it out

    got the same errors until i added the proper php tags as ryth found out

    now works as normal

    no more asp style php tags in Simple Invoices

    Cheers

    Justin
    • CommentAuthormicoots
    • CommentTimeJan 24th 2008 edited
     permalink
    Hi Justin,


    just loaded up wamp on a windows box and tested it out

    got the same errors until i added the proper php tags as ryth found out

    now works as normal

    no more asp style php tags in Simple Invoices

    Cheers

    Justin


    Does that mean there'll be a new patch or SVN release I can test out?

    Michael.
    • CommentAuthorjustin
    • CommentTimeJan 24th 2008 edited
     permalink
    Hey Michael

    yep - there'll be a release soon

    i've just got to test everything and should be able to get a release out next week - or this weekend - we'll see how we go

    Cheers

    Justin