Thread PHP: Login mit Ldap (3 answers)
Opened by nour at 2007-06-05 11:10

nour
 2007-06-05 11:39
#10036 #10036
User since
2006-11-15
108 Artikel
BenutzerIn
[default_avatar]
hier ist die Seite auf die,die Authentication code Steht.


Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<?php

# This file was automatically generated by the MediaWiki installer.
# If you make manual changes, please keep track in case you need to
# recreate them later.

 
  $IP ="C:\\Program Files\\xampp\\htdocs\\hauptseite";


ini_set( "include_path", ".;$IP;$IP/includes;$IP/languages" );
require_once( "includes/DefaultSettings.php" );

# If PHP's memory limit is very low, some operations may fail.
# ini_set( 'memory_limit', '20M' );

if ( $wgCommandLineMode ) {
    if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
        die( "This script must be run from the command line\n" );
    }
} elseif ( empty( $wgNoOutputBuffer ) ) {
    ## Compress output if the browser supports it
    if( !ini_get( 'zlib.output_compression' ) ) @ob_start( 'ob_gzhandler' );
}

$wgSitename         = "Hauptseite";

$wgScriptPath        = "/mysite";
$wgScript           = "$wgScriptPath/index.php";
$wgRedirectScript   = "$wgScriptPath/redirect.php";

## If using PHP as a CGI module, use the ugly URLs
$wgArticlePath      = "$wgScript/$1";
# $wgArticlePath      = "$wgScript?title=$1";

$wgStylePath        = "$wgScriptPath/skins";
$wgStyleDirectory   = "$IP/skins";


$wgUploadPath       = "$wgScriptPath/images";
$wgUploadDirectory  = "$IP/images";

$wgEnableEmail = true;
$wgEnableUserEmail = true;

$wgEmergencyContact = "";
$wgPasswordSender    = "";

## For a detailed description of the following switches see
## http://meta.wikimedia.org/Enotif and http://meta.wikimedia.org/Eauthent
## There are many more options for fine tuning available see
## /includes/DefaultSettings.php
## UPO means: this is also a user preference option
$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = true; # UPO
$wgEmailAuthentication = true;

$wgDBserver         = "localhost";
$wgDBname           = "mydb";
$wgDBuser           = "user";
$wgDBpassword       = "userpassword";
$wgDBprefix         = "";

# If you're on MySQL 3.x, this next line must be FALSE:
$wgDBmysql4 = true;

# Experimental charset support for MySQL 4.1/5.0.
$wgDBmysql5 = false;

## Shared memory settings
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = array();

## To enable image uploads, make sure the 'images' directory
## is writable, then uncomment this:
$wgEnableUploads        = true;
$wgUseImageResize        = true;
#$wgUseImageMagick = true;              &
nbsp;              &
nbsp;              &
nbsp;   #änderung vorgenommen
#$wgImageMagickConvertCommand = "/usr/bin/convert";              &n
bsp;         #änderung vorgenommen

## If you want to use image uploads under safe mode,
## create the directories images/archive, images/thumb and
## images/temp, and make them all writable. Then uncomment
## this, if it's not already uncommented:'
$wgHashedUploadDirectory = false;              
               
           # änderung image???

## If you have the appropriate support software installed
## you can enable inline LaTeX equations:
$wgUseTeX            = true;
$wgMathPath         = "{$wgUploadPath}/math";
$wgMathDirectory    = "{$wgUploadDirectory}/math";
$wgTmpDirectory     = "{$wgUploadDirectory}/tmp";

$wgLocalInterwiki   = $wgSitename;

$wgLanguageCode = "de";

$wgProxyKey = "596c139c5d489f462823d353e6504346e205c7b255174616b211bd228080a33";

## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
# $wgDefaultSkin = 'monobook';

## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
$wgEnableCreativeCommonsRdf = true;
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "http://www.gnu.org/copyleft/fdl.html";
$wgRightsText = "GNU Free Documentation License 1.2";
$wgRightsIcon = "${wgStylePath}/common/images/gnu-fdl.png";
# $wgRightsCode = "gfdl"; # Not yet used

$wgDiff3 = "";

# Special Permission View
define( 'Permissions_CONVENIENCE_LINKS' , true )  ;
include_once('includes/SpecialPermissions.php');

# GoogleMaps Extension
include("extensions/gmaps/gmaps.php");

# MapPoints Extension
include("extensions/MapPoints.php");

# LinkedImages
#include("extensions/LinkedImages.php");


#LDAP Authentication
require_once( 'LdapAuthentication.php' );
$wgAuth = new LdapAuthenticationPlugin();
$wgLDAPDomainNames = array( "LDAP" );

$wgLDAPServerNames = array( "LDAP"=>"domaincontroller" );
#$wgLDAPSearchStrings = array( "domaincontroller"=>"uid=USER-NAME,ou=people,o=firmaNAme,dc=fima,dc=com?(objectclass"  );
$wgLDAPSearchStrings = array( "domaincontroller"=>"uid=USER-NAME,ou=people,o=firmaNAme,dc=fima,dc=com?(departmentNumber=5)"  );
$wgLDAPSearchAttributes = array( "domaincontroller"=>"uid"  ); // USER-NAME must map to "uid"
$wgLDAPBaseDNs = array("domaincontroller"=>"ou=people,o=firmaNAme,dc=firma,dc=com");
$wgLDAPUseSSL = false;
$wgLDAPUseLocal = false;
$wgLDAPAddLDAPUsers = false;
$wgLDAPUpdateLDAP = false;
$wgLDAPMailPassword = false;
$wgLDAPRetrievePrefs = true;
$wgMinimalPasswordLength = 8;
$wgLDAPRequireAuthAttribute =true;
#$wgLDAPAuthAttribute = array ("domaincontroller"=>"departmentNumber=5");
require_once("extensions/inputbox.php");
?>



hier ist die HAuptseite Inex.php auf die müssen sich die mitarbeiter einloggen.

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
session_start();
?>


<html>
<head>
</head>
<body>
<center>

<br><br><br><br><br><br><br>
<?
if($_GET['linkTo']!='')
      $linkTo= "&returnto=".trim($_GET['linkTo']);
?>
<br>
br>
<table>
<form name="userlogin" id="userlogin" method="post" action="/Hauptseite/index.php?title=Spezial:Userlogin&amp;typ=submitlogin<? echo $linkTo; ?>">

<table border='0' style="font-family:Verdana; font-size:small">
        <tr>
            <td align='right'><label for='wpName'>Login: </label></td>

            <td align='left'>
               
 <input tabindex='1' type='text' name="wpName" id="wpName"
               
     value="" size='20' />
            </td>
            <td align='left'>
               
 <input tabindex='3' type='checkbox' name="wpRemember"
               
     value="1" id="wpRemember"
               
               
          /><label for="wpRemember">Dauerhaftes Einloggen</label>
            </td>
        </tr>
        <tr>

            <td align='right'><label for='wpPassword'>Passwort: </label></td>
            <td align='left'>
               
 <input tabindex='2' type='password' name="wpPassword" id="wpPassword"
               
     value="" size='20' />
            </td>
            <td align='left'>
               
 <input tabindex='4' type='submit' name="wpLoginattempt"
               
     value="Anmelden" />
            </td>
        </tr>

                       <tr>
            <td align='right'>Domäne: </td>
            <td align='left'>
               
 <select tabindex='11' name="wpDomain" value="invaliddomain">
               
     <option> LDAP</option>
               
     <option>Local</option>
               
     </select>


            </td>

        </tr>

               
 </table>
</form>

<br>
<!--<font style="font-family:Verdana; font-size:medium" color="#ff0000">(BETA-Status)</font>-->
</center>
</body>
</html>


danke im voraus


---
Modedit Gwendragon: Doppelpost gelöscht
---\n\n

<!--EDIT|GwenDragon|1181031381-->

View full thread PHP: Login mit Ldap