473,385 Members | 1,341 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Does mod_php also handle static HTML?

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
Jul 17 '05 #1
5 1837
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.
Jul 17 '05 #2
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.

Jul 17 '05 #3
> - 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
Jul 17 '05 #4
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.
Jul 17 '05 #5
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?
Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
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...
31
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...
5
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...
12
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)...
7
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...
0
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...
2
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...
4
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...
7
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.