Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #9459
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: php run captcha script on localhost |
| Date | 2013-05-19 10:01 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <knalna$uru$1@dont-email.me> (permalink) |
| References | <efd3cd1e-d61b-4c34-a41a-464e968fec32@googlegroups.com> |
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@attglobal.net ==================
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
php run captcha script on localhost Paul Klacher <pklacher@gmail.com> - 2013-05-19 04:17 -0700
Re: php run captcha script on localhost Jeff North <jnorthau@yahoo.com.au> - 2013-05-19 21:33 +1000
Re: php run captcha script on localhost The Natural Philosopher <tnp@invalid.invalid> - 2013-05-19 12:47 +0100
Re: php run captcha script on localhost Paul Klacher <pklacher@gmail.com> - 2013-05-19 05:03 -0700
Re: php run captcha script on localhost The Natural Philosopher <tnp@invalid.invalid> - 2013-05-19 13:12 +0100
Re: php run captcha script on localhost Paul Klacher <pklacher@gmail.com> - 2013-05-19 05:18 -0700
Re: php run captcha script on localhost Jerry Stuckle <jstucklex@attglobal.net> - 2013-05-19 10:01 -0400
Re: php run captcha script on localhost Paul Klacher <pklacher@gmail.com> - 2013-05-19 09:23 -0700
Re: php run captcha script on localhost Jerry Stuckle <jstucklex@attglobal.net> - 2013-05-19 16:16 -0400
Re: php run captcha script on localhost "J.O. Aho" <user@example.net> - 2013-05-19 18:58 +0200
Re: php run captcha script on localhost Paul Klacher <pklacher@gmail.com> - 2013-05-19 10:17 -0700
csiph-web