How to enable soap extensions - php

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!

Related

PHP 5.3: how to add PDFlib?

I recently upgraded my Linux server from Apache 2.1 to 2.4 and PHP 5.2 to 5.3. Previously I was using pdf.so from PDFlib fine, but when I tried to install it, as downloaded from here,
http://www.pdflib.com/download/free-software/pdflib-lite-7/
PHP failed to load the module as it was compiled in for PHP 5.3. This install was done using the newest version of PDFlib that I could find, 9.0.2.
Anyone know whether this is possible? I've already got things coded in PHP for PDFlib and prefer not to use another library unless the commands are the same.
UPDATE
Has anyone successfully used PDF Lite with PHP 5.3?
You must compile it. Currently no build is available for PHP 5.3.
On the Download-Site, READ the info:
PDFlib Lite source code must be compiled to generate a usable library. PDFlib GmbH does not offer precompiled (binary) versions of PDFlib Lite.
If you have compile errors, check out the error logs - What say it? Yep, i think you need additional sources for compiling (mostly).

Is it possible to access a local printer using TCP/IP sockets in PHP?

I know that PHP has it's own PECL to do this, but I'm currently using PHP 5.4 and the php_printer.dll isn't compiled for this version.
PECL can have some old stuff on there, php_printer.dll is all but deprecated.
Also, as PHP is a scripting language, it's incredibly difficult to gain access to hardware functions (like a printer) directly.
You are best off finding or writing printer access functions in something like C++, and running the script using system(); .
Best of luck!
Printing directly from PHP over TCP/IP sockets requires huge amount of work especially on windows environment without Printer extension or a nice library.
From the documentation:
Windows users must enable php_printer.dll inside of php.ini in order
to use these functions. A DLL for this PECL extension is currently
unavailable.
So, you can try to download php_printer.dll precompiled binary for PHP 5.3 from http://downloads.php.net/pierre/ and use that. Probably it will work with PHP 5.4 too. If not, you should compile PHP from source to use windows Printer extension.

Is it possible to use PECL extensions in HipHop?

I have an application which uses rabbit mq broker and I have consumers written on php and use this extension http://pecl.php.net/package/amqp. I would like to compile these consumers using hiphop but amqp extension is not supported in hiphop. So the question is could I compile PECL extensions into hiphop?
Thanks in advance
You would have to manually write a HipHop extension in C++ to interface with the extension's functionality. Most likely the original PHP extension is of little use, if it merely wraps a C library anyway. See the answers on this thread for an explanation of what the differences between HipHop and PHP extensions are: https://groups.google.com/group/hiphop-php-dev/browse_thread/thread/51184984d948a77b
I started the HHVM-AMQP project http://github.com/akalend/hhvm-amqp The base of the pecl/amqp is present, but exist the difference. See examples directory. It is developer version.

Can I use the PHP SOAP library in PHP 5.1.1?

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.

How can I disable a compiled in extension in PHP

My home system has a version of PHP compiled with the SOAP extension. The live system has a version of PHP without the SOAP extension, and most of the scripts rely on the NuSOAP library quite heavily. The fact that NuSOAP and the SOAP extension use the same names for their classes is a terrible headache.
How can I disable the SOAP extension on my home system without doing a reinstall / recompile? It's compiled in, and not enabled by a extension directive in a ini file.
it's an extension, so you can disable it in php.ini. Just outcomment the line. Remember to restart Apache afterwards.
I have found nusoap to be rather buggy, so upgrading to native soap should be a priority. If this isn't immediately possible, it would be a good idea to switch to nusoap-for-php5, since it allows you to run both the native soap extension and nusoap alongside. You can then implement new code against native soap, while still using nusoap for legacy code.

Categories