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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:38:13+00:00 2026-05-15T23:38:13+00:00

I am working with a script for resizing images. I seem to be getting

  • 0

I am working with a script for resizing images. I seem to be getting an error:

Error: no image was specified
Probably because of this code in the script(image.php):

    if (!isset($_GET['image']))
    {
        header('HTTP/1.1 400 Bad Request');
        echo 'Error: no image was specified';
        exit();

}

Here is what I’m doing(profile.php):

$your_image = $row['Image'];
$path_to_image = $row['PortraitPath'];
$width = 100;
$height = 100;

echo "<img src=\'/image.php/{$your_image}?width={$width}&amp;height={$height}&amp;cropratio=1:1&amp;image={$path_to_img}\' alt=\'Alt text goes here.\' />";

Therefore, I am reading $your_image and $path_to_image from a MySQL table, and then putting it in the img source. As mentioned above, obviously, image is not set, that is why I am getting that first error. What I don’t get is, how will the image actually even be set with my img src code? Aren’t I simply displaying the actual image? Then how will image even be set if a picture is simply being displayed? Thank you.

  • 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-15T23:38:14+00:00Added an answer on May 15, 2026 at 11:38 pm

    If you want to source a php file instead an image, you need to tell your php file that the output will be an image.
    You can do this using the php header() function, like this:

    header('Content-type: image/jpeg');
    

    Here is some reference: php header function

    About the address you are point to, isn’t a bit weird? You have a slash right after the .php, which suggest that you are trying to access some folder… Did you tested this url to see if a real image are being outputted on the screen?

    Hope this can help you =)

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

Sidebar

Related Questions

I'm trying to get this simple PowerShell script working, but I think something is
In tcsh , I have the following script working: #!/bin/tcsh setenv X_ROOT /some/specified/path setenv
I'm working on a script in PHP that needs to get some info from
I am working on a script to send data to a mysql table and
I am working on a script that will process user uploads to the server,
I am working on a bash script where I need to conditionally execute some
I'm working on a configuration script for a JNI wrapper. One of the configuration
I'm working on a Perl script. How can I pass command line parameters to
I'm working with a VB Script file written by someone else that uses Windows
I'm working on a small GreaseMonkey script where I would like to embed a

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.