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 7526927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:58:16+00:00 2026-05-30T03:58:16+00:00

I’m having a very problematic error with phpthumb: http://phpthumb.gxdlabs.com/ So basically, I have a

  • 0

I’m having a very problematic error with phpthumb: http://phpthumb.gxdlabs.com/
So basically, I have a form which uploads a profile picture. The uploading seems to work because it uploads the image in the directory. The problem is that it doesn’t generate the thumbnails but I’m sure that all the variables and names are correct. It gives me the following error. Specifically ‘Image file not found’:

Fatal error: Uncaught exception 'Exception' with message 'Image file not found: ����' in {PATH}\phpthumb\ThumbBase.inc.php:193 Stack trace: #0 {PATH}\phpthumb\ThumbBase.inc.php(172): ThumbBase->triggerError('Image file not ...') #1 {PATH}\phpthumb\ThumbBase.inc.php(110): ThumbBase->fileExistsAndReadable() #2 {PATH}\phpthumb\GdThumb.inc.php(96): ThumbBase->__construct('??????JFIF?????...', false) #3 G:\EasyPHP\www\YourSlab\phpthumb\ThumbLib.inc.php(127): GdThumb->__construct('??????JFIF?????...', Array, false) #4 {PATH}\edit_profile.php(74): PhpThumbFactory::create('??????JFIF?????...') #5 {PATH}\edit_profile.php(80): generateThumbnail->createthumbnail(25) #6 {PATH}\edit_profile.php(118): set_profile_info('Mico Abrina', '1', 'asdf', 'asdf', '', 'asdf', 'asdf', '', '05', '4', '1996', 'G:\EasyPHP\tmp\...') #7 {main} thrown in {PATH}\phpthumb\ThumbBase.inc.php on line 193

I think its because I’m generating the thumbnails right after uploading it. How do I make it work?

<?php
    //upload images
    if (file_exists($profile_pic)) {
        $src_size = getimagesize($profile_pic); 

        if ($src_size['mime'] === 'image/jpeg'){
            $src_img = imagecreatefromjpeg($profile_pic);   
        } else if ($src_size['mime'] === 'image/png') {
            $src_img = imagecreatefrompng($profile_pic);
        } else if ($src_size['mime'] === 'image/gif') {
            $src_img = imagecreatefromgif($profile_pic);    
        } else {
            $src_img = false;   
        }

        if ($src_img !== false) {
            $md5sessionid = md5($_SESSION['user_id'].'asdf');
            imagejpeg($src_img, "profile_pic/$md5sessionid.jpg");
            //end of uploading images

            //image thumbnail creation class
            class generateThumbnail {
                public function createthumbnail($size) {
                $md5sessionidsecret = md5($_SESSION['user_id'].'asdf');
                $md5sessionidthumb = md5($md5sessionidsecret.''.$size);
                $path_to_thumb_pic = 'profile_pic/'.$md5sessionidthumb.'.jpg';
                $profile_pic = file_get_contents('profile_pic/'.$md5sessionidsecret.'.jpg');
                $thumb_profile_pic = PhpThumbFactory::create($profile_pic);
                $thumb_profile_pic->adaptiveResize($size, $size);
                $thumb_profile_pic->save($path_to_thumb_pic);
                }
            }
            //make the thumbnails
            $createThumbnail = new generateThumbnail();
            $createThumbnail->createthumbnail(25);
            $createThumbnail->createthumbnail(75);
            $createThumbnail->createthumbnail(175);
        }
    }
?>
  • 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-30T03:58:18+00:00Added an answer on May 30, 2026 at 3:58 am

    It appears that PhpThumbFactory::create() takes a file path as its first argument, unless you specify true for the third isDataStream argument. That is why you are getting the strange output in the exception where it says Image File Not Found.

    You could do a few things to fix it:

    // Either skip the file_get_contents call and pass the file path directly
    $thumb_profile_pic = PhpThumbFactory::create('profile_pic/'.$md5sessionidsecret.'.jpg');
    
    // or set the 3rd parameter isDataStream to true
    $profile_pic = file_get_contents('profile_pic/'.$md5sessionidsecret.'.jpg');
    $thumb_profile_pic = PhpThumbFactory::create($profile_pic, array(), true);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text area in my form which accepts all possible characters from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am using Paperclip to handle profile photo uploads in my app. They upload
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,

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.