Magento Command line script Class 'SoapClient' not found - magento

I am trying to run a script from commandline to call a method in a Model, which involves the class SoapClient But come up with the error message
PHP Fatal error: Class 'SoapClient' not found in ....
Line which has the error is
$client = new SoapClient($this->_soapUrl);
I run the same process through web using a test route and it works.
Checked PHPINFO and it says
Soap Client enabled
Soap Server enabled
How can I include the SoapClient Class to the script or what can be the solution?

Your command line PHP uses different php.ini. Find out which php.ini file is used in PHP CLI and make sure the Soap extension is loaded there as well.

Related

Class 'Memcached' not found not.not working in laravel

I have PHP 5.4 on a litespeed web server. PHP has been compiled properly with memcached module and we also installed properly memcached library.
In fact the problem suddenly happened without any change at all (server side) when I run the artisan command, I am getting this error:
PHP Fatal error: Class 'Memcached' not found in /laravel/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php on line 52
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Memcached' not found
I googled the issue but was unable to find a solution. I am using Laravel 5.0.
I edited the app/Http/Routes.php and returned new Memcached and the php object was returned properly...
Any help would be appreciated.
I had the same issue.
Replace in .env file:
From : CACHE_DRIVER=memcached<br/>
To : CACHE_DRIVER=file**
then clear cache : php artisan cache:clear

QuickBook Autoload Integration with codeigniter (Fatal error: Class 'DataService' not found)

I am facing prob to integrate Quickbook with codeigniter.
I installed the Quick book with following commands
$ composer require quickbooks/v3-php-sdk
$ composer update
but when I call that from controller it returns an error
$configpath = '../vendor/quickbooks/v3-php-sdk/src/sdk.config';
$dataService = DataService::Configure($configpath);
On the start of your php script, add
use QuickBooksOnline\API\DataService\DataService;

URL helper functions within an Artisan command return empty base URL

When I call any of the url helper functions, e.g
URL::asset('foo/bar')
from within a command the base URL is an empty string, and the url returned is
http://:/foo/bar
I am running the command by calling
php artisan myproject:MyCommand
from a command line. Where MyCommand is a class that extends Illuminate\Console\Command
I have set my url in config/app.php but I only get a fully qualified url when I run from an
HTTP Request
I am using Laravel Framework version 4.1.24
Where did you get URL::asset('') from? I don't see it mentioned on the documentation
Try this instead:
URL::to('foo/bar')
Found the issue.
My artisan file was missing this line
$app->setRequestForConsoleEnvironment();
The file I had was an older version. This line was added Oct 25, 2013

Codeigniter - autoload database and "Fatal error: Class 'CI_DB' not found" error

I downloaded latest Codeigniter version (2.1.4), and all I did is adding
$autoload['libraries'] = array('database');
to application/config/autoload.php
and I have a following error:
Fatal error: Class 'CI_DB' not found in /www/zapach_www/www/kringle/codeigniter/system/database/drivers/mysql/mysql_driver.php on line 31
I have this error only on one hosting machine (normal shared server), it works fine locally, or in a different server. Unfortunately I have to use specific one.
The problem appears in PHP 5.2 and 5.3
Locally I use php 5.3.

how to get the console working with Doctrine and CodeIgniter

I've been following this great tutorial :
http://www.joelverhagen.com/blog/2011/05/setting-up-codeigniter-2-with-doctrine-2-the-right-way/
and at some point, you're supposed to create a doctrine-cli.php file in my app' application folder with the following code to execute Doctrine's commands from the command line:
My Doctrine repository is in /back-meetmyfriend/application/libraries/Doctrine and the Doctrine.php in libraries.
However, I can't get the console working on W7/WAMP:
I've followed step by step the tuts and my repo is
E:\Programmes\wamp\www\back-meetmyfriend\application
and in the git Bash console when in /e/Programmes/wamp/www/back-meetmyfriend/application i type down $ php doctrine-cli.php
I'm having a PHP Fatal error: Class 'Symfony\Component\Console\Helper\HelpserSet not found
Is there something wrong with my APPPATH ? how should I configure it ?
Thanks

Resources