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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:08:00+00:00 2026-05-13T06:08:00+00:00

PHP mySQL Hi, i am having an interesting problem. I have a form in

  • 0

PHP
mySQL

Hi, i am having an interesting problem.
I have a form in my cms that allows the admin to upload images to the server. The script resizes the images to a thumbnail (170px height)and a large image(600px height). The thumbnails are around 16000k in size and the large images are around 160,000k in size.
I do not set file permissions and just let it happen automatically.
When i go to the site i can see the thumbnails but i can’t see the full size images and i have tracked the problem down to the file permissions. The thumbnails have rw-r-r permissions and the larger images have rw– — — permissions. Ie the public does not have permission to view the large images. I save the large images with the name of the original and i save the thumbnails with _thumbnail appended to the end.
Why would the permissions of the large images be different when they are both uploaded and resized by the same script and when i do not set file permissions? Does the size have something to do with it? I only get this problem when uploading images to the production server, not when working on my local machine.
Thanks
Andrew

  • 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-13T06:08:00+00:00Added an answer on May 13, 2026 at 6:08 am

    How are you resizing the images? Are you using an external program?

    This is just a guess, but here goes

    1. admin uploads image.jpg via your form
    2. php script writes uploaded image.jpg to file system as rw- — — (600)
    3. php script calls image resizer program to create image_thumbnail.jpg
    4. image resizer writes image_thumbnail.jpg as rw- r– r– (644)
    5. php script calls image resizer program to create resized image.jpg
    6. image resizer overwrites image.jpg, but leaves permissions as rw- — — (600)

    To test this theory, comment out the part where it resizes image.jpg to 600px, and then check the permissions of the originally uploaded image. If they are 600, then there’s your problem.

    Regardless though, a simple chmod will solve your problem.

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

Sidebar

Related Questions

I am relatively new to PHP/MySQL and have been having a problem that I
I have a simple page in a PHP/MySQL web application that lets admin users
I am having an interesting problem with php and mysql. I am trying to
I'm having a simple select statement using php-mysql and I have this script to
Spent some time troubleshooting a problem whereby a PHP/MySQL web application was having problems
I have a form with a dynamically-generated group of fields - backend is php/mySQL,
I am having a small problem with my PHP MySQL Select. The function is
I have a PHP/MySQL application that stores blank values in some cases as ''
I am wanting to create a PHP MySQL script that will display data and
I'm having difficulties to display data from mysql database to PHP generated table. Interesting

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.