Web Hosting Talk







View Full Version : PHP Headers Issues!


important
12-28-2003, 09:48 AM
Hey guys,

I was planning to prepend a PHP file on every file of a hosting, with a banner in it.

Now the problem is that, it says header problem on PHP files and I dont want to use ob_start() and ob_end_flush() on all of the php files that would be hosted there :( ..


Any ideas?

HELP

Thanks for any replies.

loopforever
12-28-2003, 10:45 AM
You can turn off error reporting in your php.ini file this way it's never output to the browser window. New PHP releases are configured this way by default and errors are logged to your error_log rather than shown on screen (for increased security).

important
12-28-2003, 10:18 PM
Can it be turned of using .htaccess as i can't do it through php.ini as it will be done for all sites then.

And btw, error_reporting( E_ERROR, E_WARNING ); are always there on most of the bulletin boards, so they reset there and they will still get errors.

Thanks for replying ..

loopforever
12-28-2003, 11:42 PM
You might try:

php_flag display_errors off

in an .htaccess file, or:

php_admin_flag display_errors off

in Apache's virtualhost directive for this domain.

The latter would be the better option, if possible.

Also, if you have safemode off for this site, you can call ini_set(...):

http://us3.php.net/manual/en/function.ini-set.php

And change the ini file values at run-time, then unset them at the end of your script.

Hope this helps :).