Fatal error: Call to undefined function imagetypes() in

2nd July - Submitted by bamajr

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.

  1. To do this, start by opening a terminal/console session and gaining "root" or "sudo"access
  2. Next update the available packages.
    Code:

    test:~# apt-get update

  3. Now install the PHP5-GD package.
    Code:

    test:~# apt-get install php5-gd

  4. 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

3rd June - Submitted by bamajr

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:

Code:

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:

Code:

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:

Code:

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:

Code:

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:

Code:

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

2nd June - Submitted by bamajr

To see the name and kernel from the command line, you need to type:

Code:

test:~# uname -a

To see the name, style, and version from the command line, you need to type:

Code:

test:~# cat /etc/issue

You can see both from the command line, by typing:

Code:

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

1st July - Submitted by bamajr

Debian GNU/Linux Logo Image 1Debian GNU/Linux Logo Image 2

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:

Code:

test:~# pico /etc/apt/sources.list

Then you will need to add the following three lines to the bottom of the sources.list file:

Code:

# 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 to save, and then again to overwrite the same “sources.list” file.

Now you will want to run the following command:

Code:

test:~# apt-get update

Afterwards, you should be able to run the following command:

Code:

test:~# apt-cache search flashplugin

…and see a software package called flashplugin-nonfree (Adove Flash Player – Browser plugin)

To install this software package run:

Code:

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

30th June - Submitted by bamajr

Debian GNU/Linux Logo Image 1Debian GNU/Linux Logo Image 2

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:

Code:

test:~# pico /etc/apt/sources.list

After editing the file and saving it, you need to run the following command:

Code:

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:

Code:

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:

Code:

test:~# apt-get update

Code:

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

29th June - Submitted by bamajr

Debian GNU/Linux Logo Image 1Debian GNU/Linux Logo Image 2

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

26th June - Submitted by bamajr

Debian GNU/Linux Logo Image 1Debian GNU/Linux Logo Image 2

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.

Code:

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.

Code:

test:~# apt-get install package

The command below removes the package.

Code:

test:~# apt-get remove package

The command below also removes the config files for the package.

Code:

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 »

Installing phpMyAdmin on a Debian System running MySQL, Apache2 and PHP

5th May - Submitted by bamajr

INSTALLING PHPMYADMIN. (phpMyAdmin is a web interface used to develop and manage MySQL databases.)

  1. At the Debian GNU/Linux w/ KDE Welcome Screen, chose the “Menu” option in the lower left part of the screen.
  2. In the Menu chose the “Console Login” option. (You Can also simply click ALT+N from the Debian GNU/Linux w/ KDE Welcome Screen, in place of the first two steps in this section. This is a shortcut to the Console or “CONSOLE MODE”.)
  3. At the Login prompt type: “root” and hit the [enter] key.
  4. Type in the Password of the “root” user and hit the [enter] key.
  5. Then you will type the following code:
    Code:

    test:~# apt-get update

    then press the [enter] key. This will download the latest, most up to date installation packages. Do not try to continue until it has completed the package header downloads.

  6. Once all the package headers have been downloaded, type:
    Code:

    test:~# apt-get install phpmyadmin

    then press the [enter] key to continue. You will be prompted about being sure. Hit the “Y” key and press the [enter] key to continue.

  7. Verify that the installation completed by looking at the last 5 lines of the installation script. Each line should have created a configuration file. You will be left at the # Command Prompt.
  8. You will need to restart your Apache2 web server after installing phpMyAdmin. To do this type:
    Code:

    test:~# /etc/init.d/apache2 restart

    then press the [enter] key. This will restart the Apache2 server, and enforce the new modifications you just made.

  9. Bring up a web browser and go to the IP Address of the machine you are working on: “http://localhost/phpmyadmin/” if you or working locally or “http://0.0.0.0/phpmyadmin/” if you are working remote. Hit the [enter] key.
  10. You should be directed to a website showing the log in screen for phpMyAdmin.
  11. Log in with “root” as the username and leave the password blank. This is the default username and password to get it for the first time. As a rule of security and in general, you will want to add a password to that account to make it more secure.
  12. Congratulations, you have successfully installed phpMyAdmin!

Filed under: Computers, Linux-Unix, Software | No Comments »

Installing PHP5 on a Debian System running an Apache2 Server

4th May - Submitted by bamajr

INSTALLING PHP5. (PHP is a very powerful programming language for websites. At some point, your web server will need PHP in order to run specific web applications.)

  1. At the Debian GNU/Linux w/ KDE Welcome Screen, chose the “Menu” option in the lower left part of the screen.
  2. In the Menu chose the “Console Login” option. (You Can also simply click ALT+N from the Debian GNU/Linux w/ KDE Welcome Screen, in place of the first two steps in this section. This is a shortcut to the Console or “CONSOLE MODE”.)
  3. At the Login prompt type: “root” and hit the [enter] key.
  4. Type in the Password of the “root” user and hit the [enter] key.
  5. Then you will type the following code:
    Code:

    test:~# apt-get update

    then press the [enter] key. This will download the latest, most up to date installation packages. Do not try to continue until it has completed the package header downloads.

  6. Once all the package headers have been downloaded, type:
    Code:

    test:~# apt-get install libapache2-mod-php5

    then press the [enter] key to continue. You will be prompted about being sure. Hit the “Y” key and press the [enter] key to continue.

  7. Verify that the installation completed by looking at the last line of the installation script for “Forcing reload of web server (apache2)… waiting” .
  8. Again, this should leave you at the # Command Prompt.
  9. Information for these steps was obtained here.
  10. Congratulations, you have installed the latest version of PHP5 for use with your web sites.

Filed under: Computers, Linux-Unix, Software | No Comments »

Installing MySQL Server on a Debian System

1st May - Submitted by bamajr

INSTALLING MYSQL SERVER. (MySQL is one of the most popular Database Servers available and certainly the most powerful.) The MySQL Packages are necessary to use many various email systems, online bulletin boards, forums and many other data driven features you may want to use in the future.

  1. At the Debian GNU/Linux w/ KDE Welcome Screen, chose the “Menu” option in the lower left part of the screen.
  2. In the Menu chose the “Console Login” option. (You Can also simply click ALT+N from the Debian GNU/Linux w/ KDE Welcome Screen, in place of the first two steps in this section. This is a shortcut to the Console or “CONSOLE MODE”.)
  3. At the Login prompt type: “root” and hit the [enter] key.
  4. Type in the Password of the “root” user and hit the [enter] key.
  5. Then you will type the following code:
    Code:

    test:~# apt-get update

    then press the [enter] key. This will download the latest, most up to date installation packages. Do not try to continue until it has completed the package header downloads.

  6. Once all the package headers have been downloaded, type:
    Code:

    test:~# apt-get install mysql-server

    then press the [enter] key to continue. You will be prompted about being sure. Hit the “Y” key and press the [enter] key to continue.

  7. When you are returned to the command prompt, you need to verify that the installation completed without errors. Read the last 4 lines of the installation script, found above the # Command Prompt. It should say “Stopping MySQL database server: mysqld” then “Starting MySQL database server: mysqld” then “Checking for corrupt, not cleanly closed and upgrade needing tables…” and lastly “Setting up mysql-server (version number)” .
  8. Obviously the last step should have left you at the # Command Prompt.
  9. Congratulations, you have successfully installed MySQL Server!

Filed under: Computers, Linux-Unix, Software | No Comments »