Re: [PHP] Will not report errors what can I do
On Fri, 2008-12-05 at 00:00 -0500, Robert Cummings wrote: On Fri, 2008-12-05 at 17:44 +1300, German Geek wrote: On Fri, Dec 5, 2008 at 4:26 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Thu, 2008-12-04 at 15:07 -0800, Jim Lucas wrote: Terion Miller wrote: Hey everyone I am still fighting the same problem that my script isn't working and its not reporting errors, when you click to view the work order it doesn't do anything, I have all kinds of error reporting turned on but nothing, do I have them syntax wrong? ?php include(inc/dbconn_open.php); error_reporting(E_ALL); ini_set('display_errors', '1'); This is boolean, it should be ini_set('display_errors', 1); Isn't 1 an integer and true a boolean? ;) Anyways, what I noticed is that error reporting is enabled after an include. Maybe the system is failing during the include. 1 and true can usually be used interchangeably in most programming languages because true is stored as something bigger than (or different to) 0 and false as 0. But it's clearer for the programmer to use true and false because it's clearer as what its semantics are. Important for computer science: The difference between syntax and semantics... PHP does type juggling... '1' is coerced to true just as well as 1. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP Not always the case though, hence the need for the === and !== Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Will not report errors what can I do
On Fri, 2008-12-05 at 08:15 +, Ashley Sheridan wrote: On Fri, 2008-12-05 at 00:00 -0500, Robert Cummings wrote: On Fri, 2008-12-05 at 17:44 +1300, German Geek wrote: On Fri, Dec 5, 2008 at 4:26 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Thu, 2008-12-04 at 15:07 -0800, Jim Lucas wrote: Terion Miller wrote: Hey everyone I am still fighting the same problem that my script isn't working and its not reporting errors, when you click to view the work order it doesn't do anything, I have all kinds of error reporting turned on but nothing, do I have them syntax wrong? ?php include(inc/dbconn_open.php); error_reporting(E_ALL); ini_set('display_errors', '1'); This is boolean, it should be ini_set('display_errors', 1); Isn't 1 an integer and true a boolean? ;) Anyways, what I noticed is that error reporting is enabled after an include. Maybe the system is failing during the include. 1 and true can usually be used interchangeably in most programming languages because true is stored as something bigger than (or different to) 0 and false as 0. But it's clearer for the programmer to use true and false because it's clearer as what its semantics are. Important for computer science: The difference between syntax and semantics... PHP does type juggling... '1' is coerced to true just as well as 1. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP Not always the case though, hence the need for the === and !== No, PHP will happily coerce as needed... the === and !== operators are for when you want to distinguish the type-- if you want to distinguish the type, then you probably aren't relying on automatic type conversion. The comment was that a boolean should be used instead of '1', but then an integer was provided instead of a boolean. As such, an automatic conversion still happens with the same outcome. I would imagine though, that since this function works with the ini type data, it would mirror what one would expect from the php.ini itself... namely, it probably handles string values appropriately. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Will not report errors what can I do
At 3:07 PM -0800 12/4/08, Jim Lucas wrote: Terion Miller wrote: $query = SELECT ViewAllWorkOrders FROM admin WHERE AdminID='$AdminID'; $result = mysql_query ($query); Not the best solution, but add this to the above line... $result = mysql_query ($query) or die(mysql_error()); Agreed. I go even a bit further, like so: $result = mysql_query($query) or die(report($query,__LINE__ ,__FILE__)); // to show dB errors == function report($query, $line, $file) { echo($query . 'br' .$line . 'br/' . $file . 'br/' . mysql_error()); } This does two things: 1) It tells where the error took place (line/file); 2) and it provides a single place in my entire project to turn-off dB error reporting -- all I have to do is comment out a single line. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Will not report errors what can I do
$result = mysql_query($query) or die(report($query,__LINE__ ,__FILE__)); // to show dB errors == function report($query, $line, $file) { echo($query . 'br' .$line . 'br/' . $file . 'br/' . mysql_error()); } This does two things: 1) It tells where the error took place (line/file); 2) and it provides a single place in my entire project to turn-off dB error reporting -- all I have to do is comment out a single line. I did this, briefly, but got tired of typing __LINE__, __FILE__ so much. define('ERROR_VERBOSE', 0); function error_handler($level, $messsage, $file, $line, $context){ error_log($file:$line - $message); if (ERROR_VERBOSE){ foreach($context as $k=$v){ error_log($k: $v); } } switch($level){ case E_USER_ERROR: case E_USER_WARNING: case E_USER_NOTICE: case E_WARNING: case E_NOTICE: //do nothing break; case E_ERROR: exit; break; default: error_log(PHP Devs invented a new error level:? . $level); break; } } set_error_handler('error_handler'); $f = mysql_query($sql) or trigger_error(mysqli_error($connection)); This generalizes it to not be just about DB errors, but ANY php error. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Will not report errors what can I do
At 3:19 PM + 12/5/08, [EMAIL PROTECTED] wrote: $result = mysql_query($query) or die(report($query,__LINE__ ,__FILE__)); // to show dB errors == function report($query, $line, $file) { echo($query . 'br' .$line . 'br/' . $file . 'br/' . mysql_error()); } This does two things: 1) It tells where the error took place (line/file); 2) and it provides a single place in my entire project to turn-off dB error reporting -- all I have to do is comment out a single line. I did this, briefly, but got tired of typing __LINE__, __FILE__ so much. That's what I call common code -- I type it once and after that it's all cut/paste. I have entire libraries of routines that I've used before -- I just cut/paste them into the new stuff as needed. Even many of the variable names remain the same so it becomes more a job of assembly more than typing. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Will not report errors what can I do
On Fri, 2008-12-05 at 10:40 -0500, tedd wrote: At 3:19 PM + 12/5/08, [EMAIL PROTECTED] wrote: $result = mysql_query($query) or die(report($query,__LINE__ ,__FILE__)); // to show dB errors == function report($query, $line, $file) { echo($query . 'br' .$line . 'br/' . $file . 'br/' . mysql_error()); } This does two things: 1) It tells where the error took place (line/file); 2) and it provides a single place in my entire project to turn-off dB error reporting -- all I have to do is comment out a single line. I did this, briefly, but got tired of typing __LINE__, __FILE__ so much. That's what I call common code -- I type it once and after that it's all cut/paste. I have entire libraries of routines that I've used before -- I just cut/paste them into the new stuff as needed. Even many of the variable names remain the same so it becomes more a job of assembly more than typing. I have to say... for what he's trying to achieve, I cheat and extract the file and line number via debug_backtrace(). Indeed, it is annoying to type the same thing over and over :) Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Will not report errors what can I do
On Fri, Dec 5, 2008 at 12:08 PM, Robert Cummings [EMAIL PROTECTED]wrote: On Fri, 2008-12-05 at 10:40 -0500, tedd wrote: At 3:19 PM + 12/5/08, [EMAIL PROTECTED] wrote: $result = mysql_query($query) or die(report($query,__LINE__ ,__FILE__)); // to show dB errors == function report($query, $line, $file) { echo($query . 'br' .$line . 'br/' . $file . 'br/' . mysql_error()); } This does two things: 1) It tells where the error took place (line/file); 2) and it provides a single place in my entire project to turn-off dB error reporting -- all I have to do is comment out a single line. I did this, briefly, but got tired of typing __LINE__, __FILE__ so much. That's what I call common code -- I type it once and after that it's all cut/paste. I have entire libraries of routines that I've used before -- I just cut/paste them into the new stuff as needed. Even many of the variable names remain the same so it becomes more a job of assembly more than typing. I have to say... for what he's trying to achieve, I cheat and extract the file and line number via debug_backtrace(). Indeed, it is annoying to type the same thing over and over :) Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Thanks to everyone you really helped and I got that page error showing and fixed and whew...on to my next problems! I am starting a new discussion thread because I want to see what people think between using Javascript form validation or php form validation on php pagesstay tuned and much thanks! Terion
Re: [PHP] Will not report errors what can I do
On Thu, 2008-12-04 at 16:20 -0600, Terion Miller wrote: Hey everyone I am still fighting the same problem that my script isn't working and its not reporting errors, when you click to view the work order it doesn't do anything, I have all kinds of error reporting turned on but nothing, do I have them syntax wrong? ?php include(inc/dbconn_open.php); error_reporting(E_ALL); ini_set('display_errors', '1'); error_log(errors.txt); if (empty($_SESSION['AdminLogin']) OR $_SESSION['AdminLogin'] 'OK' ){ header (Location: LogOut.php); } if (isset($_GET['AdminID']) !empty($_GET['AdminID'])){ $AdminID = $_GET['AdminID']; } else { header (Location: LogOut.php); } $query = SELECT ViewAllWorkOrders FROM admin WHERE AdminID='$AdminID'; $result = mysql_query ($query); $row = mysql_fetch_object ($result); if ($row-ViewProjects == NO) { header (Location: Welcome.php?AdminID=$AdminIDmsg=Sorry, you do not have access to that page.); } if (isset($_GET['WorkOrderID'])) {$WorkOrderID = $_GET['WorkOrderID'];} else {$WorkOrderID = '';} if (isset($_GET['ReturnPage'])) {$ReturnPage = $_GET['ReturnPage'];} else {$ReturnPage = 'Welcome.php';} $sql = SELECT FormName FROM workorders WHERE WorkOrderID='$WorkOrderID'; $result = mysql_query ($sql); $row = mysql_fetch_object ($result); if (mysql_num_rows($result) 0) { if ($row-FormName == WorkOrder) { header (Location: ViewWorkOrder.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); }elseif ($row-FormName == PD_Coupon) { header (Location: ViewPD_Coupon.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); }elseif ($row-FormName == PD_TextAd) { header (Location: ViewPD_TextAd.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); }elseif ($row-FormName == PD_Enhanced) { header (Location: ViewPD_Enhanced.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); }elseif ($row-FormName == HS_Builder) { header (Location: ViewHomescape_Builder.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); }elseif ($row-FormName == HS_SpecHome) { header (Location: ViewHomescape_SpecHome.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); } else { header (Location: Welcome.php?AdminID=$AdminIDmsg=Nothing works Does it); } } else { header (Location: Welcome.php?AdminID=$AdminIDmsg=Nothing Works..g); } ? Couple of things to check here: * is the web server working correctly? * do you have permission to set the reporting level (strange but not impossible) * are you sure it's not a logic error in your code rather than a syntax error I notice you're using a LOT of header(Location: ...); calls, which I'd advise against, but if you must use them, there are sometimes problems when you don't specify the full URL of the page you need to locate to. Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Will not report errors what can I do
Terion Miller wrote: Hey everyone I am still fighting the same problem that my script isn't working and its not reporting errors, when you click to view the work order it doesn't do anything, I have all kinds of error reporting turned on but nothing, do I have them syntax wrong? ?php include(inc/dbconn_open.php); error_reporting(E_ALL); ini_set('display_errors', '1'); This is boolean, it should be ini_set('display_errors', 1); error_log(errors.txt); if (empty($_SESSION['AdminLogin']) OR $_SESSION['AdminLogin'] 'OK' ){ header (Location: LogOut.php); } if (isset($_GET['AdminID']) !empty($_GET['AdminID'])){ $AdminID = $_GET['AdminID']; } else { header (Location: LogOut.php); } $query = SELECT ViewAllWorkOrders FROM admin WHERE AdminID='$AdminID'; $result = mysql_query ($query); Not the best solution, but add this to the above line... $result = mysql_query ($query) or die(mysql_error()); $row = mysql_fetch_object ($result); This isn't going to work. Above in your select statement, you are only selecting the ViewAllWorkOrders column. But then here, you are trying to access a column/object called ViewProjects. Where do you think this column/object is coming from? It needs to exist in your previous select statement for it to work correctly, otherwise, what point is your first select statement? if ($row-ViewProjects == NO) { header (Location: Welcome.php?AdminID=$AdminIDmsg=Sorry, you do not have access to that page.); } if (isset($_GET['WorkOrderID'])) {$WorkOrderID = $_GET['WorkOrderID'];} else {$WorkOrderID = '';} if (isset($_GET['ReturnPage'])) {$ReturnPage = $_GET['ReturnPage'];} else {$ReturnPage = 'Welcome.php';} $sql = SELECT FormName FROM workorders WHERE WorkOrderID='$WorkOrderID'; $result = mysql_query ($sql); same thing for the error reporting here $result = mysql_query ($sql) or die(mysql_error()); The following line will through an error is you have no results $row = mysql_fetch_object ($result); put the previous mysql_fetch_object() call after the following if statement. if (mysql_num_rows($result) 0) { like this $row = mysql_fetch_object ($result); if ($row-FormName == WorkOrder) { header (Location: ViewWorkOrder.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); }elseif ($row-FormName == PD_Coupon) { header (Location: ViewPD_Coupon.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); }elseif ($row-FormName == PD_TextAd) { header (Location: ViewPD_TextAd.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); }elseif ($row-FormName == PD_Enhanced) { header (Location: ViewPD_Enhanced.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); }elseif ($row-FormName == HS_Builder) { header (Location: ViewHomescape_Builder.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); }elseif ($row-FormName == HS_SpecHome) { header (Location: ViewHomescape_SpecHome.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); } else { header (Location: Welcome.php?AdminID=$AdminIDmsg=Nothing works Does it); } } else { header (Location: Welcome.php?AdminID=$AdminIDmsg=Nothing Works..g); Put curly brackets around all variables in the preceding header() calls } ? and for the love of ?php echo $deity; ?, run mysql_real_escape_string() on your input before using it in a statement... Also, if you have a parse error within the page, or included pages, none of the error reporting you have set will make any difference. for you to ensure that error reporting in enabled, you need to have it set in the php.ini, the virtualhost block, or .htaccess files if they are an option. Hope this helps -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Will not report errors what can I do
On Thu, 2008-12-04 at 15:07 -0800, Jim Lucas wrote: Terion Miller wrote: Hey everyone I am still fighting the same problem that my script isn't working and its not reporting errors, when you click to view the work order it doesn't do anything, I have all kinds of error reporting turned on but nothing, do I have them syntax wrong? ?php include(inc/dbconn_open.php); error_reporting(E_ALL); ini_set('display_errors', '1'); This is boolean, it should be ini_set('display_errors', 1); Isn't 1 an integer and true a boolean? ;) Anyways, what I noticed is that error reporting is enabled after an include. Maybe the system is failing during the include. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Will not report errors what can I do
On Fri, Dec 5, 2008 at 4:26 PM, Robert Cummings [EMAIL PROTECTED]wrote: On Thu, 2008-12-04 at 15:07 -0800, Jim Lucas wrote: Terion Miller wrote: Hey everyone I am still fighting the same problem that my script isn't working and its not reporting errors, when you click to view the work order it doesn't do anything, I have all kinds of error reporting turned on but nothing, do I have them syntax wrong? ?php include(inc/dbconn_open.php); error_reporting(E_ALL); ini_set('display_errors', '1'); This is boolean, it should be ini_set('display_errors', 1); Isn't 1 an integer and true a boolean? ;) Anyways, what I noticed is that error reporting is enabled after an include. Maybe the system is failing during the include. 1 and true can usually be used interchangeably in most programming languages because true is stored as something bigger than (or different to) 0 and false as 0. But it's clearer for the programmer to use true and false because it's clearer as what its semantics are. Important for computer science: The difference between syntax and semantics... Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Tim-Hinnerk Heuer http://www.ihostnz.com -- Web Design, Hosting and free Linux Support
Re: [PHP] Will not report errors what can I do
On Fri, 2008-12-05 at 17:44 +1300, German Geek wrote: On Fri, Dec 5, 2008 at 4:26 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Thu, 2008-12-04 at 15:07 -0800, Jim Lucas wrote: Terion Miller wrote: Hey everyone I am still fighting the same problem that my script isn't working and its not reporting errors, when you click to view the work order it doesn't do anything, I have all kinds of error reporting turned on but nothing, do I have them syntax wrong? ?php include(inc/dbconn_open.php); error_reporting(E_ALL); ini_set('display_errors', '1'); This is boolean, it should be ini_set('display_errors', 1); Isn't 1 an integer and true a boolean? ;) Anyways, what I noticed is that error reporting is enabled after an include. Maybe the system is failing during the include. 1 and true can usually be used interchangeably in most programming languages because true is stored as something bigger than (or different to) 0 and false as 0. But it's clearer for the programmer to use true and false because it's clearer as what its semantics are. Important for computer science: The difference between syntax and semantics... PHP does type juggling... '1' is coerced to true just as well as 1. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Will not report errors what can I do
HI Terion, Please put the error reporting on top of the page and try. If you have any errors in the include file, it won't execute the rest of commands. Make the changes to code as follows. ?php error_reporting(E_ALL); ini_set('display_errors', '1'); include(inc/dbconn_open.php); ? Regards, Johny John www.phpshore.com On Fri, Dec 5, 2008 at 3:50 AM, Terion Miller [EMAIL PROTECTED]wrote: Hey everyone I am still fighting the same problem that my script isn't working and its not reporting errors, when you click to view the work order it doesn't do anything, I have all kinds of error reporting turned on but nothing, do I have them syntax wrong? ?php include(inc/dbconn_open.php); error_reporting(E_ALL); ini_set('display_errors', '1'); error_log(errors.txt); if (empty($_SESSION['AdminLogin']) OR $_SESSION['AdminLogin'] 'OK' ){ header (Location: LogOut.php); } if (isset($_GET['AdminID']) !empty($_GET['AdminID'])){ $AdminID = $_GET['AdminID']; } else { header (Location: LogOut.php); } $query = SELECT ViewAllWorkOrders FROM admin WHERE AdminID='$AdminID'; $result = mysql_query ($query); $row = mysql_fetch_object ($result); if ($row-ViewProjects == NO) { header (Location: Welcome.php?AdminID=$AdminIDmsg=Sorry, you do not have access to that page.); } if (isset($_GET['WorkOrderID'])) {$WorkOrderID = $_GET['WorkOrderID'];} else {$WorkOrderID = '';} if (isset($_GET['ReturnPage'])) {$ReturnPage = $_GET['ReturnPage'];} else {$ReturnPage = 'Welcome.php';} $sql = SELECT FormName FROM workorders WHERE WorkOrderID='$WorkOrderID'; $result = mysql_query ($sql); $row = mysql_fetch_object ($result); if (mysql_num_rows($result) 0) { if ($row-FormName == WorkOrder) { header (Location: ViewWorkOrder.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); }elseif ($row-FormName == PD_Coupon) { header (Location: ViewPD_Coupon.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); }elseif ($row-FormName == PD_TextAd) { header (Location: ViewPD_TextAd.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); }elseif ($row-FormName == PD_Enhanced) { header (Location: ViewPD_Enhanced.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); }elseif ($row-FormName == HS_Builder) { header (Location: ViewHomescape_Builder.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); }elseif ($row-FormName == HS_SpecHome) { header (Location: ViewHomescape_SpecHome.php?AdminID=$AdminIDWorkOrderID=$WorkOrderIDReturnPage=$ReturnPage); } else { header (Location: Welcome.php?AdminID=$AdminIDmsg=Nothing works Does it); } } else { header (Location: Welcome.php?AdminID=$AdminIDmsg=Nothing Works..g); } ? -- Regards, Johny www.phpshore.com
Re: [PHP] Will not report errors what can I do
Johny John wrote: HI Terion, Please put the error reporting on top of the page and try. If you have any errors in the include file, it won't execute the rest of commands. Make the changes to code as follows. ?php error_reporting(E_ALL); ini_set('display_errors', '1'); include(inc/dbconn_open.php); ? Regards, Johny John This still doesn't address his possible parse error problem. If he has a parse error, it makes no difference where he places the above lines. Nothing is going to work. It should be done via one of the three methods that mention in my other email. Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Will not report errors what can I do
On Thu, 2008-12-04 at 21:28 -0800, Jim Lucas wrote: Johny John wrote: HI Terion, Please put the error reporting on top of the page and try. If you have any errors in the include file, it won't execute the rest of commands. Make the changes to code as follows. ?php error_reporting(E_ALL); ini_set('display_errors', '1'); include(inc/dbconn_open.php); ? Regards, Johny John This still doesn't address his possible parse error problem. If he has a parse error, it makes no difference where he places the above lines. Nothing is going to work. It should be done via one of the three methods that mention in my other email. It depends where the parse error exists. If it exists in inc/dbconn_open.php then this will catche it since the error reporting settings will take effect before the parse error causes a fatal during the include. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Will not report errors what can I do
Jim Lucas wrote: Johny John wrote: HI Terion, Please put the error reporting on top of the page and try. If you have any errors in the include file, it won't execute the rest of commands. Make the changes to code as follows. ?php error_reporting(E_ALL); ini_set('display_errors', '1'); include(inc/dbconn_open.php); ? Regards, Johny John This still doesn't address his possible parse error problem. If he has a parse error, it makes no difference where he places the above lines. Nothing is going to work. It should be done via one of the three methods that mention in my other email. Putting it in the file is ideal if he can't set up his server to do it via one of the other methods, however if he HAS set it up via other methods, you normally HAVE to restart the server processes so that they re-read the PHP.ini file so they actually will DO the changes that you have made to them. Otherwise you are just wasting more time. HTH, Wolf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php