PDA

View Full Version : Captcha broken after 3.6.8 upgrade


andrew867
Sun 18th May '08, 2:19pm
Hi,

My captcha no longer displays text in the captcha image during registration. Originally I had to recompile apache2 with the original software package. Do I need to recompile the server with an updated captcha software? Any idea what that version that number that is?

Thanks!

Steve Machol
Sun 18th May '08, 3:50pm
Make sure the *.TTF files are uploaded to your images/regimage/fonts directory.

If you still have this problem after that then this is caused by Freetype 2 (http://freetype.sourceforge.net/freetype2/index.html) support not being compiled into PHP and requires PHP to be recompiled.

andrew867
Sun 18th May '08, 6:37pm
Okay so the files were there so I recompiled php 5.2.6. I included the options:

Command './configure' '--with-mysql' '--prefix=/usr/lib/php5' '--with-config-file-path=/etc/php5/apache2/php.ini' '--with-apxs2=/usr/bin/apxs2' '--with-pear' '--with-gd' '--with-libxml-dir=/usr/lib' '--with-jpeg-dir=/usr/lib' '--with-zlib-dir=/usr/lib' '--with-png-dir=/usr/lib' '--with-gettext' '--enable-magic-quotes' '--with-ttf' '--enable-gd-native-ttf'

I restarted apache2 but no text displays. :(

Steve Machol
Sun 18th May '08, 7:01pm
If you still have this problem after that then this is caused by Freetype 2 (http://freetype.sourceforge.net/freetype2/index.html) support not being compiled into PHP and requires PHP to be recompiled.

andrew867
Mon 19th May '08, 7:39pm
Alright, still trying. This is the latest ./configure:

./configure --with-mysql --prefix=/usr/lib/php5 --with-config-file-path=/etc/php5/apache2/php.ini --with-apxs2=/usr/bin/apxs2 --with-pear --with-gd --with-libxml-dir=/usr/lib --with-jpeg-dir=/usr/lib --with-zlib-dir=/usr/lib --with-png-dir=/usr/lib --with-gettext --enable-magic-quotes --with-ttf --enable-gd-native-ttf --with-freetype-dir=/usr --with-png-dir

/usr/local/bin/freetype-config --ftversion 2.3.5


Oh and this line exists in the php 5 Makefile: GDLIB_CFLAGS = -I/usr/src/php-5.2.6/ext/gd/libgd -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE

should it be LIBFREETYPE or LIBFREETYPE2 ?

and

INCLUDES = -I/usr/include/libxml2 -I/usr/src/php-5.2.6/ext/date/lib -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/include/mysql

php5, the latest freetype2 and gd compiles alright but no dice.

Steve Machol
Mon 19th May '08, 8:53pm
Enable phpinfo in the Admin CP, then provide the URL to your forums. This may help us troubleshoot this problem.

Admin CP -> vBulletin Options -> Server Settings and Optimization Options -> Public phpinfo() Display Enabled

andrew867
Mon 19th May '08, 9:49pm
Enable phpinfo in the Admin CP, then provide the URL to your forums. This may help us troubleshoot this problem.

Admin CP -> vBulletin Options -> Server Settings and Optimization Options -> Public phpinfo() Display Enabled

Hi Steve,

I have added the link in the rep point you received on that post.

andrew

Steve Machol
Mon 19th May '08, 10:47pm
Your PHP is not compiled with Freetype 2 support. You need to recompile PHP with that support.

Here is a relevant link:

http://freetype.sourceforge.net/freetype2/index.html

andrew867
Tue 20th May '08, 9:59pm
Your PHP is not compiled with Freetype 2 support. You need to recompile PHP with that support.

Here is a relevant link:

http://freetype.sourceforge.net/freetype2/index.html

Hi Steve,

Yeah I thoroughly understand that part of the problem. I've tried about two dozen different ./configure settings with php but none of them works. I've recompiled freetype2, and gd. I've tried pointing the --with-freetype-dir in a couple different places. Are there any options that I'm missing? :confused: The latest I've been trying is:

./configure --with-mysql --prefix=/usr/lib/php5 --with-config-file-path=/etc/php5/apache2/php.ini --with-apxs2=/usr/bin/apxs2 --with-gd --with-freetype-dir=/usr/include/ --enable-gd-native-ttf --with-libxml-dir=/usr/lib --with-jpeg-dir=/usr/lib --with-zlib-dir=/usr/lib --with-png-dir=/usr/lib --with-gettext --enable-magic-quotes --with-png-dir=/usr/lib/

Steve Machol
Tue 20th May '08, 11:00pm
You need to compile PHP with freetype2, not freetype.

andrew867
Wed 21st May '08, 12:43am
Okay, well thats what I thought I was doing. I tried a couple more things like recompiling gd with ./configure --prefix=/usr/local/lib

The ./configure script will show a bunch of gd options flash by including freetype1 support no freetype2 support yes. Then I try php with:

./configure --with-mysql --prefix=/usr/lib/php5 --with-config-file-path=/etc/php5/apache2/php.ini --with-apxs2=/usr/bin/apxs2 --with-gd=/usr/lib --with-freetype-dir=/usr/include/freetype2/ --with-libxml-dir=/usr/lib --with-jpeg-dir=/usr/lib --with-zlib-dir=/usr/lib --with-png-dir=/usr/lib --with-gettext --enable-magic-quotes --enable-gd-native-ttf --with-png-dir=/usr/lib/

the --with-gd=/usr/lib has me stumped though. If I don't include the directory it will compile just fine but won't include the freetype2 in the compiled software. If I include the full --with-gd=/usr/lib it will break during make. I've tried placing gd in a variety of places with the --prefix option and this will happen every time:

...-lmysqlclient -lgd -lfreetype -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lxml2 -lxml2 -lxml2 -lcrypt -lxml2 -lxml2 -lxml2 -lcrypt -o sapi/cli/php
ext/gd/.libs/gd.o: In function `php_image_filter_smooth':
/usr/src/php-5.2.6/ext/gd/gd.c:5272: undefined reference to `php_gd_gdImageSmooth'
ext/gd/.libs/gd.o: In function `php_image_filter_mean_removal':
/usr/src/php-5.2.6/ext/gd/gd.c:5248: undefined reference to `php_gd_gdImageMeanRemoval'
ext/gd/.libs/gd.o: In function `php_image_filter_selective_blur':
collect2: ld returned 1 exit status
etc.

Steve Machol
Wed 21st May '08, 1:11am
All you have to do is look at your phpinfo page to see if Freetype2 is installed under the GD section.

andrew867
Wed 21st May '08, 1:15am
All you have to do is look at your phpinfo page to see if Freetype2 is installed under the GD section.

I know! :) But nothing I've been able to do has been able to make it appear.

Steve Machol
Wed 21st May '08, 1:20am
I suggest you post in the Server Configuration forum for help with this. It's a server issue now.