p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 (http://p2p.wrox.com/forumdisplay.php?f=414)
-   -   Cant Login in Admin (http://p2p.wrox.com/showthread.php?t=74491)

pollers May 20th, 2009 05:38 AM

Cant Login in Admin
 
hi there!
my problem is very simple, i cant login in the admin area.
if i unload the security helper from here:
Code:

$autoload['helper'] = array('url','form','text','date','security');
login is succesfull but then i should clean from every form the id_clean and the db_clean function.
i think its cause my server;
maybe i should set some global variable?
i tried also creating a new admin via sql but of course, the password i use is not encrypted so again to log in i have to deactivate the security helper.
with the 'standard' settings from the zip, i have a weird message from firefox telling me that its unable to process the information cause the compression is not supported, that's why i thought about server (aruba linux)
thank you

myerman May 21st, 2009 08:00 AM

need more info
 
Quote:

Originally Posted by pollers (Post 241540)
hi there!
my problem is very simple, i cant login in the admin area.
if i unload the security helper from here:
Code:

$autoload['helper'] = array('url','form','text','date','security');
login is succesfull but then i should clean from every form the id_clean and the db_clean function.
i think its cause my server;
maybe i should set some global variable?
i tried also creating a new admin via sql but of course, the password i use is not encrypted so again to log in i have to deactivate the security helper.
with the 'standard' settings from the zip, i have a weird message from firefox telling me that its unable to process the information cause the compression is not supported, that's why i thought about server (aruba linux)
thank you

can you provide the rest of your autoload file? I think I need to see how else you're set up there.

langithitam May 31st, 2009 01:40 PM

Quote:

Originally Posted by myerman (Post 241606)
can you provide the rest of your autoload file? I think I need to see how else you're set up there.

I have the same problem Myer,

this is my autoload file, this pretty same as the file you provided in the download section :

Quote:

<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
| -------------------------------------------------------------------
| This file specifies which systems should be loaded by default.
|
| In order to keep the framework as light-weight as possible only the
| absolute minimal resources are loaded by default. For example,
| the database is not connected to automatically since no assumption
| is made regarding whether you intend to use it. This file lets
| you globally define which systems you would like loaded with every
| request.
|
| -------------------------------------------------------------------
| Instructions
| -------------------------------------------------------------------
|
| These are the things you can load automatically:
|
| 1. Libraries
| 2. Helper files
| 3. Plugins
| 4. Custom config files
| 5. Language files
|
*/

/*
| -------------------------------------------------------------------
| Auto-load Libraries
| -------------------------------------------------------------------
| These are the classes located in the system/libraries folder
| or in your system/application/libraries folder.
|
| Prototype:
|
| $autoload['libraries'] = array('database', 'session', 'xmlrpc');
*/

$autoload['libraries'] = array('database','session','email','validation');


/*
| -------------------------------------------------------------------
| Auto-load Helper Files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['helper'] = array('url', 'file');
*/

$autoload['helper'] = array('url','form','text','date','security');


/*
| -------------------------------------------------------------------
| Auto-load Plugins
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['plugin'] = array('captcha', 'js_calendar');
*/

$autoload['plugin'] = array('captcha');


/*
| -------------------------------------------------------------------
| Auto-load Config files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['config'] = array('config1', 'config2');
|
| NOTE: This item is intended for use ONLY if you have created custom
| config files. Otherwise, leave it blank.
|
*/

$autoload['config'] = array();


/*
| -------------------------------------------------------------------
| Auto-load Language files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['language'] = array('lang1', 'lang2');
|
| NOTE: Do not include the "_lang" part of your file. For example
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
*/

$autoload['language'] = array();

$autoload['model'] = array('MCats','MProducts','MOrders','MAdmins','MSi zes','MColors', 'MPages', 'MSubscribers');


/*
| -------------------------------------------------------------------
| Auto-load Core Libraries
| -------------------------------------------------------------------
|
| DEPRECATED: Use $autoload['libraries'] above instead.
|
*/
// $autoload['core'] = array();


?>

langithitam June 1st, 2009 04:38 PM

is it because i'm using PHP 5 insted of PHP 4? plz someone help..[:(]

myerman June 3rd, 2009 07:01 AM

do you have...
 
a file called MY_security_helper.php in /system/application/helpers folder?

langithitam June 3rd, 2009 08:14 AM

Quote:

Originally Posted by myerman (Post 242110)
a file called MY_security_helper.php in /system/application/helpers folder?

Yes i do. And this is the file :

Quote:

Yes i do. this is the file :

<?php
function id_clean($id,$size=11){
return intval(substr($id,0,$size));
}

function db_clean($string,$size=255){
return xss_clean(substr($string,0,$size));
}
?>


pollers June 3rd, 2009 09:01 AM

totally the same to me,
for both files

patch September 4th, 2009 06:40 AM

did this ever get resolved?

i got the same problem

myerman September 5th, 2009 10:24 AM

I'm a bit stumped....
 
Is there some way for you to drop your files onto an FTP site or a ZIP archive so I can see what you're doing? If you have the helper autoloaded and you've added the MY helper then you should be all right. Unless you've skipped an important point in the book (which someone else did, and once they put the code in, they were fine).

patch September 5th, 2009 11:56 AM

Hi Thomas,

Thanks for getting back.

It's working now ... I hadn't autoloaded the helper. Once I read your reply and autoloaded the helper it works just fine.

Thanks again.


All times are GMT -4. The time now is 05:29 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.