ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

DX Auth 1.0.6 (Authentication library)

December 01, 2008 6:14am

Subscribe [160]
  • #136 / Dec 11, 2008 3:20pm

    uptown

    12 posts

    I don’t know aguirre, how do you want to write your applications if you can’t debug such simple scripts. Install XDebug, switch logging in CI to level 4 and try to find a place with error… it’s very simple.

    I know right?  The nerve of him coming to a support forum asking a question to try to get things working.  How dare he?

  • #137 / Dec 11, 2008 4:24pm

    RHAngel

    14 posts

    This is not support topic uptown, this is a topic where we discuss DX Auth. Latest DX Auth is working good for me with some tweaks 😊, so aguirre problems is not a DX Auth problems. 😛

  • #138 / Dec 11, 2008 4:50pm

    aguirre

    3 posts

    the package was meant to be drop-in so i didn’t bother with debugging it to the core. I was just wondering if there was a mistake on my part or if DX Auth is know to have bugs like this. Your flaming is not neccessary but thanks anyways for the insightful replies…

  • #139 / Dec 11, 2008 4:53pm

    Paul Apostol

    43 posts

    If you don’t have in CI system/library a file named “Form_validation.php” your CI deploy has the problem.
    Check that, I don’t know, maybe ......


    EDIT: or try to change in the controller
    $this->load->library(‘Form_validation’);
    to
    $this->load->library(‘form_validation’);

  • #140 / Dec 11, 2008 5:17pm

    aguirre

    3 posts

    for whatever strange reason i had 1.6.3 deployed though i was absolutely sure i used the zip i downloaded today - disregard my message, updated to 1.7.0 - everything fine’s now ... so for that reason: it WAS my own stupidity 😉

  • #141 / Dec 11, 2008 5:20pm

    BorisK

    45 posts

    @Paul, Form_Validation.php was introduced with CI 1.7

    DX_Auth doesn’t work with previous versions.

  • #142 / Dec 11, 2008 5:54pm

    Paul Apostol

    43 posts

    Thanks BorisK,
    I know that. But, sometimes, when I put with my FTP client the files under Linux some files where skipped. The client reported but I didn’t look at the errors. I’ve tried to help him with a bit of my previous experience. That’s all. He wrote that he put 1.7 and I trusted him. If you were faster you could help him better than me.
    After you have all the info it’s easy to show that the others are misinformed.
    So, let’s drop it.
    Paul

  • #143 / Dec 11, 2008 6:47pm

    BorisK

    45 posts

    @Paul, aguirre was typing his message at the same time I was doing mine. I was typing to let you know that he actually wasn’t using 1.7. Anyhow…

  • #144 / Dec 11, 2008 6:49pm

    BorisK

    45 posts

    I just found a typo at DX_Auth.php, at line 1236.

    function get_catpcha_image

    should be

    function get_captcha_image
  • #145 / Dec 11, 2008 7:27pm

    dexcell

    142 posts

    I just found a typo at DX_Auth.php, at line 1236.

    function get_catpcha_image

    should be

    function get_captcha_image

    Thanks BorisK, fixed it for next release.

    Btw, FYI, Actually DX Auth works with any validation, even if you have your own validation library, because Auth.php is only example, DX_Auth didn’t have anything to do with validation library, instead it’s just only give function, to be used in your form validation callback function.

  • #146 / Dec 11, 2008 11:06pm

    BorisK

    45 posts

    dexcell, I know what you mean. However, out of the box it just doesn’t work due to different naming of the libraries.

    // CI 1.7
    $this->load->library(‘form_validation’);
    $this->form_validation->set_rules($rules);

    vs.

    // CI 1.6.3
    $this->load->library(‘validation’);
    $this->validation->set_rules($rules);

    Anyhow, thanks for the great piece of code. Would’ve been perfect for me if it had granularity of KhACL or phpGACL.

  • #147 / Dec 12, 2008 12:02am

    dexcell

    142 posts

    Maybe you can add the ACL part in DX Auth event.

  • #148 / Dec 12, 2008 12:49am

    dexcell

    142 posts

    Small update to 1.0.3. See change log and upgrade in first page.

  • #149 / Dec 12, 2008 3:08pm

    Ryan Pharis

    4 posts

    dexcell,

    Thanks for this authentication library. I have got it working just fine, but have one problem.
    When I register a user, I get a php warning:

    A PHP Error was encountered
    
    Severity: Warning
    
    Message: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()
    
    Filename: libraries/Email.php
    
    Line Number: 1444

    I’m using the latest version of CI and your code.
    I set up an email.php config file for my app, and set the protocol to ‘mail’ but that didn’t help.
    Any ideas why that’s happening?

    Well, looks like you don’t have smtp server in your localhost machine.

    Right. I want to use PHP’s standard mail() function, not smtp. It seems your code wants to send out by smtp. Do you know how I can change it?

  • #150 / Dec 12, 2008 3:57pm

    RHAngel

    14 posts

    Ryan Pharis, are you kidding??

    Line from your error:

    Filename: libraries/Email.php

    Code from DX Auth library:

    function _email($to, $from, $subject, $message)
        {
            $this->ci->load->library('email');
            $email = $this->ci->email;
    
            $email->from($from);
            $email->to($to);
            $email->subject($subject);
            $email->message($message);
    
            return $email->send();
        }

    Can you see any SMTP things in DX Auth library? I can’t, really. Configure your server and codeigniter first, please.

    If you are using PHP under Windows, mail() function will work over SMTP by default.

    [mail function]
    ; For Win32 only.
    SMTP = localhost
    smtp_port = 25

    So think twice, post once, please.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases