phpCOIN

  Reply to this topicStart new topicStart Poll

> Captcha error fixed, Captcha error fixed
auzzie
Posted: July 03, 2008 04:22 am
Quote Post


Advanced Member
***

Group: Members
Posts: 45
Member No.: 604
Joined: October 28, 2006



When testing the captcha images at:

http://your.domain.com/coin_addons/captcha...urityImages.php

I was getting the following error:

[error] PHP Warning: imagettfbbox(): Could not find/open font in /home/username/public_html/coin_addons/captcha/CaptchaSecurityImages.php on line 71

I thought this fix may come in handy for anyone who gets an error similar to the one above.

Under /coin_addons/captcha
I created a folder called fonts
I copied the monofont.ttf to the /coin_addons/captcha/fonts folder

I then changed the following line 39 in /coin_addons/captcha/CaptchaSecurityImages.php

var $font = 'monofont.ttf';

to

var $font = 'fonts/monofont.ttf';

NB: this may not work on all systems however it did work for me.

In my case I knew there was not a misconfiguration issue with my server as I have captcha working successfully with several other sites hosted on my server which use the same CaptchaSecurityImages.php code in various other scripts besides phpCOIN.



--------------------
In order for your dreams to become reality, you first have to dream!

Auzzie.Biz
PMEmail Poster
Top
lightman
Posted: July 03, 2008 10:51 am
Quote Post


The Janitor
***

Group: Admin
Posts: 3,639
Member No.: 3
Joined: August 25, 2006



It doesn't make a lot of sense to me that PHP can't read the monofont.ttf file in one folder but it can if it is placed in another - I would suspect the permissions on the file and/or folder in its original location - or a missing/corrupted/unreadable file.


--------------------
***** Unless otherwise stated, all replies refer to the following *****
====================================================================
--- The latest unmodified version of phpCOIN available from the phpCOIN download page on the date and time of this post.
--- All relevant HotFix files applied - One of the four included unmodified themes - The original language files .
--- Help will be given to install/configure/use phpCOIN, but not programming help to modify phpCOIN operations. If you are competent enough to make programming changes, you should be competent enough to read the source code and figure things out :)
PM
Top
cakra
Posted: July 06, 2008 12:05 pm
Quote Post


Newbie
*

Group: Probation
Posts: 4
Member No.: 3,497
Joined: July 06, 2008



Im still getting an error.
Captcha image still not show.
PMEmail PosterUsers WebsiteYahoo
Top
cantex
Posted: July 06, 2008 04:16 pm
Quote Post


Chief Cook & Bottle Washer
***

Group: Archive
Posts: 3,252
Member No.: 1
Joined: August 25, 2006



QUOTE
Im still getting an error.

What do your php error logs say?
Without that info we cannot tell you what the issue is, now how to solve it sad.gif


--------------------
================================================================
Please do not email or PM me with a question:
1: I handle over a thousand emails a day, so chances are yours would be buried in the pile.
2: All questions will only be answered in the support forums, so the answers will be useful to others.

Help will be given to install/configure/use phpCOIN, but not programming help to modify phpCOIN operations. If you are competent enough to make programming changes, you should be competent enough to read the source code and figure things out :)

If you are trying to integrate posted sample code into your website, please take into account any changes in phpCOIN made after the code sample was posted. It is discouraging to spend hours answering questions or trying to track down an issue only to find that the user has a version of phpCOIN that makes the sample irrelevant
PM
Top
cakra
Posted: July 06, 2008 04:25 pm
Quote Post


Newbie
*

Group: Probation
Posts: 4
Member No.: 3,497
Joined: July 06, 2008



Sorry.
My error same with auzzie

QUOTE
[Sun Jul 06 20:10:43 2008] [error] [client 118.136.108.237] PHP Fatal error:  Call to undefined function  imagettfbbox() in /home/cakrainf/public_html/coin_addons/captcha/CaptchaSecurityImages.php on line 71, referer: http://www.cakra.info/mod.php?mod=mail&mode=contact


Thanks for help
PMEmail PosterUsers WebsiteYahoo
Top
cakra
Posted: July 06, 2008 05:14 pm
Quote Post


Newbie
*

Group: Probation
Posts: 4
Member No.: 3,497
Joined: July 06, 2008



I have same error with auzzie.

"[error] PHP Warning: imagettfbbox(): Could not find/open font in /home/username/public_html/coin_addons/captcha/CaptchaSecurityImages.php on line 71"

And not yet solved till now.

Thanks for your help
PMEmail PosterUsers WebsiteYahoo
Top
cantex
Posted: July 06, 2008 08:37 pm
Quote Post


Chief Cook & Bottle Washer
***

Group: Archive
Posts: 3,252
Member No.: 1
Joined: August 25, 2006



QUOTE
Could not find/open font in /home/username/public_html/coin_addons/captcha/CaptchaSecurityImages.php on line 71

Your web-server is unable to find the font file, or if it found irt it cannot open it.

Does the font-file exist?
Is that location accessible by the web-server user?
Have you tried moving the font-file to a different location with 666 permissions and editing the font-file location?

Also try changing the font location variable to a full path rather than a relative path. For example, change the default
CODE
var $font = 'monofont.ttf';
to
CODE
var $font = '/home/username/public_html/coin_addons/captcha/monofont.ttf';


Bottom line: for some reason your web-server is not loading the font file, so captcha cannot work.


--------------------
================================================================
Please do not email or PM me with a question:
1: I handle over a thousand emails a day, so chances are yours would be buried in the pile.
2: All questions will only be answered in the support forums, so the answers will be useful to others.

Help will be given to install/configure/use phpCOIN, but not programming help to modify phpCOIN operations. If you are competent enough to make programming changes, you should be competent enough to read the source code and figure things out :)

If you are trying to integrate posted sample code into your website, please take into account any changes in phpCOIN made after the code sample was posted. It is discouraging to spend hours answering questions or trying to track down an issue only to find that the user has a version of phpCOIN that makes the sample irrelevant
PM
Top
cakra
Posted: July 07, 2008 02:10 am
Quote Post


Newbie
*

Group: Probation
Posts: 4
Member No.: 3,497
Joined: July 06, 2008



Still now work with same error.
I should consult our server admin, perhaps they can help.
And right now I am disable Captcha function.

Kind Regards
http://www.cakra.info
PMEmail PosterUsers WebsiteYahoo
Top
auzzie
Posted: July 08, 2008 04:28 pm
Quote Post


Advanced Member
***

Group: Members
Posts: 45
Member No.: 604
Joined: October 28, 2006



QUOTE (lightman @ July 03, 2008 09:51 am)
It doesn't make a lot of sense to me that PHP can't read the monofont.ttf file in one folder but it can if it is placed in another - I would suspect the permissions on the file and/or folder in its original location - or a missing/corrupted/unreadable file.

Checking the permissions on the file and folder was the first thing I did. Could not see anything wrong from the ssh command line.

It did not make sense to me either.

I have a number of other scripts on my web hosting server running captcha (not phpCOIN) for various Clients, each of these scripts had a captcha/fonts folder and the CaptchaSecurityImages.php file was almost identical. Their captcha images have been working without a problem.

After completely deleting the captcha folder in phpCOIN and reinstalling 3 times and still not able to get the captcha to work, I tried creating the /fonts folder as a last resort.

Permissions were the same in both cases and the font file was exactly the same file, as I copied it on the command line in a ssh shell from the /captcha folder to the /fonts folder. Checked owner/group permissions - exactly the same?


unsure.gif


--------------------
In order for your dreams to become reality, you first have to dream!

Auzzie.Biz
PMEmail Poster
Top
lightman
Posted: July 08, 2008 05:16 pm
Quote Post


The Janitor
***

Group: Admin
Posts: 3,639
Member No.: 3
Joined: August 25, 2006



From research I have done on the error messages that are being reported, there seems to be 2 overwhelming factors that can influence this issue
  • The ttf file was uploaded in ASCII mode (it is an image file and should be uploaded in binary) and was unreadable by the webserver
  • The path requires an absolute pathname defined as detailed in cantex post above
Reports in the search engines of this error as as varied as the many different solutions and advice offered smile.gif

I have absolutely no idea why the server should suddenly read the ttf file just because it is placed in a different folder, especially as the path you applied was still a relative path and not an absolute one - it just doesn't make any logical sense - but well done anyway for making it work for you !

I don't see it as being a major concern to phpCOIN at the moment as, so far, only two reports of difficulties have been reported and the vast majority of users experience no issues - the bottom line is "Whatever works for your server biggrin.gif "


--------------------
***** Unless otherwise stated, all replies refer to the following *****
====================================================================
--- The latest unmodified version of phpCOIN available from the phpCOIN download page on the date and time of this post.
--- All relevant HotFix files applied - One of the four included unmodified themes - The original language files .
--- Help will be given to install/configure/use phpCOIN, but not programming help to modify phpCOIN operations. If you are competent enough to make programming changes, you should be competent enough to read the source code and figure things out :)
PM
Top
cakra
Posted: July 08, 2008 05:48 pm
Quote Post


Newbie
*

Group: Probation
Posts: 4
Member No.: 3,497
Joined: July 06, 2008



Sorry I dont know much with PHP Coding, but perhaps this can be good reference ?

http://bugs.php.net/bug.php?id=45326

PMEmail PosterUsers WebsiteYahoo
Top
lightman
Posted: July 08, 2008 06:13 pm
Quote Post


The Janitor
***

Group: Admin
Posts: 3,639
Member No.: 3
Joined: August 25, 2006



Thank you for the link - again, we can only assume the issue is with something in your server configuration or environment - if it were a fundamental code problem we would have been getting hundreds of reports about the captcha not working !

phpCOIN is tested on a variety of standard (and cutting edge) WIMP, WAMP and LAMP servers and we are unable to replicate the issues you are seeing sad.gif


--------------------
***** Unless otherwise stated, all replies refer to the following *****
====================================================================
--- The latest unmodified version of phpCOIN available from the phpCOIN download page on the date and time of this post.
--- All relevant HotFix files applied - One of the four included unmodified themes - The original language files .
--- Help will be given to install/configure/use phpCOIN, but not programming help to modify phpCOIN operations. If you are competent enough to make programming changes, you should be competent enough to read the source code and figure things out :)
PM
Top
webling
Posted: September 06, 2015 10:51 pm
Quote Post


Newbie
*

Group: Probation
Posts: 1
Member No.: 4,634
Joined: September 06, 2015



I'm having problems with the captcha not displaying also.

Would this mean anything to anyone?
Fatal error: Call to undefined function imagettfbbox() in .../public_html/coin_addons/captcha/CaptchaSecurityImages.php on line 74

Even though I edit PHP I'm not a PHP programer. I don't think it's a permission problem on any directory either. At first I thought that the font file may have been corrupted so I checked the backup of it I have and it was good so I uploaded that to be sure.

PMEmail Poster
Top
lightman
Posted: September 07, 2015 05:03 am
Quote Post


The Janitor
***

Group: Admin
Posts: 3,639
Member No.: 3
Joined: August 25, 2006



What PHP version are you running ?
What phpCOIN version are you running ?

Sounds like you may need to try the phpCOIN Force Edition contributed by a user, and available from http://sourceforge.net/projects/phpcoinfor...ot.zip/download


--------------------
***** Unless otherwise stated, all replies refer to the following *****
====================================================================
--- The latest unmodified version of phpCOIN available from the phpCOIN download page on the date and time of this post.
--- All relevant HotFix files applied - One of the four included unmodified themes - The original language files .
--- Help will be given to install/configure/use phpCOIN, but not programming help to modify phpCOIN operations. If you are competent enough to make programming changes, you should be competent enough to read the source code and figure things out :)
PM
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 


Inscrita el Registro Mercantil de Mallorca Tomo 2140, Hoja No. PM-51034, Folio 135
This website owned and operated by: Technology Services RPVW S.L. CIF# B57345084
Avda Constitucion 48 Bajos Alaro 07340 Baleares SPAIN
Tel:+34 971518362    Fax: +34 971518368    eMail: support@phpcoin.com