Re: need to remove forward slash from request_uri

jeffs <[email protected]> Mon, 16 Feb 2009 21:54:53 -0500
Newsgroups gmane.comp.apache.mod-log-sql
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============1055723492==
Content-Type: multipart/alternative;
	boundary="------------070009080400050701010204"

This is a multi-part message in MIME format.
--------------070009080400050701010204
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Thanks you for your assistance.  I replaced the table and all is good 
now.  I think it must have gotten corrupted or something somehow.

Anyway, there is no way to filter out the content of the request_uri 
before it is written to database, I presume.

Thanks

Edward Rudd wrote:
> Can you post your mod_log_sql config?? (apache config lines)
>
> On Feb 16, 2009, at 7:43 PM, jeffs wrote:
>
>> Pardon my stupidity -- I see that the select statement can be used 
>> effectively in getting the data out from the mysql logs.  My 
>> intention was to filter out the forward slash prior to it being 
>> written to the logs.
>>
>> Still having a problem, though, getting mysql_log to log subsequent 
>> hits on the same file request.
>>
>> If anyone has an idea on why this might be happening I would 
>> appreciate a holler.
>>
>> Edward Rudd wrote:
>>> The simplest is to use SQL to remove the first character from the  
>>> field when selecting
>>>
>>> SELECT SUBSTRING(request_uri,2) as request_uri FROM myloggingtable
>>>
>>>
>>> On Feb 16, 2009, at 4:25 PM, jeffs wrote:
>>>
>>>   
>>>> I have mysql logging working perfectly.  I only need to either:
>>>>
>>>> a) use some mysql command to remove the forward slash from uri that is
>>>> being input into the uri_request field, or
>>>>
>>>> b) stop the forward slash from being recorded in the mysql database in
>>>> the first place.
>>>>
>>>> Either way, I need to not have the forward slash get recorded into the
>>>> request_uri field.  In this particular logging scenario I am using,
>>>> uri's will always look like:
>>>>
>>>> /098sdafmasf90q89234rjqwe.jpg
>>>>
>>>> as recorded by log_mysql.
>>>>
>>>> I need it to look like:
>>>>
>>>> 098sdafmasf90q89234rjqwe.jpg
>>>>
>>>> is there a way to do this?
>>>>
>>>> Thank you very much
>>>> _______________________________________________
>>>> Download the latest version at http://www.outoforder.cc/projects/apache/mod_log_sql/
>>>>
>>>> To unsubscribe send an e-mail to
>>>> mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org
>>>>     
>>> _______________________________________________
>>> Download the latest version at http://www.outoforder.cc/projects/apache/mod_log_sql/
>>>
>>> To unsubscribe send an e-mail to 
>>> mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org
>>>
>>>
>>>   
>>
>> _______________________________________________
>> Download the latest version at 
>> http://www.outoforder.cc/projects/apache/mod_log_sql/
>>
>> To unsubscribe send an e-mail to
>> mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org 
>> <mailto:mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Download the latest version at http://www.outoforder.cc/projects/apache/mod_log_sql/
>
> To unsubscribe send an e-mail to 
> mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org
>   


--------------070009080400050701010204
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks you for your assistance.&nbsp; I replaced the table and all is good
now.&nbsp; I think it must have gotten corrupted or something somehow.<br>
<br>
Anyway, there is no way to filter out the content of the request_uri
before it is written to database, I presume.<br>
<br>
Thanks<br>
<br>
Edward Rudd wrote:
<blockquote
 cite="mid:634E6A65-40D7-4710-8441-CF4DBB506447-l4c2hbCm6dz5FsjnhOxw3g@public.gmane.org"
 type="cite">Can you post your mod_log_sql config?? (apache config
lines)
  <div><br>
  <div>
  <div>On Feb 16, 2009, at 7:43 PM, jeffs wrote:</div>
  <br class="Apple-interchange-newline">
  <blockquote type="cite">
    <div bgcolor="#ffffff" text="#000000"> Pardon my stupidity -- I see
that the select statement can be used effectively in getting the data
out from the mysql logs.&nbsp; My intention was to filter out the forward
slash prior to it being written to the logs.<br>
    <br>
Still having a problem, though, getting mysql_log to log subsequent
hits on the same file request.<br>
    <br>
If anyone has an idea on why this might be happening I would appreciate
a holler.<br>
    <br>
Edward Rudd wrote:
    <blockquote
 cite="mid:D72B6692-F0F4-4A3B-98E0-EDB60C61AE03-l4c2hbCm6dz5FsjnhOxw3g@public.gmane.org"
 type="cite">
      <pre wrap="">The simplest is to use SQL to remove the first character from the  
field when selecting

SELECT SUBSTRING(request_uri,2) as request_uri FROM myloggingtable


On Feb 16, 2009, at 4:25 PM, jeffs wrote:

  </pre>
      <blockquote type="cite">
        <pre wrap="">I have mysql logging working perfectly.  I only need to either:

a) use some mysql command to remove the forward slash from uri that is
being input into the uri_request field, or

b) stop the forward slash from being recorded in the mysql database in
the first place.

Either way, I need to not have the forward slash get recorded into the
request_uri field.  In this particular logging scenario I am using,
uri's will always look like:

/098sdafmasf90q89234rjqwe.jpg

as recorded by log_mysql.

I need it to look like:

098sdafmasf90q89234rjqwe.jpg

is there a way to do this?

Thank you very much
_______________________________________________
Download the latest version at <a moz-do-not-send="true"
 class="moz-txt-link-freetext"
 href="http://www.outoforder.cc/projects/apache/mod_log_sql/">http://www.outoforder.cc/projects/apache/mod_log_sql/</a>

To unsubscribe send an e-mail to
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org">mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org</a>
    </pre>
      </blockquote>
      <pre wrap=""><!---->_______________________________________________
Download the latest version at <a moz-do-not-send="true"
 class="moz-txt-link-freetext"
 href="http://www.outoforder.cc/projects/apache/mod_log_sql/">http://www.outoforder.cc/projects/apache/mod_log_sql/</a>

To unsubscribe send an e-mail to 
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org">mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org</a>


  </pre>
    </blockquote>
    <br>
    </div>
_______________________________________________<br>
Download the latest version at <a moz-do-not-send="true"
 href="http://www.outoforder.cc/projects/apache/mod_log_sql/">http://www.outoforder.cc/projects/apache/mod_log_sql/</a><br>
    <br>
To unsubscribe send an e-mail to <br>
    <a moz-do-not-send="true"
 href="mailto:mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org">mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org</a><br>
  </blockquote>
  </div>
  <br>
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Download the latest version at <a class="moz-txt-link-freetext" href="http://www.outoforder.cc/projects/apache/mod_log_sql/">http://www.outoforder.cc/projects/apache/mod_log_sql/</a>

To unsubscribe send an e-mail to 
<a class="moz-txt-link-abbreviated" href="mailto:mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org">mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org</a>
  </pre>
</blockquote>
<br>
</body>
</html>

--------------070009080400050701010204--

--===============1055723492==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Download the latest version at http://www.outoforder.cc/projects/apache/mod_log_sql/

To unsubscribe send an e-mail to 
mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org

--===============1055723492==--