Re: PHP in html



Michael Fesser wrote:
.oO(Jerry Stuckle)

Of course, you conveniently ignore the fact those 20 images require 20 additional calls to the server, anyway.

Doesn't matter here. 20 requests are 20 requests, but it makes a big
difference if the server can deliver them statically as-is or if it has
to invoke a script handler for every single image.


Not nearly as much as you claim.

The script will already be in memory (if nothing else, the OS cache will have it),

Page-generating scripts can be cached as well, dependent on the
configuration of the webserver and the PHP interpreter.


Sure they can. But they still have to be interpreted unnecessarily.

and the overhead of interpreting it isn't very bad at all.

So you want to tell me that a simple page-generating script wastes more
resources then a script that has to

* open a connection to a database
* query the DB (requires to analyze and optimize the query)
* transfer binary data from the DB into the script
* close the connection
* transfer the data to the webserver

?


This isn't part of the discussion. There are other reasons for delivering images from the database.

And it beats trying to keep track of thousands (or tens of thousands) of files on the disk.

Doesn't matter here. We were talking about performance and "wasting a
hell of a lot" resources. If you think interpreting all pages as PHP
wastes that many resources, but fetching images from the DB does not,
then there must be something really wrong ...


If it doesn't matter, then why did you bring it up?

Not nearly as much as PHP.

Depends on the server configuration I would say. SSI requires a parser/
interpreter as well. And PHP running as a server module is quite fast.
The work that has to be done by the parsers is quite the same - they
just look for special directives in the HTML code.


You obviously don't understand how it works. The SSI parser is much smaller and much faster than the PHP parser.

But I didn't say I used SSI on all pages, either, did I?

Well, using SSI for a menu indicates that.


Sure, but I didn't say it was on every page, either.

They say URI's don't change. They don't say to interpret every page as PHP.

Again: This wasn't the point here. We were talking about leaving out
file extensions from a URL.

Micha

Exactly. They say don't change the URL. They don't say interpret every page as PHP. There are other ways to do it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.



Relevant Pages

  • mysqli error?
    ... I'm just setting up my php enviroment and I typed in a simple script ... # configuration directives that give the server its instructions. ...
    (comp.lang.php)
  • Re: How do we get there from here?
    ... >> executing on the server as a pre-processor. ... If there are client side versions of PHP, ... > name implies a static text file, is it different from a PHP script? ...
    (comp.databases.pick)
  • Re: PHP chmod Newbie Question
    ... How does the server keep ... how do I create user groups for chmod to recognize? ... CHMOD is for UNIX based servers, and the PHP chmod() ... edited or removed by the PHP script, and only read by the UNIX ...
    (comp.lang.php)
  • Re: Apache: limiting the execution place
    ... They want it so users can't use FTP, shell, or a CGI or PHP script to view, ... other users via shell, FTP, web server processes (such as PHP or CGI ...
    (Security-Basics)
  • Re: PHP on XP Setup HELP
    ... I am not running any kind of server from my house and just ... But when I rung the simplest of php ... you downloaded) must include an interpreter. ... the web server must pass on requests for your scripts to a PHP ...
    (comp.lang.php)