473,327 Members | 2,103 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Security - uploading images

hi folks,

I've been reading a lot of the discussion going on in this site about security - it has been hugely helpful, so thank you!

I was particularly interested in the discussion at http://www.thescripts.com/forum/thread1954.html. I liked the idea of having uploaded images stored outside of the webroot and only displayed when pulled through by some php code. Has anyone done anything like this? If you could give me some pointers on how it would work I'd be very grateful. I've googled it and not found anything which has helped much.

Thanks very much

Karen
Mar 23 '07 #1
2 1123
ronverdonk
4,258 Expert 4TB
Welcome to TSDN!

The forum discussion you mentioned in your post really addresses all the issues. Most important one is to have your upload program have write access to a folder outside the document root.

When you do not have that permission (and usually you don't on a shared host) you have to look for the use of htaccess or a login method to prevent outside users from accessing the folder.

Ronald :cool:
Mar 23 '07 #2
Hi,

Thanks for the rapid response!

The bit I wasn't getting was how you actually display an image via a php script if it is stored outside the webroot. Or, how you could use htaccess to allow a file to be viewed only when called from a particular script?

Thanks

karen
Mar 23 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: laredotornado | last post by:
Hi, I'm using PHP 4 and I am submitting some images in a form with <form name=addProductForm enctype="multipart/form-data" method=post action="add_product_response.php"> <input type=file...
1
by: psb | last post by:
WHO HAS THE BEST COMPONENT FOR FILE UPLOAD? HELP!? has anyone achieved 100% success with HTTP uploading with Mac clients??? I thought the whole <input type="file" .../> was a w3c standard that...
3
by: Gavin | last post by:
I need some help, I need the code to allow people that visit my website to be able to upload pictures to a file on my web server. I have been able to get close, but not quite there yet. Set fso...
1
by: joe | last post by:
Any articles relating with Uploading images files to server and resize the image by asp.net 2.0
5
by: Deejam | last post by:
hi, i've this situations where user will upload images..my code works fine for uploading images.. but i need to create auto thumbnail picture (of the same image) whenever user upload images......
1
by: gomzi | last post by:
hi, I have a file upload control in one of my pages. whenever I try to upload an image(only images are allowed), I get a security exceptions error.(Only on my web host's server) This is the exact...
1
by: thulaseeram | last post by:
I am using iframe to store uploaded images, it is uploading fine in IE but it is not happening in firefox means first time it is uploading image if i try to upload second image it is not calling even...
14
w33nie
by: w33nie | last post by:
What I'm trying to do here, is upload a video to the ../video/ folder, and up to 5 images to the ../images/ folder. As well as the database information like title, content and each file's file...
1
pezholio
by: pezholio | last post by:
Hi, It seems that every time I put together a new script to upload a file I always have problems, here's the latest one: I've got a form with two file input fields, when I submit the form,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.