|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hi guys,
I have a small problem. I use Apache 1.3.19 in my Linux box and I have used the php authentication in some pages. In my box it works fine. But in my ISP (which uses Solaris, that's the only infom I have), it doesn't. The error log is: [Sat Jul 28 14:00:39 2001] [error] [client xxx.xxx.xxx.xxx] malformed header from script. Bad header=HTTP/1.0 401 Unauthorized: /var/www/apache/cgis/www.mysite.ext/php In the PHP Script I use the next function: function authenticate() { global $PHP_AUTH_USER; Header( "WWW-authenticate: basic realm=\"Members only\""); Header( "HTTP/1.0 401 Unauthorized"); echo "You must enter a valid login ID and password to access this area!\n"; exit; } It there any kind of mistake on that function? I have to note that the site is a virtual host. I think that only http1.1 supports vh. On the other hand it works fine in the linux box. Also, the function is copied from the PHP documentation. I haven't see anything about the http1.0. Since 98% of my users uses IE 4/5, and since there are problems with PHP authentication on those browsers, can I use the http1.1 without problems, if that's the case? Thanks Peter |
|
#2
|
|||
|
|||
|
You are not using Apache Basic authentication and yours is too PHP specific. So delete this message and repost it to PHP forum.
|
|
#3
|
|||
|
|||
|
Well, I actually thought that, but since the script is OK in *6* different servers, I suppose that the problem has to be in the server setup. But the ISP is not too willing to give me information about what is wrong.
If you are sure that the problem is not in the apache part, then I will delete the message ![]() |
|
#4
|
|||
|
|||
|
>> If you are sure that the problem is not in the apache part, then I will delete the message
Prior to posting any message in any forum, you should utilitize the SEARCH feature AT ALL TIME. Do a search in PHP forum and use the keyword WWW-authenticate. |
|
#5
|
|||
|
|||
|
I usually do that
![]() |
|
#6
|
|||
|
|||
|
I think it likely they are running PHP as a cgi which stops php_auth working.
|
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > PHP Authentication success in Linux failed in Solaris |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|