rickschneider17's picture

I need to add an extension to the php configuration.  I can easily add it to the php.ini file, but I can not for the life of me find where the extension directory for the php extensions is.  I looked in the php.ini file, but the directive for directory extension is commented out.  However, if I look in the /etc/php5/conf.d directory, I see a series of ini file, each loading the module with nothing more than the extension= syntax.  So where are those so's on the filesystem?  the mysql.so?  the gd.so?  

Thanks

Forum: 
Tags: 
Jeremy Davis's picture

As that's the best (safest, most predictable and most secure) way of installing. You can find out if it's been packaged a few different ways.

You can search online via http://packages.debian.org (it defaults to seaching package names only, but you can select to search descriptions as well) or you can do a quick search by including the search term in the url e.g to search for all packages that include php5 in the package name: http://packages.debian.org/php5

Another way that you can search for packages is at the commandline, like this:

apt-get update
apt-cache --names-only search php5

Again this example uses php5 as the search term. Note that by default (without the --name-only switch) apt-cache search searches descriptions as well as names.

Assuming that you find the extension you are after then just install with:

apt-get update
apt-get install <packagename>

Note that generally apt-get update is only needed once each session (unless you change the repos).

Failing all that you can find where a file/folder is using the find command, like this:

find / -name '<file/folder-name>'

Syntax of find is find [path] [options]. You can also use wildcards (*) in the name. As an example, to find mysql.so:

 

find / -name 'mysql.so'

Add new comment