I have a cryptic PHP SOAP error on my host but cannot duplicate locally

I ran into an interesting PHP / SOAP error that silenced me. After searching, I found no plausible explanation, and I would appreciate your help. Here's the background:

I have a site built in PHP / CodeIgniter that uses SOAP to communicate over SSL with an internal system provided by a third party (let's call them "Company X" to protect the innocent) out of my control. In the spirit of good MVC, I put the code for interacting with this data source in a separate model ( system/application/models/company_x.php

). I am developing locally using MAMP on my Mac and almost everything went relatively smoothly through testing and development; including invoking Company X's web service over SSL. I should probably mention that their web service had a weird WSDL that PHP 5 SOAP didn't like. Things like required parameters that weren't there. It was a bit weird to name SOAP methods very explicitly, but I got it and got it tested. I even posted it on a test siteMosso , and I could have sworn it worked for a while too.

Imagine my surprise when every call to the SOAP web service starts throwing errors such as:

    A PHP Error was encountered
    Severity: Warning
    Message: SoapClient :: __ doRequest () [soapclient .-- dorequest]: 
    WARNING: URL fopen access
    Filename: models / company_x.php
    Line Number: 86

The error logs did not provide more information other than the full path to the model file on the server. He works locally and I thought he worked for Mosso before. Perhaps Mosso changed his settings and turned off SOAP or something. A little phpinfo()

later, and there are more than enough of them. I thought that maybe my Mac is more tolerant of SSL certificate. After all, this is a GoDaddy * .domain.com certificate, possibly fopen

having trouble getting it. I hacked a test file for SSL connection and put it on Mosso and it worked.

I am wondering why fopen

suddenly there is a problem for SOAP? What happened to Mosso that suddenly makes it difficult? Do I need to override the parameter php.ini

? Maybe so often, with such useless mistakes, something completely different?

Update: here is the configure command from phpinfo ():

'./configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-ming' '--with-mime-magic' '--with-sqlite=shared' '--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--disable-json'

Note . My comment below phpinfo()

says furl is allowed; strange!

+1


source to share


3 answers


OK, a little update on this issue: the error mysteriously disappeared without any changes from me. I'll have to guess that there was some odd configuration error on Mosso that was quietly fixed. It is also possible that there is a problem with the setup of company X. This is the worst kind of fix IMO! Thanks to everyone who looked into this.



0


source


You can have this http://us.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen

is absent.



Remember, you can always use phpinfo () to visually compare the environment between machines.

+1


source


Another possibility (from PHP documentation ):

Note. When safe mode is enabled, PHP checks if the directory where the script is running has the same UID (owner) as the script being executed.

EDIT: Hmm .. I don't see safe mode in your PHP compilation settings, so it probably isn't.

0


source







All Articles