[Bug 1081952] Re: squid 3.1.19 external_acl_type fail

sense opaperjam at yahoo.com.cn
Sat Nov 24 12:07:05 UTC 2012


** Description changed:

  System: ubuntu 12.04.1
  Squid: 3.1.19-1ubuntu3.12.04.1 (apt-get install)
  
  In squid.conf:
  ...
  external_acl_type testcom_ip ttl=0 children=5 ipv4 %SRC php /php/squid_eacl/test_ip.php
  acl testcom_ipacl external testcom_ip
- http_access allow testcom testcom_ipacl
+ http_access allow testcom_ipacl
  http_access deny all
  ...
  
  In the /php/squid_eacl/test_ip.php, I let it return OK everytime:
  <?php
  $time=null;
  $output=null;
- while ($i = fopen('php://stdin', 'r')) { 
- 	$ii = fgets($i);
- 	$s = trim($ii);
- 	fclose($i);
- 	if ($s == NULL) {
- 		if ($time == time()) {
- 			break;
- 		} else {
- 			$time = time();
- 			continue;
- 		}
- 	}
- 	$o = fopen('php://stdout', 'w');
- 	#fwrite($o,"OK user=test\n");
- 	fwrite($o,"OK\n");
- 	fclose($o);
+ while ($i = fopen('php://stdin', 'r')) {
+  $ii = fgets($i);
+  $s = trim($ii);
+  fclose($i);
+  if ($s == NULL) {
+   if ($time == time()) {
+    break;
+   } else {
+    $time = time();
+    continue;
+   }
+  }
+  $o = fopen('php://stdout', 'w');
+  #fwrite($o,"OK user=test\n");
+  fwrite($o,"OK\n");
+  fclose($o);
  }
  ?>
  
  Client use the Squid server as proxy and will get "Access Deny" many
  time. It seems squid will miss the external_acl_type acl ( "http_access
  allow testcom testcom_ipacl")  of config.conf in sometime.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to squid3 in Ubuntu.
https://bugs.launchpad.net/bugs/1081952

Title:
  squid 3.1.19 external_acl_type fail

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/squid3/+bug/1081952/+subscriptions



More information about the Ubuntu-server-bugs mailing list