locally works/remotely breaks? (Oracle related?)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • melih.onvural@gmail.com

    #1

    locally works/remotely breaks? (Oracle related?)

    Group,

    I'm diving into this crazy PHP thing, and I find myself a bit stuck.
    Locally I can get a site to work very well. However, whenever I ask a
    buddy of mine to test the site and I give him my IP it doesn't work.

    I have a form. The form checks username/password against a database and
    then either sends you back to the form or forwards you to the next
    page. Is:

    header("Locatio n: http://localhost/nextpage.php");

    the proper form of redirection?

    The issue on the not at my computer logins is in this redirect. I'm not
    sure what I need to send, but I was getting connection errors in the
    beginning which aren't showing up anymore. Then I was getting
    unreferenced index errors, but I put all the variables in a session and
    that seems to work now. And now I'm stumped because I'm not getting
    errors in the log.

    Thanks for any help in advance,

    Melih Onvural

  • Daniel Tryba

    #2
    Re: locally works/remotely breaks? (Oracle related?)

    melih.onvural@g mail.com wrote:
    [extrenal request redirects to:][color=blue]
    > header("Locatio n: http://localhost/nextpage.php");
    >
    > the proper form of redirection?[/color]

    Well, Duh! localhost is the machine where the browser is running on.
    Your friend connects to http://example.com/page.php and gets a redirect
    to _his_ machine at http://localhost/nextpage.php.

    The Q&D hack is to redirect to 'Location: nextpage.php', it violates the
    HTTP rfc but in practice I have yet to see a browser that doesn't
    redirect to the correct URL with this.

    Better would be to redirect to "Location: http://{$_SERVER['HTTP_HOST']}/nextpage.php"

    Comment

    • melih.onvural@gmail.com

      #3
      Re: locally works/remotely breaks? (Oracle related?)

      As a follow up, I'm getting that:

      $uid=$_POST['username'];
      $pwd=$_POST['pwd'];

      those lines are invalid indexes. I'm worried that the value isn't
      carrying over. I have an index.html page which has a form that posts
      and then a connection.php page that mines the data and makes a decision
      to go forward or go back. Should I turn something on so that my POST
      variables carry over?

      Comment

      • Oli Filth

        #4
        Re: locally works/remotely breaks? (Oracle related?)

        melih.onvural@g mail.com said the following on 01/07/2005 14:34:[color=blue]
        > As a follow up, I'm getting that:
        >
        > $uid=$_POST['username'];
        > $pwd=$_POST['pwd'];
        >
        > those lines are invalid indexes. I'm worried that the value isn't
        > carrying over. I have an index.html page which has a form that posts
        > and then a connection.php page that mines the data and makes a decision
        > to go forward or go back. Should I turn something on so that my POST
        > variables carry over?
        >[/color]

        Carry over to where?

        Without seeing a (minimal) example of the HTML and PHP that you're
        using, it's difficult to tell what's going on.

        --
        Oli

        Comment

        • saint exupery

          #5
          Re: locally works/remotely breaks? (Oracle related?)

          don't worry dude. it's just the error reporting config.

          change the error_reporting value to E_ERROR | E_WARNING | E_PARSE in
          php.ini and restart your webserver :)

          Comment

          Working...