How to install PHP libraries


I noticed in my PHP configuration that I am missing some PHP libraries (like CURL, GD,...). How can I install them ?



Howdy -- you can install PHP modules from the command line by running this command:

apt-get install php5-MODULE_NAME

For example, to install PHP's GD and Curl modules, you'd type this:

apt-get install php5-gd
apt-get install php5-curl

You can also install packages within Virtualmin by going into Webmin -> System -> Software Packages, where you can search for and install packages from within the GUI.

Thank you for your answer. I suppose that when you install a library with apt-get it installs the latest version available.

So I did install gd (normaly 2.0.36 version) but my Joomla extension requiring GD keeps telling me that the gd version is too old (< 2.0.1 - it is a progress however since it used to tell me that the library was missing).

It is true that the phpinfo (via Joomla) gives me : GD Version : 2.0 or higher , while I was having GD Version : bundled (2.0.34 compatible) on my previous server.

Is there a way to load this "bundled" version instead ?

The php5-gd package on Debian won't actually install unless it's using GD 2.0.36 or higher. So it actually should be fine -- I'm not sure why you're seeing that error in Joomla.

Just to be sure something isn't cached in memory, you may want to try restarting Apache by running this:

/etc/init.d/apache2 restart

Also, if there's a way to clear your Joomla cache, you may want to try that too.

I don't know how to make the GD version match the results of your previous server, though it really should work with the setup you have now.

I restarted Apache with your command but I get the following message :

Restarting web server: apache2apache2: apr_sockaddr_info_get() failed for apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName ... waiting .apache2: apr_sockaddr_info_get() failed for apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName

Hmm, so what is your server's hostname?

You can determine that by typing the command "hostname" on the command line.

Ah, that'll do it... the domain in your hostname should be one that you own and is hosted on your own server -- otherwise, you might get strange errors such as the one you're seeing above :-)

My recommendation is to pick a new hostname that uses one of your domain names, and then do the following:

  1. Set the new hostname on the server using: hostname your_new_hostname.tld

  2. Make sure that hostname exists in /etc/hosts, next to your public IP address

  3. Edit /etc/postfix/, and include that hostname in the "mydestination" line

  4. Restart Postfix

  5. Edit /etc/hostname, and change the hostname listed in there to use your new one

After all that -- try restarting Apache again, and see if those errors go away.

OK, I checked all your instructions and located all the files concerned. Just to make sure that I got everything before actually doing it, I have two questions :

  1. I can choose any of the domains hosted on server or is it better to choose one over another ?
  2. I noticed that at the moment all the emails sent by the domain have "Received: from serv01ev" in the header. So changing to a real domain is certainly better. But that means that all domains on the server will have the same "received from...". Is there a way to make each domain send its own header ?

Which domain you use doesn't matter, it just has to be none you control.

As far as the receiver header goes -- all domains on your server will have the same received header... it's not possible for each domain to have something different there. The received header is determined based on the servers hostname, as well as the reverse DNS associated with the primary IP on your server.

So you work on Sunday ! I guess you meant "one you control" instead of "none you control", otherwise I don' t understand anymore...

Thanks for your patient help with a newbie.

It's me again. This is turning to a DNS issue, but it follows the track of this post. I followed your documentation on "Troubleshooting Common Problems with DNS" and tested for glue records and NS records.

Here is the situation : I have one domaine,, hosted on a new server (that I manage with Virtualmin). This server is on a cloud hosting handled by a French company, Gandi. I have also another domain, that is currently hosted on a VPS handled by another hosting provider, Net4All. I will transfer this domain to my server shortly, but at the moment it serves as a reference.

Here are the tests : Glue records : :

ns0: ns1: ns2: :

That seems correct since each hosting provider appears. In the documentation it says that "NS records should match those found in the glue records", but this is what I have : NS records : : name server : name server name server

So, shouldn't I put "" as hostname, even though I don't own this domain name ? And if so, how do I set the secondary and third nameserver ?

Heh, you're right, my sentence makes no sense :-)

I did indeed mean to say "Which domain you use doesn't matter, it just has to be one you control."

As far as your DNS settings go --

So it looks like your DNS is setup over at That's great.

The hostname of your server would still need to include a domain you control though, and not (which you don't control).


Because you need to add a DNS record for it :-)

You own the name So we'd want to make a server name like "".

That's not the end though -- we now want to go over to, and add a DNS "A" or "Address" record for that points to your IP address.

Additional hint about what Eric said: " just has to be one you control, but whose DNS zone is not hosted on the Virtualmin server itself". :)

That is because Virtualmin expects the hostname of the Vmin host itself to be externally resolvable, e.g. having a Gandi server as authoritative nameserver.

It is possible to have a setup where the Vmin server itself is the authoritative nameserver for the domain of the Vmin host, but that requires some manual setup of zone files (I myself am actually doing that, but the zone in question is not managed through Vmin but directly in Webmin's BIND module).

In your case, jfquestiaux, it would seem that not only the zone of your host, but also that of the website you intend to host is managed at Gandi, which means you don't have to fiddle with BIND on your Vmin server at all, you just need to make sure that an A record at Gandi for your euro-vote domain points to the IP of your Vmin host.