28, May 2012

debugging in php 5.21 - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: debugging in php 5.21
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: debugging in php 5.21  (Read 1549 times)
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« on: Mar 16, 2007, 08:10:52 am »

Hi,

the last days I get some problems with the debugging of new code on a server with php 5.21.

I understand that this setting need to be on:
ini_set('display_errors', 1);

and I added also this row to the top:
error_reporting(E_ALL);

so why PHP doesn't show errors for this mistakes?

Code:
mysql_query(sprintf("REPLACE LOW_PRIORITY INTO net_adr SET domain_id = %d, keyw = %s", $id, sql_value($string));

(note the missing bracket at the end)

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #1 on: Mar 16, 2007, 08:15:15 am »

Because this is not a runtime error.

You should set the error reporting in php.ini or by using directives in .htaccess

Eg.

Code:
php_value display_errors 1

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Mar 16, 2007, 08:32:41 am »

Because this is not a runtime error.

You should set the error reporting in php.ini or by using directives in .htaccess

Eg.

Code:
php_value display_errors 1

thanks that is the solution.

but what about this info from the manual:
display_errors   "1"   PHP_INI_ALL

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #3 on: Mar 16, 2007, 08:35:59 am »

The problem is that your error was a parse error. That means that php has not yet interpreted anything (including the ini_set command) so it wont display the error. So until the state that it starts interpreting the directives in your code has no meaning at all.

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #4 on: Mar 16, 2007, 08:38:44 am »

The problem is that your error was a parse error. That means that php has not yet interpreted anything (including the ini_set command) so it wont display the error. So until the state that it starts interpreting the directives in your code has no meaning at all.
Ok, I understand (it looks like that I need to add more personal settings to every .htaccess file for this reseller hosting)

thanks

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6241
Tags : php bugs errors Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: debugging in php 5.21
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 06:53:00 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.