Support Forums

Old 04-26-2009, 10:41 PM   #1
Junior Member
 
Join Date: Mar 2009
Posts: 24
Rep Power: 1
raifs is on a distinguished road
Default Tinymce kills my session..?

Hi,

Im running 68C dev ver. 4.1.2 and got Tinymce working on my localhost site - everything is ok there. But in my publick site tinymce seems to kill admin session... When i try to change some page and click save it goes to login page.. Is there something i should of changed when I copied tinymce module from my localhost site to public site?

Regards
raifs is offline   Reply With Quote
Old 04-26-2009, 10:46 PM   #2
Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,322
Rep Power: 39
Mike-N-Tosh is just really niceMike-N-Tosh is just really nice
Default

Do you have the markitup module activated? That serves the same purpose and is also javascript which is trying to control the same functions. If you do have it active, then deactivate it.
__________________
Mike-N-Tosh
v3.1.10 Developer IndianaPC.org - A community website
Sandbox v4.0.9, 4.1
Templates, Mods & Docs for sale | My blog with much content for 68 Classifieds.
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 04-26-2009, 10:58 PM   #3
Junior Member
 
Join Date: Mar 2009
Posts: 24
Rep Power: 1
raifs is on a distinguished road
Default

Thanks for quick reply!

No, deactivated markitup. I can see tinymce toolbars and even edit texts but it seems to forget that im logged in when i try to save changes.

And IE8 (in compatibility mode - which should be like IE7.. i guess) doesnt show tinymce at all - any ideas??
raifs is offline   Reply With Quote
Old 04-26-2009, 11:09 PM   #4
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,766
Rep Power: 110
Eric Barnes is a jewel in the rough
Default

Can you check your server and see if you have registered globals turned on. And if so turn them off. Maybe it is using the same variable name.
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 04-26-2009, 11:26 PM   #5
Junior Member
 
Join Date: Mar 2009
Posts: 24
Rep Power: 1
raifs is on a distinguished road
Default

Hi,

both localhost and public server phpinfo indicates that globals are off...
raifs is offline   Reply With Quote
Old 04-27-2009, 12:23 AM   #6
Junior Member
 
Join Date: Mar 2009
Posts: 24
Rep Power: 1
raifs is on a distinguished road
Default Imagemanager

Ok,

I found out that this sessionkilling is due to a tinymce plugin I installed - imagemanager wich requires authentication to upload images - it works with localhost but not in public server. Maybe someone could guide me through this authentication issue

These lines handle imagemanager authentication


// Authentication
$mcImageManagerConfig['authenticator'] = "SessionAuthenticator";
$mcImageManagerConfig['authenticator.login_page'] = "../../../../../administration/login.php"; //this is 68C login page. I changed this so that imagemanager could underestand if administrator is logged in..
$mcImageManagerConfig['authenticator.allow_override'] = "*";

// SessionAuthenticator
$mcImageManagerConfig['SessionAuthenticator.logged_in_key'] = "logged"; //this word logged I got from 68C login.php i dont know if it is the right word but it seems to work in localhost...
$mcImageManagerConfig['SessionAuthenticator.groups_key'] = "groups";
$mcImageManagerConfig['SessionAuthenticator.user_key'] = "user";
$mcImageManagerConfig['SessionAuthenticator.path_key'] = "mc_path";
$mcImageManagerConfig['SessionAuthenticator.rootpath_key'] = "mc_rootpath";
$mcImageManagerConfig['SessionAuthenticator.config_prefix'] = "imagemanager";

Please, I really appreciate some help on this one..
raifs is offline   Reply With Quote
Old 04-27-2009, 12:48 AM   #7
Junior Member
 
Join Date: Mar 2009
Posts: 24
Rep Power: 1
raifs is on a distinguished road
Default

seems that everybody's sleeping

I'll add this code to my previous post. This is SessionAuthenticator.php file which (i guess) handles authentication itself:

PHP Code:
<?php

@session_start();

class 
Moxiecode_SessionAuthenticator extends Moxiecode_ManagerPlugin {

    function 
SessionAuthenticator() {
    }

    
/**
     * Gets called on a authenication request. This method should check sessions or simmilar to
     * verify that the user has access to the backend.
     *
     * This method should return true if the current request is authenicated or false if it's not.
     *
     * @param ManagerEngine $man ManagerEngine reference that the plugin is assigned to.
     * @return bool true/false if the user is authenticated.
     */
    
function onAuthenticate(&$man) {
        
$config =& $man->getConfig();

        
// Support both old and new format
        
$loggedInKey = isset($config['SessionAuthenticator.logged_in_key']) ? $config['SessionAuthenticator.logged_in_key'] : $config["authenticator.session.logged_in_key"];
        
$userKey = isset($config['SessionAuthenticator.user_key']) ? $config['SessionAuthenticator.user_key'] : $config["authenticator.session.user_key"];
        
$pathKey = isset($config['SessionAuthenticator.path_key']) ? $config['SessionAuthenticator.path_key'] : $config["authenticator.session.path_key"];
        
$rootPathKey = isset($config['SessionAuthenticator.rootpath_key']) ? $config['SessionAuthenticator.rootpath_key'] : $config["authenticator.session.rootpath_key"];
        
$configPrefix = (isset($config['SessionAuthenticator.config_prefix']) ? $config['SessionAuthenticator.config_prefix'] : "mcmanager") . ".";

        
// Switch path
        
if (isset($_SESSION[$pathKey]))
            
$config['filesystem.path'] = $_SESSION[$pathKey];

        
// Switch root
        
if (isset($_SESSION[$rootPathKey]))
            
$config['filesystem.rootpath'] = $_SESSION[$rootPathKey];

        
$user = isset($_SESSION[$userKey]) ? $_SESSION[$userKey] : "";
        
$user preg_replace('/[\\\\\\/:]/i'''$user);

        
// Override by prefix
        
foreach ($_SESSION as $key => $value) {
            if (
strpos($key$configPrefix) === 0)
                
$config[substr($keystrlen($configPrefix))] = $value;
        }

        foreach (
$config as $key => $value) {
            
// Skip replaceing {$user} in true/false stuff
            
if ($value === true || $value === false)
                continue;

            
$value str_replace('${user}'$user$value);
            
$config[$key] = $value;
        }

        return isset(
$_SESSION[$loggedInKey]) && checkBool($_SESSION[$loggedInKey]);
    }
}

// Add plugin to MCManager
$man->registerPlugin("SessionAuthenticator", new Moxiecode_SessionAuthenticator());
?>

Last edited by raifs; 04-27-2009 at 12:52 AM.
raifs is offline   Reply With Quote
Old 04-28-2009, 01:07 PM   #8
Junior Member
 
Join Date: Mar 2009
Posts: 24
Rep Power: 1
raifs is on a distinguished road
Default

Anybody? no ideas? Maybe there's something related to localhost and public site license key? Because in localhost it works fine and in virtual host not. And i tried it with different pc-s so it is not a cookie or cache related issue. I don't know, I can't do it alone, please help me out here.

Regards
raifs is offline   Reply With Quote
Old 04-28-2009, 01:51 PM   #9
Moderator
 
 
Join Date: Mar 2006
Posts: 4,103
Rep Power: 100
Lhotch is just really niceLhotch is just really nice
Default

Quote:
Originally Posted by raifs View Post
I found out that this sessionkilling is due to a tinymce plugin I installed - imagemanager wich requires authentication to upload images - it works with localhost but not in public server. Maybe someone could guide me through this authentication issue
Couple things, as you said, YOU installed the tinymce module so I assume its not something that comes standard with 68C. That likely means no one, or hardly anyone, has used it and therefor cant really give you support on something they know nothing about.

As for the list of variables that you displayed, if you have it working on a local system but not on a live web server, then my guess is one of the many paths asked for is incorrect.
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline   Reply With Quote
Old 04-28-2009, 04:15 PM   #10
Junior Member
 
Join Date: Mar 2009
Posts: 24
Rep Power: 1
raifs is on a distinguished road
Default

Hi,

thanks for the reply. I don't know what to say...TinyMCE module comes from mr Eric Barnes. I added this image manager which is tinymce commercial addon. I would not bother you if this addon isn't working in local server too. But it does and it is great to have a image upload function. I think that the solution is very simple but I can't put my finger on it. Paths are correct (i think - because I haven't changed them - only this 68C login.php location - it directs me to this page when I try to load imagemanager). Maybe there is still something to do with licenses...?

Regards
raifs is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
counter : once per session frommarcq v4 Questions & Support 2 12-14-2008 02:38 PM
Session IDs anna245 v4 Questions & Support 6 06-12-2008 09:11 PM
Session timeout castus v4 Questions & Support 3 12-03-2007 08:50 AM
Login Session sarep000 v3.1 Questions & Support 3 07-16-2007 11:39 AM
Session Length Maffo v3.1 Questions & Support 9 09-05-2006 02:29 PM


All times are GMT -4. The time now is 07:01 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0