Want to display errors, server admin disagrees

Want to display errors, server admin disagrees

am 15.09.2007 14:26:04 von Cruella DeVille

I'm currently working with a server with error reporting level 0,
which is good if this was purely a production server. It's not. I have
fourty students trying to learn php programming on this server and
displaying errors will be a good thing in a learning situation.

Is there any way to override the error reporing level set by the
server admin? I do not have access to php.ini and server admin will
never agree upon changing error reporting level for the server.

I tried error_reporting(E_ALL) and ini_set('display_errors', 1)
without success.


What to do?

Re: Want to display errors, server admin disagrees

am 15.09.2007 14:50:55 von Macca

You can set your own error handler. Look at

http://uk.php.net/set_error_handler

an example:

$oldErrorHandler = '';

function myErrorHandler($errNo,$errStr,$errFile,$errLine,$errContext) {

echo "Error: $errStr in $errFile on line $errLine";

}

$oldErrorhandler = set_error_handler("myErrorHandler");

Re: Want to display errors, server admin disagrees

am 15.09.2007 15:06:02 von luiheidsgoeroe

On Sat, 15 Sep 2007 14:26:04 +0200, Siv Hansen
wrote:

> I'm currently working with a server with error reporting level 0,
> which is good if this was purely a production server. It's not. I have
> fourty students trying to learn php programming on this server and
> displaying errors will be a good thing in a learning situation.
>
> Is there any way to override the error reporing level set by the
> server admin? I do not have access to php.ini and server admin will
> never agree upon changing error reporting level for the server.
>
> I tried error_reporting(E_ALL) and ini_set('display_errors', 1)
> without success.

That should work. If it's a shared server, and most of the time
error_reporting should be off, save for a few domains, I'd use Apaches
httpd.conf to alter the settings for the specific domains using php_flag &
php_value.
--
Rik Wasmus

Re: Want to display errors, server admin disagrees

am 15.09.2007 15:37:40 von Jerry Stuckle

Siv Hansen wrote:
> I'm currently working with a server with error reporting level 0,
> which is good if this was purely a production server. It's not. I have
> fourty students trying to learn php programming on this server and
> displaying errors will be a good thing in a learning situation.
>
> Is there any way to override the error reporing level set by the
> server admin? I do not have access to php.ini and server admin will
> never agree upon changing error reporting level for the server.
>
> I tried error_reporting(E_ALL) and ini_set('display_errors', 1)
> without success.
>
>
> What to do?
>

If this server is used for training, it should not be used as a
production server, also. There are too many things students can do to
bring it down. Plus, often you want to be able to change settings on a
training server for training purposes.

I always keep my training servers separate from production. Servers
aren't that expensive, and you really don't need the biggest and fastest.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: Want to display errors, server admin disagrees

am 16.09.2007 00:57:16 von Bucky Kaufman

Siv Hansen wrote:
> I'm currently working with a server with error reporting level 0,
> which is good if this was purely a production server. It's not. I have
> fourty students trying to learn php programming on this server and
> displaying errors will be a good thing in a learning situation.
>
> Is there any way to override the error reporing level set by the
> server admin? I do not have access to php.ini and server admin will
> never agree upon changing error reporting level for the server.
>
> I tried error_reporting(E_ALL) and ini_set('display_errors', 1)
> without success.
>
> What to do?

Sorry Siv, but it looks like you're trying to find a technical solution
to a political problem.

If you can outsource away from your current provider, $25US/mo should
get you a hosting provider who will do what you want.