Re: PHP in html



..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.

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.

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

?

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 ...

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.

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

Well, using SSI for a menu indicates that.

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
.



Relevant Pages

  • Re: [Full-disclosure] Arbitrary DDoS PoC
    ... make multiple requests for just one of your requests, ... its resources to flood the targets resources. ... Not trying to really argue your examples, I'm just saying his script and ... intensive script/page on that server. ...
    (Full-Disclosure)
  • Re: PHP in html
    ... additional calls to the server, ... to invoke a script handler for every single image. ... configuration of the webserver and the PHP interpreter. ... If you think interpreting all pages as PHP ...
    (comp.lang.php)
  • Re: How resource-intensive are these?
    ... > stringing together 8 smaller images. ... > month, because another little script of mine, BattleFishies ... > everything will come crashing down, with smoke coming out of the server ... requests in 1 second for example. ...
    (alt.php)
  • Re: cross-domain
    ... domain usually can't run your script on their server (who can't/won't afford ... I cannot view/spy/log the requests. ... Ajax Cross Domain can run over HTTPS or HTTP. ...
    (comp.lang.javascript)
  • Re: Steve Carroll: 116 hits in 3 days is a bit excessive
    ... I vaguely recall noticing a similar script / spider run hitting my ... But it's a crappy script as far as flooding goes - most requests ... that is set to download an entire web page. ... are HEAD requests, that doesn't stress the server at all, really. ...
    (comp.sys.mac.advocacy)