Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am compiling php, and its setting my modules directory to /usr/lib64/20090626-zts

I would like to change this to /usr/lib64/php/modules, but I cannot find a configuration option to do so.

I can change it in my php.ini and move the directory, but when I run phpize and make a new module it still puts it in /usr/lib64/20090626-zts

share|improve this question
    
Haven't have time to test this: EXTENSION_DIR=/usr/lib64/php/modules phpize. –  Mark Wagner Sep 27 '11 at 23:54

2 Answers 2

up vote 2 down vote accepted

I would suggest making /usr/lib64/php/modules a symlink to the folder with the ID. This prevents mixing extensions from different versions of PHP in the long run.

Besides that: You should be able to set it by setting EXTENSION_DIR as environment variable before running PHP's configure. something like

 $ EXTENSION_DIR=/my/location ./configure --with-some-extension
share|improve this answer
    
Yeah that makes sense, I don't want my modules to conflict in the future. I think I will just leave the folder name alone. –  copacetic Sep 28 '11 at 16:09

Check the current extension directory with:

php-config --extension-dir

and you can change it by setting extension_dir in php.ini:

extension_dir="/usr/lib64/php/modules"

Don't forget to restart Apache.

share|improve this answer

Your Answer

 
discard

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.