Search
Tags
Log In
Fatal error: Call to undefined function imagetypes() in
Sapphire Solutions recently upgraded our Web Servers to provide a faster hosting experience for our clients. As with all of our web servers, the newly installed servers are loaded with Debian GNU/Linux and then Virtualmin.
Specifically, our new systems are running:
- Kernel and CPU: Linux 2.6.26-2-686-bigmem on i686
- Operating system: Debian Linux 5.0
- Apache version: 2.2.9
- BIND version: 9.6
- ClamAV version: 0.96.1
- Logrotate version: 3.7.1
- MySQL version: 5.0.51
- Perl version: 5.010000
- PHP version: 5.2.6
- Postfix version: 2.5.5
- ProFTPd version: 1.31
- SpamAssasssin version: 3.2.5
- Webalizer version: 2.01-10
Using Virtualmin gives all our clients instant ability to install other packages (or scripts), immediately adding additional functionality. One such package is WordPress. WordPress is a state-of-the-art publishing platform with a focus on aesthetics, web standards, and usability. Part of the “USABILITY” comes in the form of Plugins. WordPress my have an infinite number of plugins but this error showed up when using CAPTCHA technology to secure a WordPress Site.
A CAPTCHA is a type of challenge-response test used in computing to ensure that the response is not generated by a computer. The process usually involves one computer (a server) asking a user to complete a simple test which the computer is able to generate and grade. CAPTCHAs are used to prevent automated software from performing actions which degrade the quality of service of a given system, whether due to abuse or resource expenditure. CAPTCHAs can be deployed to protect systems vulnerable to e-mail spam, such as the webmail services of Gmail, Hotmail, and Yahoo! Mail.
CAPTCHA web utilities are usually coded in PHP for use on web sites. Most will allow JPEG, GIF, PNG, SWF, TIFF and JPEG2000 images types to be used. For a CAPTCHA to work, You will need to compile PHP with the GD library of image functions. GD and PHP may also require other libraries, depending on which image formats you want to work with.
When installing all the software packages on the new servers, the Virtualmin Installer does not install the necessary PHP5-GD package. Because of this, web pages with CAPTCHAs known to have been working before the upgrade, now give the "Fatal error: Call to undefined function imagetypes() in" PHP Error.
Or, more specifically, the error found was:
Fatal error: Call to undefined function imagetypes() in /home/DOMAIN-NAME/public_html/wp-content/plugins/contact-form-7/modules/captcha.php on line 350
Your server configuration and the line number, probably wont be the same as what I have found on mine.
All of this may seem complicated, but the fix is quite easy. All you need to do is install the GD Library of Image Functions.
- To do this, start by opening a terminal/console session and gaining "root" or "sudo"access
- Next update the available packages.
- Code:
test:~# apt-get update - Now install the PHP5-GD package.
- Code:
test:~# apt-get install php5-gd - Finally, restart Apache.
- Code:
test:~# /etc/init.d/apache2 restart
Now see if your CAPTCHA pages are working correctly. We have had this issue in the past after installing Virtualmin and have had other clients with this same issue (though usually in a non-virtualized environment). These steps have fixed the issue every time. If this does not fix the error, it may be necessary to install the FreeType libraries as well.
We hope this freely provided information was able to assist you. However, if you would like professional assistance, simply use the CONTACT US link in the menu to get in touch with one of our technicians. We can fix many issues remotely, for a nominal fee!
Filed under: Blogs, Computers, Internet, Linux-Unix, Operating Systems, Servers, Software, Web Hosting | No Comments »
How do I Install the bigmem kernel for Debian
Let me guess, you have a machine with more than 4 Gb of RAM, but Debian GNU/Linux isn’t detecting all of it, right?
Well, you probably did what most newer Linux users do, and installed the standard i386 version of Debian. My test machine for instance, was installed with the Debian GNU/Linux 5.0.4 “Lenny” Official i386 KDE CD. This installation uses the 2.6.26-2-686 kernel, but is only a 32 Bit OS (Operating System).
A 32 Bit OS will only identify between 3.25 Gb and 3.75 Gb of RAM, even if more is installed. It has been rumored, different hardware, utilizing the same OS, may lead to more or less RAM being identified. However, I’ve never swapped out a motherboard just to try this. It has also been rumored, 2 installed, 2 Gb RAM chips, may only be seen as a total of 2 Gb, on a 32 Bit OS. However, I have tried swapping out various 2 Gb RAM Chips, and have never had this result. My testing always produced over 3 Gb of RAM visible by the 32 Bit OS.
If you have 4 Gb or more RAM installed on your Debian GNU/Linux system, type:
test:~# grep -i memory /var/log/dmesg
The “highmem” value should be larger than 0 (Zero) k, but will probably not exceed the 4,000,000 k mark. If it does, you have a 64 Bit OS installed, or you may already have the “bigmem” kernel installed.
There are two ways to utilize RAM sizes larger than 4 Gb with Debian GNU/Linux. You can either install a 64 Bit OS or you can install the “bigmem” kernel. The “bigmem” kernel is what this blog article was written for. Though it may be possible to run a 64 Bit OS on 32 Bit hardware, it probably isn’t the best option until you are an Advanced Linux User.
First we want to start off by finding out exactly what Linux Distro and Kernel Version you have installed on your system. To do this, please reference this blog article: “How do I tell which Version of Linux is Running?”
It is probably best to use the same “bigmem” kernel version as the standard kernel version, so we need to search for it. To do so, go to the command line and type:
test:~# apt-cache search linux-image-2.6.26-2-686
The numbers following “linux-image-” are for my test system, and the latest Debian GNU/Linux “Lenny” KDE release at the time of this article. The numbers/version you find on your system may not be exactly the same as I have shown. You will want to use the exact number string you find by following the first step, above!
The above command will search for all the possible kernel images matching the version number you typed in. You will probably get about 2 or 4 lines of results. Do not be alarmed if you get more. You will be looking for “linux-image-2.6.26-2-628-bigmem” as one of the results.
To install the bigmem kernel, type:
test:~# apt-get install linux-image-2.6.26-2-686-bigmem
Again, the numbers following “linux-image-” and before “-bigmem” are for my test system, and the latest Debian GNU/Linux “Lenny” KDE release at the time of this article. The numbers/version you found on your system may not be exactly the same as I have shown. You will want to use the exact number string you find by following the first step, above!
This command requires your PC have access to an internet connection. The “apt-get” part of the command is basically telling the PC to download the file from the internet. The “install” part of the command is instructing the PC to install the package, once it is downloaded. The faster your internet connection, the quicker the entire installation process will complete.
After the installation has finished, you will need to reboot your system. To do so from the command line, simply type:
test:~# shutdown now -r
Otherwise, reboot your system however you are familiar.
When your system reboots, you will see the default kernel selected is the “bigmem” kernel.
Once you have logged back into your Debian GNU/Linux OS, go to the command line and type:
test:~# grep -i memory /var/log/dmesg
The “highmem” value should now better reflect the total RAM available to your machine. If it still doesn’t look quite right, remember any on-board devices, such as a Video Card, which does not have it’s own RAM, will also use/share the system RAM.
These steps have worked flawlessly for me, on my systems and should produce similar results on your systems. However, if you would prefer a professional does this for you, just use the CONTACT US link in the menu to get in touch with one of our technicians. Most times, we can do this for you remotely, for a nominal fee!
Filed under: Computers, Desktop, Laptops, Linux-Unix, Operating Systems, Servers, Software | No Comments »
How do I tell which Version of Linux is Running
To see the name and kernel from the command line, you need to type:
test:~# uname -a
To see the name, style, and version from the command line, you need to type:
test:~# cat /etc/issue
You can see both from the command line, by typing:
test:~# uname -a && cat /etc/issue
Hope this helps. For more discussions on this topic, click here.
These steps have worked flawlessly for me, on my systems and should produce similar results on your systems. However, if you would prefer a professional does this for you, just use the CONTACT US link in the menu to get in touch with one of our technicians. Most times, we can do this for you remotely, for a nominal fee!
Filed under: Computers, Desktop, Laptops, Linux-Unix, Operating Systems, Servers, Software | 1 Comment »
Installing Adobe Flash Player for your Debian system


Installing Adobe Flash Player on a Debian system isn’t as simple as it is when using Windows and Internet Explorer. However, it isn’t that difficult either. You can’t just go to the Adobe web site to download and install it. To accomplish this, you will need to modify the sources.list file I spoke about yesterday.
To view or edit the sources.list file from the command line you need to type:
test:~# pico /etc/apt/sources.list
Then you will need to add the following three lines to the bottom of the sources.list file:
# Debian Backported Packages
deb http://www.backports.org/debian etch-backports main contrib non-free
deb-src http://www.backports.org/debian etch-backports main contrib non-free
…this allows you to install software packages which were intended for Debian 4.0 (etch) to your Debian 5.0 (lenny) system.
In order to save and quit you will need to press Ctrl-X (to quit), “Y” followed by
Now you will want to run the following command:
test:~# apt-get update
Afterwards, you should be able to run the following command:
test:~# apt-cache search flashplugin
…and see a software package called flashplugin-nonfree (Adove Flash Player – Browser plugin)
To install this software package run:
test:~# apt-get install flashplugin-nonfree
…and follow the directions when you are prompted.
Pretty Simple Huh?
Filed under: Computers, Desktop, Laptops, Linux-Unix, Operating Systems, Servers, Software | No Comments »
sources.list file in Debian


Every Debian distribution is managed by the /etc/apt/sources.list file. This file allows you to specify whether you want your distribution to run as a stable, testing or unstable distribution.
To view or edit this file from the command line you need to type:
test:~# pico /etc/apt/sources.list
After editing the file and saving it, you need to run the following command:
test:~# apt-get update
which rebuilds the package database to reflect your newest sources.list
Once this is done, you can upgrade everything on your system to the latest versions by running the following command:
test:~# apt-get dist-upgrade
If you want to flip from one distribution to the other, just modify the sources.list file, and run the following commands:
test:~# apt-get update
test:~# apt-get dist-upgrade
That is all there is to it!
Filed under: Computers, Desktop, Laptops, Linux-Unix, Operating Systems, Servers | No Comments »
Managing Debian Distributions


As a general rule Debian has three (3) distributions: Unstable, Testing & Stable.
- STABLE – This is the latest official release of the Debian GNU/Linux distribution. This is stable and well tested software, which changes only if major security or usability fixes are incorporated.
This release is recommended for the casual user. It has a strong system for fast reactions to security exploits. It will feature the latest linux kernel as of the package release date (It is usually old by the time you get to look at it!). I’m pretty sure Debian policy stipulates any packages with an “important” bug which is not resolved in 10 days, is not accepted into stable. This policy is taken to the extreme and treated very seriously (There is some talk about a time when Apache was nearly thrown out for not conforming to the strick standards of support required for entry into the stable distribution!).
- TESTING – This area contains packages that are intended to become part of the next stable distribution. There are strict criteria a package in unstable (see below) must obey before it can be added to testing. Note that “testing” does not get the timely security updates from the security team.
These packages are “in the wings,” waiting to become “STABLE.” It will contain packages without release-critical bugs. Packages will have the same version number across all architectures they are present in, and they will have spent two weeks or longer in “UNSTABLE.”
- UNSTABLE – This area contains the most recent packages in Debian. Once a package has met our criterion for stability and quality of packaging, it will be included in testing. “unstable” is also not supported by the security team.
Packages in unstable are the least tested and may contain problems severe enough to affect the stability of your system. Only experienced users should consider using this distribution.
These packages may also be referred to as bleeding edge. This area is where developers are still hard at work. There are probably still debates about feature set should be included and how long it will take to make it work correctly.
Some of the information provided was obtained here.
Filed under: Computers, Desktop, Laptops, Linux-Unix, Operating Systems, Servers, Software | No Comments »
Debian Package Management


In this post you will get an idea of the package management commands and what they do.
The command below searches for all packages which contain the specified string.
test:~# apt-cache search string
The command below fetches the package from the Internet and installs it. If there are any unmet dependencies, it automatically fetches and installs everything required to make the package work.
test:~# apt-get install package
The command below removes the package.
test:~# apt-get remove package
The command below also removes the config files for the package.
test:~# apt-get --purge remove package
“apt-get” maintains a local database of packages, dependencies, locations of files, and etc. It will behave differently by assigning a different database for each different distribution.
Filed under: Computers, Desktop, Laptops, Linux-Unix, Operating Systems, Servers, Software | No Comments »