Jump to content

Turn off errors


BoltZ

Recommended Posts

Hey I tried putting this at the top of my page

 

<?php
error_reporting(0);
?>

 

To try and disable any error reportings on my site www.devwebsites.com because sometimes it has this error

 

Notice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /home/ericr/public_html/community/SSI.php on line 166

 

I don't want that to appear. How do I do this?

Link to comment
Share on other sites

This looks like a custom scripted error, not generated by the PHP Engine

 

Notice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /home/ericr/public_html/community/SSI.php on line 166

Link to comment
Share on other sites

This looks like a custom scripted error, not generated by the PHP Engine

 

Notice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /home/ericr/public_html/community/SSI.php on line 166

 

 

He's probably right, which would be why php error settings don't affect it.

Link to comment
Share on other sites

This still displays errors in chrome and opera.
PHP can't show errors in some browsers and not in others... not unless you deliberately chose to do so by testing USER_AGENT

 

Where did you make this up?

 

PHP is server side error reporting in php has nothing to do with brower

That is precisely what I was saying. Under normal circumstances, PHP would display an error message not caring what browser the response was being sent to.

That's why I was so puzzled by the comment that it still displays in Chrome and Opera, while assumedly not in IE or FF

 

I use the phrase "not unless you deliberately chose to do so by testing USER_AGENT" because it would be possible for somebody to write a custom error handler that tested $_SERVER["HTTP_USER_AGENT"] and modified it's message accordingly... though why anybody would do so, I can't imagine

 

Link to comment
Share on other sites

I use the phrase "not unless you deliberately chose to do so by testing USER_AGENT" because it would be possible for somebody to write a custom error handler that tested $_SERVER["HTTP_USER_AGENT"] and modified it's message accordingly... though why anybody would do so, I can't imagine

 

To keep IE users dazed and confused... :P

Link to comment
Share on other sites

Oh crap I lost the link  but I got the code. Theres no JS or DHTML or images at all.

 

i'll explaini

 

The screen is made of pixels. If you arrange them so they are in a line then it sorta looks rounded. This code puts a margin of 1 px so it looks rounded

 

This code works in IE and all browsers

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<style type="text/css">
p, .container3 h3 {margin:0 15px;}
.container, .container2, .container3 {background:#ccc; color:#fff; margin:0 15px;}
.container2 { width:200px; }
.container3 { width: 200px; float: right; }
.rtop, .rbottom{display:block; background:#fff;}
.rtop *, .rbottom *{display: block; height: 1px; overflow: hidden; background:#ccc;}
.r1{margin: 0 5px}
.r2{margin: 0 3px}
.r3{margin: 0 2px}
.r4{margin: 0 1px; height: 2px}

.rl1 {margin: 0 0 0 5px; }
.rl2 {margin: 0 0 0 3px; }
.rl3 {margin: 0 0 0 2px; }
.rl4 {margin: 0 0 0 1px; height: 2px;}

.rr1 {margin: 0 5px 0 0; }
.rr2 {margin: 0 3px 0 0; }
.rr3 {margin: 0 2px 0 0; }
.rr4 {margin: 0 1px 0 0; height: 2px;}
</style>
</head>


<body id="tt0" class="gt5">

<br style="clear:both;" />
<h3>Four Rounded Corners</h3>
<div class="container">
<b class="rtop"><b class="r1"></b> <b class="r2"></b> <b class="r3"></b> <b class="r4"></b></b>

<p>Sed do eiusmod tempor incididunt ullamco laboris nisi ut labore et dolore
magna aliqua. Quis nostrud exercitation qui officia deserunt ut enim ad minim
veniam. In reprehenderit in voluptate mollit anim id est laborum. Duis aute
irure dolor consectetur adipisicing elit, ut aliquip ex ea commodo consequat.</p>
<p>Lorem ipsum dolor sit amet, qui officia deserunt cupidatat non proident.
Eu fugiat nulla pariatur. Ut labore et dolore magna aliqua.</p>
<b class="rbottom"><b class="r4"></b> <b class="r3"></b> <b class="r2"></b> <b class="r1"></b></b>
</div>

</body></html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.