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

setting error level for a particular directory / page

P: n/a
Hi,

I'm using PHP 4.4.4. In our php.ini file we have notices and warnings
turned off. However, I would like to enable them for a small subset
of pages. I know the pages specifically, but I would also settle for
enabling notices and warnings for a certain directory.

Is this possible, and if so, how?

Thanks, - Dave

May 14 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 14.05.2007 19:02 la***********@zipmail.com wrote:
Hi,

I'm using PHP 4.4.4. In our php.ini file we have notices and warnings
turned off. However, I would like to enable them for a small subset
of pages. I know the pages specifically, but I would also settle for
enabling notices and warnings for a certain directory.

Is this possible, and if so, how?

Thanks, - Dave
Yes, put the "php_value" directive with "error_reporting" and desired
error level in that dir's .htaccess

--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok
May 14 '07 #2

P: n/a
la***********@zipmail.com wrote:
Hi,

I'm using PHP 4.4.4. In our php.ini file we have notices and warnings
turned off. However, I would like to enable them for a small subset
of pages. I know the pages specifically, but I would also settle for
enabling notices and warnings for a certain directory.

Is this possible, and if so, how?

Thanks, - Dave
Dave,

Probably the most accurate way is to add to the top of the pages you
wish to have errors shown:

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
?>

You could also add to an .htaccess (or the appropriate directory entry
in your httpd.conf file)

php_value error_reporting 6143
php_value display_errors 1

(6143 is is the decimal value for E_ALL).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
May 14 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.