CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Server Setup for captcha
Pages: [1]

Author Topic: Server Setup for captcha  (Read 1691 times)

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Server Setup for captcha
August 21, 2007, 04:56:11 am
I thought there was a captcha bug when I hit the same fatal error on the demo - seems it was an invalid path to the true type font.  I have a valid path to a valid true type font entered in my global settings.  I've actually used two files, one from my desktop machine and one free font offered by redhat.

So, maybe it's my php setup.  I set up this server, so maybe I've missed something.  I compiled php 5.2.3 with freetype and ttf enabled. php reports:

GD Support   enabled
GD Version   bundled (2.0.34 compatible)
FreeType Support   enabled
FreeType Linkage   with freetype
FreeType Version   2.1.9
GIF Read Support   enabled
GIF Create Support   enabled
JPG Support   enabled
PNG Support   enabled
WBMP Support   enabled
XBM Support   enabled

What else should I check?
Lead Developer, C3 Design.
Twitter: @FatherShawn

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Server Setup for captcha
August 21, 2007, 11:25:46 am

Note that in addition to the font directory, you also specifiy the font file to be used. Thus in demo we use:

times.ttf

AND

/usr/X11R6/lib/X11/fonts/webfonts/

there is a file with this path on demo:

/usr/X11R6/lib/X11/fonts/webfonts/times.ttf

can u ensure that the same applies in your case on the server

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: Server Setup for captcha
August 22, 2007, 06:00:22 am
Yes my settings are correct.  The free ttf that I obtained from RedHat is located at:

/public/www/captcha/LiberationSans-Regular.ttf

My font file setting is: LiberationSans-Regular.ttf
My font directory setting is: /public/www/captcha

I have downloaded the font file to my desktop machine (Mac OS X) and verified that the font file previews correctly, so the file should be fine.

The directory is owned by the user that the apache server runs under and has permissions of 755. The font file also has permissions of 755 and also is owned by the server user.  When attempting to preview a profile with CAPTCHA turned on for that profile I get:

    [message] => Fontfile not found or not readable.
    [mode] => 16
    [debug_info] =>
    [type] => PEAR_Error
    [user_info] =>
    [to_string] => [pear_error: message="Fontfile not found or not readable." code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
Lead Developer, C3 Design.
Twitter: @FatherShawn

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: Server Setup for captcha
August 23, 2007, 09:08:55 am
Ahh, the simplest things always trip the very literal computer!  I read the comments in Text.php and found that the trailing slash is required on the directory path.  Added the slash and the script no longer crashes!! 

I do still have a question though.  I'm running in Joomla! and the CAPTCHA image displays at the bottom of the profile preview.  The Drupal based demo runs the CAPTCHA test and then displays the profile preview.  Why the difference?
« Last Edit: August 23, 2007, 09:11:18 am by FatherShawn »
Lead Developer, C3 Design.
Twitter: @FatherShawn

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Server Setup for captcha

This forum was archived on 2017-11-26.