does die() allow PHP to be sent to the browser screen?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lkrubner@geocities.com

    does die() allow PHP to be sent to the browser screen?


    I'm shocked to see that on a page that failed, all the PHP that came
    after a die() statement got sent to the screen, so anyone could see it.
    If I'd had passwords visible in the code, I'd be in deep trouble. This
    is what I saw on screen:

    -----------------------------------

    Whoa. Serious misconfiguratio n, dude. The software is looking
    everywhere for a file called McControllerFor All.php but not finding it.
    It needs that file in a big way. Spelling is case senstive. If somehow
    the file is lost, you can always find a new copy at Public Domain
    Software");

    $controllerForA ll = new McControllerFor All();
    $controllerForA ll->getConfig();
    $controllerForA ll->includeTheFile sThatThisSoftwa reNeedsToRun();
    $pageRender = & $controllerForA ll->getObject("McR enderPage", " Called
    on the index page, the 31st line of code");
    $pageRender->getGlobalEvent s(); $pageRender->runMainLoop( ); ?>

  • R. Rajesh Jeba Anbiah

    #2
    Re: does die() allow PHP to be sent to the browser screen?

    lkrub...@geocit ies.com wrote:[color=blue]
    > I'm shocked to see that on a page that failed, all the PHP that came
    > after a die() statement got sent to the screen, so anyone could see[/color]
    it.
    <snip>

    Didn't happen to me. But, can't make judgement unless seeing at
    least few lines of code.

    --
    <?php echo 'Just another PHP saint'; ?>
    Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

    Comment

    • Richards Noah \(IFR LIT MET\)

      #3
      Re: does die() allow PHP to be sent to the browser screen?

      <lkrubner@geoci ties.com> wrote in message
      news:1105986555 .248426.279140@ c13g2000cwb.goo glegroups.com.. .[color=blue]
      >
      > I'm shocked to see that on a page that failed, all the PHP that came
      > after a die() statement got sent to the screen, so anyone could see it.
      > If I'd had passwords visible in the code, I'd be in deep trouble. This
      > is what I saw on screen:
      >[/color]
      <snip>

      No, die _does not_ print out all of the code after it. It does precisely
      what you would expect: prints out whatever string you give it and terminates
      execution of PHP.

      That being said, your problem is probably a typo somewhere. Post the code
      that you used (copy & paste, don't retype) and we'll help you find the
      problem.


      Comment

      • Tony Marston

        #4
        Re: does die() allow PHP to be sent to the browser screen?

        The die() function does not print out anything. You have some code in your
        application that does when an error occurs. I suggest you look for it and
        change it.

        --
        Tony Marston

        This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




        <lkrubner@geoci ties.com> wrote in message
        news:1105986555 .248426.279140@ c13g2000cwb.goo glegroups.com.. .[color=blue]
        >
        > I'm shocked to see that on a page that failed, all the PHP that came
        > after a die() statement got sent to the screen, so anyone could see it.
        > If I'd had passwords visible in the code, I'd be in deep trouble. This
        > is what I saw on screen:
        >
        > -----------------------------------
        >
        > Whoa. Serious misconfiguratio n, dude. The software is looking
        > everywhere for a file called McControllerFor All.php but not finding it.
        > It needs that file in a big way. Spelling is case senstive. If somehow
        > the file is lost, you can always find a new copy at Public Domain
        > Software");
        >
        > $controllerForA ll = new McControllerFor All();
        > $controllerForA ll->getConfig();
        > $controllerForA ll->includeTheFile sThatThisSoftwa reNeedsToRun();
        > $pageRender = & $controllerForA ll->getObject("McR enderPage", " Called
        > on the index page, the 31st line of code");
        > $pageRender->getGlobalEvent s(); $pageRender->runMainLoop( ); ?>
        >[/color]


        Comment

        • Andy Barfield

          #5
          Re: does die() allow PHP to be sent to the browser screen?

          lkrubner@geocit ies.com wrote:
          [color=blue]
          > I'm shocked to see that on a page that failed, all the PHP that came
          > after a die() statement got sent to the screen, so anyone could see it.
          > If I'd had passwords visible in the code, I'd be in deep trouble. This
          > is what I saw on screen:
          >
          > -----------------------------------
          >
          > Whoa. Serious misconfiguratio n, dude. The software is looking
          > everywhere for a file called McControllerFor All.php but not finding it.
          > It needs that file in a big way. Spelling is case senstive. If somehow
          > the file is lost, you can always find a new copy at Public Domain
          > Software");[/color]
          ^^^
          That "); suggests that you may have opened string in the die() call with
          a single quote, as the double quotes have not terminated the string.

          Regards,

          Andy

          Comment

          Working...