Gagan Puri | 1 Oct 05:13 2003

undefined refrences to Apache symbols

Hi Everybody,

I have an an application which is working with apache web server on Linux As 2.1 m/c. While compiling I have to
use 
-Wl,-Bsymbolic option. My compiler is gcc. When I use this option & try to compile my application, I get
following warnings:

ExAPACHE.o: In function `CExApi::GetProtInfo(tagProtocolInfo*)':
ExAPACHE.o(.text+0x237): undefined reference to `ap_table_get'
ExAPACHE.o(.text+0x263): undefined reference to `ap_get_server_port'
ExAPACHE.o: In function `CExApi::GetAuthOnlyHeader(char*, unsigned)':
ExAPACHE.o(.text+0x4d7): undefined reference to `ap_table_get'
ExAPACHE.o: In function `CExApi::GetCookies(char**)':
ExAPACHE.o(.text+0x54f): undefined reference to `ap_table_get'
ExAPACHE.o: In function `CExApi::SetCookie(char*)':
ExAPACHE.o(.text+0x5d1): undefined reference to `ap_pstrdup'
ExAPACHE.o(.text+0x5ef): undefined reference to `ap_table_addn'
ExAPACHE.o: In function `CExApi::GetBasicAuth(char*, unsigned)':
ExAPACHE.o(.text+0x657): undefined reference to `ap_table_get'
ExAPACHE.o: In function `CExApi::SetBasicAuth(char*)':
ExAPACHE.o(.text+0x6d1): undefined reference to `ap_pstrdup'
ExAPACHE.o(.text+0x6ef): undefined reference to `ap_table_setn'
ExAPACHE.o: In function `CExApi::GetLocation(char*, unsigned)':
ExAPACHE.o(.text+0x757): undefined reference to `ap_table_get'
ExAPACHE.o: In function `CExApi::SetLocation(char*)':
ExAPACHE.o(.text+0x7dc): undefined reference to `ap_pstrdup'
ExAPACHE.o(.text+0x7fa): undefined reference to `ap_table_setn'
ExAPACHE.o(.text+0x808): undefined reference to `ap_parse_uri'
ExAPACHE.o: In function `CExApi::GetReferer(char*, unsigned)':
ExAPACHE.o(.text+0x867): undefined reference to `ap_table_get'
(Continue reading)

Jeff Trawick | 1 Oct 12:45 2003
Picon

Re: undefined refrences to Apache symbols

Gagan Puri wrote:

> I have an an application which is working with apache web server on Linux As 2.1 m/c. While compiling I have
to use 
> -Wl,-Bsymbolic option. My compiler is gcc. When I use this option & try to compile my application, I get
following warnings:
> 
> ExAPACHE.o: In function `CExApi::GetProtInfo(tagProtocolInfo*)':
> ExAPACHE.o(.text+0x237): undefined reference to `ap_table_get'
> ExAPACHE.o(.text+0x263): undefined reference to `ap_get_server_port'
...

> -Wl,-Bsymbolic says when  creating  a shared library, bind references to global symbols to the definition
within the shared library, if any. 
> 
> All the symbols shown above are apache symbols. How can I get rid of these symbols. If I don't use
-Wl,-Bsymbolic option these warning do't come. But I have to use -Wl,-Bsymbolic in my compilation. How
can I get rid of these unnecessary warnings.

maybe there is another option that tells ld to ignore unresolved symbols?

this is a question for GNU ld experts...

Graham Leggett | 1 Oct 18:29 2003

Apache won't start - shared memory problem

Hi all,

My Apache server just went down, and now refuses to come up, logging the
following message:

[Wed Oct 01 11:16:12 2003] [error] Cannot allocate shared memory:
(17)File exists

There is no record of which module is emitting this message, nor does
the message say which file this is referring to. Anyone know?

Regards,
Graham
--

Paul J. Reder | 1 Oct 18:39 2003
Picon

Re: Apache won't start - shared memory problem

The shared mem got left around after Apache crashed.
Assuming you are on Linux try:

ipcs               # check for zero access count...
ipcrm shm XXXXXX   # will remove the offending shmem id

ipcs will give you something like:
...
0x0102c028 776437784  rederpj   600        56344      6
...

ipcrm shm 776437784

will clear it up...

Graham Leggett wrote:
> Hi all,
> 
> My Apache server just went down, and now refuses to come up, logging the
> following message:
> 
> [Wed Oct 01 11:16:12 2003] [error] Cannot allocate shared memory:
> (17)File exists
> 
> There is no record of which module is emitting this message, nor does
> the message say which file this is referring to. Anyone know?
> 
> Regards,
> Graham
> -- 
(Continue reading)

Graham Leggett | 1 Oct 18:41 2003

Re: Apache won't start - shared memory problem

Graham Leggett wrote:

> My Apache server just went down, and now refuses to come up, logging the
> following message:
> 
> [Wed Oct 01 11:16:12 2003] [error] Cannot allocate shared memory:
> (17)File exists
> 
> There is no record of which module is emitting this message, nor does
> the message say which file this is referring to. Anyone know?

Turned out to be the file referred to by the SSLSessionCache parameter.

Is it possible to make the error message more descriptive, so that it 
refers to the file by name?

Is it also possible to delete this file before Apache starts up, so that 
this "file exists" problem cannot occur?

I am using httpd-2.0.47-4, as provided by Redhat Rawhide.

Regards,
Graham
--

gregames | 1 Oct 19:06 2003
Picon

Re: how to log what status was returned by a cgi script

Jeff Trawick wrote:
> a cgi script can write this in the response header: "Status: nnn"...  it 
> would sometimes be nice to know if the script did such a thing...
> 
> (like a current problem I'm working on: where the heck did the 500 come 
> from for this CGI; there's nothing in the error log and the few places 
> in the server that return 500 without logging don't seem like good 
> suspects; being able to clearly log any status set by the script would 
> eliminate any rude finger pointing)
> 
> how about in ap_scan_script_header_err_core() we set an envvar 
> (script-status) to the value of the Status field, if provided?
> then in a custom log format the script-status envvar can be logged...
> 
> or am I missing a way to log this info already?  (not the ScriptLog 
> stuff; this is for a production environment :) )
> 
> alternatively, ap_scan_script_header_err_core() could stick something in 
> the error log for bad http status codes, but that isn't quite as 
> applicable (though it is automatic)

I like your alternative better, because it will just work with no fiddling 
necessary.  What do you mean by "isn't quite as applicable"?

Greg

Sander Striker | 1 Oct 19:17 2003
Picon

RE: Tagged 2.0

> From: Sander Striker [mailto:striker <at> apache.org]
> Sent: Sunday, September 28, 2003 2:44 AM

[...]
> Ok, I've tagged pre3.  I consider this the last tag and I'd like to
> turn that into the next 2.0 release.

Due to the received feedback I had to do a pre4 tag (STRIKER_2_0_48_PRE4).
Tarballs are up at:

  http://www.apache.org/~striker/httpd-2.0.48-pre4/.

Please give it a whirl.  I'd really like to get this release out of
the door.

Sander

Esteban Pizzini | 2 Oct 04:00 2003
Picon

map_to_storage hook question..

Hi,

Anybody can explain me what map_to_storage hook does?? or where can I find
and example of its use??

Thank You!,
 Esteban

Bill Stoddard | 2 Oct 05:07 2003

Re: map_to_storage hook question..

Esteban Pizzini wrote:
> Hi,
> 
> Anybody can explain me what map_to_storage hook does?? or where can I find
> and example of its use??
>  
> Thank You!,
>  Esteban
>  
> 
One use of map_to_storage is to bypass directory walk and file walk if 
your handler module -knows for certain- that the request is not being 
served out of the Apache file space. Your module would register a 
translate_name hook, a map_to_storage hook and a handler. It inspects 
the URL in translate_name then decides whether it will serve the content 
or not. If it decides it will serve its own content (but not out of the 
Apache file system) your module drops a hint in r->request_config (from 
translate_name) that map_to_storage will look for. If map_to_storage 
sees the hint, it returns OK which causes the core_map_to_storage hook 
to be bypassed. At this point, your handler dang well better not DECLINE 
the request if it decided in translate_name that it was going to serve 
the request.

Bill

Bill Stoddard | 2 Oct 05:10 2003

Re: map_to_storage hook question..

Bill Stoddard wrote:

> Esteban Pizzini wrote:
> 
>> Hi,
>>
>> Anybody can explain me what map_to_storage hook does?? or where can I 
>> find
>> and example of its use??
>>  
>> Thank You!,
>>  Esteban
>>  
>>
> One use of map_to_storage is to bypass directory walk and file walk if 
> your handler module -knows for certain- that the request is not being 
> served out of the Apache file space. Your module would register a 
> translate_name hook, a map_to_storage hook and a handler. It inspects 
> the URL in translate_name then decides whether it will serve the content 
> or not. If it decides it will serve its own content (but not out of the 
> Apache file system) your module drops a hint in r->request_config (from 
> translate_name) that map_to_storage will look for. If map_to_storage 
> sees the hint, it returns OK which causes the core_map_to_storage hook 
> to be bypassed. At this point, your handler dang well better not DECLINE 
> the request if it decided in translate_name that it was going to serve 
> the request.
> 
> Bill

To answer your 2nd question, I believe mod_proxy uses a map_to_storage 
(Continue reading)


Gmane