do You have problem with PEAR with CakePhp ?
Are you Getting Error like Blelow ? Then this post is for you!!
<---------------------->
Warning (2): require_once(PayPal/Profile/API.php) [function.require-once]: failed to open stream: No such file or directory [APP\controllers\components\paypal.php, line 13]
Code |
Context$file = "C:\xampp\htdocs\paypal\app\controllers\components\paypal.php" $_this = App App::$search = array App::$return = false App::$__cache = true App::$__map = array App::$__paths = array App::$__loaded = array App::$_log = NULL
require_once('PayPal.php'); require_once('PayPal/Profile/API.php');
require_once - APP\controllers\components\paypal.php, line 13 require - APP\controllers\components\paypal.php, line 13 App::__load() - CORE\cake\libs\configure.php, line 956 App::__find() - CORE\cake\libs\configure.php, line 934 App::import() - CORE\cake\libs\configure.php, line 861 Component::_loadComponents() - CORE\cake\libs\controller\component.php, line 178 Component::init() - CORE\cake\libs\controller\component.php, line 69 Controller::constructClasses() - CORE\cake\libs\controller\controller.php, line 387 Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 215 [main] - APP\webroot\index.php, line 90
Fatal error: require_once() [function.require]: Failed opening required 'PayPal/Profile/API.php' (include_path='C:\xampp\htdocs\paypal;C:\xampp\htdocs\paypal\app\;.;C:\xampp\php\pear\') in C:\xampp\htdocs\paypal\app\controllers\components\paypal.php on line
13
<--------------------------->
Solution:
1) Go to /cake/config/paths.php
2) then search for :
define ('PEAR', VENDORS.'Pear'.DS);
3) change that line to :
define ('PEAR', VENDORS.'Pear'.DS);
if( file_exists(VENDORS.'Pear'))
{
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . PEAR);
}
Thats it ,now refresh your browser, voila!! It is working!!!.
No comments:
Post a Comment