24, July 2008

debugging in php 5.21 - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ 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

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


It's time to use PHP5!


« on: Mar 16, 2007, 09: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)


Last blog : 4th of July Lottery from TemplateMonster.com
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7974
40801 credits
Members referred : 3



« Reply #1 on: Mar 16, 2007, 09: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 Visit through proxy

Last blog : MIA - Where Nick and Tim
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6280
38506 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Mar 16, 2007, 09: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


Last blog : 4th of July Lottery from TemplateMonster.com
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7974
40801 credits
Members referred : 3



« Reply #3 on: Mar 16, 2007, 09: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 Visit through proxy

Last blog : MIA - Where Nick and Tim
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6280
38506 credits
Members referred : 374


It's time to use PHP5!


« Reply #4 on: Mar 16, 2007, 09: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


Last blog : 4th of July Lottery from TemplateMonster.com
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....

Topic sponsors:
Get a permanent link here for $1.99!


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?
Jul 24, 2008, 11:44:23 AM





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!


Forum Statistics
Total Posts: 35.712
Total Topics: 7.376
Total Members: 3.706
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: FortuneBeach

31 Guests, 4 Users online :

11 users online today:



Readers

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