Reputation: 7592
Okay all you 1and1 geniuses out there. I want to make use of the Zend Soap Client ( http://framework.zend.com/manual/en/zend.soap.client.html ) on my 1and1 hosting. My hosting package is supposed to support ZF out of the box but I don't think it does. When I tried the following code
<?php
$client = new Zend_Soap_Client('/path/to/WSDL');
var_dump($client);
?>
I get an error
Fatal error: Class 'Zend_Soap_Client' not found
So I downloaded the ZF and I'm uploading it now to a folder in the root of my website. I can't seem to find any answers to what to do next. I know I need to link the ZF library folder to my include path. Can this be accomplished with .htaccess or a php.ini file? Also will I be able to use the Zend Soap Class by itself or do I have to use some other Zend Framework stuff?
Thanks.
EDIT: Strangely the include path was set properly in the root directory but not in any subdirectories. I added the include path to a new php.ini file in each subdirectory and that worked.
Upvotes: 0
Views: 1777
Reputation: 337
Add
require_once 'Zend/Loader/Autoloader.php';
to the beginning of the script.
If it doesn't work, check include path in the script - it should contain libzend-framework-php directory with
<?php
echo get_include_path();
If it doesn't you can either report it to 1and 1 or set it manually in the beginning of the script
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . "directory with zend framework");
Upvotes: 1
Reputation: 20155
The first thing you should to is set the include path in the php.ini folder, or do a phpinfo() to get the current include path. then put the zend lib in that path. finally just require the Client.php script inside the Zend/Soap folder.
Upvotes: 0