Page 1 of 1

Authentication required page? (XP SP3 Pro) 1.7.3 [SOLVED]

PostPosted: 02. November 2011 00:45
by AntM
Hi, sorry if this has already been asked but I can't find it anywhere. I just wanted to know if anyone could tell me the file that returns the Authentication required page - I would like to modify the message, but for the life of me can't find where the message originates !

Thank you if anyone can help.

Re: Authentication required page?

PostPosted: 02. November 2011 00:48
by Sharley
Did you set a user/password to access the XAMPP pages in the Security section of the Welcome page?
http://localhost/xampp/index.php

Re: Authentication required page?

PostPosted: 02. November 2011 00:50
by AntM
Yes, and I know my login credentials - I just want to change the message that is returned if someone sees that page after entering wrong login info.

Edit:
xampp\htdocs\xampp\index.php looks like this:
Code: Select all
<?php
   if (@file_get_contents("../../install/xampp_language.txt") == "") {
       if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
          $uri = 'https://';
       } else {
          $uri = 'http://';
       }
       $uri .= $_SERVER['HTTP_HOST'];
       header('Location: '.$uri.'/xampp/splash.php');
       exit;
   }

   include 'langsettings.php';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
        "http://www.w3.org/TR/html4/frameset.dtd">
<html>
    <head>
        <meta name="author" content="Kai Oswald Seidler">
        <meta http-equiv="cache-control" content="no-cache">
      <link href="xampp.css" rel="stylesheet" type="text/css">
        <link href="img/xampp.ico" rel="shortcut icon" type="image/x-icon">
        <title>
            <?php echo trim(@file_get_contents('../../install/xampp_modell.txt')); ?>
            <?php echo trim(@file_get_contents('../../install/xampp_version.txt')); ?>
        </title>
    </head>
   
    <frameset rows="74,*" frameborder="0" framespacing="0" border="0">
        <frame name="head" src="head.php" scrolling="no" marginwidth="0" marginheight="0">
        <frameset cols="150,*" frameborder="0" framespacing="0" border="0">
            <frame name="navi" src="navi.php" scrolling="no" marginwidth="0" marginheight="0">
            <frame name="content" src="start.php" marginwidth="20" marginheight="0">
        </frameset>
    </frameset>
</html>

Re: Authentication required page?

PostPosted: 02. November 2011 00:54
by Sharley
What is the exact message you are referring to so I can perhaps find it for you?

Re: Authentication required page?

PostPosted: 02. November 2011 00:59
by AntM
Thanks - this is the whole message that would appear if wrong login info is entered:
Code: Select all
Authentication required!

This server could not verify that you are authorized to access the URL "/xampp/". You either supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

In case you are allowed to request the document, please check your user-id and password and try again.

If you think this is a server error, please contact the webmaster.
Error 401
localhost
01/11/2011 23:59:33
Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1

Re: Authentication required page?

PostPosted: 02. November 2011 01:03
by Sharley
Look in \xampp\apache\error\HTTP_UNAUTHORIZED.html.var under the Content-language: en section.

Make a backup copy of this file before editing.

Also the html files used are stored in the include folder.

Let me know back if this is what you wanted.

Re: Authentication required page?

PostPosted: 02. November 2011 01:14
by AntM
Thanks, that gets me closer - also what I wanted to change in that message were the webmaster and localhost links, I think they use these variables:

webmaster = var="SERVER_ADMIN" (got this from \xampp\apache\error\contact.html.var)

localhost = #echo var="SERVER_NAME" (got this from \xampp\apache\error\include\bottom.html)

Where can I change these though?

Re: Authentication required page?

PostPosted: 02. November 2011 01:18
by hackattack142
Check your "xampp/apache/conf/httpd.conf" about 1/3 of the way down.

Re: Authentication required page?

PostPosted: 02. November 2011 01:26
by AntM
Thanks, I've now made that section look like this:
Code: Select all
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin my@emailaddress.co.uk

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName myservername.no-ip.org:80


In that file my@emailaddress.co.uk is changed for my actual email address and myservername.no-ip.org:80 is changed for the actual server name but still no luck, the page is still on default values.

Edit: Actually, just looking at \xampp\apache\conf\httpd.conf those variables are different anyway, for example, I need SERVER_ADMIN and there it's ServerAdmin so I must need a different file(s)

Re: Authentication required page?

PostPosted: 02. November 2011 01:31
by hackattack142
Did you stop/start Apache after making the changes? I just tested changing the ServerAdmin value, starting Apache, and made a 404 page come up and it reflected the change.

Re: Authentication required page?

PostPosted: 02. November 2011 01:35
by AntM
Ahh yes, I usually forget that - schoolboy error lol. Thanks it has now reflected the changes.

Thank you also Sharley for your help.

Edit: Sorry for this, but the localhost part did not reflect the changes, it still says http://localhost/ if hovered over and it does that whether I use an ip for that var or an address - does anyone have any ideas on that please?

Edit2: I just found out that this is because I was looking at the page from the localhost address, if I look at it using the url instead of localhost then it does in fact state the server name.

Sorry for the mis-understanding and you can now lock this topic if you wish.
Thanks again for the great and speedy support.

Re: Authentication required page?

PostPosted: 02. November 2011 02:13
by Sharley
Thanks for the feedback.
Topic closed.