phpinfo is not affected by html_errors

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ChronoFish

    phpinfo is not affected by html_errors

    Hello,

    From my understanding, setting the ini value "html_error s" is supposed to
    force the output from phpinfo to be either plain text or HTML.

    I have setup two files. One is executes as CGI, and the other as
    preprocessor.

    (cgi:)
    #!/usr/local/bin/php
    <?PHP
    print "Content-type: text/html\n\n";
    ini_set("html_e rrors", "1");

    phpinfo();
    ?>


    (non cgi:)
    <?
    ini_set("html_e rrors", "0")."<br><br>" ;
    phpinfo();
    ?>


    Even though the value of "html_error s" is displayed correctly in phpinfo(),
    the output type does not change. The CGI process will always display as
    plain text, and likewise the preprocessor will always display as html
    despite turning html_errors off.


    How can I get the standard html phpinfo() output when running through CGI?

    Thanks!
    Christopher


  • DvDmanDT

    #2
    Re: phpinfo is not affected by html_errors

    If you just take a look at the name of the directive you understand it's
    about the errors php output for an invalid line... If it's on, PHP will
    output <b>Warning:</b> bla bla
    but if it's off, PHP will output
    Warning: bla bla
    (no HTML)

    --
    // DvDmanDT
    MSN: dvdmandt¤hotmai l.com
    Mail: dvdmandt¤telia. com
    ############### ###########
    Please, if you are using windows, you may be infected by Swen. Please go
    here to find out more:
    Get the #1 AI-powered antivirus protection and all-in-one identity theft and privacy solutions, designed to keep your personal information private, protect against scams, and safeguard you and your family online.

    Symantec security research centers around the world provide unparalleled analysis of and protection from IT security threats that include malware, security risks, vulnerabilities, and spam.

    ############### ###########
    "ChronoFish " <deja@chronofis h.com> skrev i meddelandet
    news:K%dmb.9901 9$0Z5.4779@lake read03...[color=blue]
    > Hello,
    >
    > From my understanding, setting the ini value "html_error s" is supposed to
    > force the output from phpinfo to be either plain text or HTML.
    >
    > I have setup two files. One is executes as CGI, and the other as
    > preprocessor.
    >
    > (cgi:)
    > #!/usr/local/bin/php
    > <?PHP
    > print "Content-type: text/html\n\n";
    > ini_set("html_e rrors", "1");
    >
    > phpinfo();
    > ?>
    >
    >
    > (non cgi:)
    > <?
    > ini_set("html_e rrors", "0")."<br><br>" ;
    > phpinfo();
    > ?>
    >
    >
    > Even though the value of "html_error s" is displayed correctly in[/color]
    phpinfo(),[color=blue]
    > the output type does not change. The CGI process will always display as
    > plain text, and likewise the preprocessor will always display as html
    > despite turning html_errors off.
    >
    >
    > How can I get the standard html phpinfo() output when running through CGI?
    >
    > Thanks!
    > Christopher
    >
    >[/color]


    Comment

    • ChronoFish

      #3
      Re: phpinfo is not affected by html_errors

      Thanks for the info. I guess that will teach me to take the user
      contributions on php.net as "documentation" .
      (http://www.php.net/manual/en/function.phpinfo.php - the notes were about a
      pre-release 4.3).

      In any event my question still is the same.

      How can I force phpinfo() to display as HTML when called through CGI?

      -Thanks!
      CF


      "DvDmanDT" <dvdmandt@telia .com> wrote in message
      news:rsfmb.3481 1$dP1.111402@ne wsc.telia.net.. .[color=blue]
      > If you just take a look at the name of the directive you understand it's
      > about the errors php output for an invalid line... If it's on, PHP will
      > output <b>Warning:</b> bla bla
      > but if it's off, PHP will output
      > Warning: bla bla
      > (no HTML)
      >
      > --
      > "ChronoFish " <deja@chronofis h.com> skrev i meddelandet
      > news:K%dmb.9901 9$0Z5.4779@lake read03...[color=green]
      > > Hello,
      > >
      > >
      > >
      > > How can I get the standard html phpinfo() output when running through[/color][/color]
      CGI?[color=blue][color=green]
      > >
      > > Thanks!
      > > Christopher
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...