Results 1 to 4 of 4

Thread: Error: Use of undefined constant in PHP

  1. #1
    Join Date
    May 2008
    Posts
    38

    Error: Use of undefined constant in PHP

    Hello friends,
    I got this error message & I dont understand why I am getting this error message without any changes been made from my side.

    Error: Use of undefined constant

    It says something like:
    Code:
    Notice: Use of undefined constant ID_my_site - assumed 'ID_my_site' in /path/.../login.php on line 70
    Can you let me know what should I do?

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: Error: Use of undefined constant in PHP

    Notice: Use of undefined constant/variable
    Due to a change of requirements between php versions, it became necessary to define and/or initialize all the constants and variables used in php

    The work-round to this issue is to change the php.ini settings from

    Code:
    error_reporting = E_ALL
    to

    Code:
    error_reporting = E_ALL & ~E_NOTICE

  3. #3
    Join Date
    May 2008
    Posts
    2,297

    Re: Error: Use of undefined constant in PHP

    Here It is the Answer to your Question
    Predefined Variables
    PHP provides a large number of predefined variables to any script which it runs. Many of these variables, however, cannot be fully documented as they are dependent upon which server is running, the version and setup of the server, and other factors.
    From version 4.1.0 onward, PHP provides an additional set of predefined arrays containing variables from the web server (if applicable), the environment, and user input. These new arrays are rather special in that they are automatically global--i.e., automatically available in every scope. For this reason, they are often known as "superglobals". (There is no mechanism in PHP for user-defined superglobals.)
    Superglobals cannot be used as variable variables inside functions or class methods.
    http://www.php.net/manual/en/languag...predefined.php

    I hope this helps you.

  4. #4
    Join Date
    May 2008
    Posts
    30

    Re: Error: Use of undefined constant in PHP

    I am working with Joomla & PHP.
    I just got updated to the latest version.
    Now I see an error message in my log message:

    Code:
    PHP Notice:  Use of undefined constant _ISO - assumed '_ISO' in /home/mysite/public_html/Portal/includes/joomla.php on line 2651
    What do you suggest me?

Similar Threads

  1. 'DOMParser is undefined' IE7 error message
    By Protectors in forum Technology & Internet
    Replies: 5
    Last Post: 28-01-2012, 08:20 AM
  2. Need for Speed World Undefined Error help
    By Sahira in forum Video Games
    Replies: 6
    Last Post: 20-07-2010, 11:08 AM
  3. Replies: 3
    Last Post: 13-08-2009, 06:42 PM
  4. Fatal Error : Call to undefined function simplexml_load_file()
    By Ananias in forum Software Development
    Replies: 3
    Last Post: 02-06-2009, 05:43 PM
  5. Undefined variable error in Php
    By Capers in forum Software Development
    Replies: 3
    Last Post: 31-03-2009, 05:14 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,398,818.34635 seconds with 17 queries