Compile php into a static cgi binary
Howdy folks,
I'm looking for a some help creating a portable php-cgi binary. Magento was kind enough to create this php cgi binary for testing their software with. Its got all the php extensions they use statically compiled into it. http://www.magentocommerce.com/knowl...-a-php4-server That great except they left out the 'soap' library needed to use their api and no one on those forums has been helpful so far. So I've been trying to re-compile php with the soap library. It compiles fine using this configure statement: Code:
'./configure' '--enable-static' '--disable-dl' '--enable-cgi' '--enable-force-cgi-redirect' '--with-config-file-path=/etc/php5cgi' '--prefix=/usr/local/php5cgi' '--with-gd' '--with-mysql' '--with-mcrypt=/home/yoji/libmcrypt-2.5.7' '--with-mhash=/home/yoji/mhash-0.9.9' '--with-curl' '--enable-ftp' '--with-openssl' '--with-dom' '--enable-sockets' '--with-zlib' '--with-zlib-dir=/usr/include' '--with-pear' '--with-jpeg' '--with-png' '--with-freetype' '--with-jpeg-dir' '--with-png-dir' '--with-pdo-mysql' '--with-mysqli' '--enable-soap' '--without-pdo-sqlite' I also have tried tweaking the makefile as outlined here: http://www.tipcache.com/tip/Build_PH...binary_15.html When I move the binary to the target server, I get this error: Code:
[root@mogui~]# ./php-cgi -v I've tried with CentOS 5.1, RHEL5, and Ubuntu 8.10 (all i386) The target OS is RHEL5 |
I think you need to add something to include the php-soap package (at least for RHEL/Centos).
|
Quote:
This is a special case. The php binary I'm trying to build won't have any external dependency. I appreciate the quick reply. |
Right, but you have to tell the package you are building to include the php-soap part. I do not think the '--enable-soap' will cover that.
|
Quote:
(http://magicErmine.com) to pack original executable (either one that you complied or original one) into self-contained executable. This way you can be rid of external dependencies. |
Thanks Valery. It makes sense they used a special tool to build that binary. I'll give statifier a shot.
|
My best guess is that your system simply lacks the required libmhash.so.2 library. Based on the name this could be some math hashing component, assumed to be available on the system already. If you add that component, then your php compilation can work without recompilation, if that's the only error.
Linux Archive |
All times are GMT -5. The time now is 12:37 PM. |