PHP

ID #100

Why does a PHP function give an error that it is undefined?

Applies to: Grid System

It is likely that you are using a function from a dynamic extension module that you do not have loaded. We've compiled php with all extensions compiled as shared objects. By default, only the mysql module is enabled. This other FAQ tells you how to enable and load modules.

When you try to use a function that is not part of the core PHP and you have not loaded the module for it, you will get an error like:

Fatal error: Call to undefined function: imagecreate()

In order to fix this, you just need to load the extension module that contains this function. In this example above, it would be the GD module, which you could load by uncommenting
; extension = gd.so
in your php.ini by removing the semicolon from in front of the line, or by having in your PHP code a call to the dynamic loader like


If you are trying to use any of the Apache specific functions such as getallheaders(), please contact us for help.


Last update: 2010-09-27 15:23
Author: FAQ Admin
Revision: 1.2

Digg it! Share on Facebook Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 3.83 (6 Votes)

completely useless 1 2 3 4 5 most valuable

You can comment this FAQ