Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




HIDE Errors?


I used a show error code once, can't remember which, but now I've looked at my site, every error on every page is showing, including undefined variable errors (partly because they're defined by forms on that page). So how do I hide all errors?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Supress Errors At The Page Level? Undefined Index Errors.
I'm creating a simple reply form, and if a form item isn't answered I
get an error:
"Notice: Undefined index: rb_amntspent in
c:inetpubwwwrootmackinawsurvey.php on line 36"
even if in the code I allow for an unselected item. (Code at the
bottom here.)
It works fine otherwise.

Now in the past I've made a change to php.ini to repress errors, but
for this project I don't have access to the php.ini.
Is there a way to supress errors on that page for that session?

Or, is there a way to just not get that error at all?

Here's a sample of the code that gets the form response. If an item is
selected, no error for that question, but if an item is not selected I
get the error above even though I still get a successful echo for the
"else" or "default" option which occurs if nothing is selected:

$rb_visited = $_POST["rb_visited"]; //Have you ever visited Mackinaw
City, Michigan?
if ($rb_visited == "1") {
$rb_visited_reply = "Yes";
} elseif ($rb_visited == "0") {
$rb_visited_reply = "No";
} else {
$rb_visited_reply = "You did not answer this question";
};

$rb_lastvisit = $_POST["rb_lastvisit"]; //When was your last visit to
Mackinaw ity?
switch ($rb_lastvisit) {
case "1":
$rb_lastvisit_reply = "Earlier this year (2003)";
break;
case "2":
$rb_lastvisit_reply = "Last year (2002)";
break;
case "3":
$rb_lastvisit_reply = "2 years ago (2001)";
break;
case "4":
$rb_lastvisit_reply = "3 years ago (2000)";
break;
case "5":
$rb_lastvisit_reply = "4 or more years ago (1999)";
break;
default:
$rb_lastvisit_reply = "You did not answer this uestion";
}

Hide My IP Address
Currently I have build a website and I m building contents on this site usgin
PHP/cURL by Collecting data using cURL from some other site.
Recently my server's IP address has been blocked by the other website.So my
script (that extracts data using cURL ) could not get connection to the other
website and so could not getting data for my website.

Is there any way using cURL or some way else that the other server could not
track/see my IP from where the request is coming etc.

Hide URL Parameters
I've my site wich uses POST forms and javascript (see below). Since it's
online, some people have called saying that some parts of my site are
unavailable.

I've seen that the part not accessable are the one redirected by javascript:

echo("<body bgcolor="#555555"
onLoad='document.forms["FormNext"].submit()'>
<form name="FormNext" method="POST" action="edit.php?".SID."">
<input type="hidden" name="PrevPage"
value="".$HTTP_SERVER_VARS['PHP_SELF']."">
....

I've many param to pass to the edit.php, and I must avoid some of them being
too visible, that's why I've take the POST forms. Now, I can't get further.
So I decided to go "GET", but it's there any way to pass the entire params
in some crypted way:
say edit.php?data=csdkykljr3q9sajdsd<ckmcdkasmcs

and in my edit.php, a function uncrypting the code passed in data.

Hide One Of The Checkboxes
is there any way that i would be able to hide one of the checkboxes if it is pulling from a database.

Here is the scenario in my website i have all of the different regions (of my website) listed from 1 - 6 on the database. I have just recently made it so that the users can post in different regions other then the old just one region. My problem is that there is an all in the database table. Normally i would just get rid of it but it would void out all of those posts with the region selected as all. What i need to do is hide or get rid of that all without hurting the web site. Is there any way to do that? here is my code:

Hide Php Code
I have a webserver which some user have their own accounts on. I want
to provide the users with some public classes which they may use use
when they are making there own php code placed in their own
directories.

I want the code to be accessable via an interface (like h-files in c)
but I do not want my code to be viewable to the users which are using
my classes. Very much like a library or something.
How do I make php code which are hidden but are free to use by my
users with a defined interface against my classes?

Hide A Page?
Is there anyway to hide a page in php? Example:

I make a page called test.php It is public (on a navigation menu, etc)
I don't want the real content to show up Instead, maybe a message, like "This page is currently getting a revamp" or "This page is down due to [reason here]"

Myspace Hide All
this is the code to hide everything on myspace. i want to hide everything but the default picture. does any one know how to change it so only the default picture will show up and thats it. Code:

Hide In Browser
using include ('mypage.php') want to know how i can include this page on another page but not display mypage.php in the web browser, but want all the code from mypage.php to be visible in the source code for the web crawlers.

Hide The Address?
Is there anything I can write into my php page that will make it so the user only sees the www.domain.com rather than www.domain.com/foo.php ?

Can You Hide Your Website From An IP?
I am getting traffic from india and they just spam the crap out of me, asking for link exchanges and stuff. I also they just use up my bandwidth because my product is only for canada and the USA.

Hide Region
I have a page that can be accessed by two differnet urls - what I would like to do is hide a link when coming from the second url

can anyone point me in the roght diection?

How Do I Hide Files From Download Without Php?
I want to hide files or better say restrict access to them for usual download. I want to send them just to allowed users with php? How do I do that?

I've tried to put variuos permisions on the directory, and then run this code:
<?
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=file.rar");
$ff = fopen("restricted/anyName.zip", 'r');
fpassthru($ff);
?>

If there are any restrictions, user downloads only 400b file, if there's no restrictions user gets normal filesize.

How To Hide Download Source
I am developing a website and I am providing some softwares to download but I
need to hide the source from where the softwares will be downloaded. How to hide this source from user that from where the software is being downloaded and how can I restrict DAP and other Download Accelerator (this feature is not necessary but hiding the source is necessary).

Hide Extension From The PHP Scripts
How can I hide extention(.php, .html) from the scripts.

Hide PHP Code On Server
I was wondering whether there was any FREE technology for hiding/encrypting PHP code on the server - such that server administrators cannot look at it and perhaps distribute it. I am aware of "turck mmcache" which looks brilliant. The thing is - boy is it complicated to set up and this complication does not lend itself well to my being on a virtual server where I do not have extensive admin permissions. Does anyone know a solution more appropriate for PHP code on a virtual server (apache)?

Hide Php File Extention
I noticed on most sites, there are no file extentions. Just urls like mydomain.com/action?something&result=this and there is no file extention.

An example of this is digg.com. I know its a php site but theres no file extention to be found. At first i was thinking they used mod_rewrite to get rid of the file extention, but i dont think that anymore.

Hide Javascript Source Using Php
I was thinking about using php to write the script file, something
like:

<script type="text/javascript"
src="http://insert_url_here.com/myScript.php"></script>

The php file then echo'ing the source code. If that works then how can
I stop the php file being loaded directly, that is the user browsing
to http://insert_url_here.com/myScript.php and seeing the source. I
only want it to write the source when it is called through the script.

How To Hide The Url Of A File For Download
I'd like to let user download a file but I'd like to hide the url of the file.
I'd like to write something like that:

<a href="download_file.php?id=1123">download file</a>

download_file.php get the file and give it to user. BUT....... how can I write download_file.php?

How Can I Hide A Title Bar In A Nw Window.
I am oening a new window from javascript function

window.open('imgShow.php','ImageName', 'width=100,height=100,titlebar=no,
screenX=' + x + ',screenY=' + y + ',left=' + x + ',top=' + y);

I added titlebar=no Still its showing titlebar.

I want to hide title bar as well as minimise and close option.
I want no border to HTML page. Can anyone suggest me what are the possible options to do this. I have a grid of picture and on mouseover i want to show big image over it.

HIDE LINK In Status Bar !
Kind of Javascript, but here you go:

<a href="http://www.page.com" onMouseOver="window.status='Whatever you
Want'return true;" onMouseOut="window.status=''return true;">Put
your mouse over here.</a>

Hide Mysql_pconnect Password
mysql_pconnect("localhost","user","password")

Is there a way so that password will not be text? So someone looking at
the file would not be able to know the password?

How To Hide The Document Path
this is my root document path  include_once ("C:/wwwroot/user/oneadmin/config.php"

can it possible to trace the path of my root document by php functions and  if then how to hide the path of root document..

Hide Specific Text
I was wondering whteher anybody knows a code to hide a specific text on a site which u cannot control.

For Example, i am currently with a free hosting provider, and they put a simple text on my site saying "Free Web Hosting by something" Is there a way to hide this?.

It is not on my actual coding for the page therefore i cannot remove it. I thought there might be a way to block this text or something. It can be a code of any sort like php, html, asp or whatever. I just need to hide this.

Show / Hide Text
I am looking for a way to be able to hide some text that is being pulled from a database.

For example If I have the following text being pulled out of a database onto my website, I want a way to be able to hide like the third paragraph on and replace that with a morre button than when a user clicks the more button it reveals the rest of the text:

How To Auto Hide Control When Fullscreen?
I need some help for one critical problem. I need that when
someone visit my site then my home page will be fullscreen
automatically along with autohide. I have done fullscreen but not able
to do auto hide.

How To Hide 'hidden' Form Field?
I am sending the user's password in form's hidden field as Code:

<input type=hidden name="studen_pass" value="readfromdatabase">

but i dont want anyone to read it via watching its source code. is there any trick to hide it with php so that no one can read the password hidden field value by watching page's source code.

Hide Password Input In CLI PHP Script?
I have a command line PHP script that logs into a network service with
a user name specified on the command line. The script then prompts for
a password.

Currently the password is echoed on the screen/terminal as it is
typed.

Is it possible to stop the password being echoed on the command line
while it is typed? Or perhaps just print asterix's instead of the
literal characters?

A few details: platform is Linux, PHP version is 4.3.9.

Show/Hide Portion Of Text
I want to have a webpage with some biographies. The bio's are stored in an mysql table and read from Php. The thing is that I am trying to do the usual show/hide more text link and I don't know where to post such a message! I don't want to leave the current page, I just want to have the first 5 lines of text,with a more option at the end that when clicked shows the rest of the text. This for every bio ( thats not a problem, a while loop will do it)

So what to use and how? Javascript? Css? I don't know so well those stuff so any help will be great.

How Do I Hide My Google Analytics Code?
I want to be able to "hide" my Google Analytics code whenever I personally visit one of my pages... what I've been trying to do is make it so that when I type in a url like this: www.mysite.com/index.php?hide=yes

The page would load without the Google Analytics (and my visit would deliberately not be tracked). How do I do this? I've tried variations of the following code but always get errors...

Using Permissions To Hide Parts Of A Menu
I am having trouble getting mysql to only pull where admin = 1, users = 1, pageman = 1. I want it to pull the menu, and check the value of the view field it would say somthing like "admin". Then in the users table it says admin and either there is a 1 or 0. Code:

Hide The Contents Of A Page Unless Redirected?
I have a website where I sell one downloadable product.  Someone pays for it and then is redirected to the download page.  Problem is they could just bookmark the url and go back and download it again all they want.  Is there a way to prevent that from happening?  Somehow set it up so the page only displays if they've been redirected from PayPal perhaps? 

Show / Hide True/False
Can anyone tell me the context in which to use PHP like this:

$show_calendar = false;

I would like to hide a function if it is set to "false" or show it if it is set to "true".

Can I Hide My Email Address In Require File
I am wanting to hide my email address so that a spammer cannot use one of their "crawlbots" to crawl the pages in my web site and steal my email address.

Can a spammer's crawlbot find my email address if I place my email address in an include file and place the include file somewhere like, for example, the configuration folder?

Hide GET Variables --> Pass Values Using Session
I have a php file which lists some records. On this list, the records
can be sorted on different columns. currently the sort column and the
direction of sorting is passed using GET values, this means the user
clicks the column name (which is a link) so the new sort column and
direction is passed to the script

<a href="main.php?page=news&sortfield=title&sortorder=asc">

now my question is, if it's possible to hide those values, so they
don't appear on the url, but sorting should work anyway. This means
that

1. when user clicks on column, the new sort order has to be set
2. page has to be reloaded, so new sort order gets displayed.

I'd like to do this using sessions, but I don't know how to update a
session value, when clicking on a link wihtout using GET values...

Script Hide Email Address From Spambots?
Below is (a part of) a script that I am using on my web site. In order to guard against "spambots" I am including my email address in the "email_address.inc.php" require file.

I have the "conf" directory password protected. A "spambot" crawler can't get to it from a direct call (I don't think) because the directory is password protected. The script below will call the "email_address.inc.php" file just fine from the password protected directory.

The "Submit" button has to be activated and the input in the "$FirstName" and the "$LastName" input boxes has to be in the right format before the "email_address.inc.php" file will be called (using the code in the script).

My question is this: Does anybody see how a "spambot" could get into my "email_address.inc.php" file the way I have the code written below? PHP Code:

Hide Characters When Displaying Recordset Data ?
i have a mysql and php website, some of the products have an _ underscore (epson_dx500 eg) . i display these items listed vert down the page, i want the data in the table to stay the same but when displayed on the page i want to hide the underscore.

Hide Javascript Code From Browsers And Search Engines
I want to hide the javascript code in a php file because it uses a resource from another website, and if the code is visible, search engines are spidering that php page, and also the scripts in it.

Sendmail Page: How Do I Hide My E-mail Address From Spam Bots?
how to make a sendmail script without having to place my e-mail out on the web page where a spam bot can get to it? I need to hide my e-mail address on the hosting away from the spam bots.

Errors In Php 5.0.4 Not In 4.3.10-16
I use the following statements:

$var = "";
$var = $_POST('varname');

In php 4, when 'varname' was not defined, $var remained an empty string;
In php 5, I suddenly get errors.

I solved these by including the function array_key_exist to check the
occurence of 'varname'
Is this the prefered way or is ther a better solution?

Errors In Php 5.0.4 Not In 4.3.10-16
I use the following statements:

$var = "";
$var = $_POST('varname');

In php 4, when 'varname' was not defined, $var remained an empty string;
In php 5, I suddenly get errors.

I solved these by including the function array_key_exist to check the
occurence of 'varname'
Is this the prefered way or is ther a better solution?

PHP 404 Errors
Some of my visitors keep emailing me about "404 page errors" on my website even though the pages are working perfectly. I have had this problem before , I figured it out and it was because of my "generators" which uses pure PHP codings like this - http://www.generators.hot-lyts.com/linkgen.php.

I had the solution, I made a sub domain and since then I wasn't getting anymore error mails however it occurs again, I have checked the new pages I've added recently and deleted some of them but I still have no luck, I still get tons of mails about this error pages and it is really frustrating because my hits have been dropping big time.

I really have no idea what the problem is with my website. I am not sure if it's my server or some php problems. Code:

How Do I Hide Database Connection Files Using PHP Include Files?
I have the following at the beginning of the PHP page:

<?php require_once('Connections/conn.php'); ?>

I want to hide the connection file, "conn.php", so it's out of the web
accessible file structure. I understand putting them in the php include
directory shoudl do this. For example, let's say the directory I put them
in is /www/phpIN/, and /www/ht/ is the root web directory.

So I put "conn.php" in the inlcude directory (/www/phpIN/conn.php) and
removed it form CONNECTIONS directory.

How Do I Hide Database Connection Files Using PHP Include Files?
I have the following at the beginning of the PHP page:

<?php require_once('Connections/conn.php'); ?>

I want to hide the connection file, "conn.php", so it's out of the web
accessible file structure. I understand putting them in the php include
directory shoudl do this. For example, let's say the directory I put them
in is /www/phpIN/, and /www/ht/ is the root web directory.

So I put "conn.php" in the inlcude directory (/www/phpIN/conn.php) and
removed it form CONNECTIONS directory.

Now it doesn't work.

What do I need to change?

Ereg_replace - Errors
Whenever I use the ereg_replace function like follows:

Connection Errors ?
host -{ The server }- is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts'

anyone know why this message show up allot of times and goes away only after restarting mysql and apache ? is there a other way if fixing this ?

Odbc Errors
I am using php and sybase as a backend. To connect to sybase I am using odbc connections. the odbc connection is working fine but when I run an sql statement i get the following error:

" Warning: Supplied argument is not a valid ODBC-Link resource "

I am using an external file which holds my connection function which is:
function db_connect()
{
global $dbhost, $dbusername, $dbuserpassword, $defaultdbname, $dsn;
$myConnection = odbc_connect($dsn, $dbusername, $dbuserpassword) or die("Unable to connect to Server");
}

$myConnection = db_connect();
echo "Connected";

$mySql = "Select * from branch";
$myResult = odbc_prepare($myConnection, $mySql) or die("Could not prepare Statement");
odbc_execute($myResult) or die("Could not execute Statement");

odbc_free_result($myResult);
odbc_close($myConnection);

I get an error after the sql query. Can anyone please tell me what's wrong with this?

PHP Install Errors
I want to install Twig for web email which requires apache and php so I've installed all the right stuff but it still fails. Error_log output:

[Fri Feb 16 11:57:07 2001] [info] Server built: Feb 15 2001 11:38:09
[Fri Feb 16 11:58:46 2001] [error] (8)Exec format error: exec of /var/www/htdocs/index.php3 failed
[Fri Feb 16 11:58:46 2001] [error] [client 134.202.1.235] Premature end of script headers: /var/www/htdocs/index.php3

I configured Apache using the commandline: Code:

Bcompiler Errors
I am getting these errors all the time now, on multiple scripts at random
times.

Warning: bcompiler: Bad bytecode file format at 00000000 in Unknown on line
0

This tells me it has to be PHP in some fashion.

Display Errors Is Both On And Off
I have a website in which PHP errors are displayed, despite having them
configured to not display.

Here is a test file I created to explore this:

<?php
echo ini_get( 'display_errors' );
phpInfo();
?>

The ini_get says "On", the phpInfo says "Off" (for display_errors in the PHP
Core section).

PHP 5.0.4

I'm struggling to understand how, at runtime, I get these conflicting
reports. The configuration files all say display_errors is OFF, and phpInfo
agrees, but PHP acts like they are on, and ini_get shows why.


Copyright © 2005-08 www.BigResource.com, All rights reserved