Displaying a list of all modules (extensions) installed

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DQ

    Displaying a list of all modules (extensions) installed

    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.

  • NC

    #2
    Re: Displaying a list of all modules (extensions) installed

    DQ wrote:[color=blue]
    >
    > 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.[/color]

    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_exist s('imap_open')) {
    echo "IMAP functions are available";
    } else {
    echo "IMAP functions are not available";
    }

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

    Cheers,
    NC

    Comment

    • Chung Leong

      #3
      Re: Displaying a list of all modules (extensions) installed


      DQ wrote:[color=blue]
      > 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.[/color]

      See http://fi.php.net/get-loaded-extensions/.

      Comment

      • DQ

        #4
        Re: Displaying a list of all modules (extensions) installed

        You're right! I couldn't see the forest for the trees. I was looking
        for a list of key-value pairs. I didn't realize that the _headings_
        were what I needed. Thanks.

        Comment

        • DQ

          #5
          Re: Displaying a list of all modules (extensions) installed

          Perfect! That's just what I needed.

          Comment

          Working...