Welcome Guest, Not a member yet? Register   Sign In
The image copy routine failed
#1

[eluser]Martin_boatshop24[/eluser]
Any idea what would cause this error. I have searched through the image_lib.php but can't find this message in it. Is this message coming from the GD2 library. My php_error.log is not showing anything unusual but the line "The image copy routine failed" is showing in the codeIgniter log and there is nothing been displayed by the controller.
#2

[eluser]Sumon[/eluser]
Would you please post your code for us.
#3

[eluser]Martin_boatshop24[/eluser]
Yeah can do. Just a brief description all its meant to do it resize and output the image requested. Universe is library that contains a list of vars

Code:
class Images extends Controller {
    
    var $fullPath;
    
    function Images() {
        parent::Controller();
        $this->fullPath = $this->universe->site['resource_folder'] . "/" . $this->universe->site['clientImg_folder'] . "/";
        
    }
    
    function fetch( $for , $image ) {
    error_log("FOR ::: " . $for . " IMAGE ::: " . $image );
        switch ( $for ) {
            case "upload" :
                $resizerSettings = $this->config->item("thumbnail_resizer");
                $resizerSettings['source_image'] = $this->fullPath  . str_ireplace("_" , "/" , $image);
            break;
        }
        
        error_log( $resizerSettings['source_image'] );
        
        $this->load->library('image_lib' , $resizerSettings );
        $this->image_lib->resize();
        
    }
}
#4

[eluser]Martin_boatshop24[/eluser]
dont worry fixed it
#5

[eluser]Tommy_DK[/eluser]
It would be a help to me, if you could share your solution Smile
- I'm getting the same error message now
#6

[eluser]Martin_boatshop24[/eluser]
The problem I had was that I had missed a load call i access the items in a config file without loading the config silly oversight on my part when I was debugging it. I believe the error relates to new_image setting. I have extended and alter this class so it doesn't work in excalty the same way as the standard library. If the the new_image setting isnt blank then it will try and copy the output of the image function called i.e. resize to the location and return this error.




Theme © iAndrew 2016 - Forum software by © MyBB