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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:33:18+00:00 2026-05-25T03:33:18+00:00

Everyone. I am using an image resizer script that resizes JPG images. It worked

  • 0

Everyone.

I am using an image resizer script that resizes JPG images. It worked fine on my remote server but unfortunately it doesn’t work on the client’s server. 😐

The directories are writable (permission is set to 777). All I am getting is:

Error: image does not exist: /home/content/u/s/e/username/correct/path/to/existing/file.jpg

Here’s the bit of the code that may be helpful in debugging:

// Images must be local files, so for convenience we strip the domain if it's there
$image          = preg_replace('/^(s?f|ht)tps?:\/\/[^\/]+/i', '', (string) $_GET['image']);
// ...
// Strip the possible trailing slash off the document root
$docRoot    = preg_replace('/\/$/', '', DOCUMENT_ROOT);
//...
if (!file_exists($docRoot . $image))
{
    header('HTTP/1.1 404 Not Found');
    echo 'Error: image does not exist: ' . $docRoot . $image;
    exit();
}

Please note that as a developer I have been given permission to access a subdirectory of the root directory.

I hope I made the problem case clear. I am at a loss as to what’s going on behind the scene. Help is much apreciated

  • 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-25T03:33:19+00:00Added an answer on May 25, 2026 at 3:33 am

    PHP has to have access to all the directories leading up to the file, not just access to the file itself. If it doesn’t have permissons on ALL of the directories, it’s the equvialent of putting a “Free! take one!” pamphlet dispenser inside a vault inside Fort Knox – useless.

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

Sidebar

Related Questions

I tried using a free script that I found on the Internet but it
When I'm online it seems that everyone has agreed that using the exclusive locking
What is everyone's favorite way to sanitize user data? I've been using Javascript, but
I am currently using an image manipulation script to do some work on uploaded
I'm trying to port the old HTML.Image helper, that I'm sure everyone has used
the following piece of code worked fine all day yesterday public Image getImage() {
I am using this image rotator. It's great, but if I link to it
everyone. I'm trying to give a text link a background image but I'm not
I hope not everyone is using Rational Purify. So what do you do when
In class, we are all 'studying' databases, and everyone is using Access. Bored with

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.