You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Rene Jensen <ce...@takhis.net> on 2005/06/12 21:13:23 UTC

[users@httpd] Imitating the config-initialization in Apache 1.3 from custom module

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