Page 1 of 1

Compiling/enabling libraries/extensions in php

Posted: Sat Mar 20, 2010 9:25 am
by prajeeshmca
Hi,
I have a confusion over installing extensions to php. I would like to know the difference between using --with and --enable- while installing php. Also Is it possible to add an extension after the installation by just modifying php.ini. Please guide me.

Thanking you in advance.

Prajeesh

Re: Compiling/enabling libraries/extensions in php

Posted: Wed Mar 24, 2010 5:16 pm
by Zlobcho
If you are referring to "compiling" php, --with you are telling to compile with ext/lib where --enable tell gcc to enable specific features (like memory_limit and magic_quotes to be on by default), --disable is opposite to --enable. You can check http://www.php.net/manual/en/configure.about.php or run ./configure --help for more info on what options you have.

Yes you can compile any php extension, you'll need the extension code, then run phpize, configure with required options (if any), then make and make install to compile and install the extension, at and the end you'll need to edit php.ini (depending on your configuration) to load the extension.

It sounds complicated but actually is very simple. :)