473,396 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

error_reporting() does not show error

I am trying to debug an error found somewhere within my suite of
scripts. Nothing shows up when there's an error, it just simply dies.
I tried using error_reporting(E_ALL); to no avail. I tried everything
I could think of to get some kind of error to show up, to date nothing
shows up. Even trace statements like var_dump(), echo, print_r(),
print, all fail, it dies without even showing any trace elements, even
at the beginning of the first file called!

<?php
/************************************************** ***
editpage.php -- edit page components
************************************************** ***/

// /usr/local/plesk/apache/vhosts/oconsulting.net/httpdocs
print_r("1<P>");
// include libraries
require ("/var/www/lib/lib.inc");
print_r("2<P>");
require ("$userincludes/macros.inc");
print_r("3<P>");

?>

Help!

Phil

Sep 15 '06 #1
2 11083
comp.lang.php wrote:
I am trying to debug an error found somewhere within my suite of
scripts. Nothing shows up when there's an error, it just simply dies.
I tried using error_reporting(E_ALL); to no avail.
1. Did you add ini_set('display_errors', 1); too ?
2. If so, the value of display_errors in php.ini might be set to off
and the script is throwing parser error. In that case, this may help
(not tested), if you do not have access to php.ini:
<?php
//debug.php
ini_set('display_errors', 1);
error_reporting(E_ALL); // better set to
error_reporting(E_ALL|E_STRICT); if using PHP 5
eval(file_get_contents('file im testing.php'));
?>

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Sep 15 '06 #2

R. Rajesh Jeba Anbiah wrote:
comp.lang.php wrote:
I am trying to debug an error found somewhere within my suite of
scripts. Nothing shows up when there's an error, it just simply dies.
I tried using error_reporting(E_ALL); to no avail.

1. Did you add ini_set('display_errors', 1); too ?
Thanx! That turned out to be the one remaining function I forgot to
use! I found the error (or in this case, an embedded MySQL error within
a query string of an unincludeable file)

Phil
2. If so, the value of display_errors in php.ini might be set to off
and the script is throwing parser error. In that case, this may help
(not tested), if you do not have access to php.ini:
<?php
//debug.php
ini_set('display_errors', 1);
error_reporting(E_ALL); // better set to
error_reporting(E_ALL|E_STRICT); if using PHP 5
eval(file_get_contents('file im testing.php'));
?>

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/
Sep 15 '06 #3

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

Similar topics

6
by: matty | last post by:
Just a couple of quick comments: In some of the CSS/DOM mailing lists I'm on, people generally refuse to help unless the HTML and CSS will validate. You can check these at...
6
by: Tim Tyler | last post by:
I've been experimenting with using: error_reporting (E_ALL); However, lines like this report problems when the variable is missing: $open = $_GET; Is there some way to do that with error...
1
by: lawrence | last post by:
This line: if (file_exists($fileName)) { is (on some web servers) giving me this kind of error: Warning: SAFE MODE Restriction in effect. The script whose uid is 1022 is not allowed to...
1
by: Pedro Fonseca | last post by:
Greetings everyone! I'm porting my applications to PHP5 and I've stumbled on yet another problem. I'll try to simplify things a bit. I have a main script that is being executed (index.php, PHP5...
11
by: varois83 | last post by:
Hi I am in the process of creating a guestbook for my site, I am a newbie and used several tutorials and customized them to what I need using the little knowledge I got. I get the following...
9
by: comp.lang.php | last post by:
I am having problems tracing errors in my code using PHP 4.3.9 on Linux RHEL 4 with Apache 2.0.54 On occasions I see no errors, no parse, no fatal, no warnings, no notices.. and no code either!...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
2
by: mrbog | last post by:
Here's my code: <?php error_reporting(E_ALL); ini_set("display_startup_errors","1"); ini_set("display_errors","1"); wefw wefwef=wefwe
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.