从 laravel 4.2 应用程序发出连接 magento soap api
Issue connecting magento soap api from laravel 4.2 application
在系统中,soap api 部分是用 magento 完成的。
app/config/api.php
<?php
return array (
/**
* Magento Api
*/
'mage_soap_api_url' => 'http://url/',
'mage_soap_api_user' => 'username',
'mage_soap_api_key' => 'password',
'mage_soap_api_path' => '/var/www/ecomm'
);
它正在暂存 server.But 中工作,当我尝试在暂存到本地实施的 laravel 4.2 项目时访问此 magento 部分,我收到此错误。
PHP Fatal error: {closure}(): Failed opening required
'/var/www/ecomm/app/Mage.php'
(include_path='/var/www/html/local/vendor/phpseclib/phpseclib/phpseclib:.:/usr/share/php:/usr/share/pear')
in /var/www/html/local/app/routes.php on line 125
routes.php
Route::any('/customer/account/logout', function () {
$api_path = Config::get('api.mage_soap_api_path');
require_once("{$api_path}app/Mage.php");
umask(0);
Mage::app('default');
Mage::getSingleton('core/session', array('name' => 'frontend'));
$session = Mage::getSingleton('customer/session', array('name' => 'frontend'));
$session->logout();
Session::put('customer', null);
return Redirect::to('/login');
});
是否可以设置任何权限以在本地访问它(magento soap api)。其实我是 laravel 开发者。所以不熟悉magento。
如果有人能帮助我就太好了。
其实是权限问题。我无法从我的本地系统访问暂存 magento api。他们限制了它。我在本地设置它并链接数据库。现在可以使用了。
在系统中,soap api 部分是用 magento 完成的。
app/config/api.php
<?php
return array (
/**
* Magento Api
*/
'mage_soap_api_url' => 'http://url/',
'mage_soap_api_user' => 'username',
'mage_soap_api_key' => 'password',
'mage_soap_api_path' => '/var/www/ecomm'
);
它正在暂存 server.But 中工作,当我尝试在暂存到本地实施的 laravel 4.2 项目时访问此 magento 部分,我收到此错误。
PHP Fatal error: {closure}(): Failed opening required '/var/www/ecomm/app/Mage.php' (include_path='/var/www/html/local/vendor/phpseclib/phpseclib/phpseclib:.:/usr/share/php:/usr/share/pear') in /var/www/html/local/app/routes.php on line 125
routes.php
Route::any('/customer/account/logout', function () {
$api_path = Config::get('api.mage_soap_api_path');
require_once("{$api_path}app/Mage.php");
umask(0);
Mage::app('default');
Mage::getSingleton('core/session', array('name' => 'frontend'));
$session = Mage::getSingleton('customer/session', array('name' => 'frontend'));
$session->logout();
Session::put('customer', null);
return Redirect::to('/login');
});
是否可以设置任何权限以在本地访问它(magento soap api)。其实我是 laravel 开发者。所以不熟悉magento。
如果有人能帮助我就太好了。
其实是权限问题。我无法从我的本地系统访问暂存 magento api。他们限制了它。我在本地设置它并链接数据库。现在可以使用了。