mod-php

Is there a difference between apache module vs cgi (concerning security)?

E.g. Is it more secure to use mod_php instead of php-cgi? Or is it more secure to use mod_perl instead of traditional cgi-scripts? I'm mainly interested in security concerns but speed might be an issue if there are significant differences. ...

Detect browser connection closed in PHP

Does anyone know if it is possible to detect whether the browser has closed the connection during the execution of a long PHP script, when using apache and mod_php? For example, in Java, the HttpOutputStream will throw an exception if one attempts to write to it after the browser has closed it -- Or will respond negatively to checkError...

mod_php5 uses temporary files for parsing?

I've noticed that most of my more annoying errors generate parse errors similar to this one in my logs: PHP Parse error: syntax error, unexpected T_FUNCTION in d:\docume~1\***\locals~1\temp\tmpwvpo4p on line 5. This is annoying to say the least, because I have not a clue what exactly that is supposed to be, and like a good program, ...

How to configure PHP under Apache web server in GENTOO Operating System?

Hi, is there anyone who knows how to install / configure php under apache? I have emerge php apache both. I wanted to use mod_php for apache in GENTOO OS. php temp.php command line runs fine, but http://localhost/temp.php is not executing on web server instead it shows the content of the php code. ...

Apache's mod_php OR FastCGI? Which is good for Wordpress?

Hi guys, I have basic idea about running PHP in different configurations like mod_php, cgi, FastCGI, etc. In my findings and test I found FastCGI is slightly better. I like FastCGI's support for SuEXEC most. Wait I do not want to get into benchmarking business here again. If you surf web, you will find people proving one way is faster ...

How would I perhaps reduce the processor footprint of a php script?

I'm attempting to make a php script that can load the current weather forecast and it uses a bit of XML pre-processing to digest the input, however it is accessed quite often and reloaded. The problem begins with my current host, which yes I do understand why, limits the amount of processing power a script takes up. Currently takes an e...

compiled or interpreted / apache mod or FastCGI for this use case?

We have a server-side component that is currently written in PHP on Apache2 that is essentially a cross domain proxy that uses cURL to make external HTTP requests, does header processing and performs some regular expression replacement on the payloads. It is going to be the most heavily used piece of server-side code for our site. PHP i...

Does mod_php honor HEAD requests properly?

The HTTP/1.1 RFC stipulates "The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response." I know Apache honors the RFC but modules don't have to. My question is, does mod_php5 honor this? The reason I ask is because I just came across an article saying that PHP developers should check this ...

Web programming: Apache modules: mod_python vs mod_php

Hi! I've been using for more than 12 years PHP with Apache (a.k.a mod_php) for my web development work. I've recenlty discovered python and its real power (I still don't understand why this is not always the best product that becomes the most famous). I've just discovered mod_python for Apache. I've already googled but without success t...

Apache mod php and script invocation

Say I am running a PHP script, foo.php, inside apache configured with mod php, then, say I invoke the script from my browser(or any other means), does apache spawn off a new process in which the script gets executed? How does it work? Can someone pls point me to some good article on this? ...

iconv utf-8 to ascii transliteration in mod_php/apache2

I need to compare strings and match names to one another even if they are not spelled the same way. For example DÉSIRÉ-Smith should match Desireesmith as well as Desiree or Desi'ree Smith So i had the following approch which worked perfectly in the command line using PHP-CLI: <? class Alike { static function convertAlike...

Apache: mod_rails and mod_php - can I run both both at the same time?

My goal is to run multiple Ruby on Rails web apps and one PHP application on Apache2 from a single server. All of those virtual hosts will be Name-based and running on 80 port. Is it possible? How can I do that? Will it have any negative performance impact because of these mods_x cooperation. ...

mod_php vs cgi vs fast-cgi

Hi all, I have been trying to understand the exact meaning/purpose of loading php as an apache module vs the rest. When php is installed as an apache module, what exactly happens? For example, does reading the php-ini file happen every time the php request comes or when the php module is loaded alone? ...