Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7586911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:32:37+00:00 2026-05-30T19:32:37+00:00

i am using codeigniter . in my form i am using a captcha .

  • 0

i am using codeigniter . in my form i am using a captcha . all worked fine ,but now it is not loading , when i checked in firebug this error gives

Image corrupt or truncated: http://localhost/elephanti//home/auth/get_capture/913472

this is my controller

function get_capture() {
    $this->auth_lib->get_capture_image ();
}

in my view

                                            <div 

class="form-item">
                                                    <div class="catergory-inputs">
                                                        <div class="textarea-large-container" id="caption">
                                                            <img border="0"
                                                                src="<?php echo $this->config->item('base_url'); ?>/home/auth/get_capture/<?php echo rand();?>"
                                                                id="captcha" width="225" height="67" />
                                                        </div>
                                                        <div class="caption-icon">
                                                            <img
                                                                src="<?php echo $this->config->item('img_path') ?>/icon-caption.png"
                                                                width="19" height="20" alt="icon-caption"
                                                                style="cursor: pointer;"
                                                                onclick="reload_chaptca('<?php echo $this->config->item('base_url'); ?>/home/auth/get_capture/','<?php echo rand();?>')" />
                                                        </div>
                                                    </div>
                                                </div>

in my aut_lib

public function get_capture_image()
{
    $this->ci->load->model('captcha/captcha_model');
$path = APPPATH . '../../assets/3rd/captcha';
$this->ci->captcha_model->lmj_crate_image($path);
}

this is my captcha model

public function lmj_crate_image($path) {

$this->resourcesPath=$path;
$ini = microtime(true);

/** Initialization */
$this->lmj_reserved_image();

/** Text insertion */
$text = $this->lmj_get_the_captcha();
$fontcfg = $this->fonts[array_rand($this->fonts)];
$this->lmj_write_fonts($text, $fontcfg);

$this->session->set_userdata($this->session_var, $text);
// $_SESSION[$this->session_var] = $text;

/** Transformations */
$this->lmj_render_image();
if ($this->blur && function_exists('imagefilter')) {
    imagefilter($this->im, IMG_FILTER_GAUSSIAN_BLUR);
}
$this->lmj_low_resalution();


if ($this->debug) {
    imagestring($this->im, 1, 1, $this->height - 8,
            "$text {$fontcfg['font']} " . round((microtime(true) - $ini) * 1000) . "ms",
            $this->GdFgColor
    );
}


/** Output */
$this->lmj_make_image_from_text();
$this->lmj_default_clean();

}

i can not figure out what is the problem here . this code may not be helpful .

if this is not helpful can you tell me possible reasons for not working this . thanks………..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:32:39+00:00Added an answer on May 30, 2026 at 7:32 pm

    actually the issue was i had a white space in one of my libraries , after i removed the white space and removed the php closing tag , now it works correctly , thanks 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I am using codeigniter 2.0.2 version. I have searched all files but not
I am developing an app using Codeigniter. In this app I got a form
I am using CodeIgniter's form validation . Here is an example: $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email');
I'm using codeigniter, but what I've done is made a small upload form. When
I have this form that validates the fields on submit through ajax (using Codeigniter's
I'm using codeigniter for this project. I have a search form and search form
I'm implementing a search box using CodeIgniter, but I'm not sure about how I
I am developing an REST API using Codeigniter. I need to have all error
I am using Codeigniter framework and I have a form with input fields. When
I'm using CodeIgniter and I got a model that fetches let's say all recipes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.