Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old July 28th, 2001, 07:39 AM
tpe tpe is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: Greece
Posts: 10 tpe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 38 sec
Reputation Power: 0
Question PHP Authentication success in Linux failed in Solaris

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

Reply With Quote
  #2  
Old July 28th, 2001, 10:58 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You are not using Apache Basic authentication and yours is too PHP specific. So delete this message and repost it to PHP forum.

Reply With Quote
  #3  
Old July 28th, 2001, 11:14 AM
tpe tpe is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: Greece
Posts: 10 tpe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 38 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old July 28th, 2001, 11:33 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> 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.

Reply With Quote
  #5  
Old July 29th, 2001, 10:33 AM
tpe tpe is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: Greece
Posts: 10 tpe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 38 sec
Reputation Power: 0
I usually do that

Reply With Quote
  #6  
Old July 30th, 2001, 06:44 AM
martian martian is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Emneth, UK
Posts: 49 martian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
I think it likely they are running PHP as a cgi which stops php_auth working.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > PHP Authentication success in Linux failed in Solaris


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway