skip to Main Content

I’m having some issues trying to achieve a SOAP request to a web service by using PHP.
I have a really small project which only send some requests of a SOAP web service, parses them and show the results on a table, but it’s not working. I’ve developed this using XAMPP and this is the very first time I deploy something on a IIS web server so I’m a newbie.
I’m not using any framework, it’s just plain PHP.

The first problem I have is that php_soap.dll extension seems to be disabled since I check the configuration with php_info(); and I can’t find SOAP extension in the result, but I’ve enabled it in my php.ini by removing the semicolon from that line and my extension folder is "ext" under my PHP folder. I have some other extensions running and they’re just fine.

Doing some var_dump when I try to instatiate the SOAP class, it’s not returning anything (not even null).

Some more info:

PHP Version: 7.3.25
IIS Version: 10.0.17763.1 running on Windows Server 2019

2022-09-05 Edit
I’ve found out that php_openssl.dll isn’t working on my server. I don’t know why. It’s enbled in php.ini. However, phpinfo(); shows it as disabled.
OpenSSL Disabled

On the other hand, when I run "php -m" command on my CMD, it shows that SOAP and OpenSSL are enabled:

PHP -M Command output

2

Answers


  1. Chosen as BEST ANSWER

    I already solved my problem. The problem was not in the PHP.ini file, that one was correctly configured. The problem was that I hadn't installed an extension for PHP and IIS. Once I've installed PHP Manager For IIS and configured it by following this tutorial, it worked out correctly.


  2. The first thing you need to do is enable the php_soap extension in your php.ini file. You can do this by removing the semicolon from the line that says ;extension=php_soap.dll. Once you have done this, restart your web server.

    Next, you need to make sure that the extension_dir setting in your php.ini file points to the directory where your PHP extensions are located. For example, if your extensions are in the c:phpext directory, then your extension_dir setting should look like this:

    extension_dir = "c:phpext"

    Once you have done this, restart your web server.

    If you still cannot get the SOAP extension to work, please post a comment below and I will try to help you further.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search