How to install custom modules on a Kohana 3 system

I am learning the KohanaPhp 3 framework and I have a problem adding a module called kolanos-Kohana-captcha.

What i have done so far:

  • I copied the kolanos-kohana-captcha directory to the modules directory
  • Copied kolanos-kohana-captcha / config / captcha.php to application / config / captcha.php
  • Edited the file and added Bootstrap.php

Kohana :: modules (array (... 'captcha' => MODPATH. "Kolanos-kohana-captcha ',));

But this will not work: (Whenever I want to use the Captcha class, kohana shows a "class not found" error.

Am I doing something wrong? Is this a problem with the module? Are there any other modules for captcha processing in Kohana 3+?

+4
source share
1 answer
  • The original name of the project is Kohana-Kapcha, not Kolanos-Kohana-Kapcha. Maybe you specified the wrong directory name in bootstrap.php? In addition, hosting servers are usually case sensitive, do not forget about this.

  • Use Kohana :: modules (). It returns all loaded modules, so you will see that these are just problems with Captcha or something else (for example, you are using the wrong MODPATH value).

  • You can check the autoload of the Kohana class with Kohana :: auto_load (), which will return TRUE / FALSE.

+4
source

Source: https://habr.com/ru/post/1311624/


All Articles