Use of undefined constant T_MEDIA_UR

Discussion in 'PHP' started by SurferJon, Apr 16, 2008.

  1. #1
    Before I begin, I just want to say that I know almost nothing about PHP, so if you were to help me, I would very much appreciate clear explanations. :)

    I am using a CMS called Immerse. Last night, I posted a news story on my website's front page, everything worked fine, and then I went to bed. When I woke up, I tried to login to my CMS but got this error:

    Error message: Use of undefined constant T_MEDIA_URL - assumed 'T_MEDIA_URL'
    Error triggered by: PHP
    In file: /a/path/name/apps/icms/controllers/application_controller.php
    On line: 101
    Error Code: 8

    This is the section of that code:
    Library::idefine('MEDIA_URL', T_MEDIA_URL.STYLE);

    When I remove that line completely, I just get the next "undefined constant." None of the CMS's files have been changed recently, so I don't know how the error could have been triggered (maybe something with the database?).

    Earlier in the week, I was getting PHP errors, but just cleared the CMS's cache and the problems fixed themselves. This problem won't. I also researched it on Google, and it said that the error pops up when people don't put ' ' around variables. I haven't touched anything, so I don't know how this could be the problem.

    I am not even sure if I can even get help since this is a specific piece of software with coding that is probably only understandable by someone who has it, but I do appreciate anyone who tries to help! :)
     
    SurferJon, Apr 16, 2008 IP
  2. m0nkeymafia

    m0nkeymafia Well-Known Member

    Messages:
    399
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    125
    #2
    Check that all the files it needs are being included, I suggest doing a find in files for T_MEDIA_URL and find out where that is defined, then find out if it is being included by the right scripts
     
    m0nkeymafia, Apr 17, 2008 IP
  3. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #3
    That kind of error is triggered by your error_reporting being to too high (E_ALL). Please can you try the solution that I have posted on this thread: http://forums.digitalpoint.com/showthread.php?t=797186

    If it doesn't work, please post if the original error(s) still exist, or if new ones occur.

    Jay
     
    jayshah, Apr 17, 2008 IP
  4. SurferJon

    SurferJon Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I put this at the top of the file:

    <?php
    error_reporting(E_ALL ^ E_NOTICE);
    ?>
    PHP:
    However, when loading it, it was completely blank. There was no code.
     
    SurferJon, Apr 17, 2008 IP
  5. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #5
    Unfortunately this seems like its application specific, so there is little more that I can think of. Sorry.

    Jay
     
    jayshah, Apr 17, 2008 IP