Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

  • twev
  • twev's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 62
  • Thank you received: 15
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

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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

Please Log in or Create an account to join the conversation.

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

  • twev
  • twev's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 62
  • Thank you received: 15
Yes that will be it - thanks.
It is curently running 5,2.17 so I will upgrade it.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.106 seconds

Although I found this tool some time ago I just started learning experimenting and building this first component on Monday and now on Thursday afternoon it's already online. Although I already had a working version done with another tool this is much easier to build and at the end you have the freedom to own your own component. Once you know how to use Cook you will boost your productivity as the learning curve is really moderate compared to many other tools.
Giori (Forum)

Get Started