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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:06:16+00:00 2026-05-14T14:06:16+00:00

I have a website on free hosting – 000webhost.com and it allows you to

  • 0

I have a website on free hosting – 000webhost.com and it allows you to upload images.

However, when I try to upload an image, I get these errors:

Warning: move_uploaded_file(images/SmallSmileyFace.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/a6621074/public_html/m/write.php on line 76

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move ‘/tmp/phpcmW3mo’ to ‘images/SmallSmileyFace.jpg’ in /home/a6621074/public_html/m/write.php on line 76

This is the code:

if (!empty($_FILES['fileImage']['name'])) {
  // check image type and size
  if ((($imagetype == 'image/gif') || ($imagetype == 'image/jpeg') || ($imagetype == 'image/pjpeg') || ($imagetype == 'image/png'))
    && ($imagesize > 0) && ($imagesize <= 32768)) {

    if ($_FILES['fileImage']['error'] == 0) {
        //move file
        $target = 'images/' . $image;
        if (move_uploaded_file($_FILES['fileImage']['tmp_name'], $target)) {
            $query = "INSERT INTO reviews (post_date, food_name, location, cafeteria, review, image, rating, user_id)
            VALUES (NOW(), '$foodname', '$location', '$cafeteria', '$review', '$image', $rate, $id)";

            mysqli_query($dbc, $query);

            //confirm success
            echo '<p>Thank you for your submission!</p>';
        }
        else {
            echo '<p class="errmsg">There was a problem uploading your image.</p>';
        }
    }
    @unlink($_FILES['fileImage']['tmp_name']);
  }
 else {
      echo '<p class="errmsg">The screen shot must be a GIF, JPEG, or PNG image file no greater than 32KB in size.</p>';
  }
}

Any ideas?

  • 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-14T14:06:16+00:00Added an answer on May 14, 2026 at 2:06 pm
    1. Check your “images” folder permissions, make it 0777 (writable for everyone), for example.
    2. Change “images/” path to absolute server path.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: Suppose I have a website that is hosted on http://www.example.com and the site
I have a big problem in my website (based on Joomla and a free
I have an email account that receives various requests to get free materials, for
I'm making a C# image gallery for a website (I know there's many free
I have a website serving free mp3-downloads and I would like them to be
I have moved my website and MySQL database to a new, free server at
Hi I have a free text editor for blog posts on my website with
I have my website's mobile version. I need get statistics about users visiting my
I have built a website that I thought was free from css errors until
I have a website made to provide free web-based tools for making indie games.

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.