#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    29
    Rep 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
  2. #2
  3. Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    5
    Rep 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]
  4. #3
  5. No Profile Picture
    Web Weaver
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Location
    Australia
    Posts
    64
    Rep Power
    15
    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

Similar Threads

  1. php5 and php4 module into apache 1.3x
    By marcbey in forum PHP Development
    Replies: 3
    Last Post: March 1st, 2004, 06:41 AM
  2. Apache 2.0 and PHP4 Upgrade Problems
    By xml in forum PHP Development
    Replies: 4
    Last Post: February 10th, 2004, 11:52 AM
  3. PHP -> system commands
    By Tantalus in forum PHP Development
    Replies: 1
    Last Post: January 28th, 2004, 10:51 AM
  4. uh.. xitami and apache help plz!!!
    By nitrogencool in forum Apache Development
    Replies: 1
    Last Post: December 8th, 2003, 07:02 PM
  5. Has anyone compiled Apache in Windows?
    By norberto in forum Apache Development
    Replies: 1
    Last Post: September 16th, 2003, 01:07 PM

IMN logo majestic logo spyfu logo threadwatch logo seochat tools logo