Menu

Errors connecting to DB

Help
norris
2005-08-04
2013-04-25
  • norris

    norris - 2005-08-04

    Hi there,
                I am attemtping to use your app on W2k3, with IIS6.  I have installed php4.4.0 and mysql4.1.x.

    I have other php based apps that run.  However, when I go to the http://myip/inventory/index.php I get these errors.  They are only a snippet...

    Notice: Use of undefined constant TABLE_COMP - assumed 'TABLE_COMP' in C:\Inetpub\wwwroot\inventory\include\defines.php on line 5

    Notice: Use of undefined constant TABLE_HW - assumed 'TABLE_HW' in C:\Inetpub\wwwroot\inventory\include\defines.php on line 6

    Notice: Use of undefined constant TABLE_COMP_HW - assumed 'TABLE_COMP_HW' in C:\Inetpub\wwwroot\inventory\include\defines.php on line 7

    Notice: Use of undefined constant TABLE_OS - assumed 'TABLE_OS' in C:\Inetpub\wwwroot\inventory\include\defines.php on line 8

    Notice: Use of undefined constant TABLE_SOFTWARE - assumed 'TABLE_SOFTWARE' in C:\Inetpub\wwwroot\inventory\include\defines.php on line 9
    Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub\wwwroot\inventory\include\defines.php:5) in C:\Inetpub\wwwroot\inventory\index.php on line 48

    The following are my settings for the cfg.php:
    <?
    $inv_db['host'] = "localhost";
    $inv_db['user'] = "inventory";
    $inv_db['pass'] = "inventory";
    $inv_db['db'] = "/inventory/";
    $inv_data['base'] = "inventory";
    $inv_data['theme'] = "default";
    $inv_data['lang'] = "english";
    $inv_data['display'] = 10;
    $inv_data['duration'] = 60;
    $inv_data['edit'] = 0;
    //$inv_data['logo'] = 'logo.png';
    ?>

    Is there anything I have missed or not doing?

    Thanks

     
    • Dan A.

      Dan A. - 2005-08-04

      Hi

      This is a known problem.
      Please look in your php.ini file and make sure that you have this setting:

      error_reporting  =  E_ALL & ~E_NOTICE

      it will disable E_NOTICE from reporting, and the problem should go away.

      Dan

       
    • norris

      norris - 2005-08-04

      Thanks,
                It did not work.  But thanks to your direction, commenting out this setting worked!!!!

      ;error_reporting  = E_ALL; display all errors, warnings and notices

      Now for a STOOPID question, What is the default password?  I will RTFM in the mean time :S

      Feature requests, would it be possible to add:

      - the ability to insert additional fields

      - the ability to calculate lease/warranty/age of hardware

      - the ability to import from a csv or tab delimited file?

       
    • Anonymous

      Anonymous - 2005-08-30

      admin / admin
      What throws people off is that is not the default username / pass set used by inventory to connect to the database.

       
    • Dan A.

      Dan A. - 2005-09-01

      Hi

      About the feature requests:

      - Can you elaborate on fields you think missing? Are you aiming at some generic feature where you'd have a programmable field?

      - I expect you'll be able to produce reports with hardware age/warrenty expiration. (coming soon)

      - Already in advanced stages of implementing a CVS importer it will also be available in the next release.

      Dan

       
    • grahamgreen

      grahamgreen - 2005-09-05

      Hi!

      I am attemtping to use your app on Fedora C4, with Apache. I have installed php and mysql.

      Error messages:

      Notice: Use of undefined constant TABLE_COMP - assumed 'TABLE_COMP' in /var/wwwnew/html/inv-0.8/include/defines.php on line 5

      Notice: Use of undefined constant TABLE_HW - assumed 'TABLE_HW' in /var/wwwnew/html/inv-0.8/include/defines.php on line 6

      Notice: Use of undefined constant TABLE_COMP_HW - assumed 'TABLE_COMP_HW' in /var/wwwnew/html/inv-0.8/include/defines.php on line 7

      Notice: Use of undefined constant TABLE_OS - assumed 'TABLE_OS' in /var/wwwnew/html/inv-0.8/include/defines.php on line 8

      php.ini:

      error_reporting = E_ALL & ~E_NOTICE

      I don't run! WHY??

       
      • Dan A.

        Dan A. - 2005-09-07

        Hi

        Your error_reporting setting is correct, but it seems like Apache is not acting on it:

        1. check that you've restarted apache after applying the setting.
        2. check that there are no double settings for this parameter. try:
        grep error_reporting php.ini
        and see that there are no dual definitions. (last one counts.)
        3. make sure that your command is not commented out by a ; (semi-colon) at the beginning of the line. these lines don't count.

        in short, you should have _1_ valid error_reporting command, and after a restart of the apache service you should not see any notices.

        Dan

         

Log in to post a comment.