Re: need to remove forward slash from request_uri
jeffs <[email protected]> Mon, 16 Feb 2009 19:26:03 -0500
| Newsgroups | gmane.comp.apache.mod-log-sql |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============1604527741==
Content-Type: multipart/alternative;
boundary="------------070709080306050400050101"
This is a multi-part message in MIME format.
--------------070709080306050400050101
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Thanks for the help.
I know about the substring function but I'm at a loss as to where to put
this string...
I cannot find any suitable interface within which to plug it in... the
mod_log_sql program writes directly to the mysql database so where do I
insert this code?
Is there a filter function in phpmyadmin that I cannot find?
Sorry for my newbie question but I'm confounded here.
Another issue I'm having is that although if I tail -f
/var/log/apache2/other_vhosts_access.log I can see the requests coming
in for requests for the same file, but mod_log_mysql is only logging the
first occurrence of the log, not subsequent hits and I need all hits to
be logged even if the request is for the same file.
As I stated in my previous post, the scenario is very simple. All file
requests are always going to look like this:
098sdafmasf90q89234rjqwe.jpg
with the string before the .jpg being the only thing that changes.
I've setup the sites-available to only log this:
LogSQLRequestAccept .jpg
which indeed is working, but only the first request shows up, not subsequent hits although tailing other_vhosts_access.log indeed shows the subsequent hits coming in.
Thanks for your assistance.
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
>
>
>
--------------070709080306050400050101
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">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks for the help.<br>
<br>
I know about the substring function but I'm at a loss as to where to
put this string...<br>
<br>
I cannot find any suitable interface within which to plug it in... the
mod_log_sql program writes directly to the mysql database so where do I
insert this code?<br>
<br>
Is there a filter function in phpmyadmin that I cannot find?<br>
<br>
Sorry for my newbie question but I'm confounded here.<br>
<br>
Another issue I'm having is that although if I tail -f
/var/log/apache2/other_vhosts_access.log I can see the requests coming
in for requests for the same file, but mod_log_mysql is only logging
the first occurrence of the log, not subsequent hits and I need all
hits to be logged even if the request is for the same file.<br>
<br>
As I stated in my previous post, the scenario is very simple. All file
requests are always going to look like this:<br>
<br>
<pre wrap="">098sdafmasf90q89234rjqwe.jpg
with the string before the .jpg being the only thing that changes.
I've setup the sites-available to only log this:
LogSQLRequestAccept .jpg
which indeed is working, but only the first request shows up, not subsequent hits although tailing other_vhosts_access.log indeed shows the subsequent hits coming in.
Thanks for your assistance.
</pre>
<br>
<br>
<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 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>
<pre wrap=""><!---->
_______________________________________________
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>
--------------070709080306050400050101--
--===============1604527741==
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
--===============1604527741==--