Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-11 Thread Shaine
But i am confuse in this option. Can you please direct me with an example ? Shaine Amos Jeffries-2 wrote: Shaine wrote: Hi Henrik, First of all i would like to thank you again for all valuable informations provided to me. Those were really help full for my squid integration. But

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-11 Thread Shaine
Hi ACL for url_director done. Now that also functioning properly. But I want to ask some thing. for instance , www.google.com , I have not defined in url_redirector ACL. when we access google , cant we forward it directly to the web without going to url_redirect program ? Thank you Shaine.

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-11 Thread Amos Jeffries
Shaine wrote: But i am confuse in this option. Can you please direct me with an example ? Shaine acl yes dstdomain .site1.com acl no dstdomain .site2.com url_rewrite_access yes url_rewrite_access !no Amos Jeffries-2 wrote: Shaine wrote: Hi Henrik, First of all i would like to thank

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-10 Thread Amos Jeffries
Shaine wrote: Hi Henrik, First of all i would like to thank you again for all valuable informations provided to me. Those were really help full for my squid integration. But unfortunately there is a problem in sqlite. SO i thought its really waste of hanging with such a data base , switched to

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-09 Thread Shaine
Hi Henrik, Thanks for all valuable informations. Those are really help full for me. Actually in my squid.conf i got enabled url_rewrite_concurrency. As u said that is why it shifted another step ahead. Now its disabled , took its own place. second position. I wrote a perl script to handle a

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-09 Thread Henrik Nordstrom
On tis, 2008-07-08 at 23:12 -0700, Shaine wrote: Its working fine in command line, i tested and it works as i expected. But when i placed in url_rewrite_program in squid, unfortunately squid get PANIC and its crashed. 2008/07/09 17:14:34| WARNING: redirector #3 (FD 8) exited 2008/07/09

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-09 Thread Shaine
Following are rest of logs which comes in the log. 2008/07/09 22:49:27| Starting Squid Cache version 3.0.STABLE6 for i686-pc-linux-gnu... 2008/07/09 22:49:27| Process ID 26309 2008/07/09 22:49:27| With 1024 file descriptors available 2008/07/09 22:49:27| Performing DNS Tests... 2008/07/09

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-09 Thread Shaine
one thing i couldn't mention in the mail. my redirect program located in /usr/local/squid/bin/xxx.pl. And i have given permission for user squid. chown -R squid:squid /usr/local/squid In my squid.conf cache_effective_user squid cache_effective_group squid But slite Database lacated in a

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-09 Thread Shaine
Is there any thing difference of general perl development and develop url_redirect program from perl for squid ? do we have to use different API ? Shaine. Shaine wrote: one thing i couldn't mention in the mail. my redirect program located in /usr/local/squid/bin/xxx.pl. And i have

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-09 Thread Shaine
one thing i couldn't mention in the mail. my redirect program located in /usr/local/squid/bin/xxx.pl. And i have given permission for user squid. chown -R squid:squid /usr/local/squid In my squid.conf cache_effective_user squid cache_effective_group squid But slite Database lacated in a

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-09 Thread Amos Jeffries
Shaine wrote: one thing i couldn't mention in the mail. my redirect program located in /usr/local/squid/bin/xxx.pl. And i have given permission for user squid. chown -R squid:squid /usr/local/squid In my squid.conf cache_effective_user squid cache_effective_group squid Um, It's better to

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-09 Thread Marcus Kool
Shaine, When a program runs fine from the command line but not from a daemon, the cause is usually the change of environment: PATH or other environment variable, user ID Remember that squid is started with a very clean environment. I suggest to run the redirect program from at: # su - squid

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-09 Thread Henrik Nordstrom
On ons, 2008-07-09 at 04:43 -0700, Shaine wrote: Following are rest of logs which comes in the log. The interesting part is before the error, not after... from where the helpers is started, to where Squid complains that it exited. Regards Henrik signature.asc Description: This is a

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-09 Thread Henrik Nordstrom
On ons, 2008-07-09 at 05:02 -0700, Shaine wrote: one thing i couldn't mention in the mail. my redirect program located in /usr/local/squid/bin/xxx.pl. And i have given permission for user squid. chown -R squid:squid /usr/local/squid In my squid.conf cache_effective_user squid

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-09 Thread Henrik Nordstrom
On ons, 2008-07-09 at 05:28 -0700, Shaine wrote: Is there any thing difference of general perl development and develop url_redirect program from perl for squid ? do we have to use different API ? No, no significant difference. The differences are: - stdin/stdout is a pipe, not a terminal.

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-09 Thread Henrik Nordstrom
On ons, 2008-07-09 at 10:04 -0300, Marcus Kool wrote: Shaine, When a program runs fine from the command line but not from a daemon, the cause is usually the change of environment: PATH or other environment variable, user ID Remember that squid is started with a very clean environment.

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-07 Thread Henrik Nordstrom
On sön, 2008-07-06 at 22:05 -0700, Shaine wrote: Following is my script. #!/usr/bin/perl # no buffered output, auto flush use strict; use warnings; my ($temp, $array, @array, $param_1, $param_2, $param_3, $new_uri); $|=1; $temp = ; while (STDIN){ [EMAIL PROTECTED] = split(/

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-07 Thread Shaine
Thank you Henrik. yes that script is very simple and now and its working. But i have another requirement to capture Client IP which comes via the URL . Its bit confuse at this time coz i had different idea .So now can u direct me to how to capture client ip by that perl script which you have

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-07 Thread Henrik Nordstrom
On mån, 2008-07-07 at 10:03 +, Shain Lee wrote: Thank you Henrik. yes that script is very simple and now and its working. But i have another requirement to capture Client IP which comes via the URL . Its bit confuse at this time coz i had different idea .So now can direct me to how to

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-07 Thread Shaine
I did same way . but client ip doesn't comes in the second possition. Its in third. my ($url, $x, $ip) = split(/ /); but in squid guide says it shoudl be in second element. why is this confusion ? URL ip-address/fqdn ident method. If that thrid possition will not constant all will goes off. i

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-07 Thread Henrik Nordstrom
On mån, 2008-07-07 at 05:49 -0700, Shaine wrote: I did same way . but client ip doesn't comes in the second possition. Its in third. It's the second.. http://www.squid-cache.org/ 127.0.0.1/localhost.localdomain - GET - myip=127.0.0.1 myport=3128 unless you have enabled

Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

2008-07-06 Thread Shaine
Dear Friends, Thanks a lot for all the support so far. Little by little i have some solutions. But my redirect programs behave very unusual way. Its a working script. How would i say , when i pass argument via comand line , result was as i expected. but when its in squid , it doesnt act how it