PDA

View Full Version : PHP-mySQL : Storing images on DB


R4ST3R
11-27-2003, 03:00 AM
Hi there,

i'm searching the way that i can store images inside mysql to avoid security problems from world-write-access directories.

I found an article on devshed (see it here! (http://www.devshed.com/Server_Side/PHP/User/page1.html)) but it seems not to work with php 4.3.4 and mysql 4.0.16.

Anyone knows the way it could work ? or any article-tutorial or whatever explains how this think will work ?

( :( ...Sorry for my English... )

MikeParent
11-27-2003, 07:39 AM
Storing images can eat up a lot of db space, possibly needlessly... why do you want to do this... can you describe the project in more detail?

I have always had an upload directory that is temporary and then had the upload script move the files to another read-only directory on successful upload. That worked well for me...

R4ST3R
11-27-2003, 01:03 PM
A read-only directory is the solution....but how the script will write in a 744 directory ? I tried that but didn't work.

It depends on the owner of the dir ?
I haven't permission to chown dir at (for example) apache.apache

How did you make this work ?

Have php scripts access to whole filesystem without any restriction ?

MikeParent
12-04-2003, 09:16 AM
In the past, if I didn't control the box, I called my ISP to get write permissions on a designated folder. Usually they are pretty understanding if you explain what you are trying to do.

R4ST3R
12-04-2003, 10:42 PM
I'll try it but i don't think they will make it.....

Thanks for the help!

MikeParent
12-07-2003, 03:47 AM
No sweat! and good luck....