Problem Securing Web Services in PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ejpoirier@gmail.com

    Problem Securing Web Services in PHP

    I'm trying to get https to work for Web Services in PHP. I've
    installed PHP 5.0.5 with the following configuration line:

    ../configure --with-mysql=/usr/local/mysql \
    --with-apxs=/usr/local/apache/bin/apxs \
    --with-gd=/usr/local/src/ \
    --with-gd --with-freetype-dir=/usr \
    --enable-gd-native-ttf \
    --enable-gd-imgstrttf \
    --with-jpeg-dir=/usr/lib \
    --with-png-dir=/usr/lib \
    --with-zlib \
    --with-lib-xml \
    --with-lib-xsl \
    --enable-soap \
    --with-open-ssl \
    --with-curl=/usr/local/bin/curl \
    --with-curlwrappers

    I'm able to open https streams with fopen, I've even connected to WSDLs
    with fopen and https. I'm able to open and use non-https web services
    with the SoapClient. I am unable to open any https web services with
    SoapClient. For example, trying to run this script:
    http://playground.jwscripts.com/php5...words-api.phps results in
    a fatal exception on my server. Unfortunately I'm not at liberty to
    divulge the URL for the server. But, here is the (doctored) output:

    SoapFault exception: [HTTP] Could not connect to host in
    /usr/local/apache/sites/website.com/htdocs/soap/soaptestscript. php:39
    Stack trace:
    #0
    /usr/local/apache/sites/website.com/htdocs/soap/soaptestscript. php(39):
    SoapClient->__doRequest('_ _soapCall('esti mateKeyword...' , Array, NULL,
    Array)
    #2 {main}

    Does anyone have any thoughts on what the problem may be?

  • ejpoirier@gmail.com

    #2
    Re: Problem Securing Web Services in PHP

    I was able to fix the issue, but I have no idea why. By configuring
    PHP this way it works now:

    ../configure --with-mysql=/usr/local/mysql --enable-soap
    --with-apxs=/usr/local/apache/bin/apxs --enable-trans-sid
    --enable-track-vars --with-openssl=/usr/local/openssl

    I tried the previous configure with the full path to openssl and it
    still didn't work, so I know that isn't it. Can anyone tell me why
    this would be?

    Comment

    Working...