473,804 Members | 3,178 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Suppressing full path dump on interpreter warnings?

I read somewhere that showing the full path during an error dump is a "bad
thing":

/dir1/dir2/somedir/script_that_die d.php

Like during a parse error or a warning from the interpreter. How can I tell
the PHP interpreter to show only the script filename and if possible, one or
two directories above?

Thanks.
Jul 25 '05 #1
1 1504
On Mon, 25 Jul 2005 11:42:37 -0400, "Robert Oschler"
<no************ @nospam.com> wrote:
I read somewhere that showing the full path during an error dump is a "bad
thing":

/dir1/dir2/somedir/script_that_die d.php

Like during a parse error or a warning from the interpreter. How can I tell
the PHP interpreter to show only the script filename and if possible, one or
two directories above?


Disable automatic error display and create your own error handler --
then put in whatever you want. For all public facing websites, I
always create a "friendly" error page anyway that doesn't go into
detail. Only during debugging would I want the errors fully
displayed.

Jul 25 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
7413
by: Adam Smith | last post by:
Hope this is the right news group!! I did a server upgrade and at the same time did a mysql update from 4.0.12 to Ver 12.22 Distrib 4.0.16 mach1# mysql --version mysql Ver 12.22 Distrib 4.0.16, for portbld-freebsd4.9 (i386) I attempted to restore the DB with
40
7908
by: Dave Hansen | last post by:
Please note crosspost. Often when writing code requiring function pointers, it is necessary to write functions that ignore their formal parameters. For example, a state machine function might take a status input, but a certain error-handling state might ignore it: typedef void (*State_Fn)(uint8_t); void error_state(uint8_t status)
4
4074
by: Dots | last post by:
I have a class library with a method called getpath(). I want to be able to get the full path of a folder and write some files to the (my_files_dir) folder. A console application will use this class library. How can I do this so I wont have to hardcode this path in my getpath() method. Here is the path below. "C:\Inetpub\wwwroot\Web_mycontrol\my_Files_dir\" -- Dotty
2
2385
by: stevie.greenslade | last post by:
'Lo all. I have a simple question I'd like help on. :] How, if at all, would one go about suppressing the console window that flashes up when you make at system() call in your C++ program? I'm using Dev-C++ with GTK-- with all the 'GUI' options ticked. There is nothing functionally wrong with the program save this flashing console window.
7
2893
by: Mike OKC | last post by:
The Directory.GetFiles method will bring back the file name including the path. I just want the file name, not the path. For Each strFile In Directory.GetFiles(strLocalPath) Me.lstLocal.Items.Add(strFile.ToString) Next
6
2424
by: Michael B Allen | last post by:
Hi, I have a macro that looks like the following: #define MMSG msgno_loc0(LOC0, LOC1) && msgno_mmsg0 which if used in some code like: MMSG("foo=%s", foo);
1
1440
by: Claire | last post by:
Visual Studio 2005 In my setup project, I've needed to include external setup files required to install a manufacturers smart card reader drivers. This collection of files includes those needed for 32 and 64 bit installs. Every time I compile my project (even in debug mode where the setup project shouldnt be compiled) I get a list of warnings issued about the 64 bit files not being of the right target can I switch individual warnings...
5
1991
by: jerrygarciuh | last post by:
Hello, I have a couple of PHP scripts I use via cron and from the CLI. They always produce warnings like PHP Warning: Module 'mysql' already loaded in Unknown on line 0 PHP Warning: Module 'gd' already loaded in Unknown on line 0 PHP Warning: Module 'zlib' already loaded in Unknown on line 0 I have read all of the commandline flags docs and there does not
5
6097
by: johnericaturnbull | last post by:
Hi - I am very new to python. I get this random core dump and am looking for a good way to catch the error. I know the function my core dump occurs. Is there any error catching/handling that I could use in python?
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10583
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9160
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7622
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6854
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3822
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2995
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.