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

  • Home
  • SEARCH
  • 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 4058714
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:06:52+00:00 2026-05-20T15:06:52+00:00

After changing the file permissions to allow a picture upload I am now getting

  • 0

After changing the file permissions to allow a picture upload I am now getting Internal Server Error and none of the following code is having a chance to execute. This all happened when I changed the file permissions of the folder /upload.

THE PHP

<?php

$filename = 'http://www.divethegap.com/update/z-images/admin/upload/test.gif';
if (is_writable($filename)) {
    echo 'The file is writable';
} else {
    echo 'The file is not writable';
}

print_r($_FILES);
if ($_FILES['thumbfile']['error'] === UPLOAD_ERR_OK) {
    $info = getimagesize($_FILES['thumbfile']['tmp_name']);
    if (($info[2] !== IMG_GIF) && ($info[2] !== IMG_JPEG)) {
       die("not a gif/jpg");
    }
    if (filesize($_FILES['thumbfile']['tmp_name']) > 20000) {
       die("larger than 20000");
    }
    move_uploaded_file($_FILES['thumbfile']['tmp_name'], 'http://www.divethegap.com/update/z-images/admin/upload/test.jpg');

      echo '<script type="text/javascript">
parent.document.getElementById("thumbprogress").innerHTML = "Archiving"</script>Archiving';

  }
else
  {
  echo '<script type="text/javascript">
parent.document.getElementById("thumbprogress").innerHTML = "Invalid File Format"</script>Invalid File Format';
  }
?>

Currently the file permissions of the upload folder are open to all as writable.

Any ideas whats wrong?

Marvellous

  • 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-20T15:06:53+00:00Added an answer on May 20, 2026 at 3:06 pm

    You should upload to a local folder, not to an internet URL, ej:

    $filename = ‘/var/www/my-site/z-images/admin/upload/test.gif’;

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

Sidebar

Related Questions

Im having a weird issue here; The following .htaccess works but now (after changing
Please help. The code to upload photos to an album by. After changing the
After changing the Subscriber2 project in the PubSub sample, I am getting this error
After changing the import as a from-import i'm running into this error: from datetime
I have implemented the following set up (after being requested): slideshow of images changing,
Do I have to restart cron after changing the crontable file?
I have oracle 10.2.0.4 version..Some days before everything was well..but after changing tnsnames.ora file(I
I have a web page with a Javascript file added dynamically. After changing the
after changing from a 32 to 64Bit Ubuntu installation my python+ctypes+c99 code is broken.
I have checked out a directory from my local SVN: server. After changing some

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.