FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » php run captcha script on localhost
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: php run captcha script on localhost [message #181511 is a reply to message #181499] Sun, 19 May 2013 14:01 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 5/19/2013 7:17 AM, Paul Klacher wrote:
> Hi
>
> I'm trying to implement a php html javascript form with captcha validation. I'm trying to run the script from this page:
>
> http://www.white-hat-web-design.co.uk/articles/php-captcha.php
>
> as a localhost page on my computer. Nothing is showing. The @imagecreate is not showing anything.
>
> My system runs windows 7 and Php, MySql and Apache server installed separately. Is there any configuration to do with for instance php.ini or Apache conf file?
>
> I guess I'm missing a simple step at some point;
> Thanks for your help
>
> Paul S K
>

A couple of things.

First of all, get rid of the '@' before imagecreate(). All it does is
hide error messages (you should never use it unless you have a VERY good
reason to do so - and even then shy away from using it).

Additionally, the "or die(...)" is bad - it terminates processing of the
script immediately, generating syntactically invalid output.

Next, in your php.ini file, ensure the following are set:

error_reporting = E_ALL
display_errors = on

(These should always be on for a development system while display_errors
should never be on for a production system).

Next, this must be in a separate file called from an img= statement, not
in the code with the rest of your page. What happens when you try
to load the image in your browser directly?

And finally, what does phpinfo() show you?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: makes searching and booking applications airfares
Next Topic: Re: Immediate Position:::Business Analyst With BI EXP::::At Houston, TX
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 11:14:24 GMT 2024

Total time taken to generate the page: 0.05164 seconds