Re: [EMAIL PROTECTED] mod_dbd and mysql
[thread moved from users list] On 5/8/07, Nick Kew [EMAIL PROTECTED] wrote: On Tue, 8 May 2007 08:11:13 -0500 Frank Jones [EMAIL PROTECTED] wrote: However, I don't know what to do if apr_dbd_pvselect using the prepared statement returns 2013 (Lost connection). What MySQL version are you using? This appears to have changed between 4.1 (where mysql_ping would reestablish a lost connection) and 5.0 (where it doesn't). I'm using MySQL 5.0.22 on Ubuntu server 6.06 LTS with Apache/2.2.4. The correct solution is for your module to call apr_dbd_invalidate to invalidate the stale connection, then grab another from the pool. But alas, only your module can decide how many times to retry in case of problems. I grepped the whole source tree for apr_dbd_invalidate and also googled for it with no result. Is that the right name? BTW, this would be more on-topic on the dev or modules-dev list. moved
Re: Regexp mess?
On May 8, 2007, at 7:20 PM, Tim Bray wrote: Why are the regex-related routine declarations splashed across httpd.h and ap_regex.h? And why are there two versions of regcomp, only one of which takes a pool for allocation? Too much history and a bit of indecisiveness. We originally used a different regex library that lacked some of the features in PCRE. After migrating to PCRE, we needed just enough of the library to define a pool-capable regcomp. The declarations are a mess because of the pseudo portable way in which various broken implementations of regex libraries exist on various operating systems (e.g., Solaris) and the various ways in which header files are included on those systems. Finally, long after we had to add that stuff, PCRE became popular enough on its own to justify removing it from the core server and simply making it a dependency, but that kind of change will have to wait until the next major release. And why are they ap_ instead of apr_? The ap_ prefix is what we use for public functions in Apache httpd. The apr_ prefix was created for the APR project, which adopted most (but not all) of the original httpd public functions. And why is it so hard to find any documentation on them? Fortunately the code is pretty easy to read... -Tim Thanks for volunteering. ;-) Roy
Documenting Modules
Hi. How do I document modules the way apache does it? There seems to be an XML format that is used to generate the documentation. Where can I read about this? Thx, Joachim
Re: Documenting Modules
Am Mittwoch, den 09.05.2007, 19:50 +0100 schrieb Nick Kew: On Wed, 09 May 2007 18:16:46 +0200 Joachim Zobel [EMAIL PROTECTED] wrote: There seems to be an XML format that is used to generate the documentation. Where can I read about this? Download apache (any version) and look in the docs/manual directory and you'll see it all. Go to style for the DTD and the XSLT transform. I can't see any mod_example.xml or the like. And reading the DTD and xsl for understanding an unknown XML format is a bit hard. I would need a working example. Sincerely, Joachim
Re: Documenting Modules
Am Mittwoch, den 09.05.2007, 14:36 -0400 schrieb Marc Dostie: Are you referring to doxygen? See http://www.doxygen.org/ No. I want to generate the html pages apache uses for module documentation (e.g. http://httpd.apache.org/docs/2.2/mod/mod_example.html) Sincerely, Joachim
Re: Documenting Modules
Am Mittwoch, den 09.05.2007, 16:11 -0300 schrieb Davi Arnaut: http://httpd.apache.org/docs-project/docsformat.html Aaahh! Could not find that with google. Thanks, Joachim
Event MPM
Anyone know what the roadmap looks like for the Event MPM? I'm interested in playing with it but I need mod_ssl which is a known outage. Thanks. -Marc
determining if browser is on same machine as server
I am working on the access to my kiosk system, one condition I need to handle in a unique way is when a web browser is run on the same physical machine as Apache. It is obvious when using localhost or 127.0.0.1. But when the URL is the machine name, I seem to be getting an IP address. I do see in r-server-server_hostname, is there any way to convert that into the IP address? Sam
Re: determining if browser is on same machine as server
Sam, From what I know, which is not much, a server name could be any ID given to a computer. It could be an IP, it could be a domain or subdomain, or it could be any ID defined in a /etc/hosts or equivelent (which would only have to be defined on the visitor's computer). I believe this value is defined to be whatever your VirtualHost is defined to be. There could be ServerAliases which resolve better than the actual servername. You can try a local getbyhostname() (which may be OS-dependent an/or deprecated) or something similar, but there is no gurantee you will get a good reverse-IP-lookup resolve. Try searching the web for man getbyhostname. You may need to find something newer to handle IPv6 addresses (if that is a concern). It is true that when a visitor uses localhost to access a webserver, it is translated into 127.0.0.1 (I believe on both sides). I know it's not the best and most definitive answer, but I hope it helps a little. Dave On 5/9/07, Sam Carleton [EMAIL PROTECTED] wrote: I am working on the access to my kiosk system, one condition I need to handle in a unique way is when a web browser is run on the same physical machine as Apache. It is obvious when using localhost or 127.0.0.1. But when the URL is the machine name, I seem to be getting an IP address. I do see in r-server-server_hostname, is there any way to convert that into the IP address? Sam -- David Wortham Senior Web Applications Developer Unspam Technologies, Inc. (408) 338-8863
Re: determining if browser is on same machine as server
Sam, I knew I missed something. There is a C-string containing the local_ip of the server in the conn_rec struct. I believe the access from a request_rec would be r-connection-local_ip Dave On 5/9/07, David Wortham [EMAIL PROTECTED] wrote: Sam, From what I know, which is not much, a server name could be any ID given to a computer. It could be an IP, it could be a domain or subdomain, or it could be any ID defined in a /etc/hosts or equivelent (which would only have to be defined on the visitor's computer). I believe this value is defined to be whatever your VirtualHost is defined to be. There could be ServerAliases which resolve better than the actual servername. You can try a local getbyhostname() (which may be OS-dependent an/or deprecated) or something similar, but there is no gurantee you will get a good reverse-IP-lookup resolve. Try searching the web for man getbyhostname. You may need to find something newer to handle IPv6 addresses (if that is a concern). It is true that when a visitor uses localhost to access a webserver, it is translated into 127.0.0.1 (I believe on both sides). I know it's not the best and most definitive answer, but I hope it helps a little. Dave On 5/9/07, Sam Carleton [EMAIL PROTECTED] wrote: I am working on the access to my kiosk system, one condition I need to handle in a unique way is when a web browser is run on the same physical machine as Apache. It is obvious when using localhost or 127.0.0.1. But when the URL is the machine name, I seem to be getting an IP address. I do see in r-server-server_hostname, is there any way to convert that into the IP address? Sam -- David Wortham Senior Web Applications Developer Unspam Technologies, Inc. (408) 338-8863 -- David Wortham Senior Web Applications Developer Unspam Technologies, Inc. (408) 338-8863