Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am on an ubuntu 10.04 system and I am building php 5.3.3. I can build a CGI version just fine, but when i try and build a .so with this command:

./configure --with-apxs2=/usr/bin/apxs2 --enable-so --disable-cgi

I get this:

Notice: Following unknown configure options were used:


So how do I build a .so with 5.3.3?

share|improve this question
have update my answer and it indeeds does not require the --enable-so anymore nor have it on the configure options as i stated. – Prix Oct 18 '10 at 19:20
up vote 2 down vote accepted

Using the below command you will see all available command for compiling it:

./configure --help |less

While i was browsing it i saw no --enable-so anymore so i am assuming that only using --with-apxs2=path/apsx2 will do the job for you.

I will be compiling this in a minute and let you know how it goes.


I have just finished compiling the version 5.3.3 and it indeed DONT NEED OR HAVE the --enable-so aslong as you specify the --with-apxs2

I have configured it with:

./configure --prefix=/usr --enable-sockets --enable-bcmath --with-pear=/usr/lib/pear --with-mysql=/usr --enable-calendar --with-mhash=/usr --with-kerberos --with-config-file-path=/etc --with-gd --with-xsl --with-freetype-dir=/usr --enable-exif --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-pdo-mysql --enable-ftp --with-curl=/usr --with-pspell=/usr --enable-mbstring --with-mcrypt --with-mysqli --with-openssl=/usr --with-gettext --enable-pcntl --with-apxs2 && make && make install

Once the proccess was done there was a /usr/lib/httpd/modules/ in place.

Also during the compilation you can see the below:

Installing PHP SAPI module:       apache2handler
/usr/lib/httpd/build/ SH_LIBTOOL='/usr/lib/apr-1.3.9/build-1/libtool' /usr/lib/httpd/modules
/usr/lib/apr-1.3.9/build-1/libtool --mode=install cp /usr/lib/httpd/modules/
cp .libs/ /usr/lib/httpd/modules/
cp .libs/libphp5.lai /usr/lib/httpd/modules/

it has also included the LoadModule php5_module lib/httpd/modules/ on my httpd.conf automaticly without the need to do it by hand.

share|improve this answer
Yeah i have that in my ./configure and i'm not getting a .so file. find . | grep "\.so" doesn't find anything :( – Rook Oct 18 '10 at 17:30
@Rook are you sure your ./configure on 5.3.3 display the --enable-so option ? it is from what i know default options when you type it. – Prix Oct 18 '10 at 17:42
I have totally used the --enable-so option before. I just grabbed the latest 5.3.3 source from and its not there, i even tried grepping though the -h looking or .so, so such luck. There is a php-cgi option, but i don't want that. – Rook Oct 18 '10 at 17:47
I am not questionning the existence of --enable-so in the past version all i am saying is that the new version does not have it on the configure options. When i said that i was looking at the configure of 5.3.3 as i was installing it. i have just set it to compile and i will tell you soon about the .so – Prix Oct 18 '10 at 19:04 I've write the way i compiled php 5.3.3. May be the above could help you..

share|improve this answer
Thanks, but i don't want to use php-cgi. i want a – Rook Oct 18 '10 at 18:13
You can skip php-cgi – User4283 Oct 18 '10 at 18:50
yeah but i'm not getting a .so! thats the whole point of this post. – Rook Oct 18 '10 at 19:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.