View previous topic :: View next topic |
Author |
Message |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Tue Mar 09, 2004 7:06 pm Post subject: php errors |
|
|
when i've finished testing/writing a script how can i stop error messages like this appearing if there's a problem with my MySQL server: Quote: | Warning: mysql_connect(): Access denied for user: 'dbmain@localhost' (Using password: YES) in D:\Web\http\Site\renals\links.php on line 30 |
_________________ Olly |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Wed Mar 10, 2004 1:16 am Post subject: |
|
|
http://www.aprelium.com/forum/viewtopic.php?t=1140 shows you how to disable it.
I hate errors also; mostly because it shows I use Windows to run my webserver, which embarrasses me. _________________ Bienvenidos! |
|
Back to top |
 |
 |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Wed Mar 10, 2004 11:45 am Post subject: |
|
|
iNaNimAtE wrote: | I hate errors also; mostly because it shows I use Windows to run my webserver, which embarrasses me. | we're in the same boat then :roll:
what i want to know is not how to disable errors for all my php scripts, but select one's after i'm confident that it works properly _________________ Olly |
|
Back to top |
|
 |
Moxxnixx -
Joined: 21 Jun 2003 Posts: 1226 Location: Florida
|
Posted: Wed Mar 10, 2004 2:28 pm Post subject: |
|
|
olly86 wrote: | what i want to know is not how to disable errors for all my php scripts, but select one's after i'm confident that it works properly | All you have to do is insert an error reporting function at the top of each script.
This will override the php.ini settings.
For example,
error_reporting (E_ERROR | E_WARNING | E_PARSE);
would show everything but notices.
It would look like this:
Code: | <?php
error_reporting (E_ERROR | E_WARNING | E_PARSE);
// The rest of the script
echo "<P>Hello World! I'm using PHP!</P>\n";
?> |
Hope this helps. :wink: |
|
Back to top |
|
 |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Wed Mar 10, 2004 6:45 pm Post subject: |
|
|
thanks
is their any way to stop notice errors being displayed :roll: _________________ Olly |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Wed Mar 10, 2004 9:51 pm Post subject: |
|
|
Wasn't that also an option in the php.ini file? _________________ Bienvenidos! |
|
Back to top |
 |
 |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Wed Mar 10, 2004 10:11 pm Post subject: |
|
|
olly86 wrote: | what i want to know is not how to disable errors for all my php scripts, but select one's after i'm confident that it works properly | i already said above i don't want to apply these settings to all my scripts but only to the ones i've finished _________________ Olly |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Mar 12, 2004 3:46 pm Post subject: |
|
|
olly86 wrote: | thanks
is their any way to stop notice errors being displayed :roll: |
Search for e_notice in the forum and you'll find how to do. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
|