Loading ...
Sorry, an error occurred while loading the content.
 

blob display in PHP from Mysql

Expand Messages
  • Rajesh Fowkar
    Hi, I am trying to display a list of Thumbnails from a blob field of ... $sSql = select * from portfolio where city_id = $nCityId and category_id =
    Message 1 of 16 , Jan 1, 2003
      Hi,

      I am trying to display a list of Thumbnails from a blob field of
      MySQL table on a PHP page. My code is as follows :

      ------------------------------------------------------------------------
      $sSql = "select * from portfolio where city_id = '$nCityId' and
      category_id = '$nCategoryId' order by user_id";
      $lResult = mysql_query($sSql, $mysql_link);
      $nNumRows = mysql_num_rows($lResult);
      echo "<table width=80%>";
      for ( $nRow=0; $nRow < $nNumRows; $nRow++ )
      {
      $aAns = mysql_fetch_array($lResult);
      $nPortfolioId = $aAns["portfolio_id"];
      $sDescription = $aAns["description"];
      $pPicture = $aAns["picture"];
      $pThumbnail = $aAns["thumbnail"];

      echo "<tr><td width=30%>";
      echo "<a href='ViewDetails.html'>
      <img src='ShowThumbnail.php?pThumbnail=" . $pThumbnail .
      "' width=60 height=50></img></a>";
      echo "</td><td width=70%>";
      echo "$sDescription</td></tr>";
      }
      echo "</table>";
      ------------------------------------------------------------------------

      ShowThumbnail.php is as follows :
      ------------------------------------------------------------------------
      <?

      header(" Content-Type: image/jpg");
      header(" Content-Disposition: inline");

      echo $pThumbnail;

      ?>
      ------------------------------------------------------------------------

      ShowThumbnail.php is required since header data need to be passed.
      However the above code does not display the Thumbnail on the page. Can
      anybody find any bug in the above code.


      However if I try the following code :
      -----------------------------------------------------------------------
      <html>
      <head><title></title></head>
      <body>

      <img src='ShowThumbnail.php'>

      </body>
      </html>
      -----------------------------------------------------------------------

      Only difference here is that I am not passing any argument to
      ShowThumbnail.php and doing the thumbnail retrieving part in
      ShowThumbnail.php. But with this I can display only one Thumbnail. I
      want it in a loop like above. Can't I pass parameters like in my
      original code ?

      Any help will be very useful.

      Thanks in advance.

      Peace

      --
      Rajesh
      :
      ####[ GNU/Linux One Stanza Tip (LOST) ]#######################

      Sub : Deleting dot files LOST #163

      Doing a 'rm -f *' within a directory will remove all the files
      within the directory but NOT invisible DOT (.) files. You need
      to do a: '$rm .[A-Za-z0-9]*' # To delete DOT files

      ####<bish@...>####################################
      :
    • Dr Tarique Sani
      On Thu, 2 Jan 2003, Rajesh Fowkar wrote: Rajesh, ... Passing the entire image as a get variable will mess up the things due to the URL encoding plus remember
      Message 2 of 16 , Jan 1, 2003
        On Thu, 2 Jan 2003, Rajesh Fowkar wrote:

        Rajesh,

        > <img src='ShowThumbnail.php?pThumbnail=" . $pThumbnail .

        Passing the entire image as a get variable will mess up the things due to
        the URL encoding plus remember you will then be wasting some bandwith as
        Image data will be passed twice.

        Instead pass some ID and do the necessary processing in the
        ShowThumbnail.php file

        HTH

        Tarique

        --
        ===================================================================
        PHP Applications for E-Biz: http://www.sanisoft.com -o)
        /\\
        Indian PHP User Group: http://groups.yahoo.com/group/in-phpug _\_v
        ===================================================================
      • Rajesh Fowkar
        ... Thanks Dr. I did that too. In fact that was the first thing I tried. But it did not display any image. Hence tried the above stuff. ps.: I am subscribed to
        Message 3 of 16 , Jan 1, 2003
          On Thu, Jan 02, 2003 at 11:51:20AM +0530, Dr Tarique Sani wrote:

          >On Thu, 2 Jan 2003, Rajesh Fowkar wrote:
          >
          >Rajesh,
          >
          >> <img src='ShowThumbnail.php?pThumbnail=" . $pThumbnail .
          >
          >Passing the entire image as a get variable will mess up the things due to
          >the URL encoding plus remember you will then be wasting some bandwith as
          >Image data will be passed twice.
          >
          >Instead pass some ID and do the necessary processing in the
          >ShowThumbnail.php file

          Thanks Dr.

          I did that too. In fact that was the first thing I tried. But it did not
          display any image. Hence tried the above stuff.

          ps.: I am subscribed to the group, so don't cc me. Thank you.

          Peace

          --
          Rajesh
          :
          ####[ GNU/Linux One Stanza Tip (LOST) ]#######################

          Sub : Lesser known commands (w) LOST #209

          w displays information about users currently using the machine
          and their processes. The header shows, the current time, how
          long the system has been running, how many users are currently
          logged on, and the system load averages for the past 1, 5, and
          15 minutes.

          ####<bish@...>####################################
          :
        • Dr Tarique Sani
          ... If the get variable are creating problems even with the ID then check if the the variable is getting set inside the ShowThumbnail.php put something like
          Message 4 of 16 , Jan 2, 2003
            On Thu, 2 Jan 2003, Rajesh Fowkar wrote:

            > >Instead pass some ID and do the necessary processing in the
            > >ShowThumbnail.php file
            >
            > Thanks Dr.
            >
            > I did that too. In fact that was the first thing I tried. But it did not
            > display any image. Hence tried the above stuff.

            If the get variable are creating problems even with the ID then check if
            the the variable is getting set inside the ShowThumbnail.php

            put something like

            echo $ID;

            OR

            echo $_GET["ID"]; if register_globals = off

            If you are using an older version with register_globals off then use the
            $HTTP_GET_VARS

            If none of the above work put your code on a publicly accessible server
            and we will take it further from there

            HTH

            Tarique

            --
            ===================================================================
            PHP Applications for E-Biz: http://www.sanisoft.com -o)
            /\\
            Indian PHP User Group: http://groups.yahoo.com/group/in-phpug _\_v
            ===================================================================
          • Rajesh Fowkar
            ... The problem is solved after putting the header function at the top of ShowThumbnail.php. Earlier I had put it just before the echo command which was
            Message 5 of 16 , Jan 2, 2003
              On Thu, Jan 02, 2003 at 08:59:32PM +0530, Dr Tarique Sani wrote:

              >On Thu, 2 Jan 2003, Rajesh Fowkar wrote:
              >
              >> >Instead pass some ID and do the necessary processing in the
              >> >ShowThumbnail.php file
              >>
              >> Thanks Dr.
              >>
              >> I did that too. In fact that was the first thing I tried. But it did not
              >> display any image. Hence tried the above stuff.
              >
              >If the get variable are creating problems even with the ID then check if
              >the the variable is getting set inside the ShowThumbnail.php
              >

              The problem is solved after putting the header function at the top of
              ShowThumbnail.php. Earlier I had put it just before the echo command
              which was obviously wrong. Just a silly mistake.

              Peace

              --
              Rajesh
              :
              ####[ GNU/Linux One Stanza Tip (LOST) ]#######################

              Sub : bash keystrokes (#4) LOST #337

              C-l : clear screen [C = Ctrl key]
              C-_ : undo last action
              C-r : reverse search in history with completion as you type
              (even searches through different arguments)

              ####<gaurav@...>######################################
              :
            • Srinivasan Ramakrishnan
              I tend to agree with Tarique, your technique is very naive. I was scared out of my wits when I saw your code. Let me draw your attention to a few defects in
              Message 6 of 16 , Jan 6, 2003
                I tend to agree with Tarique, your technique is very naive. I was scared
                out of my wits when I saw your code.

                Let me draw your attention to a few defects in your line of thought:

                Technical:
                ----------
                *) RFC 2068 - HTTP 1.1

                <quote section=3.2.1 RFC=2068 href="http://www.faqs.org/rfcs/rfc2068.html">
                The HTTP protocol does not place any a priori limit on the length of
                a URI. Servers MUST be able to handle the URI of any resource they
                serve, and SHOULD be able to handle URIs of unbounded length if they
                provide GET-based forms that could generate such URIs. A server
                SHOULD return 414 (Request-URI Too Long) status if a URI is longer
                than the server can handle (see section 10.4.15).

                Note: Servers should be cautious about depending on URI lengths
                above 255 bytes, because some older client or proxy implementations
                may not properly support these lengths.
                </quote>

                *) Most versions of Internet Explorer have a well defined hard limit of
                2083 characters for the length of the URL.

                *) The Apache web server applies a compile-time constant max request
                line limit. As distributed, this limit is set to 8190 characters
                (including method and protocol). As of apache 1.3.2 and later, there is
                a config parameter in httpd.conf that allows site administrators to
                lower this limit. The limit cannot be raised, except at compile time.

                Elegance:
                ---------
                *) Do you really want to put your name behind a piece of code that will
                generate gobbledeegook URLs like this:
                http://foo.fowkar.com/ShowThumbnail.php?pThumbnail=~2$^7898........

                Design:
                -------
                *) Did you know that the best database for your binary files is probably
                the filesystem? I am yet to see a genuine use of blob datatypes that
                makes them worth the headache.


                Here is my prediction:
                a) You will befuddle most browsers, proxy servers and webservers with
                that piece of devlish code
                b) You will certainly have a user like me go hopping mad after taking a
                look at the code.
                c) HTTP encoding is going to ensure that even the smallest of files gets
                encoded into a monstrosity
                d) You will have higher bandwidth bills, each thumbnail is downloaded
                twice remember, ahemmm... more than twice, see above
                e) Your PHP code will be slow as hell pumping out all that data

                If you really need to use blobs, atleast use an image_id or so and
                reference it on the ShowThumbanil.php page like so.

                <img src='ShowThumbnail.php?pThumbnail_id=123'>

                My recommendation, get rid of blobs, start storing relative filenames,
                and let the webserver do the job of serving those image files from the
                file system eh....

                Also, don't ever think elegance of your solution is not important, that
                separates the true hackers from the code monkeys.

                I wonder why more people didn't find things wrong with this.

                -Srini


                Dr Tarique Sani wrote:
                > On Thu, 2 Jan 2003, Rajesh Fowkar wrote:
                >
                > Rajesh,
                >
                >
                >> <img src='ShowThumbnail.php?pThumbnail=" . $pThumbnail .
                >
                >
                > Passing the entire image as a get variable will mess up the things due to
                > the URL encoding plus remember you will then be wasting some bandwith as
                > Image data will be passed twice.
                >
                > Instead pass some ID and do the necessary processing in the
                > ShowThumbnail.php file
                >
                > HTH
                >
                > Tarique
                >
              • Srinivasan Ramakrishnan
                Tarique, I do want to point out that HTTP encoding in itself will not mess the code so as to make it inoperable. You will definitely see a different visual
                Message 7 of 16 , Jan 6, 2003
                  Tarique,

                  I do want to point out that HTTP encoding in itself will not mess the
                  code so as to make it inoperable. You will definitely see a different
                  visual appearance yes, but HTTP encoding in itself does work well.

                  Of course there are plenty of other reasons why this code won't work.

                  -Srini

                  Dr Tarique Sani wrote:
                  > On Thu, 2 Jan 2003, Rajesh Fowkar wrote:
                  >
                  > Rajesh,
                  >
                  >
                  >> <img src='ShowThumbnail.php?pThumbnail=" . $pThumbnail .
                  >
                  >
                  > Passing the entire image as a get variable will mess up the things due to
                  > the URL encoding plus remember you will then be wasting some bandwith as
                  > Image data will be passed twice.
                  >
                  > Instead pass some ID and do the necessary processing in the
                  > ShowThumbnail.php file
                  >
                  > HTH
                  >
                  > Tarique
                  >
                • Rajesh Fowkar
                  ... That is not the final code :-) I was just trying some stuff. You seem to have missed my followups to this thread. In fact I was trying passing the id of
                  Message 8 of 16 , Jan 7, 2003
                    On 07/01/03 at 01:22 - Srinivasan Ramakrishnan said :
                    >I tend to agree with Tarique, your technique is very naive. I was scared
                    >out of my wits when I saw your code.

                    That is not the final code :-) I was just trying some stuff.

                    You seem to have missed my followups to this thread. In fact I was trying
                    passing the id of the thumnail, but since that was not working I just tried
                    passing picture variable directly. My final aim though was to pass the id
                    to showthumbnail.php.

                    Due to my silly mistake it was not working. Now everything is working
                    alright. No problems.

                    >
                    >Let me draw your attention to a few defects in your line of thought:
                    >
                    >Technical:
                    >----------
                    >*) RFC 2068 - HTTP 1.1
                    >
                    ><quote section=3.2.1 RFC=2068 href="http://www.faqs.org/rfcs/rfc2068.html">
                    > The HTTP protocol does not place any a priori limit on the length of
                    > a URI. Servers MUST be able to handle the URI of any resource they
                    > serve, and SHOULD be able to handle URIs of unbounded length if they
                    > provide GET-based forms that could generate such URIs. A server
                    > SHOULD return 414 (Request-URI Too Long) status if a URI is longer
                    > than the server can handle (see section 10.4.15).
                    >
                    > Note: Servers should be cautious about depending on URI lengths
                    > above 255 bytes, because some older client or proxy implementations
                    > may not properly support these lengths.
                    ></quote>

                    Thanks for these details.

                    >Elegance:
                    >---------
                    >*) Do you really want to put your name behind a piece of code that will
                    >generate gobbledeegook URLs like this:
                    >http://foo.fowkar.com/ShowThumbnail.php?pThumbnail=~2$^7898........

                    You can also encode the stuff you pass isn't it ? That's what I am doing.
                    So no problems again.

                    >
                    >Design:
                    >-------
                    >*) Did you know that the best database for your binary files is probably
                    >the filesystem? I am yet to see a genuine use of blob datatypes that
                    >makes them worth the headache.

                    Requirement of the client. Cannot change.

                    >If you really need to use blobs, atleast use an image_id or so and
                    >reference it on the ShowThumbanil.php page like so.
                    >
                    ><img src='ShowThumbnail.php?pThumbnail_id=123'>

                    Replied above.

                    >
                    >I wonder why more people didn't find things wrong with this.

                    Because you have not read the followup mails.

                    Thanks for enlightening me about certain things.


                    Peace

                    --
                    Rajesh * rajesh-shriram@... * http://www.symonds.net/~rajesh/
                    Powered By : Debian GNU/Linux 3.0 (Woody) - [Kernel 2.4.18(ext3),Mutt 1.5.1i]
                    Felson's Law:
                    To steal ideas from one person is plagiarism; to steal from
                    many is research.
                  • Srinivasan Ramakrishnan
                    Hi, Glad to know you are using reference ids. BTW, have you tried convincng your client to not use blobs? Here are what I think are some good grounds for
                    Message 9 of 16 , Jan 7, 2003
                      Hi,

                      Glad to know you are using reference ids. BTW, have you tried convincng
                      your client to not use blobs?

                      Here are what I think are some good grounds for asking your client to
                      change their mind:

                      a)I see from your code that you were slapping a jpeg mime type. If the
                      project changed to include an image of a different file format like a
                      gif, or a png then you would have to change your code.

                      b) Slower than a filesystem.

                      c) You would fill up the number of connections to MySQL if a page with
                      lots of images started to load. Also there would be the start up time of
                      multiple instances of ShowThumbnail.php or such page.

                      d) On any active production server there will be a timeout for php
                      scripts, the default is 30 seconds I think, which will be too little for
                      a client with a slow connection, if they start loading lots of images.
                      The HTTP timeout is more forgiving, than the PHP timeout.

                      e) Blob types are more difficult to port across databases. Is your
                      client forever going to use MySQL?

                      f) Managing the filesystem is easier than managing a database

                      I'm sure if you give it some thought you will find more arguments. That
                      said, I'm incredibly curious to know why your client thinks BLOBs are
                      such a good idea in this particular case.

                      Cheers,
                      -Srini

                      Rajesh Fowkar wrote:
                      > On 07/01/03 at 01:22 - Srinivasan Ramakrishnan said :
                      >
                      >>I tend to agree with Tarique, your technique is very naive. I was scared
                      >>out of my wits when I saw your code.
                      >
                      >
                      > That is not the final code :-) I was just trying some stuff.
                      >
                      > You seem to have missed my followups to this thread. In fact I was trying
                      > passing the id of the thumnail, but since that was not working I just tried
                      > passing picture variable directly. My final aim though was to pass the id
                      > to showthumbnail.php.
                      >
                      > Due to my silly mistake it was not working. Now everything is working
                      > alright. No problems.

                      <snip>
                    • Rajesh Fowkar
                      ... Hi Srini, Just go through the thread on this same topic on php-db list. The thread was today itself. The subject line reads blob . Interesting thread.
                      Message 10 of 16 , Jan 8, 2003
                        On 08/01/03 at 00:47 - Srinivasan Ramakrishnan said :
                        >Hi,
                        >
                        >I'm sure if you give it some thought you will find more arguments. That
                        >said, I'm incredibly curious to know why your client thinks BLOBs are
                        >such a good idea in this particular case.

                        Hi Srini,

                        Just go through the thread on this same topic on php-db list. The thread
                        was today itself. The subject line reads 'blob'. Interesting thread.

                        Peace

                        --
                        Rajesh * rajesh-shriram@... * http://www.symonds.net/~rajesh/
                        Powered By : Debian GNU/Linux 3.0 (Woody) - [Kernel 2.4.18(ext3),Mutt 1.5.1i]
                        Love is like the measles; we all have to go through it.
                        -- Jerome K. Jerome
                      • Srinivasan Ramakrishnan
                        Hi Rajesh, Well, the only argument I could find there was that MySQL could be used as a convenient data store for uploaded files instead of tinkering around
                        Message 11 of 16 , Jan 9, 2003
                          Hi Rajesh,

                          Well, the only argument I could find there was that MySQL could be used
                          as a convenient data store for uploaded files instead of tinkering
                          around with the filesystem, and making it world readable, or even
                          granting access to apache.


                          I agree, it's a nice trick to be able to write files to the DB, and get
                          out of a sticky situation where you don't want to allow global write.


                          Is this your case? That you have a lot of images / files that are
                          uploaded, and you don't have write perms?

                          -Srini

                          Rajesh Fowkar wrote:
                          > On 08/01/03 at 00:47 - Srinivasan Ramakrishnan said :
                          >
                          >>Hi,
                          >>
                          >>I'm sure if you give it some thought you will find more arguments. That
                          >>said, I'm incredibly curious to know why your client thinks BLOBs are
                          >>such a good idea in this particular case.
                          >
                          >
                          > Hi Srini,
                          >
                          > Just go through the thread on this same topic on php-db list. The thread
                          > was today itself. The subject line reads 'blob'. Interesting thread.
                          >
                          > Peace
                          >
                          > --
                          > Rajesh * rajesh-shriram@... * http://www.symonds.net/~rajesh/
                          > Powered By : Debian GNU/Linux 3.0 (Woody) - [Kernel 2.4.18(ext3),Mutt 1.5.1i]
                          > Love is like the measles; we all have to go through it.
                          > -- Jerome K. Jerome
                        • Anand.H
                          Hello All, we are on a look out for PHP progarmmers, mail to mail.penguindia.com . Thank you, Anand --
                          Message 12 of 16 , Jan 9, 2003
                            Hello All,
                            we are on a look out for PHP progarmmers,
                            mail to "mail.penguindia.com".

                            Thank you,
                            Anand

                            --
                          • Sid Carter <sidcarter@symonds.net>
                            ... Hi, Ummm....Errr.....when I mail to mail.penguindia.com, the mail seems to bounce ......Am I doing something wrong here ? :D I was thinking there was
                            Message 13 of 16 , Jan 9, 2003
                              --- In in-phpug@yahoogroups.com, "Anand.H" <anand_123@f...> wrote:
                              > Hello All,
                              > we are on a look out for PHP progarmmers,
                              > mail to "mail.penguindia.com".

                              Hi,

                              Ummm....Errr.....when I mail to mail.penguindia.com, the mail seems to
                              bounce ......Am I doing something wrong here ? :D

                              I was thinking there was something wrong with the mail ID ;)

                              Regards
                              Sid
                            • Rajesh Fowkar
                              ... Say there is a site that allows people to upload their portfolios after registering. They are allowed to upload the picture too. In that case to avoid
                              Message 14 of 16 , Jan 9, 2003
                                On Thu, Jan 09, 2003 at 03:29:49AM -0500, Srinivasan Ramakrishnan wrote:

                                >Hi Rajesh,
                                >
                                >Well, the only argument I could find there was that MySQL could be used
                                >as a convenient data store for uploaded files instead of tinkering
                                >around with the filesystem, and making it world readable, or even
                                >granting access to apache.
                                >
                                >
                                >I agree, it's a nice trick to be able to write files to the DB, and get
                                >out of a sticky situation where you don't want to allow global write.
                                >
                                >
                                >Is this your case? That you have a lot of images / files that are
                                >uploaded, and you don't have write perms?

                                Say there is a site that allows people to upload their portfolios after
                                registering. They are allowed to upload the picture too. In that case to
                                avoid filename conflicts storing in db is convinient.

                                Peace

                                --
                                Rajesh
                                :
                                ####[ GNU/Linux One Stanza Tip (LOST) ]#######################

                                Sub : Blocking pings to your server/ box LOST #301

                                This is dependent upon the setting at /proc/sys/net/ipv4/icmp_
                                echo_ignore_all. A "0" value blocks and "1" allows. viz:
                                '#echo "0" > /proc/sys/net/ipv4/icmp_echo_ignore_all' [Block]
                                '#echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all' [Allow]

                                ####<bish@...>####################################
                                :
                              • Anand.H.Reddy
                                Hello, The email id is fine , There is no problem with it , plz do check again , the MAIL DOMAIN is PENGUINDIA.COM(MAIL@PENGUINDIA.COM) Bye On Thu, 09 Jan 2003
                                Message 15 of 16 , Jan 9, 2003
                                  Hello,
                                  The email id is fine , There is no problem with it , plz do check
                                  again ,

                                  the MAIL DOMAIN is PENGUINDIA.COM(MAIL@...)
                                  Bye


                                  On Thu, 09 Jan 2003 09:26:04 -0000, "Sid Carter <sidcarter@...>"
                                  <sidcarter@...> said:
                                  > --- In in-phpug@yahoogroups.com, "Anand.H" <anand_123@f...> wrote:
                                  > > Hello All,
                                  > > we are on a look out for PHP progarmmers,
                                  > > mail to "mail.penguindia.com".
                                  >
                                  > Hi,
                                  >
                                  > Ummm....Errr.....when I mail to mail.penguindia.com, the mail seems to
                                  > bounce ......Am I doing something wrong here ? :D
                                  >
                                  > I was thinking there was something wrong with the mail ID ;)
                                  >
                                  > Regards
                                  > Sid
                                  >
                                  >
                                  >
                                  > Read Posting Guidelines at
                                  > http://groups.yahoo.com/group/in-phpug/files/guidelines.html
                                  > To unsubscribe from this group, send an email to:
                                  > in-phpug-unsubscribe@yahoogroups.com
                                  >
                                  >
                                  >
                                  > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                                  >
                                  >
                                  >

                                  --
                                  http://fastmail.fm - Email service worth paying for. Try it for free
                                • Srinivasan Ramakrishnan
                                  Yup, not just file name conflicts, but also tricky filenames.... like a&b.jpg is a valid windows file can but can throw any *nix for a spin. I typically store
                                  Message 16 of 16 , Jan 9, 2003
                                    Yup, not just file name conflicts, but also tricky filenames.... like
                                    a&b.jpg is a valid windows file can but can throw any *nix for a spin.

                                    I typically store the filenames in a DB field, and store the file in the
                                    FS with a primary key or by some numerical convetion, with a valid
                                    extension pinned to it. Did something exactly like this last week,
                                    works like a charm.

                                    -Srini


                                    Rajesh Fowkar wrote:
                                    > On Thu, Jan 09, 2003 at 03:29:49AM -0500, Srinivasan Ramakrishnan wrote:
                                    >
                                    >
                                    >>Hi Rajesh,
                                    >>
                                    >>Well, the only argument I could find there was that MySQL could be used
                                    >>as a convenient data store for uploaded files instead of tinkering
                                    >>around with the filesystem, and making it world readable, or even
                                    >>granting access to apache.
                                    >>
                                    >>
                                    >>I agree, it's a nice trick to be able to write files to the DB, and get
                                    >>out of a sticky situation where you don't want to allow global write.
                                    >>
                                    >>
                                    >>Is this your case? That you have a lot of images / files that are
                                    >>uploaded, and you don't have write perms?
                                    >
                                    >
                                    > Say there is a site that allows people to upload their portfolios after
                                    > registering. They are allowed to upload the picture too. In that case to
                                    > avoid filename conflicts storing in db is convinient.
                                    >
                                    > Peace
                                    >
                                    > --
                                    > Rajesh
                                    > :
                                    > ####[ GNU/Linux One Stanza Tip (LOST) ]#######################
                                    >
                                    > Sub : Blocking pings to your server/ box LOST #301
                                    >
                                    > This is dependent upon the setting at /proc/sys/net/ipv4/icmp_
                                    > echo_ignore_all. A "0" value blocks and "1" allows. viz:
                                    > '#echo "0" > /proc/sys/net/ipv4/icmp_echo_ignore_all' [Block]
                                    > '#echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all' [Allow]
                                    >
                                    > ####<bish@...>####################################
                                    > :
                                  Your message has been successfully submitted and would be delivered to recipients shortly.