You are here: Re: Displaying a list of all modules (extensions) installed « PHP Programming Language « IT news, forums, messages
Re: Displaying a list of all modules (extensions) installed

Posted by NC on 03/29/06 20:27

DQ wrote:
>
> I just signed up for a web hosting service. They have PHP, but can't
> tell me which modules (extensions) are installed.
>
> Is there a function, or some other easy way, to show all modules
> (extensions) that are installed? phpinfo() doesn't do this.

But of course it does! First, it shows you system information
(including configuration string), then, there's Configuration heading.
First table under Configuration is "PHP Core", the rest of the tables
contain data about extensions and their configuration. Something like
this:

bcmath
BCMath support enabled

calendar
Calendar support enabled

ctype
ctype functions enabled

curl
CURL support enabled
CURL Information libcurl/7.12.0 OpenSSL/0.9.6g zlib/1.1.3

Additionally, you can always check if an extension is present by
testing if functions defined in this extension are available. Example:


if (function_exists('imap_open')) {
echo "IMAP functions are available";
} else {
echo "IMAP functions are not available";
}

You could also call get_defined_functions() and see what extensions are
enabled from the list of functions that are available.

Cheers,
NC

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация