Re: [PHP] Re: how to display images stored in DB

2007-03-04 Thread Roman Neuhauser
# martin@bugs.unl.edu.ar / 2007-03-03 09:18:08 -0300: We have a system (I didn't work on it, just maintaining it) that has about 1100 images in a directory. I think we aren't seen any problems just because it's on a 64bit system. You should test that assumption. -- How many Vietnam vets

Re: [PHP] Re: how to display images stored in DB

2007-03-03 Thread Martin Marques
steve wrote: As a newbie, is storing an image in a dB a good thing or a bad thing? I tend to go with depends. We actually store files in a DB in development, as those machines are separate from the grid. Since some are windows, linux, and MacOS, it is far easier to store in a DB than have

Re: [PHP] Re: how to display images stored in DB*

2007-03-03 Thread markw
On Fri, 2007-03-02 at 22:53 -0500, markw@mohawksoft.com wrote: On Fri, 2007-03-02 at 17:31 -0500, markw@mohawksoft.com wrote: Your claim is that in ALL cases using a file system to store images is preferable to using a database. As such, you claim that using a dB for storing images is

Re: [PHP] Re: how to display images stored in DB*

2007-03-03 Thread Robert Cummings
On Sat, 2007-03-03 at 08:22 -0500, markw@mohawksoft.com wrote: On Fri, 2007-03-02 at 22:53 -0500, markw@mohawksoft.com wrote: On Fri, 2007-03-02 at 17:31 -0500, markw@mohawksoft.com wrote: Your claim is that in ALL cases using a file system to store images is preferable to using a

Re: [PHP] Re: how to display images stored in DB**

2007-03-03 Thread tedd
At 10:01 AM -0500 3/1/07, markw@mohawksoft.com wrote: tedd said: Well... it's not just me, but from what I've learned and read over the years. Your claim is that in ALL cases using a file system to store images is preferable to using a database. As such, you claim that using a dB

Re: [PHP] Re: how to display images stored in DB

2007-03-03 Thread steve
Also, when you hit the 1024 image limit you have to think about directory schema to store the images, as the linux filesystem (and also on other 32 bit systems) will start getting slow, until things like ls will just give you an error. We have a system (I didn't work on it, just maintaining it)

Re: [PHP] Re: how to display images stored in DB

2007-03-02 Thread Robert Cummings
On Thu, 2007-03-01 at 19:42 -0500, markw@mohawksoft.com wrote: On Thu, 2007-03-01 at 21:08 +0100, Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-03-01 12:46:09 -0500: At 10:01 AM -0500 3/1/07, markw@mohawksoft.com wrote: In this discussion I have stated reasons why it is a bad idea.

RE: [PHP] Re: how to display images stored in DB

2007-03-02 Thread Tim
I highly recommend a dark ale or two to bring down the core temperature :) Amen! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: how to display images stored in DB

2007-03-02 Thread tedd
At 5:24 PM -0600 3/1/07, Richard Lynch wrote: On Wed, February 28, 2007 6:41 pm, Robert Cummings wrote: What about when you need to share those files across a 50 node network? I'd keep it in a database, then when I need it cache a local copy on the filesystem. Then I can just check the

RE: [PHP] Re: how to display images stored in DB

2007-03-02 Thread markw
I highly recommend a dark ale or two to bring down the core temperature :) A good Zinfendel, sit back and relax. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: how to display images stored in DB

2007-03-02 Thread Robert Cummings
On Fri, 2007-03-02 at 11:01 -0500, markw@mohawksoft.com wrote: I'm going to mostly skip your drivel... and cut straight to a short comment and an example proving the invalidity of your general argument that the filesystem is always a better place to store image content. There we go... you only

Re: [PHP] Re: how to display images stored in DB*

2007-03-02 Thread tedd
At 10:01 AM -0500 3/1/07, markw@mohawksoft.com wrote: If you are open to honestly consider, then I shall provide a couple of examples. But if I do and you do not agree, then your only recourse will be to *prove* otherwise. So, what say you? Absolutely, I'm all about computer science.

Re: [PHP] Re: how to display images stored in DB

2007-03-02 Thread steve
Not in my environment. All db servers have RAID 10 over 8 SCSI 15K disks. Pulling from them is always faster than a webserver pulling from its SATA drive. That's not exactly an apples to apples comparison. That is true, and sort of the point. However, the whole thing started because

Re: [PHP] Re: how to display images stored in DB*

2007-03-02 Thread Brad Bonkoski
snip... For the record, I will *never* say one size fits all in the realm of computer programming... Consideration 2 If your project is to supply images across several web servers on different host, then you are caught in a sync problem. Images stored in a file system must be stored on a

Re: [PHP] Re: how to display images stored in DB

2007-03-02 Thread tedd
At 10:28 AM -0800 3/2/07, steve wrote: Putting the files in the DB doesn't always remove extra cleanup/management stuff. Sometimes the database stores binary objects as files and sometimes they don't get deleted correctly. I'm dying to know what database you are using that puts every blob in a

Re: [PHP] Re: how to display images stored in DB*

2007-03-02 Thread Robert Cummings
On Fri, 2007-03-02 at 13:49 -0500, Brad Bonkoski wrote: Overall this has been a cool and interesting thread. For the most part, I would say I side with Mark, but again the fatal flaw appears to be the insistence that one approach is right in 100% of the time...which 99% of the time is

Re: [PHP] Re: how to display images stored in DB

2007-03-02 Thread Børge Holen
On Thursday 01 March 2007 22:24, Richard Lynch wrote: I have reflected upon this thread for awhile now. I believe that the only new thing I have to add is for newbies. I believe that for a newbie, it would be easier to use the filesystem rather than the DB. THAT on the other hand is BS! not

Re: [PHP] Re: how to display images stored in DB

2007-03-02 Thread Børge Holen
On Friday 02 March 2007 14:48, tedd wrote: At 5:24 PM -0600 3/1/07, Richard Lynch wrote: On Wed, February 28, 2007 6:41 pm, Robert Cummings wrote: What about when you need to share those files across a 50 node network? I'd keep it in a database, then when I need it cache a local copy on

Re: [PHP] Re: how to display images stored in DB*

2007-03-02 Thread tedd
At 1:49 PM -0500 3/2/07, Brad Bonkoski wrote: Overall this has been a cool and interesting thread. For the most part, I would say I side with Mark, but again the fatal flaw appears to be the insistence that one approach is right in 100% of the time...which 99% of the time is false. -B

Re: [PHP] Re: how to display images stored in DB

2007-03-02 Thread tedd
At 7:52 PM +0100 3/2/07, Børge Holen wrote: On Thursday 01 March 2007 22:24, Richard Lynch wrote: I believe that for a newbie, it would be easier to use the filesystem rather than the DB. THAT on the other hand is BS! not to jerk around with you, but no and HELL no. Storing in the

Re: [PHP] Re: how to display images stored in DB

2007-03-02 Thread Børge Holen
On Friday 02 March 2007 21:13, tedd wrote: At 7:52 PM +0100 3/2/07, Børge Holen wrote: On Thursday 01 March 2007 22:24, Richard Lynch wrote: I believe that for a newbie, it would be easier to use the filesystem rather than the DB. THAT on the other hand is BS! not to jerk around with

Re: [PHP] Re: how to display images stored in DB

2007-03-02 Thread steve
But storing them in the DB invariably ends up with too many issues involving DB storage size and query buffer size, compounded by data escaping/security issues. This on the other hand... I'm a newbie, whatever your saying, BUT and it is a big one; The data has to be escaped anyway, the binary

Re: [PHP] Re: how to display images stored in DB*

2007-03-02 Thread markw
At 10:01 AM -0500 3/1/07, markw@mohawksoft.com wrote: If you are open to honestly consider, then I shall provide a couple of examples. But if I do and you do not agree, then your only recourse will be to *prove* otherwise. So, what say you? Absolutely, I'm all about computer science.

Re: [PHP] Re: how to display images stored in DB

2007-03-02 Thread markw
Not in my environment. All db servers have RAID 10 over 8 SCSI 15K disks. Pulling from them is always faster than a webserver pulling from its SATA drive. That's not exactly an apples to apples comparison. That is true, and sort of the point. Not really, anything that you provide for

Re: [PHP] Re: how to display images stored in DB*

2007-03-02 Thread steve
It is funny, but most people don't get the fact that SQL databases are not the best way to store data. They are designed to select algebraic relationships from a data set. They are designed to ensure accuracy of the relationships and the integrity of the data. Like blobs in separate files, this

Re: [PHP] Re: how to display images stored in DB

2007-03-02 Thread steve
I'm making assumptions about the layout again. The database will likely already have the table files opened, but will need a seek to get the data. The webserver will have to do an additional seek (I was assuming on a far slower drive system, and likely twice for stat and read). I'm not sure

Re: [PHP] Re: how to display images stored in DB

2007-03-02 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-03-02 21:37:48 +0100: However... 6000 small files (and a sub if obliged) I cannot see one heck of a good reason NOT to hold storage in a database... Imagine the rotten backup cyclus. I cannot imagine it. What was the problem? -- How many Vietnam vets does it

Re: [PHP] Re: how to display images stored in DB

2007-03-02 Thread Børge Holen
On Saturday 03 March 2007 00:00, Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-03-02 21:37:48 +0100: However... 6000 small files (and a sub if obliged) I cannot see one heck of a good reason NOT to hold storage in a database... Imagine the rotten backup cyclus. I cannot imagine it.

Re: [PHP] Re: how to display images stored in DB

2007-03-02 Thread markw
I'm making assumptions about the layout again. The database will likely already have the table files opened, but will need a seek to get the data. The webserver will have to do an additional seek (I was assuming on a far slower drive system, and likely twice for stat and read). I'm not

Re: [PHP] Re: how to display images stored in DB*

2007-03-02 Thread markw
It is funny, but most people don't get the fact that SQL databases are not the best way to store data. They are designed to select algebraic relationships from a data set. They are designed to ensure accuracy of the relationships and the integrity of the data. Like blobs in separate files,

Re: [PHP] Re: how to display images stored in DB*

2007-03-02 Thread Robert Cummings
On Fri, 2007-03-02 at 17:31 -0500, markw@mohawksoft.com wrote: Your claim is that in ALL cases using a file system to store images is preferable to using a database. As such, you claim that using a dB for storing images is bad practice. That is fairly close to my professional opinion,

Re: [PHP] Re: how to display images stored in DB*

2007-03-02 Thread markw
On Fri, 2007-03-02 at 17:31 -0500, markw@mohawksoft.com wrote: Your claim is that in ALL cases using a file system to store images is preferable to using a database. As such, you claim that using a dB for storing images is bad practice. That is fairly close to my professional opinion,

Re: [PHP] Re: how to display images stored in DB*

2007-03-02 Thread Robert Cummings
On Fri, 2007-03-02 at 22:53 -0500, markw@mohawksoft.com wrote: On Fri, 2007-03-02 at 17:31 -0500, markw@mohawksoft.com wrote: Your claim is that in ALL cases using a file system to store images is preferable to using a database. As such, you claim that using a dB for storing images is

Re: [PHP] Re: how to display images stored in DB

2007-03-01 Thread markw
On Wed, 2007-02-28 at 22:08 -0500, markw@mohawksoft.com wrote: On Wed, 2007-02-28 at 17:04 -0500, Mark wrote: Kevin Waterson wrote: This one time, at band camp, zerof [EMAIL PROTECTED] wrote: It is not a good practice to store pictures in DataBases, use links, instead of.

Re: [PHP] Re: how to display images stored in DB

2007-03-01 Thread markw
The web browser sees an image as a single HTTP request. Invoking the PHP script engine, parsing the script, and executing a SQL query to retrieve the image from the database is less efficient than letting the web server just send the file. In a simple setup, that is probably

Re: [PHP] Re: how to display images stored in DB

2007-03-01 Thread tedd
At 5:04 PM -0500 2/28/07, Mark wrote: Images are typically best supported in the form of files. They are more easily manipulated by external tools. -snip- I could go on, but it should be clear enough that putting images in a database is not a good idea. It's clear enough to me that it's not a

Re: [PHP] Re: how to display images stored in DB

2007-03-01 Thread markw
At 5:04 PM -0500 2/28/07, Mark wrote: Images are typically best supported in the form of files. They are more easily manipulated by external tools. -snip- I could go on, but it should be clear enough that putting images in a database is not a good idea. It's clear enough to me that it's not a

Re: [PHP] Re: how to display images stored in DB

2007-03-01 Thread Jack Gleeson
Rubbish, where are your benchmarks? ^^ whoever wrote that needs to check the manual before you make bold statements and my friend it is not 'Rubbish' On 2/28/07, Richard Lynch [EMAIL PROTECTED] wrote: On Tue, February 27, 2007 8:03 pm, Kevin Waterson wrote: This one time, at band camp,

Re: [PHP] Re: how to display images stored in DB

2007-03-01 Thread jgodish
Information on image storage in DB's http://www.webmasterworld.com/forum88/9091.htm Quoting markw@mohawksoft.com: The web browser sees an image as a single HTTP request. Invoking the PHP script engine, parsing the script, and executing a SQL query to retrieve the image from the

Re: [PHP] Re: how to display images stored in DB

2007-03-01 Thread tedd
At 10:01 AM -0500 3/1/07, markw@mohawksoft.com wrote: In this discussion I have stated reasons why it is a bad idea. No one has come up with a counter point which can only be served by a database and thus proves me wrong. I think that says something. Contradiction is not a sign of falsity,

Re: [PHP] Re: how to display images stored in DB

2007-03-01 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-03-01 12:46:09 -0500: At 10:01 AM -0500 3/1/07, markw@mohawksoft.com wrote: In this discussion I have stated reasons why it is a bad idea. No one has come up with a counter point which can only be served by a database and thus proves me wrong. I think that says

Re: [PHP] Re: how to display images stored in DB

2007-03-01 Thread Robert Cummings
On Thu, 2007-03-01 at 21:08 +0100, Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-03-01 12:46:09 -0500: At 10:01 AM -0500 3/1/07, markw@mohawksoft.com wrote: In this discussion I have stated reasons why it is a bad idea. No one has come up with a counter point which can only be served by

Re: [PHP] Re: how to display images stored in DB

2007-03-01 Thread Richard Lynch
I have reflected upon this thread for awhile now. I believe that the only new thing I have to add is for newbies. I believe that for a newbie, it would be easier to use the filesystem rather than the DB. True, you then have to do some extra cleanup/management work for deleted records, so that

Re: [PHP] Re: how to display images stored in DB

2007-03-01 Thread Richard Lynch
On Wed, February 28, 2007 4:04 pm, Mark wrote: Kevin Waterson wrote: This one time, at band camp, zerof [EMAIL PROTECTED] wrote: It is not a good practice to store pictures in DataBases, use links, instead of. Rubbish, where are your benchmarks? It has almost nothing to do with

Re: [PHP] Re: how to display images stored in DB

2007-03-01 Thread Richard Lynch
On Wed, February 28, 2007 6:41 pm, Robert Cummings wrote: What about when you need to share those files across a 50 node network? I'd keep it in a database, then when I need it cache a local copy on the filesystem. Then I can just check the timestamp in the database to see if the file has

Re: [PHP] Re: how to display images stored in DB

2007-03-01 Thread markw
On Thu, 2007-03-01 at 21:08 +0100, Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-03-01 12:46:09 -0500: At 10:01 AM -0500 3/1/07, markw@mohawksoft.com wrote: In this discussion I have stated reasons why it is a bad idea. No one has come up with a counter point which can only be served

Re: [PHP] Re: how to display images stored in DB

2007-03-01 Thread steve
To follow up with Ted, nobody said using the filesystem is bad, No, it is the most efficient way. Not in my environment. All db servers have RAID 10 over 8 SCSI 15K disks. Pulling from them is always faster than a webserver pulling from its SATA drive. Also, there is issue of going to the

Re: [PHP] Re: how to display images stored in DB

2007-03-01 Thread markw
To follow up with Ted, nobody said using the filesystem is bad, No, it is the most efficient way. Not in my environment. All db servers have RAID 10 over 8 SCSI 15K disks. Pulling from them is always faster than a webserver pulling from its SATA drive. That's not exactly an apples to

Re: [PHP] Re: how to display images stored in DB

2007-02-28 Thread Richard Lynch
On Tue, February 27, 2007 8:03 pm, Kevin Waterson wrote: This one time, at band camp, Richard Lynch [EMAIL PROTECTED] wrote: *ALL* of the arguments on this topic, and benchmarks, are in the PHP General archives. I am not concerned with past benchmarks done by others, I am asking what

Re: [PHP] Re: how to display images stored in DB

2007-02-28 Thread Mark
Kevin Waterson wrote: This one time, at band camp, zerof [EMAIL PROTECTED] wrote: It is not a good practice to store pictures in DataBases, use links, instead of. Rubbish, where are your benchmarks? It has almost nothing to do with benchmarks. Images are typically best supported in the

Re: [PHP] Re: how to display images stored in DB

2007-02-28 Thread Robert Cummings
On Wed, 2007-02-28 at 17:04 -0500, Mark wrote: Kevin Waterson wrote: This one time, at band camp, zerof [EMAIL PROTECTED] wrote: It is not a good practice to store pictures in DataBases, use links, instead of. Rubbish, where are your benchmarks? It has almost nothing to do with

Re: [PHP] Re: how to display images stored in DB

2007-02-28 Thread markw
On Wed, 2007-02-28 at 17:04 -0500, Mark wrote: Kevin Waterson wrote: This one time, at band camp, zerof [EMAIL PROTECTED] wrote: It is not a good practice to store pictures in DataBases, use links, instead of. Rubbish, where are your benchmarks? It has almost nothing to do with

Re: [PHP] Re: how to display images stored in DB

2007-02-28 Thread Robert Cummings
On Wed, 2007-02-28 at 22:08 -0500, markw@mohawksoft.com wrote: On Wed, 2007-02-28 at 17:04 -0500, Mark wrote: Kevin Waterson wrote: This one time, at band camp, zerof [EMAIL PROTECTED] wrote: It is not a good practice to store pictures in DataBases, use links, instead of.

Re: [PHP] Re: how to display images stored in DB

2007-02-28 Thread steve
The web browser sees an image as a single HTTP request. Invoking the PHP script engine, parsing the script, and executing a SQL query to retrieve the image from the database is less efficient than letting the web server just send the file. In a simple setup, that is probably true.

Re: [PHP] Re: how to display images stored in DB

2007-02-27 Thread Richard Lynch
On Sun, February 25, 2007 8:27 pm, Kevin Waterson wrote: This one time, at band camp, zerof [EMAIL PROTECTED] wrote: It is not a good practice to store pictures in DataBases, use links, instead of. Rubbish, where are your benchmarks? In the archives. Unless your images are teeny-tiny and

Re: [PHP] Re: how to display images stored in DB

2007-02-27 Thread Kevin Waterson
This one time, at band camp, Richard Lynch [EMAIL PROTECTED] wrote: *ALL* of the arguments on this topic, and benchmarks, are in the PHP General archives. I am not concerned with past benchmarks done by others, I am asking what current benchmarks this user has made to make his claim. Kevin --

[PHP] Re: how to display images stored in DB

2007-02-25 Thread zerof
Alain Roger escreveu: Hi, i stored all my pictures in my PostgreSQL DB as bytea type. Now i would like to know how can i display them in my PHP pages ? where can i find some example ? thanks a lot, -- It is not a good practice to store pictures in DataBases, use links,

Re: [PHP] Re: how to display images stored in DB

2007-02-25 Thread Dave Goodchild
On 2/25/07, zerof [EMAIL PROTECTED] wrote: Alain Roger escreveu: Hi, i stored all my pictures in my PostgreSQL DB as bytea type. Now i would like to know how can i display them in my PHP pages ? where can i find some example ? thanks a lot, -- It is not a good practice

[PHP] Re: how to display images stored in DB

2007-02-25 Thread tedd
At 3:53 PM -0300 2/25/07, zerof wrote: Alain Roger escreveu: Hi, i stored all my pictures in my PostgreSQL DB as bytea type. Now i would like to know how can i display them in my PHP pages ? where can i find some example ? thanks a lot, -- It is not a good practice to store

Re: [PHP] Re: how to display images stored in DB

2007-02-25 Thread Kevin Waterson
This one time, at band camp, zerof [EMAIL PROTECTED] wrote: It is not a good practice to store pictures in DataBases, use links, instead of. Rubbish, where are your benchmarks? kevin -- Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb

[PHP] Re: How to display all keys in a multi-dim array?

2004-05-23 Thread Torsten Roehr
Richard Davey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, I am trying to work out how to display all of the keys in a multi-dimensional array (not their values). For example: $array = array(); $array['a'] = 1; $array['a']['b'] = 2; $array['a']['b']['c'] = 3;

Re: [PHP] Re: How to display all keys in a multi-dim array?

2004-05-23 Thread Richard Davey
Hello Torsten, Sunday, May 23, 2004, 6:44:08 PM, you wrote: $array = array(); $array['a'] = 1; $array['a']['b'] = 2; $array['a']['b']['c'] = 3; $array['a']['b']['c']['d'] = 4; TR Could you describe a bit more in detail what you mean with based on search TR result for 4? I know that 4 is a

Re: [PHP] Re: How to display all keys in a multi-dim array?

2004-05-23 Thread Torsten Roehr
Richard Davey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello Torsten, Sunday, May 23, 2004, 6:44:08 PM, you wrote: $array = array(); $array['a'] = 1; $array['a']['b'] = 2; $array['a']['b']['c'] = 3; $array['a']['b']['c']['d'] = 4; TR Could you describe a bit more

[PHP] Re: how to display a font with two words???

2004-01-13 Thread DvDmanDT
Rename the font... I think that's the only solution... -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Matt Hedges [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Howdy, I'm trying to specify font face=Monotype Corsiva in my php document... but can't b/c it's

[PHP] Re: how to display a font with two words???

2004-01-13 Thread Matt Hedges
you can use single quotes ' ' (I didn't think it would work, but it does) around the font. matt Matt Hedges [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Howdy, I'm trying to specify font face=Monotype Corsiva in my php document... but can't b/c it's two words... if it was html

[PHP] Re: how to display a font with two words???

2004-01-13 Thread DvDmanDT
I just realized my misstake.. In GD you can't, in HTML it's possible.. Read the other ppls replies.. -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Dvdmandt [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Rename the font... I think that's the only solution...

[PHP] Re: How to display?

2003-08-11 Thread rush
Here is small example on how to do it with PHP MySQL and TemplateTamer: http://www.templatetamer.org/index.php?SimpleMySqlRowList rush -- http://www.templatetamer.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: how to display a file's last updated time using php?

2002-05-27 Thread Michael Virnstein
look here: http://www.php.net/manual/en/ref.filesystem.php and especially here: http://www.php.net/manual/en/function.filemtime.php Michael Rui Huang [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED]... Hi, friends, I want to display the last updated time of a file using php,

[PHP] Re: How to display one line from a file rather than the whole lot

2001-11-30 Thread Julio Nobrega Trabalhando
Dirty trick: ?php $line_I_want = '47'; // get a web page into an array and print it out $fcontents = file ('http://www.php.net'); while (list ($line_num, $line) = each ($fcontents)) { // echo bLine $line_num:/b . htmlspecialchars ($line) . br\n; if ($line_I_want == $line_num) {