PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP 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:
  #1  
Old April 8th, 2000, 05:07 PM
devCisk devCisk is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 29 devCisk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i just installed apache 1.3.9 with php4 and was wondering how i can make it so that header function works... Well like the following gives me a server misconfiguration error:
header('WWW-Authenticate: Basic realm="Top 10 Login"');
header('HTTP/1.0 401 Unauthorized');
printf('Authorization required...');

can anyone PLEASE tell me where i can enable or tweak apahce so that the previous code would work..

also.. how i can setup custom error pages like 500 and stuff

thanks in advance!
Cisk
devcisk@ev1.net

Reply With Quote
  #2  
Old April 9th, 2000, 06:21 PM
DIGROVE's Avatar
DIGROVE DIGROVE is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Posts: 5 DIGROVE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by devCisk:
i just installed apache 1.3.9 with php4 and was wondering how i can make it so that header function works... Well like the following gives me a server misconfiguration error:
header('WWW-Authenticate: Basic realm="Top 10 Login"');
header('HTTP/1.0 401 Unauthorized');
printf('Authorization required...');

can anyone PLEASE tell me where i can enable or tweak apahce so that the previous code would work..

also.. how i can setup custom error pages like 500 and stuff

thanks in advance!
Cisk
devcisk@ev1.net
[/quote]

Sorry ... I am not sure what's meanning in your first questions!!
and the 2nd Question could be solved by changing the following config file..
// your_httpd_root_dir/conf/httpd.conf
# Customizable error response (Apache style)
# these come in three flavors
#
# 1) plain text
#ErrorDocument 500 "The server made a boo boo.
# n.b. the (") marks it as text, it does not get output
#
# 2) local redirects
#ErrorDocument 404 /missing.html
# to redirect to local URL /missing.html
#ErrorDocument 404 /cgi-bin/missing_handler.pl
# N.B.: You can redirect to a script or a document using server-side-includes.
#
# 3) external redirects
#ErrorDocument 402 http://some.other_server.com/subscription_info.html
# N.B.: Many of the environment variables associated with the original
# request will *not* be available to such a script.

#
# The following directives modify normal HTTP response behavior.
# The first directive disables keepalive for Netscape 2.x and browsers that
# spoof it. There are known problems with these browser implementations.
# The second directive is for Microsoft Internet Explorer 4.0b2
# which has a broken HTTP/1.1 implementation and does not properly
# support keepalive when it is used on 301 or 302 (redirect) responses.
#

Take the # away.. And suit it to your will..

Sorry for my English..


------------------
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Ask not what your friends can do for you....
ask what you can do for your friends.[/quote]

Reply With Quote
  #3  
Old April 13th, 2000, 06:21 PM
Spyder Spyder is offline
Web Weaver
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 1999
Location: Australia
Posts: 64 Spyder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
Send a message via ICQ to Spyder Send a message via AIM to Spyder
devCisk,
To solve your server error (I think all you need to do is get rid of the spaces in the Basic realm="Top 10 login" bit.
You could put: Basic realm="Top_10_Login" instead.

I'm not sure if that is the best way but it should stop the error...

As for custom error pages you can use .htaccess files if you don't have access to the conf files

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Apache && PHP4 new release

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap