As you see below, I have a "--with-freetype-dir" setting in my configure string. However the output of phpinfo() does not include the word "freetype" and when I visit a page that runs this function on "imagettftext" and "filter_var", it returns false:
[FONT="Courier New"] if (function_exists($functionName) && strstr(ini_get("disable_functions"), $functionName) === false) {
return true;
}
return false;
}
[/FONT]
I read about a problem with filter.so, which I tried to fix with the instructions at http://forum.ivorde.ro/fatal-error-call-to-undefined-function-filter-var-in-php-script-t39.html but apparently that didn't work, as shown by the function above when it's called on "filter_var". I think perhaps I didn't use the correct phpize script, so the more important problem is imagettftext.
Here's the configure string I used:
[FONT="Courier New"]./configure '--prefix=/usr/src/php-5.2.17' '--datadir=/usr/share/php5' '--mandir=/usr/share/man' '--bindir=/usr/bin' '--with-libdir=lib64' '--includedir=/usr/include' '--sysconfdir=/etc/php5/apache2' '--with-config-file-path=/etc/php5/apache2' '--with-config-file-scan-dir=/etc/php5/conf.d' '--with-exec-dir=/usr/lib64/php5/bin' '--enable-magic-quotes' '--enable-libxml' '--enable-session' '--with-mm' '--with-pcre-regex' '--enable-xml' '--enable-simplexml' '--enable-spl' '--enable-safe-mode' '--enable-sigchild' '--disable-debug' '--enable-memory-limit' '--enable-inline-optimization' '--enable-zend-multibyte' '--with-mysql=/usr' '--with-mssql=/usr/local/freetds' '--with-gd' --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-freetype-dir=/usr '--with-apxs2=/usr/sbin/apxs2' '--disable-all' '--disable-cli' --with-xpm-dir=/usr
[/FONT]
In the config.log, I found these errors which did not prevent PHP from finishing the build:
[FONT="Courier New"]configure:90679: gcc -o conftest -g -O2 -I/usr/src/php-5.2.17/ext/date/lib -I/usr/local/include/libxml2 -
I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/freetds/include -I/usr/include/mysql -I/us
r/src/php-5.2.17 -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib64 -L/usr/local/lib
64 -Wl,-rpath,/usr/local/freetds/lib64 -L/usr/local/freetds/lib64 conftest.c -lmm -lmysqlclient -lsybdb -l
freetype -lX11 -lXpm -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm 1>&5
configure: failed program was:
#line 90670 "configure"
#include "confdefs.h"
#include "Zend/zend_types.h"
int main(int argc, char **argv) {
return ((sizeof(zend_object_handle) + sizeof(zend_object_handlers*)) == sizeof(zend_object_value))
? 0 : 1;
}
configure:92893: gcc -o conftest -g -O2 -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local
/lib64 -L/usr/local/lib64 -Wl,-rpath,/usr/local/freetds/lib64 -L/usr/local/freetds/lib64 conftest.c -lcryp
t -lmm -lmysqlclient -lsybdb -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lxml2 -
lz -lm -lxml2 -lz -lm -lcrypt 1>&5
/tmp/ccSljHhm.o: In function main':
/usr/src/php-5.2.17/configure:92887: undefined reference tores_nmkquery'
collect2: ld returned 1 exit status
configure: failed program was:
#line 92870 "configure"
#include "confdefs.h"
/ System header to define __stub macros and hopefully few prototypes,
which can conflict with char res_nmkquery(); below. /
#include <assert.h>
/ Override any gcc2 internal prototype to avoid an error. /
/ We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. /
char res_nmkquery();
int main() {
/ The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with and the normal name is an alias. /
#if defined (stub_res_nmkquery) || defined (stub_res_nmkquery)
choke me
#else
res_nmkquery();
#endif
; return 0; }
[/FONT]
There are some more like that, but I noticed that each time it fails, it checks for the same function again and doesn't fail - so maybe that isn't a cause for concern.