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.

Freakauth_light and Modular Extensions

September 23, 2008 12:28am

Subscribe [2]
  • #1 / Sep 23, 2008 12:28am

    wiredesignz

    2882 posts

    I have successfully installed Freakauth_light with ME5.1 (Should be the same with ME4.2)

    Note: No allowance has been made for installing the freakauth example files.

    Copy all freakauth files except controllers into their respective applicaton/directories.

    Move models in FreakAuth_light subdirectory up one level into models directory.

    Create a freakauth module, add all of the controllers to freakauth/controllers/, the admin subdirectory is no longer used.

    Configure routes:

    $route['auth(.*)'] = 'freakauth/auth$1';
    $route['admin'] = 'freakauth/adminhome';
    $route['admin/(.*)'] = 'freakauth/$1';
    
    $route['installer'] = 'freakauth/installer';

    Autoload freakauth dependencies:

    $autoload['libraries'] = array('database', 'validation', 'fal_validation', 'freakauth_light');
    
    $autoload['helper'] = array('url', 'form', 'array', 'freakauth_light', 'html');
    
    $autoload['config'] = array('freakauth_light');

    I think thats about all there is to do, if I have missed something or you have other issues please let me know.

  • #2 / Sep 23, 2008 9:37pm

    otn3m3m

    20 posts

    Hi,

    Do we ignore the config files suffix with _demo?

    Thanks

  • #3 / Sep 23, 2008 10:13pm

    otn3m3m

    20 posts

    I tried ignoring the _demo config files and modified the files as stated in your example. When I navigate to installer page is says that DB_session OFF. How do I turn it on?

    Thanks

  • #4 / Sep 23, 2008 10:47pm

    wiredesignz

    2882 posts

    Read the FreakAuth installation guide.

  • #5 / Sep 23, 2008 11:28pm

    otn3m3m

    20 posts

    okay,

    so i followed the install guide.
    I copied the config files from freakAuth with the suffix _demo. I deleted the original files in the config folder on my local machine:
    - system/application/config.php
    - system/application/autoload.php

    and renamed the _demo to the appropriate file name. I then followed your guide for the changes to be made to the config and autoload files.

    I deviated from the install guide in that i left the original routes.php file and instead of using the _demo file i used your modification to the original routes file.

    The install page says everything is working fine. But when i click on a tab in the installer page like login i get routed to the index.php page.

    any help would be appreciated.

    thanks

  • #6 / Sep 23, 2008 11:45pm

    otn3m3m

    20 posts

    so when i manage to logout. I can view the login page. unfortuntely when i try to login i get an error.

    Undefined property: Auth::$UserModel
    Filename: libraries/FAL_validation.php

  • #7 / Sep 24, 2008 12:27am

    otn3m3m

    20 posts

    the line of code in the library that the error points to

    line 70 : $query = $this->CI->UserModel->getUserByUsername($username_login);

    i moved freakauth models up one level into application/models

  • #8 / Oct 02, 2008 3:49pm

    Tony Nash

    42 posts

    I had the same problem. Has anyone found a solutions for this issue?

    @wiredesignz, How did you manage to get away with this…

  • #9 / Oct 03, 2008 1:14pm

    Tony Nash

    42 posts

    @wiredesignz

    ME5.1.x seems awesome! However, I desperately need Freakauth_ligh with my project too. I am having a very hard time merging these two wonderful libs together. ME5.1.31 working fine when its along and when I follow above steps, I got whole page of errors as bellow. Will you be kind enough to tell us how you able to manage to add FreakAuth with ME5.1.31 successfully? See the error bellow, it looks like an error on ME Loader? or is it actually FreakAuth?

    A PHP Error was encountered</p> <p>Severity: 4096</p> <p>Message: Object of class UserTemp could not be converted to string</p> <p>Filename: libraries/Loader.php</p> <p>Line Number: 1029</p> <p>A PHP Error was encountered</p> <p>Severity: Notice</p> <p>Message: Object of class UserTemp to string conversion</p> <p>Filename: libraries/Loader.php</p> <p>Line Number: 1029</p> <p>A PHP Error was encountered</p> <p>Severity: Notice</p> <p>Message: Undefined property: Installer::$Object</p> <p>Filename: libraries/Loader.php</p> <p>Line Number: 1029</p> <p><br /> Fatal error: Call to a member function _assign_libraries() on a non-object in C:\wamp\www\intranet2\system\libraries\Loader.php on line 1029


    This error appear after I moved “usertemp.php” from app../model/FreakAuth_light to app../model/usertemp.php. before that it was as bellow.

    An Error Was Encountered<br /> Unable to locate the file: usertemp.php in: FreakAuth_light

  • #10 / Oct 03, 2008 2:06pm

    wiredesignz

    2882 posts

    The error is from CI Loader not ME.

    You only have one error there, the others are a byproduct of the first error.

    Fatal error: Call to a member function _assign_libraries() on a non-object…

    CI Loader cannot find the usertemp model, Check your filenames and locations again.

    EDIT:
    You may have to put the usertemp model back into the original subdirectory and try again.

  • #11 / Oct 03, 2008 3:47pm

    Tony Nash

    42 posts

    Well.. I am pulling my hire now… Sorry I can’t seems to find the exact problem here! files and folders seems to be in right place. See my PM screen shot.

    Yet I get following error message
    An Error Was Encountered<br /> Unable to locate the file: usertemp.php in: FreakAuth_light


    If I move usertemp.php to above from /app../mode../FreakAuth_light to app../models/usertemp.php then only I get that huge error message.

    hummm… still not sure why I get “Unable to locate the file: usertemp.php” :-(. In fact, both ME and FA working fine when they not togather.

  • #12 / Oct 03, 2008 3:55pm

    wiredesignz

    2882 posts

    They both work fine together too Tony.

    I’ll take a look at the screenshot and post back.

    EDIT:
    Actually looking further ME doesnt allow loading from model subdirectories, which is why I said to move them in my original post, and is something I might need to change in the next update of ME5.

    Until then you need to move the usertemp model up one level and find where the freakauth libraries load the usertemp model and alter the path accordingly.

    Good luck

  • #13 / Oct 04, 2008 2:32am

    Tony Nash

    42 posts

    Thanks for the tip wiredesignz. But no luck so far…

    Well I move the usertemp.php and change the following code in FA (freakAuth_light.php)

    Line 86) $this->CI->load->model(‘FreakAuth_light/usertemp’, ‘UserTemp’);</p> <p>to <br /> $this->CI->load->model(‘usertemp’, ‘UserTemp’);

    But still get the long error page..

    I then tested with ME5.1.32 (with model inside sub directly and then above) and still get the same old error..

    I now feel this is some kind of bug in CI loader class? If so, that would be a very interesting case.

    Fatal error: Call to a member function _assign_libraries() on a non-object in C:\wamp\www\intranet2\system\libraries\Loader.php on line 1029

  • #14 / Oct 04, 2008 4:09am

    wiredesignz

    2882 posts

    Tony, One thing that I just realised is, with ME installed properly, CI Loader is never used to load models, so why is it causing the error?

    I’m thinking you don’t have ME installed correctly or you are using a MY_Controller extension which bypasses ME completely.

  • #15 / Oct 04, 2008 6:51am

    Tony Nash

    42 posts

    Trust me, I just tested with complete new instance of CI (1.7 SVN), ME5.1.32, FA 1.1 and (PHP 5.2.5). But still I get the same error. I am 100% sure that ME is working fine and it has passed all your test cases on wiki. But I don’t know why it load CI loader. However, I noticed ME is not calling the proper module with following FA libraries on on autoload.php. it simply display that long error.

    $autoload[‘libraries’] = array(‘database’, ‘validation’, ‘fal_validation’, ‘freakauth_light’);

    If I remove FA libraries (last 2) from autoload.php then ME display the correct module output (ex: welcome, test). Otherwise its the same long error.

    NOTE: I noticed CI 1.7 is having a new validation lib. since fal_validaion extending CI validation, will it be the issues here? 

    Is there anything I can send you to help to identify this issue for me?

    I know you are busy guy and really appreciate all your help so far.. Thanks indeed!

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

ExpressionEngine News!

#eecms, #events, #releases