in reply to Re: Re: mkdir through a web interface
in thread mkdir through a web interface

well, yes... if it creates the directory just fine then it doesn't have to die, does it? It is imperative to send a header before anything that might send any output.

Not trying to start a fight, just trying to point Anonymous Monk in the right direction.

Jay

  • Comment on Re: Re: Re: mkdir through a web interface

Replies are listed 'Best First'.
Re: Re: Re: Re: mkdir through a web interface
by higle (Chaplain) on Oct 05, 2001 at 19:00 UTC
    dirthurts wrote:
    The short answer is that you called die before you sent the content-type header.
    So your script is failing there, move the content header up and you will see the error message.


    Anonymous Monk Ashley's question was about the internal server errors that /s?he/ was receiving. The way that your reply to that question was worded, "the short answer is....<snip>" and "So your script is failing there" would suggest that the answer to the question is contained, succinctly, within your reply, when indeed it was not.

    Furthermore, putting the content-type header before the die statement would have no effect on the output in this script, as Ashley was not outputting the die message to the browser, but to STDERR, which would be captured and written to the webserver's error log.

    I, too, am concerned with pointing people in the right direction. I felt that your posts, if anything, would confuse the issue, aside from being technically incorrect.

    higle
      doh... I forgot that die prints to STDERR, more importantly I forgot that STDERR doesn't go to the browser. So, my bad.

      It was my first reaction to the code snippet posted.

      Peace!

      Jay