httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rene Jensen <centip...@takhis.net>
Subject [users@httpd] Imitating the config-initialization in Apache 1.3 from custom module
Date Sun, 12 Jun 2005 19:13:23 GMT
Perhaps asking coding questions for apache 1.3 is rather in the eleventh
hour, but I really need my custom module to work and have no other
choices.

Currently I'm modifying a virtual-host-from-mysql-table module I found
at (http://www.crazygreek.co.uk/content/mod_shapvh)

The module will simulate configurations like:

<VirtualHost XXXX>
    ServerName XX.YY.org
</VirtualHost>

but I also need it to simulate configurations with commands like:

<VirtualHost XXXX>
    php_admin_value open_basedir "/var/www/:/var/opt/upload/"
    ServerName XX.YY.org
</VirtualHost>

Now, the 'php_admin_value' configuration line is a command that is
handled by mod_php5.c (in the old apache1.3 source, of course)

This is the strategy I have planned:
  1) From my_own_module.c I retrieve the necessary strings
     (fetched from a mysql database, file or where ever
      I decide to store the virtual host data).
  2) Simulate the steps that the apache-core takes when
     is sees the line
     'php_admin_value open_basedir "blablabla"'

The module already handles 1) nice, but I'm having trouble figuring out
how to do step 2). I suspect that some function in 'http_config.c' would
do the trick, but I can't figure out which one. I can't call
mod_php5.c / php_apache_admin_value_handler directly because that would
require access to the module-configuration that only the core knows
about from when it initialized the php module.


Anybody here who knows the source code for 1.3 ?

Thanks,
Rene Jensen



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message