NYCPHP Meetup

NYPHP.org

[nycphp-talk] photo album

please reply to "patterson@computer.org" billpatterson48 at netscape.net
Wed Dec 25 01:26:13 EST 2002


It would be better to keep a max-id in a central location.  Keep max-id in its own 1-row table and bump max-id everytime a new request comes in for a new-unique-file-name, then incorporate it in the file name returned.  The problem with an 8 digit random number is that at a very short time you will end up with a collision (the odds are not 1 in 10^8 that your system will experience a collision but are much less because each file id is competing with each other one).

Bill

"Francisco Marin" <dg_francisco at hotmail.com> wrote:

>One More Way to Handle Images which we used at my previous job:
>
>The form will upload the file and rename it as a random generated number ( I
>believe it was 8 digits long). There was a folder called images and then
>inside this folder there were 10 folders named 0 1 2 3 4 5 6 7 8 and 9. Once
>the image is renamed, the program looks at the last digit of the name and
>puts it in that directory. Obviously the name of the image was entered in
>the DB. It may sound a little bit complicated but once we set it up it was
>very easy to handle images since we had about 10000 images of Artists and CD
>covers.
>----- Original Message -----
>From: "Christopher Hendry" <chendry at nyc.rr.com>
>To: "NYPHP Talk" <talk at nyphp.org>
>Sent: Tuesday, December 24, 2002 7:48 AM
>Subject: RE: [nycphp-talk] photo album
>
>
>> yeah - call me a fool - but I'm not quite sure how to read phpinfo(), is
>it
>> in this line (ie, sparc?):
>>
>> SunOS no10 5.7 Generic_106541-08 sun4u sparc SUNW,UltraSPARC-IIi-Engine
>>
>> -> -----Original Message-----
>> -> From: Winston Churchill-Joell [mailto:winston at xylophage.com]
>> -> Sent: Tuesday, December 24, 2002 1:13 AM
>> -> To: NYPHP Talk
>> -> Subject: Re: [nycphp-talk] photo album
>> ->
>> ->
>> -> phpinfo();
>> ->
>> -> Will give you a full breakdown of the version and configuration of PHP
>> -> you're running, you're machine's OS and version as well as a multitude
>of
>> -> other useful information.
>> ->
>> -> On 12/23/02 11:08 PM, "Christopher Hendry" <chendry at nyc.rr.com> wrote:
>> ->
>> -> > site looks good, and the gallery looks great, nice and clean and good
>> -> > navigation.  However, I'm still just looking for the ability
>> -> to manipulate
>> -> > images - my latest (and greatest) problem is that the host
>> -> that my site is
>> -> > sitting on is on (get this) PHP4.0.3 - which does not allow
>> -> the previously
>> -> > mentioned gallery program to run (or configure) - so I'm
>> -> trying to get the
>> -> > netPBM library set up and just to use that to manipulate
>> -> images, but so far
>> -> > no luck - I know I'm on apache, and I think the software I'm
>> -> on is Tomcat
>> -> > (is that right???) - or maybe Sparc - can someone let me know
>> -> how to find
>> -> > out what software is running on my server.  I'm not very good
>> -> with Unix, so
>> -> > I'm not sure what I'm supposed to be doing with the netPBM
>> -> library ... can
>> -> > anyone out there help?
>> -> >
>> -> > Thanks all.  C
>> -> >
>> -> > -> -----Original Message-----
>> -> > -> From: Dan Horning [mailto:dan at dwc.to]
>> -> > -> Sent: Monday, December 23, 2002 10:09 PM
>> -> > -> To: NYPHP Talk
>> -> > -> Subject: RE: [nycphp-talk] photo album
>> -> > ->
>> -> > ->
>> -> > -> On the note of a photo gallery ..
>> -> > -> The gallery mentioned back a few messages ago .. It really does
>take
>> -> > -> care of everything.. Including controlling permissions if
>> -> you need to do
>> -> > -> so...
>> -> > -> If you want to see a site that's using the software
>> -> (integrated within a
>> -> > -> postnuke - a feature of the gallery) check out
>> -> > -> http://www.conwayentertainment.com/
>> -> > -> And I just added a small addition of being able to send an
>> -> ecard of any
>> -> > -> of the pictures with ecards (again a postnuke module set)
>> -> > ->
>> -> > -> From the Desk of:
>> -> > -> Dan Horning     Owner
>> -> > ->  Dsoundmn's Web Creations
>> -> > -> Dsoundmn's Web Creations
>> -> > -> PO Box 109 Clifton Park, NY 12065-0109
>> -> > -> Email: info at dwc.to
>> -> > -> ------
>> -> > -> Online on
>> -> > -> AIM - dsoundmn (or dsoundmn1 for emergencies)
>> -> > -> ICQ - 14308614
>> -> > -> MSN - dan at dwc.to
>> -> > -> YIM - dsoundmn
>> -> > ->
>> -> > ->
>> -> > ->
>> -> > ->
>> -> > ->
>> -> > ->
>> -> > ->
>> -> > ->
>> -> > ->
>> -> > ->
>> -> >
>> -> >
>> -> >
>> -> >
>> -> >
>> -> >
>> -> >
>> -> >
>> ->
>> ->
>> ->
>> ->
>> ->
>> ->
>>
>>
>>
>>
>> 
>>
>
>
>--- Unsubscribe at http://nyphp.org/list/ ---
>
>
>


-- 
[please send replies to "patterson at computer.org"]


__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/



More information about the talk mailing list