By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,743 Members | 1,850 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,743 IT Pros & Developers. It's quick & easy.

phpinfo is not affected by html_errors

P: n/a
Hello,

From my understanding, setting the ini value "html_errors" 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_errors", "1");

phpinfo();
?>
(non cgi:)
<?
ini_set("html_errors", "0")."<br><br>";
phpinfo();
?>
Even though the value of "html_errors" 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
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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€hotmail.com
Mail: dvdmandt€telia.com
##########################
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/defau...er&hcName=swen
http://securityresponse.symantec.com...******@mm.html
##########################
"ChronoFish" <de**@chronofish.com> skrev i meddelandet
news:K%dmb.99019$0Z5.4779@lakeread03...
Hello,

From my understanding, setting the ini value "html_errors" 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_errors", "1");

phpinfo();
?>
(non cgi:)
<?
ini_set("html_errors", "0")."<br><br>";
phpinfo();
?>
Even though the value of "html_errors" 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

Jul 17 '05 #2

P: n/a
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" <dv******@telia.com> wrote in message
news:rs********************@newsc.telia.net...
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" <de**@chronofish.com> skrev i meddelandet
news:K%dmb.99019$0Z5.4779@lakeread03...
Hello,

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


Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.