We recently upgraded our test server from PHP 5.5.* to 5.6.8. I had to fiddle with the php.ini file to get things working again but I cant get my SOAP calls to work properly. The call seems to happen but I get a "can't connect to host" error.
I then copied the contents of the 5.5.* php.ini file and I still get the error. I then reverted back to the old version and the SOAP works again. I tried replacing the soap DLL from 5.5.* with 5.6.8 and that totally broke.
Ive triple checked my php.ini SOAP settings and everything is perfect. Im at a total loss as to what is causing this problem? Is it possible there is another dependancy that is needed in 5.6.8?
The problem with the above was the SSL certificate. We are working on a staging environment on HTTPS but the certificate is not valid. With PHP 5.6+ if the certificate is invalid the SOAP call throws an exception.
Related
Long story short, I had to reinstall php 7.4 on my Mac. I have a php webapp that hits a .NET API. Prior to the reinstall of php, I was able to hit a locally running version of my API at https://localhost:5001 using cURL in php but now I get a response code of 0 with this error:
Curl error: SSL certificate problem: self signed certificate
If I point the same php code to my production API, everything works fine. I am able to successfully hit the local version of the API with Postman.
I tried the accepted answer from this post but it did not work for me even after restarting apache and my computer. I tried both the php.ini and runtime approaches but neither solved my problem.
You should append the public key of your self signed certificate to the cacert.pem file. Then either of the solutions (setting curl.cainfo in php.ini OR explicitly specifying the path to the cacert.pem file using CURLOPT_CAINFO) proposed here should work just fine.
Make sure you respect the format of the cacert.pem file when adding your public key.
We have a PHP API that returns formatted postcodes from a (in this case) Ajax call from javascript.
We are running a windows 2019 server and did an upgrade to PHP8 and are now getting the error net::ERR_CERT_DATE_INVALID whenever we try to make the call to the API.
I have downloaded the latest cacert.pem file and added the following two lines to the php.ini:
curl.cainfo ="C:\Program Files\PHP\v8.0\ext\cacert.pem"
openssl.cafile="C:\Program Files\PHP\v8.0\ext\cacert.pem"
Now I am assuming that it is a PHP issue (as we upgraded to PHP8 over the weekend) but it could be something else and just a coincidence.
The issue can bee seen here: www.postcodetools.co.uk. Just attempt to use any of the examples and the console shows the error.
Any advice would be appreciated.
Revoked and re-issued and re-installed the certificate for the API domain and all now works.
I have a testlink installation on one machine with MSSQL server at another machine. So, everything is working fine besides xmlrpc api.
I have already set 2 options
$tlCfg->api->enabled = TRUE;
$tlCfg->exec_cfg->enabled_test_automation = ENABLED;
in config.inc.php file, but can't using http://localhost/lib/api/xmlrpc/v1/xmlrpc.php.
I got HTTP ERROR 500 (Internal server error). I looked through the testlink forum and didn't find more options to configure the connection.
Could you please give me advice what it can be?
Update
Testlink version is 1.9.19
PHP version is 7.3.4
Apache version is 2.4.25
UPDATE
I have found the reason why the api doesn't work. The issue say that php:
PHP Fatal error call to undefined function mssql_get_last_message() in ../adodb-mssql.inc.php ..
I am running Bolt CMS locally on my machine using XAMPP. I just upgraded to version 2.0.1 today and everything seems to be working great. The only issue I am having is installing extensions.
On the view/install extensions page, I am seeing this message:
The Bolt extensions Repo at https://extensions.bolt.cm/list.json is currently unavailable. Check your connection and try again shortly.
I do have an active internet connection and am not sure why I cannot connect to the repository from the extensions page. Any help would be appreciated!
Update
In the CommandRunner.php file's setup method, there is this line:
$json = json_decode((file_get_contents($this->packageRepo)));
The problem is coming from the file_get_contents($this->packageRepo) call
The error message being returned from that call is
file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Update 2
The issue is not related to bolt CMS but rather my XAMPP configuration. However, if someone else using bolt CMS locally with XAMPP has already tackled this issue, I would appreciate their input.
At this point, I have not been able to solve the SSL issue with my local server.
I did, however, find a solution that allows me to install bolt extensions.
The solution is to open up the config.yml file and add the following:
extensions:
site: 'http://extensions.bolt.cm/'
This will tell bolt to use the http URL rather than https. I would recommend using the secure URL in production, but this has allowed me to install extensions on my local server until I solve the underlying problem.
I found that the following fixed it correctly for me!
PHP cURL error code 60
From that post:
Use this certificate root certificate bundle:
https://curl.haxx.se/ca/cacert.pem
Copy this certificate bundle on your disk. And use this on php.ini
curl.cainfo = "path_to_cert\cacert.pem"
Trying to make Soap connection to a https:// WSDL source via PHP/Win32, but keep getting the error:
Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning
: failed to load external entity "https://...
If I try to save the WSDL locally and access it then, the SoapFault->faultstring property has the message "SSL support is not available in this build".
After some Googling, seems like PHP SOAP cannot connect to a HTTPS source. HTTP is OK, though.
Is there a workaround for this? Or is there an alternative SOAP version/module I can install?
HTTPS support for SOAP in PHP5
If you’re seeing error messages about missing https wrappers when trying to use SOAP (”Unable to find the wrapper “https” – did you forget to enable it when you configured PHP?” or “[HTTP] SSL support is not available in this build”), you haven’t installed the SSL libraries to support secure transactions.
Uncomment
extension=php_soap.dll
in your php.ini
Uncomment
extension=php_openssl.dll
in your php.ini
Copy
ssleay32.dll
and
libeay32.dll
to your windows system32 directory
Reboot apache, et voila!
I originally found this answer at: http://webponce.com/rants/2008/04/https-support-for-soap-in-php5-under-windows/
I had the same problem. openSSL, cURL were enabled, initiated a SoapClient with option of location to stored certificated, etc, etc.. tried everything.
Turns out it does work in CLI mode. Thus php_sapi = CLI.
As we almost always run our webservices calls as a cronjob, scheduled task in Windows, this is not really a bad thing. I was really glad to get it working!
Update:
Okay, turns out when PHP is running as an Apache module, it uses the by opensll required libraries libeay32.dll and ssleay32.dll from the Apache install. When using PHP in CLI is uses the libraries from the PHP directory/install. Overwriting the 2 Apache dlls with the dlls from the PHP directory did the trick. It now also runs under Apache.
So your PHP version should match with the working dlls for the specific version. When it still doesn't work in the web interface. Please check that Apache isn't loading these dlls from a Windows System directory, specified earlier in your system defined path, which is picked up by Apache.
I've had success with SSL and SOAP using NuSOAP:
http://nusoap.sourceforge.net/