Howto: Show and install php extensions on Ubuntu/Debian

You may review the available PHP extensions on your Debian/Ubuntu system by tipping in:

your output on a standard Ubuntu/Debian could looks like this:

To install new php modules on your Ubuntu/Debian, all you need to type in is:

If you need to check what is installed php-wise you can:

this could look like this:

If you want to add the gd library for example, try: php5enmod gd

In this case, it didn’t work, so let us install the library using ” apt-get install php5-gd”. The output may look like this:

Now you may enable the phpmodule and restart the apache:

i use a small php test.php script to have a look at the php configuration in a well formated, it looks like this:

put it in your webspace and check the output by typing in: www.yourdomain.de/test.php

The installed and enmoded php extension should now be available.

good luck and have fun!

 

Leave a Comment