473,325 Members | 2,308 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,325 software developers and data experts.

Wanted - Undefined variable errors

Hello.

Is there any way please I can make the PHP interpreter report "undefined
variable" errors, instead of replacing unknown variables with nothing?

Three times today, I've tracked an error down to using a non-existant
variable which had arrived though a typo or a scoping error.

Many thanks.

Bill, trying to learn.
Jul 17 '05 #1
2 1713
Bill Godfrey wrote:
Is there any way please I can make the PHP interpreter report "undefined
variable" errors, instead of replacing unknown variables with nothing?


Yes.

Try http://www.php.net/error_reporting
You may want to change your php.ini to have PHP default to reporting all
errors it finds.
HTH

--
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |
Jul 17 '05 #2
bi**********@sunny-coventry.invalid (Bill Godfrey) wrote in message news:<20*******************@newsreader.com>...
Hello.

Is there any way please I can make the PHP interpreter report "undefined
variable" errors, instead of replacing unknown variables with nothing?


Try adding the following two lines in the beginning of all your scripts:

error_reporting(E_ALL);
ini_set('display_errors', 1);

_Or_ fix your ini file settings.

--
| Just another PHP saint |
Email: rrjanbiah-at-Y!com
Jul 17 '05 #3

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

Similar topics

5
by: news.bigpond.com | last post by:
getting errors Notice: Undefined index: name in F:\uni\Software engineering\assignment4\guestbook.php on line 6 the variable $name is declared as $name = _POST; What could be causing this?...
7
by: Coder Droid | last post by:
I decided to run some code with errors set to E_ALL, just to see what I would run across. It caught a few things, but 90% or better of the messages were of the 'undefined' kind: PHP Notice: ...
3
by: lkrubner | last post by:
how does one set a variable so as to avoid errors like this: Notice: Undefined variable: arrayToCapture in /home/httpd/vhosts/publicdomainsoftware.org/httpdocs/pdsIncludes/McControllerForAll.php...
49
by: matty | last post by:
Hi, I recently got very confused (well that's my life) about the "undefined" value. I looked in the FAQ and didn't see anything about it. On...
17
by: yb | last post by:
Hi, Looking for clarification of undefined variables vs. error in JavaScript code. e.g. <script> alert( z ); // this will be an error, i.e. an exception </script>
1
by: Justin Johnson | last post by:
Hello, I'm trying to build Python 2.5.0 on AIX 5.3 using IBM's compiler (VisualAge C++ Professional / C for AIX Compiler, Version 6). I run configure and make, but makes fails with undefined...
2
by: Reggie | last post by:
am trying to create a a upload file.am uploading files ok but i recieve this message. Notice: Undefined variable: uploaded_size in /home/fhlinux169/c/ clashoff.co.uk/user/htdocs/upload.php on...
5
by: siyaverma | last post by:
Hi, I am new to php, i was doing some small chnages in a project developed by my collegue who left the job and i got the responsibility for that, After doing some changes when i run it on my...
10
blyxx86
by: blyxx86 | last post by:
Good Morning, I have a set of variables being passed to a form via CodeIgniter's MVC setup, however I am trying to keep from duplicating the form elements if at all possible. However, I am...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.