Welcome, Guest
Username: Password: Remember me

TOPIC: Use of undefined constant __DIR__ - assumed '__DIR

Use of undefined constant __DIR__ - assumed '__DIR 19 May 2013 09:49 #7207

  • twev
  • twev's Avatar
  • Offline
  • Senior Member
  • Posts: 62
  • Thank you received: 15
  • Karma: 6
I have been trying to test one of my components in 2.5. It works OK in the sandbox but when uploaded to my server I get the following error:

Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in
/httpdocs/j25/administrator/components/com_coursecalendar/helpers/loader.php on line 90

Warning: require_once(__DIR__/mvc.php) [function.require-once]: failed to open stream: No such file or directory in
/httpdocs/j25/administrator/components/com_coursecalendar/helpers/loader.php on line 90

The file mvc.php is there!

Trevor
The administrator has disabled public write access.

Re: Use of undefined constant __DIR__ - assumed '__DIR 19 May 2013 21:32 #7210

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
This is a problem with your server I think.

Try __DIR__ outside of your component.

__DIR__ only exists with PHP >= 5.3
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Use of undefined constant __DIR__ - assumed '__DIR 20 May 2013 06:28 #7211

  • twev
  • twev's Avatar
  • Offline
  • Senior Member
  • Posts: 62
  • Thank you received: 15
  • Karma: 6
Yes that will be it - thanks.
It is curently running 5,2.17 so I will upgrade it.
The administrator has disabled public write access.
Time to create page: 0.068 seconds

Get Started