Can I use the PHP SOAP library in PHP 5.1.1? - php

I have developed a PHP site with PHP 5.3, and would like to deploy it to a server running PHP 5.1.1. My site depends heavily on the PHP SOAP library, since pretty much everything that isn't a presentation task is done by a Web Service. Does PHP 5.1.1 support the SOAP library? Apparently, it doesn't come with the default PHP installation, so, where could I download it?

Before answering your question, I want to mention that you really should upgrade (or convince whoever is in charge) to 5.3.
That said, soap is available, but you must compile with --enable-soap. If you're on a system that uses a package manager, you may try apt-get install php-soap, yum install php-soap, etc. If you're on windows, you may have to download php_soap.dll.

SOAP should be able to run on any version of PHP 5. However, it's important to note that prior to PHP 5.2.9 the SOAP extension is only capable of understanding WSDL 1.0 and 1.1 formats.
To enable SOAP support, configure PHP with --enable-soap.

Related

PHP PECL extension V8Js on Openshift Online

I need Openshift Online to get the PHP PECL extension V8Js running for letting React.js execute server side Javascript from PHP. Are PECL extensions now enabled? If yes, how can I do that? The last I saw was a feature request for this from 02.2014. But I did not get information if in the meantime something has changed.
25.07.2015: I'm a step further. Corey pointed me to a promising direction. Did not know, that PECL is some kind of PEAR. Both seem compatible to openshift. I added 'v8js' to the .openshift/pear.txt file and when git pushing the app the console talked to me. I tried to install v8js with 'pecl install channel://pecl.php.net/v8js-0.2.0' but the compiler could not find V8, console said:
checking for V8 Javascript Engine... yes, shared
checking for V8 files in default path... not found
configure: error: Please reinstall the v8 distribution
So, how do I find the path to V8, and how do I know, if it is already there? If not there, how do I get it?
26.07.2015: Did not manage to install V8. I tried to do it like described in the Google docs. The compilation takes 600MB! and I am running out of quota. Maybe I may need to upgrade python version too, since the depot_tools require a more recent version. So, this is very complicated right now. I am asking myself, if I am on the right track. I would still prefer the mainstream PHP way with V8Js for serverside Javascript instead of node.js.
What shall I do? another shared hosting (search hard)? Cloud hosting, like bitnami and Amazon AWS? Is there still hope with openshift? Virtual, managed server? I am confused.
Have you tried reading through the section of the Developer Portal about PHP cartridge dependencies? https://developers.openshift.com/en/php-getting-started.html#step3
The Openshift Online support immediately answered my question: "Sorry, we do not have the V8Js PECL extension at this time".
But from the hints of corey112358 and N.B. and own experience and from internet research I additionally learned that it's a hassle to make that extension run or find hosting support, if you are not a Google engineer who can install v8 or if you have no time or money to run an own server or if you are no expert in V8Js. So, in this case, you may find node.js a more comfortable solution.

couchbase php windows client

I just fail to understand why couchbase does not provide a php extension for use on "windows" & IIS 7. Is there some efficient other ways of connecting & working with couchbase using php on windows?
I just set up the Couchbase client library today (PHP 5.4 NTS under IIS7). The directions posted at Couchbase's page for the PHP Client Library are accurate for the most part but I wanted to clarify where the dlls go.
Download the zip containing php_couchbase.dll and libcouchbase.dll. Generally you will want the NTS (non-thread safe) version under IIS.
Put php_couchbase.dll in the extensions directory.
Put libcouchbase.dll in the php directory (same directory as php.exe/php-cgi.exe).
If necessary, install the Visual C 9 runtime from Microsoft.
Enable the extension in php.ini
I initially put libcouchbase.dll in the extensions folder per the directions on the Couchbase site. That will not work. (Generates the PHP "the specified module could not be found" dll load error.)
The above only gives you the Couchbase client. You also need a server; that can be locally on the Windows machine or somewhere else.
The Couchbase client SDKs are quite important because they are "cluster aware".
The SDKs, including the PHP one will automatically use all the nodes of the cluster using vBuckets and they will be notified when the topology changes (add new nodes, failover, ...)
Also if you are using Couchbase 2.0 the SDK provides you API to call the views and do more advanced queries on documents.
So the best practice is to use the PHP SDK, that use internally the memcached protocol.
I am inviting you to read:
- http://www.couchbase.com/docs/couchbase-devguide-2.0/couchbase-clients.html
- http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-introduction-architecture-vbuckets.html vBuckets used to manage the auto-sharding.
- http://www.couchbase.com/develop/php/next the PHP SDK main page
A more advanced topic that explains how to developer a client SDK:
- http://www.couchbase.com/docs/couchbase-devguide-2.0/creating-client-library.html
I suppose you are referring to Couchbase 1 (and not the 2.0 version which is currently in Beta).
Couchbase is compatible with memcached. That means you can use any memcached-compatible client to access it, e.g. PHP's memcache or memcached functions.
Update:
If you want to get your hands dirty and compile the PHP extention for the Couchbase SDK yourself, here is a tutorial that guides you through the process.

Use gearman from PHP application without installing PHP extension

I'm interested in using a Gearman server to distribute long-running jobs in my PHP application. Unfortunately I don't have direct access to my application servers and I can't install any PECL extensions.
Is there a pure PHP client library out there I can use?
Have you tried the obvious?
Net_Gearman (PHP)
A pure PHP API that can be found as Net_Gearman on PEAR.
PHP module on PEAR
Quoted from: http://gearman.org/index.php?id=download#php

After compiling PHP from source are the devel libraries still needed?

After compiling PHP from source are the devel libraries still needed?
For example, I am building a newer version of PHP from source than is on our dev servers. I installed alot of [extension i.e. mysql, postgresql, curl, etc]-devel packages in order for the configure from the dev server setup to work. Do i still need these after php has compiled? For example could I make a distro and then distribute the PHP distro to another server without needing these devel dependencies?
I am a bit of a noob to this.
You don't need to ship the devel-libraries.
But my advice is to take some time and learn how the build system of your linux distribution works. And then build a new php package that can be installed by the package manager.
Take a look at how the "original" php packages were built for the distribution. Most likely you can simply copy and edit the existing rule file(s) and then make a new version of that package. This way you take advantage of the dependency mechanisms and the package manager will not remove/overwrite your version so easily when an update shows up in the "official" repositories.

How to enable soap extensions

Is it possible to enable soap extensions in php without compiling the php dist? I´m using Mac OS X 10.5+ with the built in php interpreter.
If you really don't want to compile it you can use NuSoap from PEAR.
But I'd compile it if I were you, nusoap is not compatible with the built-in soap and it's a pain to juggle. Just do it right and start with the PHP5 SOAP lib.
Alan
As far as i know, you need to compile it because it's a core function. But you could try to copy precompiled php packages over your existing ones to put the compiled soap binaries and it's loading informations into the propriate files. Don't forget to make a backup!

Categories