Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

FYI re. SOAP API - Unable to load Soap extension on the server
 
arpieb
Jr. Member
 
Total Posts:  1
Joined:  2008-10-14
 

Just a bit of info for anyone else that might run across this… We have Magento v1.1.6 installed on a Linux server, and before installng ran magento_check.php to make sure all PHP features were available that Magento requires, receiving the following green light:

CongratulationsYour server meets the requirements for Magento.

You have PHP 5.2.0 (or greater)
Safe Mode is off
You have MySQL 4.1.20 
(or greater)
You have the curl extension
You have the dom extension
You have the gd extension
You have the hash extension
You have the iconv extension
You have the mcrypt extension
You have the pcre extension
You have the pdo extension
You have the pdo_mysql extension
You have the simplexml extension

Apparently it doesn’t verify the web service API interface extensions in PHP like SOAP and XML-RPC, so when I tried to retrieve the WSDL file I received the following SOAP response:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
                <
SOAP-ENV:Body>
                <
SOAP-ENV:Fault>
                <
faultcode>0</faultcode>
                <
faultstring>Unable to load Soap extension on the server</faultstring>
                </
SOAP-ENV:Fault>
                </
SOAP-ENV:Body>
                </
SOAP-ENV:Envelope>

Thinking that something was wrong with our server, I alerted our hosting support, and they found that the PHP extension for SOAP was not built into our installation.  I also verified this on a standalone system by enabling/disabling the PHP SOAP extension on a Windows machine via the php.ini file.

Hope this helps someone else as I could find no info on this error on Google.

-R

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brandlive_br
Guru
 
Avatar
Total Posts:  653
Joined:  2008-05-19
Buenos Aires, Argentina
 

That file (magento_check.php” doesn’t test your SOAP support.
You can test creating a new php file, with this code.

<?php
phpinfo
();
?>

That file shows you all the information about your php confgiuration.
Look there for the SOAP extensions information.
If you can find it, it’s mean that you don’t have it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
PandaWebStudio
Member
 
Avatar
Total Posts:  40
Joined:  2008-04-19
Amsterdam, Netherlands
 

@arpieb
the error message is in Mage_Api_Model_Server_Adapter_Soap
$this->fault(’0’, ‘Unable to load Soap extension on the server’);

And appears because the php class SoapServer is not present.

 
Magento Community Magento Community
Magento Community
Magento Community
 
PandaWebStudio
Member
 
Avatar
Total Posts:  40
Joined:  2008-04-19
Amsterdam, Netherlands
 

Edit: duplicate message

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

php.ini has little on SOAP. You need:

yum install php-soap
service httpd restart

..or equivalent for your distro - that fixes the error and lets you in on the SOAP e-fun…

 
Magento Community Magento Community
Magento Community
Magento Community
 
and448
Jr. Member
 
Total Posts:  13
Joined:  2008-09-23
 

Hey guys, please help, I’m getting the same “Unable to load Soap extension on the server “ error when I try and connect to the Magento web service.

I’ve enabled the php_soap extension in the php.ini file....why am I getting this error? what does it mean?

I’m running the latest version of Magento on top of the latest version of WAMP.

I’m running alongside IIS so Apache is listening on port 8080

I’ve just installed Magento and everything “seems” fine, though I haven’t used it much.....but why am I getting the SOAP error?

any help greatly appreciated

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

Enabling the extension is not enough - you have to install it. On Penguin Powered servers you do yum install php-soap, that’s it, jobs a good un.

“You need Silverlight...”

I don’t know what the Bill Gates way of installing software is, but theoretically it is possible - ‘add remove programs’ in ‘Control Panel’ rings a bell. Maybe you have to throw chairs at it or a drive-by botnet virus will to get it installed for you anyway. A Micro$oft Certified Software Expert could do it for a small fee or you could try and get support - doesn’t Window$ come with that, or was I imagining things?

Another workaround could be to run a Linux host in a VMware machine, or you could run that Window$ thing in a VM machine on a Linux host.. If you backup the image then you can ‘reinstall’ it when it gets slow, as happen with Window$.

(That’s enough Window$ bashing...!)

 
Magento Community Magento Community
Magento Community
Magento Community
 
and448
Jr. Member
 
Total Posts:  13
Joined:  2008-09-23
 

cool, thanks discovery.

on non penguin powered servers how do I install it. I’m running windows, just want to get the thing running...its proving to be unnecessarily fiddly

thanks again

andy

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

http://www.tutcity.com/view/soap-php-implementations.9994.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
and448
Jr. Member
 
Total Posts:  13
Joined:  2008-09-23
 

hey, thanks discovery

that link just says you have to load the extension in php.ini.....except that doesn’t work.

You also mention that I need to “install” it...I think you’re right....but how do I “install” it....the link you gave me doesn’t go through that step...?

thanks again

andy

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

See: http://uk3.php.net/install.windows.extensions

You will need to change the extension_dir setting to point to the directory where your extensions lives, or where you have placed your php_*.dll files. For example:

extension_dir = C:\php\extensions

Enable the extension(s) in php.ini you want to use by uncommenting the extension=php_*.dll lines in php.ini. This is done by deleting the leading ; from the extension you want to load.

You might as well install the PECL extensions whilst you are at it - see above page.

Just check your system for the php_soap.dll file - you may have it but in the wrong place. If it needs moving to the extension directory then copy it across. Failing that, you should be able to download it from the interwebs - obviously check for no viruses…

 
Magento Community Magento Community
Magento Community
Magento Community
 
saloob
Jr. Member
 
Total Posts:  9
Joined:  2008-11-03
 

Hi Discovery,

You seem to know what you are on about here.
I am using Plesk but on php5.1 - so I had to set up the php5.2 CGI binary in /cgi-bin/ and added to .htaccess - as per:

http://www.magentocommerce.com/knowledge-base/entry/installing-magento-on-a-php4-server

This is working fine (although I am sure it is stuffing up my ability to use symbolic links to my core domain/store for multiple domains/stores)

But related to the SOAP issue - I have yummed in php-soap and shows it is available in info;

Soap Client enabled
Soap Server enabled

..but it still doesn’t allow to view the wsdl;

0 Unable to load Soap extension on the server

I would appreciate any ideas you might have for this…

Cheers in advance!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

@saloob

There is probably good cause for you to change host (yikes) if you are on an old version of php. Some of the go-faster cache-ing extensions need the new version of php and if you end up with a store worth visiting it will have to be fast… I recommend getting a VPS where you can access everything including the http.conf and php.ini files, rebooting it whenever you get stuck…

For SOAP I suggest building a development server on your own PC, running a recent version of Fedora/CentOS/Ubuntu. It will take all day to get it up and running, but that is a small price to pay for an offline development environment. You need not have your main store on there, just use it to test your mods. Also, running php programs on the command line is most useful for debugging. I have a whole directory full of command line only SOAP stuff for such tests.

Getting logged in is a huge achievement in SOAP, you have added a SOAP user and granted all to it?

 
Magento Community Magento Community
Magento Community
Magento Community
 
saloob
Jr. Member
 
Total Posts:  9
Joined:  2008-11-03
 

Discovery, thanks for your follow-up.

I have been contemplating upping php - but the main problem is how Plesk is auto provisioned with CentoS-5 in Virtuozzo with EZ Templates - so upping is an issue (CentOS php 5.2 EZ Templates aren’t available so it causes all sorts of headaches).

Appreciate your ideas and will try and work out how to get 5.2 EZs going maybe..

For SOAP, I did set the user in Admin with all rights granted. I think it might not be a SOAP issue, because I can’t view the WSDL - which is usually viewable from the bare URL, right?

http://mydomain.com/store/api/soap/?wsdl

Or does Magento require user privileges before this can even be viewed?

PHP Fatal error:  Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn’t find <definitions> in ‘http://mydomain.com/store/api/soap/?wsdl’ in /var/www/vhosts/mydomain.com/httpdocs/synch/magento_soap.php:6\nStack trace:\n#0 /var/www/vhosts/mydomain.com/httpdocs/synch/magento_soap.php(6): SoapClient->__construct(’http://office.k...’)\n#1 {main}\n thrown in /var/www/vhosts/mydomain.com/httpdocs/synch/magento_soap.php on line 6

[Thu Jan 08 19:12:42 2009] [error] [client 61.215.201.130] PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn’t find <definitions> in ‘http://mydomain.com/store/api/soap/?wsdl’ in /var/www/vhosts/mydomain.com/httpdocs/synch/magento_soap.php on line 6

Buggered if I know - but as you say, maybe php 5.2 is just the only good way to go..

Cheers!

 
Magento Community Magento Community
Magento Community
Magento Community
 
saloob
Jr. Member
 
Total Posts:  9
Joined:  2008-11-03
 

Discovery,

Mate, I upgraded to php5.2 and all is sweet.
I really should have done this before - but I eventually found a very easy and “safe” way to do it without breaking too much!
NOTE: It will possibly affect a sitebuilder module if you have it installed - which depends on php-sqlite2
I just removed it as this is more important to me;

rpm -e php-sqlite2 --nodeps

For anyone on Plesk - get OFF php5.1x - it is more trouble than it is worth and will save you hours of buggering around.

And because everyone is so bloody helpful, I will share my perfect solution on Plesk 8.6 starting out with php5.1 on CentOS-5 with VZ4

NOTE: If you are using Virtuozzo Containers, php is most likely installed with EZ Templates (CentOS5.2) - so this next operation will manually/physically upgrade php and it will now be non-EZ Templated.

On command line:

wget -q -O - http://www.atomicorp.com/installers/atomic.sh | sh

Select Y (yes) and 8 (Plesk version) etc

Then run:

yum upgrade php

It will then collect all the required apps and just say: Y (Yes)

That is it! It was really way too painless..

Now SOAP and all other gear works - and don’t have to bugger around with that shizer cgi binary.

Next, to do multiple/unlimited domains in ONE physical server based on ONE Magento app and database:

* First set up the domain vhost.conf properly to allow access to the core Magento app;

For this example, I will make the core Magento on domain1.com
I will then make a “virtual” Magento on domain2.com
(This file doesn’t exist by default)

vi /var/www/vhosts/domain2.com/conf/vhost.conf

(Also, do the same for SSL if needed and make vhost_ssl.conf and make httpsdocs in place of httpdocs)

# Added by ME
<Directory /var/www/vhosts/domain2.com/httpdocs>
php_admin_value open_basedir “/var/www/vhosts/domain2.com/httpdocs:/var/www/vhosts/domain1.com/httpdocs:/tmp”
Options Indexes FollowSymLinks
</Directory>
# To here

Then execute the below commands to let Plesk know it must include the vhost.conf file when it loads httpd

/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=domain2.com
/etc/init.d/httpd restart

The above will now let your new domain get access to the core domain

Next, we just need to make symbolic links to the core Magento.
For this, my core Magento will be here:

/var/www/vhosts/domain1.com/httpdocs/store <- in here

It doesn’t have to be here - could be anywhere - even at root level;

/var/www/vhosts/domain1.com/httpdocs/ <- in here

But I think having the core here makes it simpler to target and maybe have something like drupal or normal website on root level already.

On the web it looks like this: http://www.domain1.com/store

cd into /var/www/vhosts/domain2.com/httpdocs/

ln -s /var/www/vhosts/domain1.com/httpdocs/store/* . <- don’t forget this little “period” here or do this;

ln -s /var/www/vhosts/domain1.com/httpdocs/store/* /var/www/vhosts/domain2.com/httpdocs/

This will make a symbolic link of EVERYTHING in the /store folder and put it in the root level of domain2.com

I made these links have user permission of domain2.com - let’s assume domain2ftp is my FTP username;

Still inside; /var/www/vhosts/domain2.com/httpdocs/

chown domain2ftp.psacln -R *

On the web it looks like this: http://www.domain2.com/

Before Magento will recognise this new store, you have to set the website and store from inside Magento Admin;
http://www.domain1.com/store/admin/

I won’t go over that, but the KEY thing you need is the “code” name you give your second website - let’s say you call it: domain2
This shows how to set that up pretty clearly:
http://www.magentocommerce.com/blog/comments/video-creating-multiple-online-storefronts-part1/

Finally, in /var/www/vhosts/domain1.com/httpdocs/store/index.php - you need to add your website code(s).

Some other smart fella put this out there somewhere and works sweet - especially if you plan to do multiple domains - with symbolics - then all you have to do is update the core index.php file in domain1.com because the index.php file itself is ALSO a symbolic link.

vi /var/www/vhosts/domain1.com/httpdocs/store/index.php

Comment out this;

Mage::run();

to this

#Mage::run();

then, below that add this - which basically replaces the above but provides extensibility;

switch($_SERVER[’HTTP_HOST’]) {

case ‘domain2.com’:
case ‘www.domain2.com’:
Mage::run(’domain2’, ‘website’);
break;
default:
Mage::run();
break;
}

And that is it! It will work sweet.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top