cakephp not load phpwois

117 Views Asked by At

I'm using cakephp and phpwhois I'm copying phpwhois folder in app/vendor in my controller :

App::import('Vendor', 'phpWhois\Whois', array('file' => 'phpWhois/Whois.php'));

whois class is extended with whpisclient class and show me this error :

Error: Class 'phpWhois\WhoisClient' not found   
File: C:\xampp\htdocs\padweb\app\Vendor\phpWhois\Whois.php

If I use composer autoloader, it shows me the same error.

1

There are 1 best solutions below

0
On

see this nice article http://ceeram.github.io/blog/2013/02/22/using-composer-with-cakephp-2-dot-x/ about using composer in cakephp 2.0 it will allow you to use a global autoload.php file for all your new packages that you install with composer

let me know if it helps