|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
|
Is there a way not to show php errors on a specific page
I have a php script that is doing the correct job but the page is displaying an annoying:
Warning: Cannot modify header information - headers already sent by etc etc. error. Is there a way to not show errors on this specific page? There is not need to fix the problem since the script is working fine. |
|
|
|
|
|
#2 |
|
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: Pornblogspace.com
Posts: 334
|
yep, there is
just add a code inside the php script: error_reporting(0); and you are done..
__________________
![]() Superior Blogging Scripts | Porn Blog Space - not just another free blog hosting! |
|
|
|
|
|
#3 |
|
Confirmed User
Join Date: Dec 2005
Location: Bucharest, Romania
Posts: 2,074
|
;)
Egomancer
__________________
ICQ: 95-239-282 WWW: www.webprogrammers.eu WWW:www.seodev.eu Y!MSN: lord_ender If you want to outsource any work to Romania - here I am !!!! www.anotheranime.com | www.autotrafic.ro | www.jocurionline.ro |
|
|
|
|
|
#4 |
|
Confirmed User
Industry Role:
Join Date: Dec 2004
Location: Denver
Posts: 6,559
|
Yeah, you could fix the script ya lazy bastard.
__________________
![]() |
|
|
|
|
|
#5 |
|
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
you can also try <no error no error> at the top of the page
|
|
|
|
|
|
#6 | |
|
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
|
Quote:
<? error_reporting(0); ?> to the top of the page but it still displays |
|
|
|
|
|
|
#7 |
|
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
|
Maybe I should just fix it. Here is the problem. I am adding an include file to the index.php page of my oscommerce site. The include file goes to:
Code:
<?php
if ($ref)
{
SetCookie ("ref","$ref");
{
session_start();
session_register("ref");
}
include "config.php";
{
mysql_connect($server, $db_user, $db_pass) or die ("Database CONNECT Error (line 17)");
mysql_db_query($database, "INSERT INTO clickthroughs VALUES ('$ref', '$clientdate', '$clienttime', '$clientbrowser', '$clientip', '$clienturl', '')") or die ("Database INSERT Error (line 18)");
}
}
?>
Warning: Cannot modify header information - headers already sent by (output started at /home/site/public_html/config.php:22) in /home/site/public_html/includes/functions/general.php on line 1174 Fatal error: Unknown(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition <b>navigationhistory</b> of the object you are trying to operate on was loaded _before_ the session was started in /home/site/public_html/includes/application_top.php on line 322 |
|
|
|
|
|
#8 |
|
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
To suppress the error(s), put an @ in front of the function causing it.
eg: @session_start @session_register @include @mysql_connect @mysql_db_query Can also be helpfull if you're not sure which one if throwing the error, i.e. put @ in front of all of them and then remove one at a time until you see the error. |
|
|
|
|
|
#9 |
|
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
you might have a blank line in config.php at the very end, right below ?>
look around line 22 in config.php and see what's there...
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
|
|
|
|
|
#10 |
|
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
seriously, put this in the beginning of every page <NO ERROR>
you will be FINE!!! |
|
|
|