By Stuartb
I have a Ubuntu 18.4 LAMP with a simple site to input leads via a form to WSDL.
I have been using nuSOAP for the data.
On this server, I am stuck in a loop.
If cURL is disabled I have a working site, but this WSDL error…
wsdl error: Getting https://xxxxxxx.xxxxxxxxxxxxxx.xxx/services/dataservice.asmx?WSDL - HTTP ERROR: The PHP cURL Extension is required for HTTPS or NLTM. You will need to re-build or update your PHP to include cURL or change php.ini to load the PHP cURL extension.
With cURL enabled the server gives a 500 error.
Any thoughts on this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
What I could suggest here is:
php -m | grep -i curl
Another way to check that would be to add a PHP info file in your web root directory with the following content:
<?php
phpinfo();
?>
And access that file via your browser and look for the cURL module.
sudo apt install php-curl
After that restart Apache:
systemctl restart apache2
If you are still getting the 500 error, I would recommend checking your error log for more information. Feel free to share the error here so that I could try to advise you further.
Hope that this helps! Regards, Bobby
The situation you’ve described indicates an issue with the cURL extension on your Ubuntu server, especially in relation to using it with nuSOAP for a WSDL service. Here’s a detailed step-by-step approach to troubleshoot and possibly resolve this issue:
First, ensure that cURL is properly installed on your server. You can do this by checking its presence and status in PHP.
php -m | grep curl
This command lists the PHP modules and filters the output for “curl”. If it prints “curl”, then the cURL module is installed.
phpinfo() results and check if cURL is listed under the modules.Create a file, say info.php, in your web server’s root directory:
<?php
phpinfo();
?>
Access this file via a browser. This will show all the PHP configuration details. Look for the cURL section to confirm it’s installed and configured.
If cURL is installed but not enabled:
Locate the php.ini file: The location of php.ini depends on your PHP installation. Common paths are /etc/php/7.x/apache2/php.ini or /etc/php/7.x/cli/php.ini where 7.x is your PHP version. You can find it by checking phpinfo() output under “Loaded Configuration File”.
Enable cURL extension: Open php.ini in a text editor (you may need superuser permissions):
sudo nano /etc/php/7.x/apache2/php.ini
Uncomment the line (remove the semicolon at the start):
;extension=curl
Save and close the file.
sudo systemctl restart apache2
Since enabling cURL leads to a 500 error, it’s important to identify the source of this error.
sudo tail -f /var/log/apache2/error.log
This might provide a clue as to what exactly is causing the 500 error when cURL is enabled.
Debugging PHP code:
PHP and Apache Version Compatibility: Ensure that your PHP version is compatible with your Apache version. Sometimes, specific modules or PHP versions have bugs or issues with certain Apache versions.
Dependencies and PHP Extensions: Check if there are other PHP extensions that are required by your application or nuSOAP that may not be installed or enabled.
Operating System Updates: Ensure your operating system and all packages are up to date:
sudo apt update && sudo apt upgrade
By following these steps, you should be able to identify and resolve the issues related to cURL and your WSDL service on your Ubuntu LAMP server. If the problem persists, consider reaching out for further help with detailed error logs and configuration details.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.