{"id":250,"date":"2009-03-30T16:12:30","date_gmt":"2009-03-30T21:12:30","guid":{"rendered":"http:\/\/it.thelibrarie.com\/weblog\/?p=250"},"modified":"2009-03-30T16:12:30","modified_gmt":"2009-03-30T21:12:30","slug":"gd-apache-captcha-php-error","status":"publish","type":"post","link":"https:\/\/it.thelibrarie.com\/weblog\/2009\/03\/gd-apache-captcha-php-error\/","title":{"rendered":"GD, Apache, Captcha, PHP, Error"},"content":{"rendered":"<p>I had to setup a captcha on someone&#8217;s website.  The captcha refused to load.  The easiest way to get the error (since, by default, PHP will <strong>not<\/strong> list out all the problems when called from another page) is to call the script directly.<br \/>\nSay your site is http:\/\/www.mysite.net.  You&#8217;ll want to go to http:\/\/www.mysite.net\/CaptchaSecurityImages.php.  You can do the website math.<\/p>\n<p>I had apache installed, GD installed, PHP installed.<\/p>\n<p>This is the error I was receiving:<br \/>\n<code>Warning: imagettfbbox() [function.imagettfbbox]: Could not find\/open font in \/var\/www\/sitehere\/CaptchaSecurityImages.php on line 60<\/code><\/p>\n<p>Error in imagettfbbox function, eh?  That&#8217;s none too helpful.  Good thing I can read: Could not find\/open font.  That&#8217;s all I need to know.<\/p>\n<p>If you were to open up CaptchaSecurityImages.php and change the location of monofont.ttf to a debian\/ubuntu file location, everything would probably end up working correctly.<\/p>\n<p>SSH to your machine<br \/>\n<code>nano CaptchaSecurityImages.php<\/code><br \/>\nSearch for:<br \/>\n<code>var $font = 'monofont.ttf'<\/code><br \/>\nand replace with:<br \/>\n<code>var $font = '.\/monofont.ttf'<\/code><br \/>\nReload your script on your web browser<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had to setup a captcha on someone&#8217;s website. The captcha refused to load. The easiest way to get the error (since, by default, PHP will not list out all the problems when called from another page) is to call the script directly. Say your site is http:\/\/www.mysite.net. You&#8217;ll want to go to http:\/\/www.mysite.net\/CaptchaSecurityImages.php. You &hellip; <a href=\"https:\/\/it.thelibrarie.com\/weblog\/2009\/03\/gd-apache-captcha-php-error\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">GD, Apache, Captcha, PHP, Error<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-250","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/comments?post=250"}],"version-history":[{"count":1,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/250\/revisions"}],"predecessor-version":[{"id":251,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/250\/revisions\/251"}],"wp:attachment":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/media?parent=250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/categories?post=250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/tags?post=250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}