thanks abcdom but it still doesnt work.
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
December 01, 2008 6:14am
Subscribe [160]#226 / Dec 21, 2008 11:08am
thanks abcdom but it still doesnt work.
#227 / Dec 21, 2008 2:04pm
1- Check your php config. Is the GD2 extension enabled ?
2- The captcha do not appears each time. Try to validate the form with wrong data, and DX auth will make the captcha appears as a spam bot/bruteforce protection.
3- Check this in your DX auth config file :
// Registration
$config[‘DX_allow_registration’] = TRUE;
$config[‘DX_captcha_registration’] = TRUE;
// Login
$config[‘DX_captcha_login’] = FALSE;
#228 / Dec 21, 2008 2:14pm
I can verify that step 2 and 3 have been followed and it still does not work. How exactly do i verify that the gd2 extension is enabled?
#229 / Dec 21, 2008 3:01pm
You can run phpinfo() function and see if it’s enabled or not.
Make sure 2 things
- your captcha folder is in the same directory as index.php (unless you changed it)
- Make sure you have write permission on captcha folder
#230 / Dec 21, 2008 3:32pm
Capchta folder is in same directory as index.php and i have given this folder 777 permission.
This is in the gd section of the phpinfo() results
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XPM Support enabled
XBM Support enabled
#231 / Dec 21, 2008 3:59pm
If you are using Firefox and Web Developer extension, then you can use images drop down and “View Image Information” to see what might be an issue.
If it does show an image link but no image then it’s just a matter of wrong image path. Maybe that will help.
#232 / Dec 21, 2008 4:00pm
It doesnt show any html to insert an image never mind a broken image link.
#233 / Dec 21, 2008 4:03pm
Hi, I’m trying to use this library for my new project but there is an issue I must resolve before continue:
when a user is trying to access a specific URL which is protected, if the user is not connected is redirected to the login form, but when the user has logged on is not redirected to the originally requested URL.
How is posible to do that?
Can anyone give me some help about that?
PD: Sorry about my english
#234 / Dec 21, 2008 4:14pm
Hi, I’m trying to use this library for my new project but there is an issue I must resolve before continue:
when a user is trying to access a specific URL which is protected, if the user is not connected is redirected to the login form, but when the user has logged on is not redirected to the originally requested URL.
How is posible to do that?
Can anyone give me some help about that?
PD: Sorry about my english
I have the same problem. I haven’t checked to see how to resolve this but I will
- either check for $_SERVER[‘HTTT_REFERER’] value
- or pass the referer to the login page when redirecting users if they are not logged in
#235 / Dec 21, 2008 4:37pm
Hi, I’m trying to use this library for my new project but there is an issue I must resolve before continue:
when a user is trying to access a specific URL which is protected, if the user is not connected is redirected to the login form, but when the user has logged on is not redirected to the originally requested URL.
How is posible to do that?
Can anyone give me some help about that?
PD: Sorry about my english
I have the same problem. I haven’t checked to see how to resolve this but I will
- either check for $_SERVER[‘HTTT_REFERER’] value
- or pass the referer to the login page when redirecting users if they are not logged in
Thank you for your fast response.
I’ve been thinking on use the user_logged_in() function in DX_Auth_Event.php and do something like retrieve the requested URL from someplace (i’m still thinking from where :roll: ) and then redirect the user
What do you think about that?
What is the correct way to use the events in DX_Auth?
#236 / Dec 21, 2008 6:10pm
I noticed that when I logout, cookies (or session information) is still there even after user ha logged out.
I tried following code on my logout page
if($this->dx_auth->is_logged_in(){
echo 'Logged In';
}else{
echo 'Logged Out';
}When I go to logout page, it shows “Logged In”. When I refresh it again, then it says “Logged Out”.
I understand that cookies can’t be deleted (at least in FireFox) until page is refreshed. So, maybe a redirect behind the scenes on logout page can solve it?
Not sure if it’d be considered bug but just wanted to post my finding.
#237 / Dec 22, 2008 12:34am
when a user is trying to access a specific URL which is protected, if the user is not connected is redirected to the login form, but when the user has logged on is not redirected to the originally requested URL.
I use flashdata to store the URL. You can set_flashdata(‘url’, uri_string()) to set the page referred from, get the flashdata(‘url’) to redirect to on successful login, or you can keep_flashdata(‘url’) to keep the referral when the user does not login successfully.
So if I tried to access a protected URI, e.g: /admin/dashboard
in Controller admin/dashboard.php set the flashdata
//Constructor
function Dashboard()
if ( ! $this->dx_auth->is_logged_in()) {
$this->session->set_flashdata('url', uri_string());
redirect('/auth/login');
}then in Controller auth.php, from line 99, grab the flashdata
if ($val->run() AND $this->dx_auth->login($val->set_value('username'), $val->set_value('password'), $val->set_value('remember')))
{
// Redirect to url stored in flashdata else homepage
$redirect = $this->session->flashdata('url');
redirect($redirect);
}and line 128 set keep_flashdata for when an error occurs:
// Load login page view
$this->session->keep_flashdata('url');
$this->load->view($this->dx_auth->login_view, $data);Hope this helps. It works well enough for me.
#238 / Dec 22, 2008 12:45am
I noticed that when I logout, cookies (or session information) is still there even after user ha logged out.
I tried following code on my logout page
if($this->dx_auth->is_logged_in(){ echo 'Logged In'; }else{ echo 'Logged Out'; }When I go to logout page, it shows “Logged In”. When I refresh it again, then it says “Logged Out”.
I understand that cookies can’t be deleted (at least in FireFox) until page is refreshed. So, maybe a redirect behind the scenes on logout page can solve it?
Not sure if it’d be considered bug but just wanted to post my finding.
I tried logging in using /auth/login
Then I logged out using /auth/logout and it displays You have been logged out so I guess the default logout page works.
When I tried your example, it does what you say. Interesting.
I can see how it can cause some confusion if you are debugging. 😊
#239 / Dec 22, 2008 4:30am
I have 2 questions:
Why does it say the captcha is “case insensitive” on the registration page, when it is actually case sensitive?
Why does the password reset email address the person as “site name” instead of “username?” For example, if my website is called “Cool Cars Website”, and a user named “Frank” resets his password, the email looks like this:
Cool Cars Website,
You have requested your password to be changed…
Is there an easy way to fix this so that it says “Frank” instead of “Cool Cars Website?”
#240 / Dec 22, 2008 12:49pm
I tried logging in using /auth/login
Then I logged out using /auth/logout and it displays You have been logged out so I guess the default logout page works.When I tried your example, it does what you say. Interesting.
I can see how it can cause some confusion if you are debugging. 😊
Actually, if you put following code in auth/logout(), you will find the same behavior. It doesn’t delete session and cookies until browser is refreshed.
if($this->dx_auth->is_logged_in()){
echo 'Not Yet';
}
$data['auth_message'] = 'You have been logged out.';and it does print “Not Yet”. It’s just printing the message after running library/logout() function. It’s not checking if user has logged out or not.