PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > Want to display errors, server admin disagrees
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Want to display errors, server admin disagrees

Réponse
 
LinkBack Outils de la discussion
Vieux 15/09/2007, 13h26   #1
Siv Hansen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Want to display errors, server admin disagrees

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?

  Réponse avec citation
Vieux 15/09/2007, 13h50   #2
macca
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Want to display errors, server admin disagrees

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,$e rrContext){

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

}

$oldErrorhandler = set_error_handler("myErrorHandler");

  Réponse avec citation
Vieux 15/09/2007, 14h06   #3
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Want to display errors, server admin disagrees

On Sat, 15 Sep 2007 14:26:04 +0200, Siv Hansen <siv.hansen@gmail.com>
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
  Réponse avec citation
Vieux 15/09/2007, 14h37   #4
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Want to display errors, server admin disagrees

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
==================
  Réponse avec citation
Vieux 15/09/2007, 23h57   #5
Sanders Kaufman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Want to display errors, server admin disagrees

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.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h58.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10062 seconds with 13 queries