Thread: php vs. ssi

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    poil
    Posts
    55
    Rep Power
    15
    i want to know what is faster and what takes up less computer power?
    if i put an image into mysql will it load faster?
    this is probably a debate for the ages, there is no real reason. i just want to know the facts. maybe there are other place on the web you could point me to? thanks.
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    Are you sure you know SSI is and what does it do at all?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Washington, USA
    Posts
    52
    Rep Power
    15
    Yeah, I'm kinda missing the SSI reference here myself

    If you have to open a picture that is stored in a mySQL database that would not be as efficient (nor fast) as referencing the picture in the file structure through normal <IMG TAG> call. Databases aren't as effective when acting as file storage systems, they are better used for relational comparison and access of large amounts of information where using a flat file system would be antiquated.

    Would probably be more effective to store the location of the picture in the normal file system, query the database and fetch through normal methods if you really wanted to use a mySQL db. With all this said, you *can* of course store binary files in mySQL.


    ------------------
    <UL TYPE=SQUARE>
    <LI> TD Scripts
    <LI> Script School
    <LI>php-scripts
    </UL>
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    poil
    Posts
    55
    Rep Power
    15
    sorry about now fully explaing myself. i was kind of in a rush to go to lunch. speed wise as in inlcuding stuff on a shtml page or including stuff on a php page. i would assume that it would be about the same speed. but does using php take less computer power than doing it via ssi? i hope i am getting my question across.

    [This message has been edited by poil11 (edited August 24, 2000).]
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Washington, USA
    Posts
    52
    Rep Power
    15
    Using PHP is more efficient than using SSI because SSI is still forking a separate CGI process where PHP is not (unless PHP is compiled as a CGI and then it is basically a wash vs. Perl CGI with PHP being a little faster since the source for PHP is smaller than Perl)


    ------------------
    <UL TYPE=SQUARE>
    <LI> TD Scripts
    <LI> Script School
    <LI>php-scripts
    </UL>
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    poil
    Posts
    55
    Rep Power
    15
    well it was a two part question, both being not related. (about puting images into a mysql datase)
  12. #7
  13. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,648
    Rep Power
    4493
    I don't see any reason to put image data into mysql. I think it's easier to just store a line of text with the path to the image, and then reference that.

    <img src="<?php echo $path_to_image; ?>">

    ---John Holmes...

Similar Threads

  1. Replies: 2
    Last Post: August 18th, 2004, 11:45 PM
  2. PHP with UnixODBC
    By coder4hire in forum PHP Development
    Replies: 2
    Last Post: January 20th, 2004, 02:14 PM
  3. Free Hosting 100 MB, PHP, CGI, SSI, File Manager
    By idleserv in forum Free Web Hosting
    Replies: 1
    Last Post: January 18th, 2004, 09:12 PM
  4. Passing string from PHP to Javascript
    By ka8oad in forum JavaScript Development
    Replies: 4
    Last Post: January 17th, 2004, 04:12 PM
  5. UnixODBC + PHP + Apache + Empress
    By coder4hire in forum Database Management
    Replies: 0
    Last Post: January 15th, 2004, 02:41 PM

IMN logo majestic logo threadwatch logo seochat tools logo