FAQ

  • I get an error that says “Call to undefined function imagecreate()” in securimage.php.

  • I get an error that says “Call to undefined function imagecreatetruecolor()” in securimage.php.

  • I get an error that says “Call to undefined function imagettftext()” in securimage.php.

  • The image appears but there is no text on the image.

  • The image does not show up on my HTML page.

  • No image appears and nothing shows up when I go to securimage_show.php

  • I get an error saying “Warning: include(securimage.php) [function.include]: failed to open stream: No such file or directory in …”

  • I get an error on my pages that says “Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at page.php:###) in securimage.php on line ###.”

  • Even if I type the correct code, Securimage always says it is wrong.

 

 

 

18 comments “FAQ”

my web error:

Call to undefined function imagettfbbox() in /home/gravity/public_html/captcha/securimage.php on line 867

please help me

This most likely means you have an older version of PHP or PHP & GD are not compiled with FreeType (TTF) support. Make sure you have at least PHP 4.3, and preferably PHP 5.2 or above, and that GD and FreeType are included. You can create a script with in it to view your configuration.

Image does not display, on looking at http://www.nickothyme.co.uk/securimage/securimage_show.php I am getting the message starting

Warning: session_start() [function.session-start]: open(C:\inetpub\conf\temp\sess_29k9lj9nab1uge70gqk6cg45t7, O_RDWR) failed: Permission denied (13) in E:\Inetpub\win1658\website\securimage\securimage.php on line 523

Help!

Hi,
This means that sessions are not configured correctly in your server’s php.ini file. The actual cause is that your user does not have permission to write to C:\inetpub\conf\temp\ where sessions are stored.
That folder should either be writable by everyone or changed to something your user can write to.
One thing you could do is to modify securimage.php and add ini_set('session.save_path', 'C:/some_folder'); where C:/some_folder is a location you have permission to write to. It could be a folder in your directory that is not accessible from the web.

I try to make Securimage to work, but it seems to refuse to work with my existing session, which is however very classic and not so special. The only difference is I have to give the session a particular name. Why is there a problem between Securimage and a named session ?

If you have changed the default name of the PHP session from PHPSESSID to something else, you will need to inform securimage of the change by editing securimage.php and setting the $session_name value to match the name you chose for your session. Then securimage should work within your custom session.

Hello! First of all i have to say it is a very nice captcha! However I didnt understand what exactly i have to do in order to implement the captcha to a component that I created for joomla cms.

Thanks in Advance..

I set up securimage once for Joomla, and had to modify securimage_show.php a bit to get it to use the Joomla session because Joomla generates a random session name for each user. Unfortunately I don’t have the modifications anymore but if you need help feel free to contact me with the contact form and show me what you have. Here is a a Joomla extension that uses securimage so you may be able to figure something out from that too.

Hi! The $_SESSION['securimage_code_value'] is always empty. The PHP session_name() always return a session_name(). Any idea?

If this is always blank, it may be that you are using a different session name than the default PHP session, or there is a problem with the session save path in php.ini. Try adding error_reporting(E_ALL); ini_set('display_errors', 1); in securimage_show.php just after the <?php tag and open securimage_show.php directly in your browser and see if any errors are output.

The following link might help you http://reydacoco.blogspot.com/2010/08/fixing-fatal-error-call-to-undefined.html

Hi Drew

I am testing this out but the validation always fails. I am using a custom session handler with a database but none of the possibilities that you mention in the FAQ seem to apply. Any ideas ?

regards
Jon

Were you able to confirm that the securimage session data was making it to the database? Was your session save handler set in php.ini or in one of your scripts? If it was set in a script, you will need to modify securimage_show.php so it knows to use the correct session handler. Contact me from the contact form if you are still having issues.

Hi,

This is what I get when I run securimage_show.php directly:

The image “http://www.florida-dreaming.com/securimage/securimage_show.php” cannot be displayed, because it contains errors.

Can you help?

Nima

Hi, I looked on your site and saw this when I try to load the image:

HTTP/1.1 500 Server Error
Date: Mon, 26 Sep 2011 17:26:34 GMT
Server: Microsoft-IIS/6.0
Pool: 77
X-Powered-By: ASP.NET
Content-Length: 460

PHP Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in \\boswinfs03\home\users\web\b814\nf.creativemathandc\florida-dreaming.com\securimage\securimage.php on line 867
PHP Warning: imagettftext() [function.imagettftext]: Could not find/open font in \\boswinfs03\home\users\web\b814\nf.creativemathandc\florida-dreaming.com\securimage\securimage.php on line 878

Hello there:
I am having not issues at all, and very happy btw with it. It works in FF4 and 5 and  IE8 and 9. However, it seems not work in Chrome.
Is that normal? Am I missing something?
Thanks in advance

PS… It does´nt eitheir on this one so…my friend Copy/Paste

I’m trying to use securimage with a FormToEmail php script. Where in this script should I place the securimage code? I’m not sure where the validation ends in this script. I don’t think I have it in the right place because I’m getting random results with it eg says code is incorrect when it’s right and vice-versa – testing in Firefox 3.6.6.

Finding the right place to put the code in pre-made form-to-email scripts can be difficult sometimes due to the way they are built.
Generally, the best place to put it might be right before the actual email is sent. For best results, you will only want to attempt to validate the captcha code if there were no other errors with the form.
The reason for this is because if they typed the code correctly and you validate it, the code will no longer be valid and if there were other errors on the form then the validation was for nothing.
Hope that helps


Leave a Reply

CAPTCHA Image
Reload Image
 
Enter the code above: