I've recently considered switching from mod_perl to mod_php because
mod_perl, unless configured with multiple servers/ports/IP addresses, serves
static HTML from mod_perl processes, which is grossly inefficient. Since I
do not think you should have to tamper so much with server configs to do web
development efficiently I'm considering mod_php instead. I need to know if
PHP handles this differently:
- Are static HTML requests handled through a normal HTTPD process rather
than a mod_php process?
- How does the memory/process compare for a similar script written in
mod_perl/mod_php? Is mod_php more efficient in its use of memory?
zaphod 5 1859
zaphod wrote: .., serves static HTML from mod_perl processes, which is grossly inefficient.
err..... are you sure it does?
It shouldn't!
Assuming a normal httpd configuration, your server should serve static
html directly and pass .pl through perl, .php through php.
I'm going by what I found on perl.apache.org which states that having
anything other than separate servers/ports/IPs for dealing with static
content is inefficient.
2metre wrote: zaphod wrote:
.., serves static HTML from mod_perl processes, which is grossly inefficient.
err..... are you sure it does?
It shouldn't!
Assuming a normal httpd configuration, your server should serve static html directly and pass .pl through perl, .php through php.
> - Are static HTML requests handled through a normal HTTPD process rather than a mod_php process?
Only when you specifically configure Apache to do that, as mentioned in the
PHP documentation, to hide the fact that it is a PHP script you can rename
it to HTML and with the right configuration of Apache it will handle it as a
PHP file.
On my ISP and also in my Fedora Core 2 box default behaviour is that HTML
are treated as static (no embedded PHP is recognized) and only PHP files are
treated what they are. With AddHandler application/x-httpd-php .html .htm
..shtml in .htaccess you can change this behaviour. Wouldn't it be similar
with mod_pl?
--
René
comunica2.com
Web Hosting, design and translations
zaphod wrote: I'm going by what I found on perl.apache.org which states that having anything other than separate servers/ports/IPs for dealing with static content is inefficient.
2metre wrote:
zaphod wrote:
.., serves static HTML from mod_perl processes, which is grossly inefficient.
err..... are you sure it does?
It shouldn't!
Assuming a normal httpd configuration, your server should serve static html directly and pass .pl through perl, .php through php.
Could you give me the context where you read "grossly inefficient"?
If your site has no dynamic content whatsoever, then a very simple
server configuration without any additional modules will save memory and
CPU cycles. But if you do any processing then either perl or php modues
will be as efficient as you get. I also use compiled CGI (C and/or
pascal), but that requires loading a large executable into memory for
each page served and takes up far more disk space per executable.
2metre wrote: If your site has no dynamic content whatsoever, then a very simple server configuration without any additional modules will save memory and CPU cycles. But if you do any processing then either perl or php modues will be as efficient as you get. I also use compiled CGI (C and/or pascal), but that requires loading a large executable into memory for each page served and takes up far more disk space per executable.
For similar scripts would you say a mod_php httpd process is significantly
smaller than a mod_perl httpd process? Would statically compiled mod_perl
with mod_php DSO mean each httpd process had both mod_perl and mod_php
increasing the size of the process? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: yarmfelder |
last post by:
Hi all,
I noticed that with Slackware they don't include
mod_php in the latest distro. I also noticed some
talk on the web that there was an insecurity
issue with mod_php in a previous version of
Slackware.
So is this just a Slackware mishap or is there
a good reason to no longer permit PHP from
|
by: Prabhat |
last post by:
Hi All,
The "Session_OnStart" event doesnot fire if the website has .htm file as the
startup document. If I change the extension of the default document from
..htm to .asp then I can see the event fires, But now I cant change the
default page to .asp.
How can I make the Session_OnStart fire in that situation? Please suggest.
Thanks
|
by: howachen |
last post by:
hi,
which package you perfer?
mod_php on apache is okay but some people said fastcgi version of php
is faster, is it true?
thanks...
|
by: InvalidLastName |
last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example:
// javascript
if (a > b)
.....
// xsl contents
abc.aspx?p1=v1&p2=<xsl:value-of select="$v2" />
|
by: Vincent Delporte |
last post by:
Hello
I'm interested in hearing reflections by seasoned web app
developpers about the different ways to write PHP apps, and especially
how they compare in terms of performance, whether it's the PHP part or
connections to MySQL.
As far as I know, there are different ways to write a PHP application:
- CGI, ie. the usual way : some PHP code in web pages, and the PHP
interpreter is loaded each time a PHP page is called
| |
by: R.A.M. |
last post by:
Hello,
I am using Fedora 7 Moonshine Linux with Apache installed.
I have installed PHP5 using command: yum install php. Then I configured
httpd adding module mod_php.so to httpd.conf (and other necessary
operations). The problem is that when I am trying to start Apache using
command: httpd -k start, I receive error of missing mod_php.so. To solve
the problem, I downloaded mod_php.2.0.1.-9.s390.rpm and executed
command: rpm -i...
|
by: Evil Son |
last post by:
Hello group,
If I switched from mod_php to fast-cgi, would I need to make any
changes to my php source?
Also, will something like APC still be useful?
Will my database connections suddenly become persistent?
If I had static data in my script, will it persist when that same
|
by: setesting001 |
last post by:
How many of you are running Fast CGI instead of the popular mod_php?
I planning to change to fast cgi since my applications need around
15MB memory to handle a single request, so consider if Apache running
in multi-process mode, serving 300 clients, then it nearly used up all
my memory in my server.
Any experience can share how to handle large concurrent clients for
PHP?
|
by: yawnmoth |
last post by:
Correct me if I'm wrong, but isn't running PHP via mod_php faster than
running it via CGI? If so, why would a web hosting company be running
PHP via CGI and not mod_php?
I asked that very question to one web hosting company and given the
following response:
"We run our php based on what is secure, not what could be a few
seconds faster"
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |