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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:50:07+00:00 2026-05-24T17:50:07+00:00

i’ve created a folder in my c drive (c:/artwork) that im using to upload

  • 0

i’ve created a folder in my c drive (c:/artwork) that im using to upload files via a form in php, like this:

<input name="file" type="file">

The problem is that when files are uploaded and i go to the folder and try to open a file i get the following message:
Photo Gallery can’t open this picture because yu do not have permission to access the file location

If i manually copy and paste a picture in that same folder, there are no issues. I can open and view pictures perfectly!

Im guessing it has to be a permission issue when uploading via php, but wich? How do i fix it?

Thanks

edit (added code)

$destination = 'c:/public_html/discography/artwork/'; // path to the upload folder

if (is_dir($destination) && is_writable($destination)) {
    // if file already exists, ask what to do

    // upload the file  
    $ok = move_uploaded_file($_FILES['file']['tmp_name'], $destination . $_FILES['file']['name']);

    // if file uploaded, go ahead an insert record in database
    if ($ok) {
        $stmt = $conn->stmt_init(); // initialize a prepared statement

        $stmt->prepare($sql);
        $stmt->bind_param('s', $_FILES['file']['name']);
        $stmt->execute();
        $stmt->free_result(); // free the database resources for other queries

        // if success
        if ($stmt->affected_rows > 0) {
            $success = true;
        } else {
            $err_msg = $stmt->error;
        }

        $stmt->close(); // close statement  
    }

} else {
    $err_msg = "'$destination' must be a valid, writable directory!";
}
  • 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-24T17:50:08+00:00Added an answer on May 24, 2026 at 5:50 pm

    if you haven’t setup “upload_tmp_dir” directives in php.ini then the files are being saved in temp folder. In your case C:\Windows\Temp if you are using IIS and therefore it inherits the permission of that directory instead of c:/public_html/discography/artwork/.

    To fix that either set the permission of Temp directory of define a another place to store tmp files in php.ini.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have some data like this: 1 2 3 4 5 9 2 6
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am using Paperclip to handle profile photo uploads in my app. They upload
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
I have a bunch of posts stored in text files formatted in yaml/textile (from
We're building an app, our first using Rails 3, and we're having to build

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.