I've attempted googling this, but i'm not gearing my searches right or something cause i'm coming up with junk.

I have some php software I design that uses GD functions. One of my main users is on an extra machine that belongs to a hosting company. With my software installed on their site the GD functions keep coming back as not found.

The sites php info page shows that GD is installed with all the options. I found some info that did say if they did a makeclean before reinstalling that it could possibly fix the problem, but the owner of the machine wont do a reinstall for the site operator.

Is there something I/he can do to attempt to diagnose or even fix the problem without being able to reinstall?

The first function that failed was imageftbbox(), so I downgraded to code to imagettfbbox() and that wasn't found either.

Any help would be greatly appreciated.

Dani AI

Generated

Brief diagnostic add-on that follows and : when phpinfo reports GD present but the FreeType/TrueType routines are reported “not found” (as in the original post), the problem is usually one of three things — GD was built without FreeType, the wrong php.ini / SAPI is being inspected, or the GD module failed to load its underlying libraries at runtime. The quickest way to see which is true is to run a tiny test from the same virtual host/SAPI that serves the failing script.

Run a short script on that site to dump GD details and loaded modules:

<?php
echo "<pre>";
print_r(gd_info());
print_r(get_loaded_extensions());
echo "</pre>";
?>

Interpretation of common results: if gd_info() shows FreeType support as false, the GD build lacks TrueType support and the font routines will be absent. If FreeType is true but the functions still error, compare the phpinfo() “Loaded Configuration File” and the extension list — different SAPIs (Apache vs CLI vs FastCGI/PHP‑FPM) use different ini files. Also check disable_functions and the webserver/PHP error log for module-load or shared-library errors (missing runtime libs will prevent certain features even when phpinfo appears to list GD).

If the host will not recompile or enable FreeType, typical mitigations are: ask for the imagick/ ImageMagick PHP extension, fall back to GD’s bitmap fonts for simple needs, pre-render text images elsewhere, or perform client-side rendering. When requesting help from the host, provide the small test output above and the exact startup/errors so the administrator can see whether GD was compiled with FreeType or if a missing shared library is blocking those functions.

Recommended Answers

All 2 Replies

Well, i dont know how helpful this is, but once my applxn could not use the gd functions too, though the library was installed, so i read some article that told me i had to uncomment the line that included the gd library in the php.ini file. So, after uncommenting the line below, the code executed. extension=gd.so I was working on a linux machine. I think on a windows machine the same line would be extension=gd.dll Good luck.

The first function that failed was imageftbbox(), so I downgraded to code to imagettfbbox() and that wasn't found either.

Any help would be greatly appreciated.

The imagettfbbox() rquires both GD library and the FreeType library both.
FreeType@ http://freetype.sourceforge.net or http://www.freetype.org
You did it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.