Home arrow Forum Login / Timeout Problems.
  Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 08:54:33 PM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  Joomla-SMF Forum Support
| | |-+  Joomla-SMF 1.1.x (Moderators: -Wolverine, kai920)
| | | |-+  Login / Timeout Problems.
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: 1 [2] Go Down Print
Author Topic: Login / Timeout Problems.  (Read 5800 times)
Scott
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 17


View Profile
Re: Login / Timeout Problems.
« Reply #15 on: April 19, 2006, 11:39:04 AM »

Error= Failed: Code to be patched not found in file: /home/httpd/vhosts/live4soccer.com/httpdocs/index.php

index.php =
<?php
/**
* @version $Id: index.php,v 1.6 2005/11/21 11:57:20 csouza Exp $
* @package Mambo
* @copyright (C) 2000 - 2005 Miro International Pty Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* Mambo is Free Software
*/

// fix to address the globals overwrite problem in php versions < 4.4.1
$protect_globals = array('_REQUEST', '_GET', '_POST', '_COOKIE', '_FILES', '_SERVER', '_ENV', 'GLOBALS', '_SESSION');
foreach ($protect_globals as $global) {
    if ( in_array($global , array_keys($_REQUEST)) ||
         in_array($global , array_keys($_GET))     ||
         in_array($global , array_keys($_POST))    ||
         in_array($global , array_keys($_COOKIE))  ||
         in_array($global , array_keys($_FILES))) {
        die("Invalid Request.");
    }
}

/** Set flag that this is a parent file  */
define( '_VALID_MOS', 1 );

// checks for configuration file, if none found loads installation page
if ( !file_exists( 'configuration.php' ) || filesize( 'configuration.php' ) < 10 ) {
   header( 'Location: installation/index.php' );
   exit();
}

include_once( 'globals.php' );
require_once( 'configuration.php' );

// displays offline page
if ( $mosConfig_offline == 1 ){
   include( 'offline.php' );
   exit();
}

require_once( 'includes/mambo.php' );
if (file_exists( 'components/com_sef/sef.php' )) {
   require_once( 'components/com_sef/sef.php' );
} else {
   require_once( 'includes/sef.php' );
}
require_once( 'includes/frontend.php' );

/*
Installation sub folder check, removed for work with CVS*/
if (file_exists( 'installation/index.php' )) {
   include ('offline.php');
   exit();
}
/**/
/** retrieve some expected url (or form) arguments */
$option = trim( strtolower( mosGetParam( $_REQUEST, 'option' ) ) );
$Itemid = intval( mosGetParam( $_REQUEST, 'Itemid', null ) );
$database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );
$database->debug( $mosConfig_debug );
$acl = new gacl_api();

if ($option == '') {
   if ($Itemid) {
      $query = "SELECT id, link"
      . "\n FROM #__menu"
      . "\n WHERE menutype='mainmenu'"
      . "\n AND id = '$Itemid'"
      . "\n AND published = '1'"
      ;
      $database->setQuery( $query );
   } else {
      $query = "SELECT id, link"
      . "\n FROM #__menu"
      . "\n WHERE menutype='mainmenu' AND published='1'"
      . "\n ORDER BY parent, ordering LIMIT 1"
      ;
      $database->setQuery( $query );
   }
   $menu = new mosMenu( $database );
   if ($database->loadObject( $menu )) {
      $Itemid = $menu->id;
   }
   $link = $menu->link;
   if (($pos = strpos( $link, '?' )) !== false) {
      $link = substr( $link, $pos+1 ). '&Itemid='.$Itemid;
   }
   parse_str( $link, $temp );
   /** this is a patch, need to rework when globals are handled better */
   foreach ($temp as $k=>$v) {
      $GLOBALS[$k] = $v;
      $_REQUEST[$k] = $v;
      if ($k == 'option') {
         $option = $v;
      }
   }
}

/** mainframe is an API workhorse, lots of 'core' interaction routines */
$mainframe = new mosMainFrame( $database, $option, '.' );
$mainframe->initSession();

// checking if we can find the Itemid thru the content
if ( $option == 'com_content' && $Itemid === 0 ) {
   $id = intval( mosGetParam( $_REQUEST, 'id', 0 ) );
   $Itemid = $mainframe->getItemid( $id );
}

/** do we have a valid Itemid yet?? */
if ( $Itemid === 0 ) {
   /** Nope, just use the homepage then. */
   $query = "SELECT id"
   . "\n FROM #__menu"
   . "\n WHERE menutype='mainmenu'"
   . "\n AND published='1'"
   . "\n ORDER BY parent, ordering"
   . "\n LIMIT 1"
   ;
   $database->setQuery( $query );
   $Itemid = $database->loadResult();
}

/** patch to lessen the impact on templates */
if ($option == 'search') {
   $option = 'com_search';
}

// loads english language file by default
if ( $mosConfig_lang == '' ) {
   $mosConfig_lang = 'english';
}
include_once ( 'language/'.$mosConfig_lang.'.php' );

// frontend login & logout controls
$return = mosGetParam( $_REQUEST, 'return', NULL );
$message = mosGetParam( $_POST, 'message', 0 );
if ($option == "login") {
   $mainframe->login();

   // JS Popup message
   if ( $message ) {
      ?>
      <script>
      <!--//
      alert( "<?php echo _LOGIN_SUCCESS; ?>" );
      //-->
      </script>
      <?php
   }

   if ($return) {
      mosRedirect( $return );
   } else {
      mosRedirect( 'index.php' );
   }

} else if ($option == "logout") {
   $mainframe->logout();

   // JS Popup message
   if ( $message ) {
      ?>
      <script>
      <!--//
      alert( "<?php echo _LOGOUT_SUCCESS; ?>" );
      //-->
      </script>
      <?php
   }

   if ($return) {
      mosRedirect( $return );
   } else {
      mosRedirect( 'index.php' );
   }
}

/** get the information about the current user from the sessions table */
$my = $mainframe->getUser();

/** detect first visit */
$mainframe->detect();

$gid = intval( $my->gid );

// gets template for page
$cur_template = $mainframe->getTemplate();
/** temp fix - this feature is currently disabled */

/** @global A places to store information from processing of the component */
$_MOS_OPTION = array();

// precapture the output of the component
require_once( $mosConfig_absolute_path . '/editor/editor.php' );

ob_start();
if ($path = $mainframe->getPath( 'front' )) {
   $task = mosGetParam( $_REQUEST, 'task', '' );
   $ret = mosMenuCheck( $Itemid, $option, $task, $gid );
   if ($ret) {
      require_once( $path );
   } else {
      mosNotAuth();
   }
} else {
   echo _NOT_EXIST;
}
$_MOS_OPTION['buffer'] = ob_get_contents();
ob_end_clean();

initGzip();

header( 'Expires: Mon, 26 Jul 1997 05:00:00 GMT' );
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
header( 'Cache-Control: post-check=0, pre-check=0', false );
header( 'Pragma: no-cache' );

// loads template file
if ( !file_exists( 'templates/'. $cur_template .'/index.php' ) ) {
   echo _TEMPLATE_WARN . $cur_template;
} else {
   require_once( 'templates/'. $cur_template .'/index.php' );
   echo "<!-- ".time()." -->";
}

// displays queries performed for page
if ($mosConfig_debug) {
   echo $database->_ticker . ' queries executed';
   echo '<pre>';
    foreach ($database->_log as $k=>$sql) {
        echo $k+1 . "\n" . $sql . '<hr />';
   }
}

doGzip();
?>

Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: Login / Timeout Problems.
« Reply #16 on: April 19, 2006, 11:50:54 AM »

Well there is your problem, that isn't an original Mambo 4.5.3h index.php because the login section(around line 135) should look like this:

// frontend login & logout controls
$return = mosGetParam( $_REQUEST, 'return', NULL );
if ($option == "login") {
   $mainframe->login();

   // JS Popup message
   if ( mosGetParam( $_POST, 'message', 0 ) ) {
      ?>
      <script>
      <!--//
      alert( "<?php echo _LOGIN_SUCCESS; ?>" );
      //-->
      </script>
      <?php
   }

   if ($return) {
      mosRedirect( $return );
   } else {
      mosRedirect( 'index.php' );
   }

} else if ($option == "logout") {
   $mainframe->logout();

   // JS Popup message
   if ( mosGetParam( $_POST, 'message', 0 ) ) {
      ?>
      <script>
      <!--//
      alert( "<?php echo _LOGOUT_SUCCESS; ?>" );
      //-->
      </script>
      <?php
   }

   if ($return) {
      mosRedirect( $return );
   } else {
      mosRedirect( 'index.php' );
   }
}

The bold sections are the sections we patch and are missing from your file.  So you didn't actually follow my instructions which was to upload a clean 4.5.3h index.php.  Try that and then see if it works.
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Scott
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 17


View Profile
Re: Login / Timeout Problems.
« Reply #17 on: April 19, 2006, 12:27:17 PM »

Hey thats because my mambo version is 4.5.3 not 4.5.3h
Logged
Scott
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 17


View Profile
Re: Login / Timeout Problems.
« Reply #18 on: April 19, 2006, 02:02:55 PM »

Ok I have updated my index.php to reflect what you have. Installed that beta version you sent me. Everything is still the same, nothing has changed?

 Huh
Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: Login / Timeout Problems.
« Reply #19 on: April 19, 2006, 03:05:57 PM »

don't just update the index file if it's not part of your mambo version.  I thought you were running 4.5.3h so that was my mistake.  And please be specific in posting your responses, I hate guessing.   If you are still receiving an error message make sure and put, I am still receiveing this error message.

I need to make another modification to the bridge to handle people still running 4.5.3.  You will have to wait for that mod. 
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Scott
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 17


View Profile
Re: Login / Timeout Problems.
« Reply #20 on: April 19, 2006, 03:15:50 PM »

Ok to be specific.

I updated my Mambo version to 4.5.3h from 4.5.3 to see if that helped "not just my index file"!
Sorry I though you were following this thread so I did not want to keep reposting the same stuff. But if thats what you want me to do I will do that.

MAMBO: 4.5.3h
Community Builder 1.0 RC2
SMF 1.1 RC2
com_joomla_smf_forum_1_1_03_beta.zip
Joomla-SMF_cb_plugin_1_0_1.zip


If I login it automatically redirects me to the forum. Which I set both the redirect options in the config to 0. So not sure why it is doing that.

Then once I am logged in and I am in the forum if I try and post something I get an error. "Your session timed out while posting. Please try to re-submit your message. No subject was filled in. The message body was left empty."

If I go directly to the forum http://www.live4soccer.com/smf/index.php and login the forum works great. Just not in combination with the CB login module.

And I did go through the recommended SMF & server settings for the forum itself but no difference?

I hope that explains where I am at now.
Logged
Scott
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 17


View Profile
Re: Login / Timeout Problems.
« Reply #21 on: April 28, 2006, 08:38:17 AM »

Hey there Wolverine,

I stayed away for a bit in hopes there would be a fix for my problem. Any luck with the timeout issue? Here is my info of what I am using and the problem.

MAMBO: 4.5.3h
Community Builder 1.0 RC2
SMF 1.1 RC2
com_joomla_smf_forum_1_1_03_beta.zip
Joomla-SMF_cb_plugin_1_0_1.zip

Once I am logged in and I am in the forum if I try and post something I get an error. "Your session timed out while posting. Please try to re-submit your message. No subject was filled in. The message body was left empty."

It does redirect me to the forum but I can live with that. It is this timeout problem that is driving me crazy. I tried to use the mod_joomla_smf_login_1_4_1.zip module but it still does the same thing. Any new suggestions?

Thanks
Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: Login / Timeout Problems.
« Reply #22 on: April 28, 2006, 12:37:47 PM »

"Your session timed out while posting. Please try to re-submit your message. No subject was filled in. The message body was left empty."

It seems like that error message was an unfixed SMF problem with 1.1RC1 and 2 but I am not certain.  I am not sure at this point.  You aren't storing cookies locally on the server(SMF admin setting) are you? 

You might do some searching on the SMF forums as well:
simplemachines.org
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Scott
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 17


View Profile
Re: Login / Timeout Problems.
« Reply #23 on: April 28, 2006, 12:46:47 PM »

"Enable local storage of cookies" is not checked in the smf config.

I will give the smf site a try.
Logged
Scott
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 17


View Profile
Re: Login / Timeout Problems.
« Reply #24 on: May 02, 2006, 02:12:45 PM »

Hey Wolverine,

Had a look around the SMF forums like you said and nothing that I found made any difference. Most of what I found was changing the theme which did nothing.

Running out of choices here. Any other ideas?
Logged
Scott
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 17


View Profile
Re: Login / Timeout Problems.
« Reply #25 on: May 09, 2006, 08:19:46 AM »

Hey Wolverine any new ideas or patches for my timeout issue?

Thanks
Logged
Pages: 1 [2] Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
MamboBuzz.com
Search Contact About Advertise Blogs Topsites Submit News Register Login