Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

captcha #149

Closed
tayzee opened this issue Nov 6, 2014 · 32 comments
Closed

captcha #149

tayzee opened this issue Nov 6, 2014 · 32 comments
Assignees
Labels
compatibility Compatibility issue with other framework, features confirmed bug Something isn't working

Comments

@tayzee
Copy link

tayzee commented Nov 6, 2014

Hi again,

I am using the latest version of your app.

When trying to register a new user, I am running into the following problem on the registration page:
screen shot 2014-11-06 at 12 51 08

I also notice in the developer tools:
screen shot 2014-11-06 at 12 52 19

I see you guys have been trying to sort the problem out, have you been able to do so, or is this just happening to me?

Secondly, is there a way for me to disable using captcha for now?

Thanks,
Tay

@lilfade
Copy link
Contributor

lilfade commented Nov 6, 2014

@r3wt this looks like its for you ^_^, he just rewrote the captcha code so ill leave this one to him, as for disabling it im not so sure about that.
Edit: also what apache and php version are you using (or xampp/wamp version if using a compiled lamp server)

@lilfade lilfade added the confirmed bug Something isn't working label Nov 6, 2014
@lilfade
Copy link
Contributor

lilfade commented Nov 6, 2014

register.php comment out lines 123 - 134, line 175, api/create_user.php line 103, 112- 118. those are the revelent lines i see from a quick scan im sure @r3wt will figure out whats up with the captcha.

@MechTee
Copy link

MechTee commented Nov 10, 2014

I have the same Error is there any way yet to fix it?
I am trying to get UserFrosting working on my localhost:
Apache/2.4.10
PHP/5.5.15

@lilfade
Copy link
Contributor

lilfade commented Nov 10, 2014

Not yet there isn't a fix I'll check into it once I get home and see what o can come up with.

@lilfade
Copy link
Contributor

lilfade commented Nov 10, 2014

I just tried this on my dev server and it worked fine. Are you both on localhost trying this? Could you try on my site @ dev.fadedgaming.co

@MechTee
Copy link

MechTee commented Nov 10, 2014

Yeah maybe its a problem with localhost because the OP was on localhost too.

@lilfade
Copy link
Contributor

lilfade commented Nov 10, 2014

Hmm I wonder if it's something to do with ImageMagick or GD will have to test this ...

@lilfade
Copy link
Contributor

lilfade commented Nov 10, 2014

Can you try this copy and paste this into a new php file and see if it will run or errors out.

<?php

error_reporting(E_ALL); 
ini_set( 'display_errors','1');

/* Create a new imagick object */
$im = new Imagick();

/* Create new image. This will be used as fill pattern */
$im->newPseudoImage(50, 50, "gradient:red-black");

/* Create imagickdraw object */
$draw = new ImagickDraw();

/* Start a new pattern called "gradient" */
$draw->pushPattern('gradient', 0, 0, 50, 50);

/* Composite the gradient on the pattern */
$draw->composite(Imagick::COMPOSITE_OVER, 0, 0, 50, 50, $im);

/* Close the pattern */
$draw->popPattern();

/* Use the pattern called "gradient" as the fill */
$draw->setFillPatternURL('#gradient');

/* Set font size to 52 */
$draw->setFontSize(52);

/* Annotate some text */
$draw->annotation(20, 50, "Hello World!");

/* Create a new canvas object and a white image */
$canvas = new Imagick();
$canvas->newImage(350, 70, "white");

/* Draw the ImagickDraw on to the canvas */
$canvas->drawImage($draw);

/* 1px black border around the image */
$canvas->borderImage('black', 1, 1);

/* Set the format to PNG */
$canvas->setImageFormat('png');

/* Output the image */
header("Content-Type: image/png");
echo $canvas;
?>

@MechTee
Copy link

MechTee commented Nov 10, 2014

Class 'Imagick' not found in C:\xampp\htdocs\gaben\phptest.php on line 7

So imagick seems to be the problem

@tayzee
Copy link
Author

tayzee commented Nov 10, 2014

just catching onto this now..
I get only this error:
Fatal error: Class 'Imagick' not found in /Library/WebServer/Documents/test.php on line 7

seems like it is an imagemagick thing?

@lilfade
Copy link
Contributor

lilfade commented Nov 10, 2014

Yea which lamp server are you using? Like xampp wamp ect. That way we can check it out and see what to do for a fall back on this.

@tayzee
Copy link
Author

tayzee commented Nov 10, 2014

not quite sure.
Mac comes with php/apache etc already installed.. the only thing I've ever had to install extra was mysql

@lilfade
Copy link
Contributor

lilfade commented Nov 10, 2014

Well I can honestly say my mac knowledge is like um zero but I did a search and found this maybe it will help see if it's just the missing module.

http://cactuslab.com/imagemagick/

@tayzee
Copy link
Author

tayzee commented Nov 10, 2014

yeah, will try install it later and update you.. unfortunately swamped with "real" work today :(

@lilfade
Copy link
Contributor

lilfade commented Nov 10, 2014

All good I know the feeling I think I'll be a bit busy tonight as well.

@lilfade
Copy link
Contributor

lilfade commented Nov 10, 2014

@MechTee
Copy link

MechTee commented Nov 10, 2014

I've tried to get it to work since I posted the last time I've ran into a PHP Startup Error:
Unable to load dynamic library 'C:\xampp\php\ext\php_imagick.dll'

  • The specified procedure could not be found.

I'm still trying to fix it...

@r3wt
Copy link

r3wt commented Nov 10, 2014

You don't have the imagemagick extension in php, probably because xampp is no frills, bare basics. some installations of php come with it preinstalled. you would have to compile it or install the dll

@MechTee
Copy link

MechTee commented Nov 10, 2014

i got it to work and the test.php is working fine now thank you

@r3wt
Copy link

r3wt commented Nov 10, 2014

@lilfade should we roll back to non base64 version? i forget what the support is like for these data uri schemes.

@r3wt
Copy link

r3wt commented Nov 10, 2014

@MechTee Can you tell me what solved it, just so i can get up to speed? i was out of town the last few days, i'm just getting back to the pc. I can try to work on some compatibility layer or alternative.

@r3wt r3wt added compatibility Compatibility issue with other framework, features wontfix This will not be worked on and removed wontfix This will not be worked on labels Nov 10, 2014
@r3wt
Copy link

r3wt commented Nov 10, 2014

@alexweissman can we get some more labels for the ticketing system? we need one called "needs more info"

@MechTee
Copy link

MechTee commented Nov 10, 2014

Ok i got ImageMagick to work which was not installed on XAMPP 1.8.3 on my localhost the main problem was to install it successfully complete reinstall of apache and the tutorial lilfade posted with a reboot afterwards fixed it.

@r3wt
Copy link

r3wt commented Nov 10, 2014

Ok, so we know that LilFade's ImageMagick is a viable alternative for Windows. this makes sense. what i've gathered(or think happened atleast) is that windows doesn't have native bmp fonts that are compatible with GD. that's the only way i could explain the gd functions not working. seeing the strange query string in the dev tools might confirm that. I don't know. i do know that i can check for gd, and offer compability for imagemagick. as a fallback for that, i'm not sure. it's obviously going to be tricky to support every use case, especially for localhost environments, but i'll see what i can try. as for now, i do have some improvements to the captcha system. here's the latest incarnation of it:

http://superuser.openex.info/register

@lilfade
Copy link
Contributor

lilfade commented Nov 10, 2014

I like the reloading function that's pretty nifty ^_^. Yea I remember having some trouble when first using php back in the day with so many extensions missing on windows =( usually easy to fix. On a side note I think a small layer to fall back on incase imagemagick fails would be good but I don't find it failing to much as a majority of servers will be nix based so this module is usually installed on most servers now days as a default options ... unless your all about your source but then you'd never have this issue xD

@r3wt
Copy link

r3wt commented Nov 10, 2014

@lilfade pretty much what i was thinking. so i'll offer imagemagick as a fallback, then we'll slap the won't fix label on it and call it good.

@alexweissman
Copy link
Member

Would it make more sense for us to just make it compatible with reCAPTCHA, and then provide instructions for how to obtain an API key? There is already an official PHP library here. We could disable captcha by default on new installations, and then when they're ready to go live they can get reCAPTCHA.

I've also been having a lot of luck by using a simple honeypot. This is a nice solution because it doesn't require users to do anything extra. So we could implement the honeypot, and then if necessary, admins could enable reCAPTCHA as well.

I guess my philosophy on this is, let's not put too much effort into this when there is already a very good and simple solution available ;-)

@kirabook
Copy link

Yes, I'm looking for other alternatives to the captcha... so far, I am so so SO happy I found this system for the small website I'm building.

The only real issue I've faces so far is the incompatible syntax for arrays (I've fixed that myself) and this captcha.

You see, this website I'm building is for elderly people. It'll be near impossible for older people with bad eye sight to figure out the captcha. I either want to replace the captcha with another one that is larger or offers an audio option, or go with the honeypot idea where the older people won't have to do anything extra to sign up.

I do want to try the honeypot idea right now, but I can't figure out how to dismantle the current captcha.

@Espanta
Copy link

Espanta commented Nov 30, 2014

Hi guys, thanks for the code. It is nice. I have the same problem stated here with captcha. I also on localhost. So, for now, I commented the given lines and it is fine. But I will be happy if I can add captcha too.

One more issue with captcha is that its font is not very popular and known. For instance, it is not clear what is '0' and what is 'o'.

Many thanks
Espanta

@alexweissman
Copy link
Member

Is this working for everyone now? I added a honeypot as well, so whether you use a captcha or not depends on how tough you want to be against spammers.

@kirabook
Copy link

I will look into it as soon as I can, I've been so busy of late.

@alexweissman
Copy link
Member

Alright, just reopen the issue if you still have trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility issue with other framework, features confirmed bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants