Simple Invoices logo
Simple Invoices - Home Simple Invoices - Download Simple Invoices - Demo Simple Invoices - Blog Simple Invoices - oOrum Simple Invoices - Wiki
Home Download Demo Blog Forum Wiki
    • CommentAuthorrwmarch
    • CommentTimeJul 11th 2008
     permalink
    All prerequisites met. All the configuration and installation steps followed per the readme. Installation proceeded OK until attempting to browse to http://localhost/simpleinvoices/library/pdf
    The result was ...
    The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

    In /var/log/apache2/error_log ...
    [alert] [client 127.0.0.1] /srv/www/htdocs/simpleinvoices/library/pdf/.htaccess: DirectoryIndex not allowed here, referer: http://www.simpleinvoices.org/documentation

    Linux OpenSUSE 10.3
    PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cli)
    mysql Ver 14.12 Distrib 5.0.45
    Firefox 2.0.0.15

    Would someone get me pointed in the right direction?
    • CommentAuthorjustin
    • CommentTimeJul 11th 2008
     permalink
    hey rwmarch,

    i'm not 100% sure about what suhosin allows and dis-allows

    you may want to try browsing to simpleinvoices/library/pdf/index.php and see if you get the same error

    also try generating a pdf while in Simple Invoices and let me know what/if errors you get

    cheers

    justin
    • CommentAuthorrwmarch
    • CommentTimeJul 11th 2008
     permalink
    Justin, thanks for your help.

    Browsing to simpleinvoices/library/pdf/index.php produces the same "500" error.
    /var/log/apache2/error_log says:
    [Fri Jul 11 08:12:45 2008] [alert] [client 127.0.0.1] /srv/www/htdocs/simpleinvoices/library/pdf/.htaccess: DirectoryIndex not allowed here

    Login is successful, but the following is logged:
    [Fri Jul 11 08:13:59 2008] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/htdocs/simpleinvoices/include/sql_queries.php on line 3
    [Fri Jul 11 08:13:59 2008] [error] [client 127.0.0.1] PHP Notice: Undefined variable: MD5Auth in /srv/www/htdocs/simpleinvoices/login.php on line 82
    [Fri Jul 11 08:13:59 2008] [error] [client 127.0.0.1] PHP Notice: Undefined variable: MD5Auth in /srv/www/htdocs/simpleinvoices/login.php on line 87
    [Fri Jul 11 08:13:59 2008] [error] [client 127.0.0.1] PHP Notice: Undefined variable: ChallengeLife in /srv/www/htdocs/simpleinvoices/login.php on line 90
    [Fri Jul 11 08:14:06 2008] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/htdocs/simpleinvoices/include/sql_queries.php on line 3, referer: http://localhost/simpleinvoices/login.php
    [Fri Jul 11 08:14:06 2008] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/htdocs/simpleinvoices/include/sql_queries.php on line 3, referer: http://localhost/simpleinvoices/login.php
    [Fri Jul 11 08:14:06 2008] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/htdocs/simpleinvoices/include/sql_queries.php on line 28, referer: http://localhost/simpleinvoices/login.php
    [Fri Jul 11 08:14:06 2008] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/htdocs/simpleinvoices/include/sql_queries.php on line 28, referer: http://localhost/simpleinvoices/login.php
    [Fri Jul 11 08:14:06 2008] [error] [client 127.0.0.1] PHP Notice: Undefined variable: defaults in /srv/www/htdocs/simpleinvoices/include/sql_patches.php on line 563, referer: http://localhost/simpleinvoices/login.php
    [Fri Jul 11 08:14:06 2008] [error] [client 127.0.0.1] PHP Notice: Undefined variable: defaults in /srv/www/htdocs/simpleinvoices/include/sql_patches.php on line 567, referer: http://localhost/simpleinvoices/login.php
    ...

    And pressing the PDF button results in:
    [Fri Jul 11 08:17:31 2008] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/htdocs/simpleinvoices/include/sql_queries.php on line 3, referer: http://localhost/simpleinvoices/index.php?module=invoices&view=manage
    [Fri Jul 11 08:17:31 2008] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/htdocs/simpleinvoices/include/sql_queries.php on line 28, referer: http://localhost/simpleinvoices/index.php?module=invoices&view=manage
    [Fri Jul 11 08:17:31 2008] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/htdocs/simpleinvoices/include/sql_queries.php on line 28, referer: http://localhost/simpleinvoices/index.php?module=invoices&view=manage
    [Fri Jul 11 08:17:31 2008] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/htdocs/simpleinvoices/include/sql_queries.php on line 28, referer: http://localhost/simpleinvoices/index.php?module=invoices&view=manage
    [Fri Jul 11 08:17:31 2008] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/htdocs/simpleinvoices/include/sql_queries.php on line 28, referer: http://localhost/simpleinvoices/index.php?module=invoices&view=manage
    [Fri Jul 11 08:17:31 2008] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/htdocs/simpleinvoices/include/sql_queries.php on line 28, referer: http://localhost/simpleinvoices/index.php?module=invoices&view=manage
    [Fri Jul 11 08:17:31 2008] [alert] [client 127.0.0.1] /srv/www/htdocs/simpleinvoices/library/pdf/.htaccess: DirectoryIndex not allowed here, referer: http://localhost/simpleinvoices/index.php?module=invoices&view=manage

    My PHP installation is as distributed with OpenSUSE.
    • CommentAuthorjustin
    • CommentTimeJul 11th 2008
     permalink
    only thing i can think of is to try removing the .htaccess file in library/pdf and see what happens

    Cheers

    Justin
    • CommentAuthorrwmarch
    • CommentTimeJul 12th 2008
     permalink
    Justin,

    Right on. Thank you. Removed .htaccess in library/pdf. Now the pdf creation works. But does this now create a security issue for me? Is there a better solution? library/pdf is drwxr-xr-x 10 wwwrun www.

    And I still see reams of associated error messages generated such as:
    [Sat Jul 12 08:43:58 2008] [error] [client 76.10.170.116] PHP Notice: Use of undefined constant LOGGING - assumed 'LOGGING' in /srv/www/htdocs/simpleinvoices/include/sql_queries.php on line 3, referer: http://king/simpleinvoices/index.php?module=invoices&view=manage

    Thank you,
    Robert
    • CommentAuthorjustin
    • CommentTimeJul 13th 2008
     permalink
    Thanks Robert,

    re security
    - not that im aware - but im no security guru
    - the main security issues with using tufat.com's PDF library is that someone can (depending on your configuration) use your server to generate their own pdfs (not of your invoices though)
    -- which is more server performance issue

    re LOGGING error
    - thats just a minor error - don't worry about that - its my fault :)


    Cheers

    Justin