jeffs | 16 Feb 2009 22:25
Favicon

need to remove forward slash from request_uri

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@...

(Continue reading)

Edward Rudd | 17 Feb 2009 00:17
Favicon
Gravatar

Re: need to remove forward slash from request_uri

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
(Continue reading)

jeffs | 17 Feb 2009 01:43
Favicon

Re: need to remove forward slash from request_uri

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@...
Edward Rudd | 17 Feb 2009 02:11
Favicon
Gravatar

Re: need to remove forward slash from request_uri

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

_______________________________________________
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@...
jeffs | 17 Feb 2009 03:54
Favicon

Re: need to remove forward slash from request_uri

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

_______________________________________________ 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@...
jeffs | 17 Feb 2009 01:26
Favicon

Re: need to remove forward slash from request_uri

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

_______________________________________________
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@...

Gmane