RE: [PHP-WIN] RE: Big question about databases...

From: Date: Thu, 28 Sep 2000 15:41:29 +0000
Subject: RE: [PHP-WIN] RE: Big question about databases...
Groups: php.windows 
Request: Send a blank email to php-windows+get-2838@lists.php.net to get a copy of this message
I'm also doing something similar... It's still in the planning stages. But this is what we have to work with: 1) An index of all of the resolutions passed by our county commissioners 2) a directory with dozens of other directories containing the resolutions in Word format 3) the indexing system has a spot for "type" which "could" match with the directory structure, but doesn't always... what I'm going to do is use the index (which is in Oracle) to do searches, etc... I think I'm going to have to make all of the pdfs and drop them in a similar directory structure on the web... dunnon yet... Anyway... I have nothing interesting to offer, so I will shut up now, John --------------------- Founder and Only Member of The 'What Kind of Idiot Uses PHP with IIS with Oracle on NT?' Consortium John Asendorf - jasendorf@lcounty.com Web Applications Developer http://www.lcounty.com - NEW FEATURES ADDED DAILY! Licking County, Ohio, USA 740-349-3631 > -----Original Message----- > From: Nold, Mark [mailto:Mark.Nold@normandy.com.au] > Sent: Wednesday, September 27, 2000 9:05 PM > To: 'Camelot, Nathanael (N.)'; 'php-windows@lists.php.net' > Subject: [PHP-WIN] RE: Big question about databases... > > > -------------------------------------------------------------- > -------------- > ----------------- > Disclaimer: The information contained in this email is > intended only for the > use of the person(s) to whom it is addressed and may be > confidential or > contain legally privileged information. If you are not the intended > recipient you are hereby notified that any perusal, use, distribution, > copying or disclosure is strictly prohibited. If you have > received this > email in error please immediately advise us by return email at > postmaster@normandy.com.au and delete the email document > without making a > copy. > -------------------------------------------------------------- > -------------- > ----------------- > Nathanael, > > I've been doing some work on this myself and you've probably seen my > opinions about using files with just pointers in a DB. > > I have a few questions for you and others on this list as to > how they would > handle such a document repository. > > 1. I remember reading somewhere about limits to the numbers > of files for a > directory... something to do with node space? We plan to have > 1000's maybe > even 10,000 documents stored in our system... any problems > with throwing all > these in one directory? > > 2. To stop name clashing etc we rename the file to its ID > number in the > table so that "My Doc.pdf" become 1234 (the original name is > stored in the > DB). Plus we also store all the documents out of the web > root. To deliver > the file to the user we have deliver.php which sets some > headers then does a > readfile() on the file (if the user should be able to access > the file). My > problem is that this is a bit flakey (very client dependent) > and i would > like to some how set the filename for the file. Any ideas? I > currently use.. > > Header("Content-Disposition: inline; filename='$original_filename'"); > Header("Content-Description: Document Repository"); > Header("Content-type: $mimetype"); > $success = readfile($file); > > But this doesnt work all the time... and doesnt work at all > for PDF's. One > way to make this more reliable (and i've only tested various > MSIE 4 -5.x so > far) is to make the link contain a spurious get var like > deliver.php?id=1234&output=.xls this works more often than > not... any body > have any more success further than these ideas? > > 3. Are there any security traps here... im pretty sure that > by readfile() i > dont have to worry about people uploading a .php since it wont run via > readfile.. also since they are out of the webroot noone can > find the secret > dir a just grab em (i control the OS security) but any > securtiy holes i may > need to be concerned about? > > Also Nathanael im not sure what PUT does, im currently using > POST.. should i > be interested in PUT? > > mn > > > -----Original Message----- > From: Camelot, Nathanael (N.) [mailto:ncamelot@visteon.com] > Sent: Wednesday, September 27, 2000 11:44 PM > To: 'php-windows@lists.php.net' > Subject: Big question about databases... > > > Hi all, here I am with a big question : > On a Windows NT, Apache 1.3.12 & php4.01 intranet server, I > need to have > people upload files (pdf, xls, doc, jpeg...) (not more than > 1Mo. each one) > > What do you all think is better : > - Files are uploaded into a directory and I store > filenames, paths > ... in a database > - Files are uploaded into the database, via BLOBs ? > > I think about putting datas into a directory, knowing my > serveur isn't a > killing supercalculator... > Most of times the files will be downloaded, only a few people > will a have a > "PUT" right . > > Any answer would be appreciated. > > Nathanael > > "Artificial intelligence is nothing compared to natural stupidity" > Someone > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.windows (#2838) next »