+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 28 of 28
Web Development Thread, glpi .70 probs in Coding and Web Development; sure i will give it a go here is a translated link if anyone else is watching this fourm http://www.google.com/translate?u=ht...&hl=en&ie=UTF8 ...
  1. #16
    alonebfg's Avatar
    Join Date
    Aug 2006
    Location
    south west some of the time
    Posts
    834
    Thank Post
    12
    Thanked 34 Times in 21 Posts
    Blog Entries
    5
    Rep Power
    24
    sure i will give it a go here is a translated link if anyone else is watching this fourm http://www.google.com/translate?u=ht...&hl=en&ie=UTF8 how did you conferm that it was avalible
    Last edited by alonebfg; 12th January 2008 at 01:44 PM.

  2. #17
    alonebfg's Avatar
    Join Date
    Aug 2006
    Location
    south west some of the time
    Posts
    834
    Thank Post
    12
    Thanked 34 Times in 21 Posts
    Blog Entries
    5
    Rep Power
    24
    Ok it just dont work i cant automaticaly log in. I can type username and password of a domain user and it will let me log in but when i goto the site it wont automaticaly auth me its driving me nuts. It does not seem to be retriving the data from IE7 I dont know way and cant find the answer.

  3. #18
    alonebfg's Avatar
    Join Date
    Aug 2006
    Location
    south west some of the time
    Posts
    834
    Thank Post
    12
    Thanked 34 Times in 21 Posts
    Blog Entries
    5
    Rep Power
    24
    after trying and trying and trying i have come to the conclusion that this only works with windows based aphache and not linux but i am still looking into it. I have found the problem it is this sspi_auth_module modules/mod_auth_sspi.so and it can only be installed onto a windows apache php install so there is no way to get it working. Ok i think it might have something to do with the directives and where i put them any idea.
    Last edited by alonebfg; 13th January 2008 at 10:24 PM.

  4. #19
    monkeyx's Avatar
    Join Date
    Nov 2006
    Posts
    364
    Thank Post
    8
    Thanked 52 Times in 41 Posts
    Rep Power
    25
    The ntlm mod is passing through a username as I can get it echoed to the screen, but it is not getting parsed by login.php. It would appeared to have worked in release 0.68, will contact glpi project members to ask for help on this.

    Placed a post on glpi board here
    Last edited by monkeyx; 14th January 2008 at 09:01 PM.

  5. #20
    alonebfg's Avatar
    Join Date
    Aug 2006
    Location
    south west some of the time
    Posts
    834
    Thank Post
    12
    Thanked 34 Times in 21 Posts
    Blog Entries
    5
    Rep Power
    24
    how do you test it to see if it is working I just want to make sure. I have also installed the most resent version and it is not working still but lapd is working fine.
    Last edited by alonebfg; 15th January 2008 at 01:30 PM.

  6. #21
    monkeyx's Avatar
    Join Date
    Nov 2006
    Posts
    364
    Thank Post
    8
    Thanked 52 Times in 41 Posts
    Rep Power
    25
    Hi

    I added echo 'username: ' .$login;

    to the footer login div section in login.php and it gives my username.

    monkeyx

  7. #22
    alonebfg's Avatar
    Join Date
    Aug 2006
    Location
    south west some of the time
    Posts
    834
    Thank Post
    12
    Thanked 34 Times in 21 Posts
    Blog Entries
    5
    Rep Power
    24
    k can you put a bit more info than that i cant find out where it goes as i am not getting a echo ??My php is not good.

  8. #23
    monkeyx's Avatar
    Join Date
    Nov 2006
    Posts
    364
    Thank Post
    8
    Thanked 52 Times in 41 Posts
    Rep Power
    25
    My experimental version of index.php. Look for username: to see the little extra I added to show username and the suggested additions from authtoad link i mentioned earlier. It will add your username to bottom right, when you attach to glpi via Internet Explorer. Sorry for posting whole page but I am in a rush to start my red wine

    Been busy in Windows land last couple of days, hopefully get more time on Friday to look at this again.

    Monkeyx

    Code:
    <?php
    /*
     * @version $Id: index.php 5773 2007-10-29 11:39:49Z jmd $
     -------------------------------------------------------------------------
     GLPI - Gestionnaire Libre de Parc Informatique
     Copyright (C) 2003-2007 by the INDEPNET Development Team.
    
     http://indepnet.net/   http://glpi-project.org
     -------------------------------------------------------------------------
    
     LICENSE
    
     This file is part of GLPI.
    
     GLPI is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.
    
     GLPI is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
    
     You should have received a copy of the GNU General Public License
     along with GLPI; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     --------------------------------------------------------------------------
     */
    
    // ----------------------------------------------------------------------
    // Original Author of file:
    // Purpose of file:
    // ----------------------------------------------------------------------
    
    // Test si config_db n'existe pas on lance l'installation
    
    define('GLPI_ROOT', '.');
    
    include (GLPI_ROOT . "/config/based_config.php");
    if(!file_exists(GLPI_CONFIG_DIR . "/config_db.php")) {
    	include (GLPI_ROOT . "/inc/common.function.php");
    	glpi_header("install/install.php");
    	die();
    }
    else
    {
    	include (GLPI_ROOT . "/inc/includes.php");
    	$_SESSION["glpitest"]='testcookie';
    	// Using CAS server
    	if (!empty($CFG_GLPI["cas_host"])&&!isset($_GET["noCAS"])) {
    		glpi_header("login.php");
    	}
    
       // Authentification Automatique HTTP
     if (isset($_SERVER["REMOTE_USER"])) { 
            $pos = stripos($_SERVER["REMOTE_USER"],"\\");
            if (!$pos === false) {
                $login = substr($_SERVER["REMOTE_USER"], $pos + 1);
                if ($login != '') {
                    header("Location: login.php?login_name=".$login);
                }
            }
        }
    
    	
    	// Send UTF8 Headers
    	header("Content-Type: text/html; charset=UTF-8");
    	// Start the page
    
    
    	echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">";
    	echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"fr\" lang=\"fr\">";
    	echo "<head><title>GLPI Login</title>\n";
    	echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8 \" />\n";
    	echo "<meta http-equiv=\"Content-Script-Type\" content=\"text/javascript\" />\n";
    	echo '<link rel="shortcut icon" type="images/x-icon" href="'.$CFG_GLPI["root_doc"].'/pics/favicon.ico" />';
    
    	// Appel CSS
    	echo '<link rel="stylesheet"  href="'.$CFG_GLPI["root_doc"].'/css/styles.css" type="text/css" media="screen" />';
    	// surcharge CSS hack for IE
    	echo "<!--[if lte IE 6]>" ;
     	echo "<link rel='stylesheet' href='".$CFG_GLPI["root_doc"]."/css/styles_ie.css' type='text/css' media='screen' >\n";
     	echo "<![endif]-->";
    	echo "<script type=\"text/javascript\"><!--document.getElementById('var_login_name').focus();--></script>";
    
    	echo "</head>";
    
    	// Body with configured stuff
    	echo "<body>";
    	// contenu
    
    
    
    	echo "<div id='contenulogin'>";
    	
    	echo "<div id='logo-login'>";
    
    	echo nl2br(unclean_cross_side_scripting_deep($CFG_GLPI['text_login']));
    
    	
    	echo "</div>";
    
    
    
    	echo "<form action='login.php' method='post'>";
    	// authentification CAS 
    	if (isset($_GET["noCAS"])) echo "<input type='hidden' name='noCAS' value='1' />";
    	if (isset($_GET["noHTTP"])) echo "<input type='hidden' name='noHTTP' value='1' />";
    
    	// redirect to tracking
    	if (isset($_GET["redirect"])){
    		manageRedirect($_GET["redirect"]);
    		echo '<input type="hidden" name="redirect" value="'.$_GET['redirect'].'">';
    	}
    
    	echo "<fieldset>";
    	echo '<legend>'.$LANG["login"][10].'</legend>';
    
    
    	echo '<div class="row"><span class="label"><label>'.$LANG["login"][6].' :  </label></span><span class="formw"> <input type="text" name="login_name" id="login_name" size="15" /></span></div>';
    
    
    	echo '<div class="row"><span class="label"><label>'.$LANG["login"][7].' : </label></span><span class="formw"><input type="password" name="login_password" id="login_password" size="15" /> </span></div>';
    
    
    
    
    
    	echo "</fieldset>";
    	echo '<p ><span> <input type="submit" name="submit" value="'.$LANG["buttons"][2].'" class="submit" /></span></p>';
    	echo "</form>";
    
    	echo "<script type='text/javascript' >\n";
    	echo "document.getElementById('login_name').focus();";
    	echo "</script>";
    
    
    	echo "</div>";  // fin box login
    
    
    
    	echo '<div class="error">';
    	echo "<noscript><p>";
    	echo $LANG["login"][26];
    	echo "</p></noscript>";
    	if (isset($_GET['cookie_error'])){
    		echo $LANG["login"][27];
    	}
    	echo "</div>";
    
    
    	// Affichage autorisee FAQ
    	if ($CFG_GLPI["public_faq"]){
    		echo '<div id="box-faq" "><a href="front/helpdesk.faq.php">[ '.$LANG["knowbase"][24].' ]</a></div>';
    	}
    	
    
    	echo "</div>"; // fin contenu login
    
    	if ($CFG_GLPI["debug"]==DEMO_MODE){
    		echo "<div align='center'";
    
    		$query="SELECT count(*) 
    			FROM `glpi_event_log` 
    			WHERE message LIKE '%logged in%'";
    
    		$query2="SELECT date 
    			FROM `glpi_event_log` 
    			ORDER BY date ASC 
    			LIMIT 1";
    
    		$DB=new DB;
    		$result=$DB->query($query);
    		$result2=$DB->query($query2);
    		$nb_login=$DB->result($result,0,0);
    		$date=$DB->result($result2,0,0);
    
    		echo '<b>'.$nb_login.'</b> logins since '.$date ;
    
    		echo "</div>";
    	}
    	if ( isset($_SERVER["REMOTE_USER"])){          
    	   $login = $_SERVER["REMOTE_USER"];
    	   if ( $login != ''&& !isset($_GET["noHTTP"])){
    		header("Location: login.php?login_name=".$login);
    	   }
    	}
    
    	echo "<div id='footer-login'>";
    	echo "<a href=\"http://glpi-project.org/\" title=\"Powered By Indepnet\"  >";
    	echo 'GLPI version '.(isset($CFG_GLPI["version"])?$CFG_GLPI["version"]:"").' Copyright (C) 2003-'.date("Y").' INDEPNET Development Team.';
    	echo "</a>";
     echo 'username: '  .$login;
    
    	echo "</div>";
    
    }
    // Appel de cron
    if ($CFG_GLPI["debug"]!=DEMO_MODE){
    	callCron();
    }
    
    
    echo "</body></html>";
    
    // End
    
    
    ?>
    Last edited by monkeyx; 16th January 2008 at 09:37 PM.

  9. #24
    alonebfg's Avatar
    Join Date
    Aug 2006
    Location
    south west some of the time
    Posts
    834
    Thank Post
    12
    Thanked 34 Times in 21 Posts
    Blog Entries
    5
    Rep Power
    24
    ok thats it i have broken it now lol never mind have done a new install and it seems to be ok again. where do you put the directives as it does not seem to show my username just username:

  10. #25
    monkeyx's Avatar
    Join Date
    Nov 2006
    Posts
    364
    Thank Post
    8
    Thanked 52 Times in 41 Posts
    Rep Power
    25
    If you are running on Ubuntu you will need to install this mod

    http://mywheel.net/blog/index.php/mo...on-apache-22x/

    I then setup the apache website modifications as per

    http://glpi-project.org/wiki/doku.php?id=en:authautoad

    The index.php I sent you should then work, if not I will need to upload the login.php as well.

  11. #26
    monkeyx's Avatar
    Join Date
    Nov 2006
    Posts
    364
    Thank Post
    8
    Thanked 52 Times in 41 Posts
    Rep Power
    25
    There has been an update on the forum suggesting that this will be fixed in release 0.71 Which has just been released, but it maybe svn versions that has the fix? see http://glpi-project.org/forum/viewtopic.php?id=5188 for more.

  12. #27
    alonebfg's Avatar
    Join Date
    Aug 2006
    Location
    south west some of the time
    Posts
    834
    Thank Post
    12
    Thanked 34 Times in 21 Posts
    Blog Entries
    5
    Rep Power
    24
    ok still no luck I think it is to do with the plugin Dont think it work proplery

  13. #28
    monkeyx's Avatar
    Join Date
    Nov 2006
    Posts
    364
    Thank Post
    8
    Thanked 52 Times in 41 Posts
    Rep Power
    25
    I have had not had much time too look at this any further, but on reading further it looks as though setting up CAS is the more strategic fix for the solution of automated logins.

    A couple of recent patches to 0.70 have addressed ldap authentication issues, but I am not sure they fix the issue we are looking at.

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. PLEASE HELP ASAP E4300 Probs
    By Mr_M_Cox in forum Hardware
    Replies: 7
    Last Post: 5th December 2007, 01:53 PM
  2. Probs with Smooth Gallery on Joomla Template
    By bensewell in forum Web Development
    Replies: 2
    Last Post: 26th June 2007, 07:09 AM
  3. DHCP Probs
    By westbourne in forum Wireless Networks
    Replies: 10
    Last Post: 13th June 2007, 09:34 AM
  4. veritas backup probs
    By pickman in forum Windows
    Replies: 2
    Last Post: 21st April 2006, 07:16 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •