PHP Classes

Squid/2.4.STABLE6 Proxy Authentication error

Recommend this page to a friend!

      Simple Authentication and Security Layer  >  All threads  >  Squid/2.4.STABLE6 Proxy...  >  (Un) Subscribe thread alerts  
Subject:Squid/2.4.STABLE6 Proxy...
Summary:any suggest ?
Messages:7
Author:yuanyuan
Date:2007-12-27 02:52:26
Update:2007-12-28 03:10:41
 

  1. Squid/2.4.STABLE6 Proxy...   Reply   Report abuse  
Picture of yuanyuan yuanyuan - 2007-12-27 02:52:26
I have edit this val with my ,
------------------------------------------------------
$arguments["ProxyHostName"]="xxx.x.xxx.xxx";
$arguments["ProxyHostPort"]=1234;
$arguments["ProxyUser"]="super";
$arguments["ProxyPassword"]="superman";


but I get this message...... :(
-------------------------------------------------------
Request headers:
Host: www.php.net
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Pragma: nocache

S HTTP/1.0 407 Proxy Authentication Required
S Server: Squid/2.4.STABLE6
S Mime-Version: 1.0
S Date: Thu, 27 Dec 2007 02:39:18 GMT
S Content-Type: text/html
S Content-Length: 955
S Expires: Thu, 27 Dec 2007 02:39:18 GMT
S X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
S Proxy-Authenticate: Basic realm="Squid proxy-caching web server"
S X-Cache: MISS from xxx.xxxxxx.COM
S Proxy-Connection: close
S
S <HTML><HEAD>
<TITLE>ERROR: Cache Access Denied</TITLE>
</HEAD>
<BODY>
<H1>ERROR</H1>
<H2>Cache Access Denied</H2>
<HR>
<P>
While trying to retrieve the URL:
<A HREF="http://www.php.net/">http://www.php.net/</A>
<P>
The following error was encountered:
<UL>
<LI>
<STRONG>
Cache Access Denied.
</STRONG>
</UL>
</P>

<P>Sorry, you are not currently allowed to request:
<PRE> http://www.php.net/</PRE>
from this cache until you have authenticated yourself.
</P>

<P>
You need to use Netscape version 2.0 or greater, or Microsoft Internet
Explorer 3.0, or an HTTP/1.1 compliant browser for this to work. Please
contact the <A HREF="mailto:webmaster">cache administrator</a> if you have
difficulties authenticating yourself or
<A HREF="http://xxxx.xxxxx.COM/cgi-bin/chpasswd.cgi">change</a> your default password.
</P>

<br clear="all">
<hr noshade size=1>
Generated Thu, 27 Dec 2007 02:39:18 GMT by xxxx.xxxx.COM (Squid/2.4.STABLE6)
</BODY></HTML>
---------------------------------------------------------------------

need UR help, thanks.

  2. Re: Squid/2.4.STABLE6 Proxy...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-12-27 03:27:01 - In reply to message 1 from yuanyuan
I suppose you are using the HTTP client class.

It seems that you may not be including the SASL class as needed. Take a look at the test_http.php example and make sure the line that says require("sasl.php"); is uncommented.

  3. Re: Squid/2.4.STABLE6 Proxy...   Reply   Report abuse  
Picture of yuanyuan yuanyuan - 2007-12-27 07:43:19 - In reply to message 2 from Manuel Lemos
yes, I have include sasl.php

require("../sasl-2005-10-31/sasl.php");

,

thanks.

  4. Re: Squid/2.4.STABLE6 Proxy...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-12-27 21:50:26 - In reply to message 3 from yuanyuan
I just tried the test_http.php making it use a Squid 2.6 proxy and it worked as expected.

The response that you get is correct, but the class should automatically access submit a new request after that using passing proxy authentication credentials with some request headers like this:

Proxy-Authorization: Basic xxXXXXXXxxXXxxXXxxXXx

Doesn't the class send a new request with that header after the first request?

Which PHP version are you using?

  5. Re: Squid/2.4.STABLE6 Proxy...   Reply   Report abuse  
Picture of yuanyuan yuanyuan - 2007-12-28 01:00:25 - In reply to message 4 from Manuel Lemos
my PHP Version 5.2.4

thank U.


  6. Re: Squid/2.4.STABLE6 Proxy...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-12-28 01:39:14 - In reply to message 5 from yuanyuan
I just tried with PHP 5.2.4 and it still works as expected.

Are you using any special extensions with your PHP installation like optimizers, accelerators or cache extensions?

  7. Re: Squid/2.4.STABLE6 Proxy...   Reply   Report abuse  
Picture of yuanyuan yuanyuan - 2007-12-28 03:10:41 - In reply to message 6 from Manuel Lemos
hi Manue ,

I'm so sorry, that's my fail.

I type wrong $arguments["ProxyUser"]="balbal...". :P

Now it's work perfect.

Thank U so much.