For Programmers: Free Programming Magazines  


Home > Archive > PHP Installation > October 2005 > PHP Extension Compiling









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PHP Extension Compiling
Ryan Creasey

2005-10-05, 9:56 pm

Hello,

I recently noticed in FreeBSD ports all of php's extensions are
dynamically build and loaded. In an attempt to do this manually on my
fedora webservers, I've been met with a few problems.

First off, I've built php 5.0.5 with the following options:
'./configure' '--prefix=3D/usr/local/php'
'--with-config-file-path=3D/usr/local/php/conf'
'--with-config-file-scan-dir=3D/z/www/conf/php' '--disable-all'
'--disable-ipv6' '--with-regex=3Dphp'
'--with-apxs2=3D/usr/local/apache/bin/apxs'

This configuration builds and runs just fine. However, the difficulty I
encounter occurs when doing the following (I'm just using soap as an
example, the results are the same with other extensions):

$ cd /usr/src/php-5.0.5/ext/soap
$ phpize
$ ./configure && make install

This executes without error and the extension is built and installed
properly to my extensions directory[1]. I enable the module in an
extensions.ini file found in the config-file-scan-dir:

$ grep soap extensions.ini
extension=3Dsoap.so

After restarting apache, I notice that the extensions.ini file is found
and loaded, but the soap extension isn't listed as a loaded module.
Trying the cli version of php, it spews the following error:

$ php
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/php/extensions/soap.so' - /usr/local/php/extensions/soap.so:
undefined symbol: ps_globals in Unknown on line 0

I suppose my question isn't to ask how to fix installing the soap
extension, but rather, is this the correct way to build, install and
enable dynamic extensions? What am I doing wrong? This process doesn't
seem to work for any of the other extensions I've tried to build and
load.

Any help would be appreciated.

--
Ryan C. Creasey
Systems Administrator
IGN Entertainment
=20
Footnotes:
----------
[1] What's the variable or configure flag to specify this path? With
the above build options, it's putting extension files in:
/usr/local/php/lib/php/extensions/no-debug-non-zts-20041030

I'd rather they be installed to /usr/local/php/extensions/20041030/.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com