Welcome Guest, Not a member yet? Register   Sign In
  Best way to handle passwords using CI library?
Posted by: El Forum - 02-14-2008, 08:01 PM - Replies (26)

[eluser]Chris.Campbell[/eluser]
I read this page and it shows some options: http://ellislab.com/codeigniter/user-gui...ption.html Which one is the recommended way to handle passwords, encrypting + salt, and then comparing the supplied pass with the one in the database, thanks in advance.


  Simple text being outputted twice
Posted by: El Forum - 02-14-2008, 05:56 PM - Replies (2)

[eluser]Unknown[/eluser]
Hey All,

I am an extreme CI newbie, as I just started programming with it a little over 15 minutes ago. However, I have set up this very simple application and I see the output being outputted twice.

My very simple controller:

Code:
class Index extends Controller {
    function index() {
        echo "Hey World!";
    }
}

I was wondering if there was anyone who could help me?

Thanks


  It's just a question.
Posted by: El Forum - 02-14-2008, 05:13 PM - Replies (8)

[eluser]Olivares[/eluser]
Hello Friends.

i'm a newbie with CI and i have a question, if i use CI my sites are safe from sql injection or cross side scripting?

im considering CI for a proyect but i don't know if i'm safe with just CI or i need extra validations.


  default_controller can't be in directory
Posted by: El Forum - 02-14-2008, 04:26 PM - Replies (3)

[eluser]Cong Do[/eluser]
default_controller can't be in directory

by replacing the following code in router.php in 1.61

//$this->set_class($this->default_controller);
//$this->set_method('index');
//$this->_set_request(array($this->default_controller, 'index'));

to this Big Grin
$this->_set_request(explode('/',$this->default_controller));

It just work


  Whats the best way to use this? model, extend library or other?
Posted by: El Forum - 02-14-2008, 03:30 PM - Replies (2)

[eluser]bugboy[/eluser]
Hello all

I have a quick question.

I have this code which i use a lot to help me create the image size's i need.

I use this a lot as it allows me to have a loop and to create images sizes when uploading multiple images.

At the minute i have placed it in a model and it works just fine and keeps my code smaller and neater. But i'm wondering is this the best way or am i right in thinking i could extend the image_lib libray to do this?

I just want to get my coding practice up to scratch.

Code:
function resizeImage($filename, $folder, $width, $height, $thumb=FALSE){
        
        $config['source_image'] = $folder.$filename;
        $config['maintain_ratio'] = TRUE;
        $config['width'] = $width;
        $config['height'] = $height;
        $config['master_dim'] = 'width';
        
        // create a thumb
        if($thumb == TRUE){
            $config['new_image'] = $folder.'thumb_'.$filename;
        }
        
        $this->image_lib->initialize($config);
        
        if ( ! $this->image_lib->resize())
        {
            return $this->image_lib->display_errors();
        }
    
    }

Any advice would be most appreciated.

Smile


  smtp email hangs for a while, then fails
Posted by: El Forum - 02-14-2008, 03:23 PM - No Replies

[eluser]echadwickb[/eluser]
I'm having trouble with the email class. When I submit my form, the page churns for several minutes, then lets me know the send action failed. The code is executing in a LAMP environment (PHP 4.3.6, apache 1.3.41). The smtp server I'm connecting to is a Lotus Domino 7.02 server on the internal network. Here's the code (I've x'd out the company identifiable tidbits):

Code:
$email_config['protocol'] = 'smtp';
$email_config['smtp_host'] = '10.0.X.X';
$email_config['smtp_port'] = '25';
$email_config['mailtype'] = 'text';
$email_config['smtp_user'] = '';
$email_config['smtp_pass'] = '';
$email_config['smtp_timeout'] = '10';
$email_config['useragent'] = 'XXXXX Glossary';
$email_config['charset'] = 'iso-8859-1';
            
$this->email->initialize($email_config);
            
$this->email->from($this->input->post('suggestEmail'), $this->input->post('suggestName'));
$this->email->to('[email protected]');
$this->email->subject('XXXXX Glossary term suggestion');
$this->email->message('Suggested term: '.$this->input->post('termName').'Suggested Definition: '.$this->input->post('termDef').'Additional Comments: '.$this->input->post('comments'));
if($this->email->send())
{
    $suggest_form['result_msg'] = "Your suggestion was sent successfully";
}
else
{
    $suggest_form['result_msg'] = $this->email->print_debugger();
    //$suggest_form['result_msg'] = "There was a problem sending your suggestion. Please click the back button in your browser and resubmit your suggestion";
}

I get the following message from print_debugger after several minutes (like 5+):


220 XXXXXXX.XXXXX.COM ESMTP Service (Lotus Domino Release 7.0.2) ready at Thu, 14 Feb 2008 15:09:53 -0600

hello:

The following SMTP error was encountered:

from:

The following SMTP error was encountered:

to:

The following SMTP error was encountered:

data:

The following SMTP error was encountered:

The following SMTP error was encountered:
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.

User-Agent: CodeIgniter
Date: Thu, 14 Feb 2008 16:10:15 -0600
From: "XXXXX XXXXXX"
Return-Path:
To: [email protected]
Subject: XXXXXX Glossary term suggestion
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: XXXXXX Glossary
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0


Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Suggested term: test termSuggested Definition: test definitionAdditional
Comments: test comments

I'm currently trying to confirm that smtp works on my linux box independant of CI, but I haven't figured out how to accomplish that yet. I do know that apps written by my predecessor use smtp functions built on PEAR for error notification (though I'm not 100% sure they're working). Still it would be nice if I got an actual error message back from domino telling me what is the matter. Any ideas? Thanks.

Chad B.


  Google like Ajax loading indicator
Posted by: El Forum - 02-14-2008, 02:02 PM - Replies (4)

[eluser]danfreak[/eluser]
Hey guys,

for those of you interested, I wrote a tutorial with a demo on how to build a Google Like Ajax loading... indicator.

If you wanna give a touch of style to your applications go for it!

Enjoy

Dan


  safe_mailto anf firefox on mac
Posted by: El Forum - 02-14-2008, 01:45 PM - Replies (9)

[eluser]Unknown[/eluser]
Hi,
don't know why this is happening, but as soon as I use the

Code:
safe_mailto
command in a page the page wont load in firefox 2 on os x. The page loads forever and is blank. This problem does not occur when I visit the page with Safari or Opera.

Thanks
cat


  Hooks example
Posted by: El Forum - 02-14-2008, 12:13 PM - Replies (4)

[eluser]freshface[/eluser]
Hey

I want to extend the $this->db class is the best way to use a hook?
And could an example be posted? The user guide is not that revealing for me.

Thx in advance


  Error on the data base Connection
Posted by: El Forum - 02-14-2008, 12:10 PM - Replies (3)

[eluser]anouar[/eluser]
hello very body

i'm a beginner on the C.I.,I ve tried to apply and to concept the blog, which was implemented on the video tutorials, but on the connection step with the database ,
i've received an error message (as figured bellow)

Quote:An Error Was Encountered

Unable to connect to your database server using the provided settings.


So, i tried to reconfigure the database.php as figured below but the pb persist.
Code:
$active_group = "default";

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "";
$db['default']['password'] = "";
$db['default']['database'] = "blog";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['active_r'] =TRUE ;
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = TRUE;

if you have an idea about this error , could you pass me the solution .
Best regards
El Amri Anouar Nabil.


Ps : i'm using MySQL 4.1.9 version


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
Best way to create micros...
by jean5769
1 hour ago
Limiting Stack Trace Erro...
by byrallier
10 hours ago
Bug with sessions CI 4.5....
by ALTITUDE_DEV
11 hours ago
codeigniter 3.0.1 equiped...
by JustJohnQ
Yesterday, 10:05 AM
Display a custom error if...
by b126
Yesterday, 06:22 AM
Type error in SYSTEMPATH\...
by DXArc
Yesterday, 06:20 AM
v4.5.1 Bug Fix Released
by LP_bnss
Yesterday, 04:52 AM
Retaining search variable...
by Bosborne
Yesterday, 03:20 AM
Getting supportedLocales ...
by InsiteFX
Yesterday, 12:24 AM
Component help
by InsiteFX
Yesterday, 12:21 AM

Forum Statistics
» Members: 85,130
» Latest member: ipro999
» Forum threads: 77,573
» Forum posts: 375,958

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB