Captcha text not displayed

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Nik2004
Posts: 132
Joined: Mon 9. Aug 2004, 14:31
Location: Athens,Greece

Captcha text not displayed

Post by Nik2004 »

In version 1.3.0, on guestbook, verification is on, the image is displayed, but it does not contain any text. What may be wrong? Should something be enabled?

GD is enabled, you can see php settings here:

http://www.unborn.gr/info.php
User avatar
Oliver Georgi
Site Admin
Posts: 9919
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

check if fonts are uploaded too. And also check if path settings are correct
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Nik2004
Posts: 132
Joined: Mon 9. Aug 2004, 14:31
Location: Athens,Greece

Post by Nik2004 »

Thanks for the reply Oliver.

Path settings seem correct:

$phpwcms['site'] = 'http://www.eurobjects.com/';
$phpwcms['DOC_ROOT'] = '/home/eurobjects/www';
$phpwcms['root'] = 'cms/cms1'; //default: ''
$phpwcms['file_path'] = 'filearchive'; //default: 'filearchive'
$phpwcms['templates'] = 'template'; //default: 'template'
$phpwcms['content_path'] = 'content'; //default: 'content'
$phpwcms['cimage_path'] = 'images'; //default: 'images'
$phpwcms['ftp_path'] = 'upload'; //default: 'upload'

Everything else is working (and the captcha background image appears too). See: http://www.unborn.gr/cms/cms1/index.php?guestbook

In /template/inc_captca I see 4 fonts:
solmetra1.ttf
solmetra2.ttf
solmetra3.ttf
solmetra4.ttf

... and 14 images: 1-12.png and 100.png and 101.png

Note: The guestbook existed since version 1.1RC4; I have upgraded and I am now doing adjustments.

Any other hints?
Nik2004
Posts: 132
Joined: Mon 9. Aug 2004, 14:31
Location: Athens,Greece

Found the cause, but no solution

Post by Nik2004 »

I found why captcha code is not displayed: The PHP/GD function imagettftext() which is used by captcha component (solmetra) does not work. It does not produce errors, but it is simply ignored. Since GD/Freetype is compiled in PHP, I classified it as an error in PHP behaviour and I asked my host (shared hosting at "Hosting Masters": hostings.com) to correct it; unfortunately they insist that "it's not a bug, it's a feature" (does that remind anyone of something? :x) and they need to charge me ($90-$120) to create a custom PHP compilation!

By the way, I found this older but very much related info: http://forum.dreamhosters.com/troublesh ... t-work.htm

They argue that only one other customer has ever asked for this "feature", and they suggest that I compile my own PHP version. They said: "you would compile a local version of php that only your site would use (you would not be replacing the general php used by everyone else on the server) and you would change the first line of your php applications to contain the path to the new php that you compiled."

After all that, I am planning to move to a new host (any suggestions?) After a (not very extensive but relatively) thorough market research, I am thinking of webresellers.net.

I have three options:
1. Move to another host
2. Try and use their suggested solution
3. Find another means of making captcha work, without the use of imagettftext() (and imagefttext() which also doesn't work), by hacking solmetra (captcha) component and replacing this function with some other (which?)

If someone can find a solution on 3, I would do this as a temporary solution, and then follow 1 (move to another host). But I am in a pressure to make captcha work because I receive a huge amount of spam in the guestbook and I need to upgrade.

In any case, would anyone here have a suggested PHP compilation command that I could use to make sure phpWCMS with all its components will work fine? And, exactly how would I "change the first line of my php applications to contain the path to the new php that I compiled"? What should I change in phpWCMS?

Any help will be appreciated.
User avatar
Oliver Georgi
Site Admin
Posts: 9919
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

The GD is default since a long time and working too. S it is a "must" for each PHP installtion. I can't understand such hosting service...

Dont't know if you are located in the US. But check out 1and1.com. You will find professional products for a good price.



Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
Detlef
Posts: 38
Joined: Fri 22. Sep 2006, 10:15
Location: Berlin

Post by Detlef »

Ich habe da auch mein Problem damit.
Manchmal wird der Code auf Anhieb angezeigt, dann sind wieder mehrere Versuche erforderlich.
Wenn ich das Kontaktformular unten an eine Seite anhänge sind die Fehlermeldungen nicht immer sofort sichtbar. Die Seite baut sich erneut auf und der Besucher sieht den alten Content... und denkt alles war o.k.
Dabei hat gar nicht funktioniert.
Bei Kontaktformular einzel ist das anders.
Habe das bei mir bedauerlicher Weise wieder herausgenommen.

Gruß
Detlef
User avatar
Oliver Georgi
Site Admin
Posts: 9919
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

sounds like slow or mis configured server.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Nik2004
Posts: 132
Joined: Mon 9. Aug 2004, 14:31
Location: Athens,Greece

Which host?

Post by Nik2004 »

The strange thing is that GD and Freetype is compiled-in and working. The problem is that these two functions only do not work; but they insist that this compilation has been made to optimize stability and support of these two functions is not standard. I cannot agree with their reasoning, so I plan to move.

About hosting: I see 1and1.com have many complaining users... (see: http://www.webhostingjury.com/reviews/1and1)

I will let you know of my experiences with any host I'll try. Anyone else's experience will be very useful too. With thousands of hosts out there, it's very difficult to locate one with REALLY reasonable cost/services to whom you can rely on.

Nick
User avatar
Oliver Georgi
Site Admin
Posts: 9919
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

1and1 is Germany's largest. Very good backend and lot of tools. This is right for everybody.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Post by Jensensen »

Hi Nik2004,

in addition, here are some more ISPs noticed:

http://www.phpwcms.de/forum/viewtopic.php?t=14170

Greetz
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
joaopalma
Posts: 23
Joined: Tue 28. Mar 2006, 17:32
Location: Portugal
Contact:

Post by joaopalma »

Hi. I am still using phpwcms 1.1RC4 and I had to do my own captcha way.

I am using the scripts from http://www.captcha.biz/
which are 2 files
http://www.captcha.biz/testcaptcha.zip

the file captcha.php is the image produced.
the file captcha-page.php is where the image is displayed.

The script does not need fonts.

It works fine on my local machine (with XAMPP) using only those files but in phpWCMS in the server the image does not show the letters. I found the script is producing the randomized characters but it is not placing them in the image.

My solution at the moment is placing just the random characters (without the image) which does not solve almost nothing.

I am using the file as an "external content" in the article.

Any help is welcome. Hopefully without the need to change phpWCMS version.

Cheers
User avatar
Oliver Georgi
Site Admin
Posts: 9919
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

please, this is not a problem of phpwcms! So ask somewhere else for support.

I recommend upgrading to current release of phpwcms. There captcha is integrated.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
joaopalma
Posts: 23
Joined: Tue 28. Mar 2006, 17:32
Location: Portugal
Contact:

Post by joaopalma »

Dear Oliver

Thanks for your reply.
But if this works fine on my local machine (letters with image), and it does not work with phpWCMS, how come this is not a phpWCMS problem?

Cheers
User avatar
Oliver Georgi
Site Admin
Posts: 9919
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

sometimes it's necessary to know how to include external scripts in the right way.

Because it's nothing default inside of phpwcms it can not be the fault of phpwcms. I guess you will agree to that.

How if it is the fault of that script? This would make more sense.

You really should know what you are doing. Running scripts standalone is NEVER the same as when it is integrated into more complex context!

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply