Welcome Guest, Not a member yet? Register   Sign In
  Email Class: Problem with 'protocol' setting
Posted by: El Forum - 09-11-2007, 03:34 AM - No Replies

[eluser]ortsanfang[/eluser]
Since CI 1.5.3 I've used the following code in on of my controllers:

Code:
$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';

With 1.5.4 sending emails stopped working. In my Apache error log I get the message:

sh: /sendmail: No such file or directory

If I set the protocol to

Code:
$config['protocol'] = '/usr/sbin/sendmail';

or if I omit the protocol setting (in the controller), sending emails works again.

Any ideas what's wrong?


  Fatal error: Class 'Controller' not found
Posted by: El Forum - 09-10-2007, 10:49 PM - No Replies

[eluser]evilNT[/eluser]
Fatal error: Class 'Controller' not found in /var/www/CI/system/application/controllers/welcome.php on line 3
Any suggestions?


  how to create new name
Posted by: El Forum - 09-10-2007, 10:43 PM - No Replies

[eluser]Unknown[/eluser]
this not work...

$field_name = "some_field_name";
$this->upload->do_upload($field_name)


help....


  [Help] - Unable to locate Class(s) - *URGENT*
Posted by: El Forum - 09-10-2007, 09:56 PM - No Replies

[eluser]evilNT[/eluser]
I have downloaded and installed CI, but am not able to find the class files :S.


  SHA1: differences between CI library and hash/mhash (from PHP)?
Posted by: El Forum - 09-10-2007, 09:18 PM - No Replies

[eluser]Optimus Prime[/eluser]
Hi, my question is what are the differences between SHA1 encryption generation from CI library (for the security helper) and hash/mhash from PHP (using "MHASH_SHA1" as a parameter)?

For PHP and encryption newbies:
About hash/mhash, it can be found php manual:
Hash function (PHP)
mhasf function (PHP)


  noob here: stupid error message
Posted by: El Forum - 09-10-2007, 06:52 PM - No Replies

[eluser]tucspl[/eluser]
error message keeps on coming up, I can't see how to fix it.


Fatal error: Call to a member function get() on a non-object in /home/chainrea/public_html/dev/infrastructure/application/controllers/site.php on line 16


  Validation help please
Posted by: El Forum - 09-10-2007, 06:02 PM - No Replies

[eluser]LifeSteala[/eluser]
I have a form, with Textarea (Description), Input (Due Date), Textarea (Internal Owner) and Input (External Owner).

I set the rule and field for description..

I created a callback function for this reason:

If description is filled in, then there MUST be a date and the Internal OR External owner must be set before it goes into the database.

Code is unfinished but i'll post it anyways. I get this error:

Unable to access an error message corresponding to your field name.

Code:
$this->_loadViews($data, $viewQu);
    
$rules['nextactdesc']       = "callback__nextAction";
$this->validation->set_rules($rules);

$fields['nextactdesc']      = "Next Action Description";
$this->validation->set_fields($fields);
        
if ($this->validation->run() == FALSE)
{
    $this->_loadViews($data, $viewQu);
}
else
{
    echo "success";
}    

function _nextAction($nextActionField)
{
if (!empty($nextActionField))
{
if ((empty($_POST['duedate'])))
{
$this->validation->set_message('nextactdesc', 'A date is required.');
return FALSE;
}
else
{
if (empty($_POST['internalowner']) && empty($_POST['externalowner']))
{
$this->validation->set_message('nextactdesc', 'An internal or external owner is required');
return FALSE;
}
}
}    
else
{
return TRUE;
}            
}

Can anyone point out what i'm doing wrong please? Cheers


  Repopulation after validation not wanted
Posted by: El Forum - 09-10-2007, 05:42 PM - No Replies

[eluser]bakpakka[/eluser]
I'm impressed the forum is so active, keep it up! If I could seek some assistance from the CI whizzes, it would be appreciated.

I currently have a blog script that displays an article with the ability the submit comments below. After posting a new comment, the validate class can return an error if a field is not filled. It will the repopulate any completed fields.

What if it was a successful transaction? I return the user to the article page, but do not want the fields repopulated. What can I do? Here's a snippet of code.

Thanks, all.

Code:
// Load up validation library, rules and fields
            $this->load->library('validation');
                
            $rules['comment'] = $rules['name_person'] = "trim|required";
            $this->validation->set_rules($rules);

            $fields['name_person'] = "Name";
            $fields['comment'] = "Comment";
            $this->validation->set_fields($fields);

            // Validation is passed, store in db
            if ($this->validation->run() == TRUE)
            {
                $insert_db = array('date_created'=>date('Y-m-d H:i:s'), 'article_id'=>$article_id, 'created_by'=>'1', 'status'=>'active', 'name_person'=>htmlspecialchars($_POST['name_person']), 'content'=>htmlspecialchars($_POST['comment']));
                $this->db->insert('articles_comments', $insert_db);
                $row['success_msg'] = "Your comment has been posted";
                // Stop the repopulation of data, then return to the view

            }

        $template['content'] = $this->load->view('articles/article_view', $row, true);
        $this->load->view('themes/moo/article', $template);


  Exceptions - displaying uncaught error messages... possible?
Posted by: El Forum - 09-10-2007, 05:20 PM - No Replies

[eluser]LeePR[/eluser]
I've been pulling my hair out over the weekend trying to figure out why my display_error settings in php.ini were being ignored. Now I've got an issue with exceptions...

I currently have my log_threshold set to 4 and have set error_reporting(E_ALL) in CodeIgniter.

Here's my problem... I have code like this:

Code:
$myObj = new Object();
$value = null;
$myObj->setName($value); // throws an exception
Line #3 throws an exception - of course, all I need to handle that is a try{} catch{} block, but is there any way to make CI tell me that I have an uncaught exception?!? Right now, I'm just getting a blank page. I come from a Java background - debugging/testing would be so much easier if I could make CI display uncaught exception in a manner similar to PHP warnings/notices.

Cheers,
Lee


  After getting welcome page what next to do ? - Does CI run on PHP5 server ?
Posted by: El Forum - 09-10-2007, 03:13 PM - No Replies

[eluser]bingecoder[/eluser]
I managed to get my (production) installation up to the stage where it shows a welcome page. However I am unable to proceed beyond this stage. Even the link for "Users Guide " gives me an error - 403 Forbidden "You tried to access a document for which you don't have privileges" , even though I have CHMOD all files and folders to be readable. This effectively means that the folder users_guide or any other for that matter cannot be accessed. Can CI be successfully run on a PHP5 server? Otherwise I don't know what is going on. Can anyone help ? How do I get to the CI workspace ?


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

Username
  

Password
  





Latest Threads
Ajax post failing with Ty...
by PaulC
2 hours ago
Magic login link not work...
by InsiteFX
4 hours ago
Is codeigniter 5 upco...
by InsiteFX
4 hours ago
Why PHP is still worth le...
by InsiteFX
9 hours ago
Any user guid or video o...
by msnisha
Yesterday, 02:30 PM
MVC vs MVCS vs CodeIgnite...
by massimiliano1.mancini
Yesterday, 10:15 AM
Is hiring a digital marke...
by Markhenry123
Yesterday, 02:45 AM
my controller fails to fi...
by PaulC
Yesterday, 01:40 AM
My Library cannot see ses...
by InsiteFX
05-08-2025, 08:48 PM
update the framework to t...
by captain-sensible
05-08-2025, 12:14 PM

Forum Statistics
» Members: 145,101
» Latest member: butterscotchblankeesdealscom
» Forum threads: 78,383
» Forum posts: 379,424

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB