The character '1' is being prepended to all of my URLs
  • funkiwanfunkiwan February 1

    When I preview my invoices, or print them to pdf, anything that calls getURL seems to retrieve a result with a one (1) prepended to it. This breaks the formatting for invoices, obviously. For instance, if I access simpleinvoices like so:

    http://192.168.0.11/simpleinvoices/index.php?module=export&view=invoice&id=15&format=print

    Then the stylesheet in the html looks like this:

    link rel="stylesheet" type="text/css" href="http://1192.168.0.11/simpleinvoices/templates/invoices/default/style.css" media="all"

    Note the extra "1' on the href. This also happens using named host records (http://test.com -> http://1test.com).

    This hasn't always been the case but I recently moved my install to OSX so it might be a function of something I did there. Any idea how I can figure out what's going on?

  • modirmodir February 2

    This one could come from a function which would return true or false. Did you use the print_r() function somewhere?

  • funkiwanfunkiwan February 2

    The problem seems to be in the getURL() function of include/sql_queries.php:

    $_SERVER['FULL_URL'] .= $config->authentication->http.$_SERVER['HTTP_HOST'].$dir;

    I recently set "authentication.http = true" in config/config.ini in order to set up .htaccess as instructed in the docs:

    http://www.simpleinvoices.org/config#authentication

    I'm not quite sure what that line is supposed to do, but I haven't been able to get authentication working. I'm guessing the "$config->authentication->http" evaluates to true and thus "1".

    As far as authentication goes, it just always says "Hello [email protected]" at the top of the screen and never asks me to login.

    My config.ini file says my version.name = 2011.1 - stable.

  • modirmodir February 9

    We have a new wiki with more information:
    http://code.google.com/p/simpleinvoices/wiki/Config

    But the new one seems wrong too. I am not sure, but it looks like you can only set one of the two. Try to not set this parameter and set only the first one.

    In the long run we have to fix it. If you want you can add an issue to our list: http://code.google.com/p/simpleinvoices/issues/list

    Either we have to change the code or the documentation.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

Categories