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]
  • #121 / Dec 09, 2008 3:46pm

    uptown

    12 posts

    I’m not seeing any captcha on my screen with the simple example.  Any hints what I might be doing wrong?

  • #122 / Dec 09, 2008 3:47pm

    tdktank59

    322 posts

    Another update on the HMVC problem… I think it has something to do with how HMVC is loading the config not what is going on with DX_auth

  • #123 / Dec 09, 2008 4:42pm

    RHAngel

    14 posts

    Error is in HMVC config loader function. “config” function put config to section by default, and you can’t change $use_sections variable when loading global config.

    Replace in Controller.php:

    if ($path === FALSE)
    {
       self::$loader->config($file, TRUE);                    
       return $ci->config->item($file);
    }

    ->

    if ($path === FALSE)
    {
       self::$loader->config($file, $use_sections);                    
       return $ci->config->item($file);
    }

    In this case config loading in DX_Auth will work good.
    Sorry for my stupid english 😊

  • #124 / Dec 09, 2008 5:16pm

    tdktank59

    322 posts

    Error is in HMVC config loader function. “config” function put config to section by default, and you can’t change $use_sections variable when loading global config.

    Replace in Controller.php:

    if ($path === FALSE)
    {
       self::$loader->config($file, TRUE);                    
       return $ci->config->item($file);
    }

    ->

    if ($path === FALSE)
    {
       self::$loader->config($file, $use_sections);                    
       return $ci->config->item($file);
    }

    In this case config loading in DX_Auth will work good.
    Sorry for my stupid english 😊

    This fixed it!

    Posted the quote into the HMVC to see what WireDesigns says…

  • #125 / Dec 09, 2008 7:26pm

    JimmyPHP

    14 posts

    I’m not seeing any captcha on my screen with the simple example.  Any hints what I might be doing wrong?

    Check to make sure you have an exception in your .htaccess file if you have one:

    RewriteEngine on
    RewriteRule ^$ /index.php [L]
    RewriteCond $1 !^(index\.php|img|images|css|js|captcha|robots\.txt|favicon\.ico)
    RewriteRule ^(.*)$ /index.php/$1 [L]

    Also, make sure you have GD library installed and loaded in PHP

  • #126 / Dec 10, 2008 12:01am

    dexcell

    142 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.

  • #127 / Dec 10, 2008 12:02am

    dexcell

    142 posts

    I’m not seeing any captcha on my screen with the simple example.  Any hints what I might be doing wrong?

    Correct, simple example only showing you how to do simple auth operation like login, register, logout, etc.

    If you want to learn how to use the captcha, open advanced example in documentation, or try bundled examples in DX Auth. Read getting started in the docs.

    If you still have problem, check JimmyPHP post before.

  • #128 / Dec 10, 2008 12:05am

    dexcell

    142 posts

    This is absolutely the best Auth library I have used. This is the first time I’ve ever had an auth up and running in seconds. Great job!

    Thanks

  • #129 / Dec 10, 2008 12:07am

    dexcell

    142 posts

    For those of you just looking you also need to

    include the url, and html helpers

    Ill keep posting this until its in the documentation…

    Thanks, i recall i already put load the url helper in the examples, and remove the html helpers function, but let me check again.

  • #130 / Dec 10, 2008 3:04pm

    Paul Apostol

    43 posts

    Hello,
    In what I understood right now the user (in fact the role) has a permission (as ex “edit”) over the application? Not over each controller/method?
    :((
    I misunderstood something?
    Paul

  • #131 / Dec 10, 2008 3:12pm

    tdktank59

    322 posts

    Hello,
    In what I understood right now the user (in fact the role) has edit permission over the application? Not over each controller/method?
    :((
    I misunderstood something?
    Paul

    The way it works is you assign a permissions to the roles,
    each role then has access based on class -> method restrictions of class rescritions or full access

    / = full access
    /class = access to all of the classes methods
    /class/method = access to the method from the class

    Then you assign this role to a user to give them the permission levels you want!

    Hope that helps

  • #132 / Dec 10, 2008 3:18pm

    Paul Apostol

    43 posts

    Thanks a lot tdktank59. I got the idea.

  • #133 / Dec 10, 2008 3:23pm

    uptown

    12 posts

    I’m not seeing any captcha on my screen with the simple example.  Any hints what I might be doing wrong?

    Check to make sure you have an exception in your .htaccess file if you have one:

    RewriteEngine on
    RewriteRule ^$ /index.php [L]
    RewriteCond $1 !^(index\.php|img|images|css|js|captcha|robots\.txt|favicon\.ico)
    RewriteRule ^(.*)$ /index.php/$1 [L]

    Also, make sure you have GD library installed and loaded in PHP

    The .htaccess rule was the problem.  Thanks!

  • #134 / Dec 11, 2008 2:56pm

    aguirre

    3 posts

    hi guys,

    i don’t know if it’s my stupidity but i encounter several strange bugs upon installing DX_Auth (1.0.2).

    1. unpack it as described
    2. opening http://myhost/auth gives me:

    An Error Was Encountered
    
    Unable to load the requested class: form_validation

    so i check and i see there is no “form_validation” anywhere. Change it to “validation” and:

    3. i get this error

    An Error Was Encountered
    
    Unable to load the requested class: dx_auth

    The library is positively there so i wonder if the file cannot be found because the file is called “DX_Auth.php”. Maybe this collides with the autoloading so i change the filename to lowercase and it works. Same for “dx_auth_event”

    4. i have renamed both files but then i get this error:

    Message: Undefined property: Auth::$form_validation

    Can anyone shed some light on this? I am using CI 1.7.0 on Ubuntu with apache2/php5

    The download page says

    DX Auth is tested in CI 1.7.0, but should be working for above version.

    but i feel extremly stupid for not being able to deploy DX_Auth on my completely fresh CI Install.

    best

    aguirre

  • #135 / Dec 11, 2008 3:07pm

    RHAngel

    14 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.

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

ExpressionEngine News!

#eecms, #events, #releases