Custom PHP extension_dir

webaltern

Verified User
Joined
Feb 10, 2008
Messages
172
Location
Québec, Canada
Hello!

i want to know if its possible to set a custom extension_dir to php that make all extensions goes to /usr/local/lib/php/extensions/ and not to /usr/local/lib/php/extensions/no-debug-non-zts-20090626/

so that way, we don't need to update this part: no-debug-non-zts-20090626 all the time...

thank you
 
Hello!

i want to know if its possible to set a custom extension_dir to php that make all extensions goes to /usr/local/lib/php/extensions/ and not to /usr/local/lib/php/extensions/no-debug-non-zts-20090626/

so that way, we don't need to update this part: no-debug-non-zts-20090626 all the time...

thank you

You should post this topic in feature request, this is the wrong channel.
 
1. Set
Code:
extension_dir=/usr/local/lib/php/extensions/

if it differs as for now.

2. Open php-config in any editor, find line

Code:
extension_dir='/usr/local/lib/php/extensions/no-debug-non-zts-20090626'

and replace it with

Code:
extension_dir='/usr/local/lib/php/extensions'

Since that all new extensions on

Code:
make && make install

will be placed into /usr/local/lib/php/extensions/ directly.

Note, if you upgrade your PHP with custombuild you might loose changes in php-config and you 'll need to replace path once more time.

In some certain cases you might want to copy php-config let's say into /root/ (to protect it from being overwritten) and run

Code:
./configure --with-php-config=/root/php-config

when compiling a new extension.

Note, though it worked for me, I can't guarantee that it will work by your side and you won't break anything. So make sure you've got backups for all files, that you are going to modify before following my steps.
 
Back
Top