tags:

views:

101

answers:

2

I have googled the topic for a while but haven't found what I'm looking for...

Is there a mod for PHP that allows it to act much like mod_wsgi or mod_python so that one can create Apache hooks using PHP?

For example an equivalent to WSGIAccesScript?

Thank you

+1  A: 

? mod_php ? Or did I misunderstand your question.

What do you mean with Apache Hooks?

jitter
A hook is a script that extends Apache's functionality. A access hook allows the following scenario:When a website is visited, the Apache config runs a script (Python in mod_wsgi's case) that returns true or false depending on whether or not the user should be able to view the document. This protection can be put on any kind of file (i.e. docs and imgs). I already have a setup with Python on the server but the app runs PHP and I need to collect session information that is only accesible through PHP.
Christoffer
+2  A: 

Only if you use a FASTCGI module such as mod_fastcgi or mod_fcgid which implements access checker hook defined as part of FASTCGI. Obviously, you need be running PHP via FASTCGI.

For mod_fcgid see:

http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidaccesschecker

For mod_fastcgi see:

http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html#FastCgiAccessChecker

Graham Dumpleton
Thank you Graham :)
Christoffer