PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old October 6th, 2007, 04:41 PM
downunder downunder is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 35 downunder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 3 m 4 sec
Reputation Power: 2
Undefined variables but no error generated - Resolved

Hi, I have recently installed php 5.2.2.

Previously I was using version 4.x

In 4.x, if I accessed a variable that was not defined then I would get an error. But now I can have undefined variables and I get no error.

For example, If I put this line in my script
$a = $b;

Then i expect an error because $b does not exist.

My php.ini file contains the following settings which are the same as the php.ini that I used with php4.x

error_reporting = E_ALL & ~E_NOTICE
display_errors = On

So there must be some other switch to control this type of error detection and reporting.

Help appreciated.

Thanks.

Last edited by downunder : October 6th, 2007 at 08:16 PM. Reason: Added word resolved

Reply With Quote
  #2  
Old October 6th, 2007, 06:29 PM
cwf's Avatar
cwf cwf is online now
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 343 cwf User rank is Private First Class (20 - 50 Reputation Level)cwf User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 2 Days 18 h 5 m 35 sec
Reputation Power: 2
An undefined variable generates a NOTICE level message. The error_reporting setting you posted specifically turns off notice level messages.

If you were receiving notice messages with that setting, then either the php.ini where that setting was located was not being used by php or there was another setting that was overriding that setting.

For your current want to display notice level messages, change the setting to: error_reporting = E_ALL

Stop and start your web server to get any changes made to php.ini to take effect.

Reply With Quote
  #3  
Old October 6th, 2007, 08:15 PM
downunder downunder is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 35 downunder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 3 m 4 sec
Reputation Power: 2
Fixed - Thank You

change the setting to: error_reporting = E_ALL

Worked a treat. Too obvious. I dont know why I did not see it.

Thanks

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > Undefined variables but no error generated


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway