Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

My Application.cfm File creating trouble?

Participant ,
Jul 08, 2008 Jul 08, 2008
I am creating a AForums username/pasword from the admin panel, and when i try to login into the forums through the main admin panel it sets the sessions up aas i have dumped into ans seen their value. The I am redirecting the page the home page like

www.website.com/forums/admin/home.cfm

but i dumped over there and sessions get lossed. i have not included any application.cfm differenly in the forums, all my website uses only 1 cfm file and in this applciation file.

i have did the dfault sessting for the forum as session.forums eq false, and when i login, it just goes true.

When i locate from admin page to forums admin page, the sessions get lost.

HAs there any workaround for this. i am trying for the last couple of hours but did not find anything specific to this.

TOPICS
Getting started
800
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 08, 2008 Jul 08, 2008
sounds strange are you using cf5 in my experience there were a lot of problems with that kindof thing. Are you clearing the session vars somewhere in the cflocation maybe?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 08, 2008 Jul 08, 2008
1) Have you enabled session variables in your application.cfm? Something like:
<cfapplication
name="myApp"
sessionmanagement="yes"
sessiontimeout="#CreateTimeSpan(0, 0, 30, 0)#">

2)If you have done no. 1 above, make sure that both of your admin panel and forum admin directories have the same cfapplication name. To do this, you might want to have the structure of your directory to be similar below.

appRootDir\forum\forum_admin\home.cfm -> for your forum admin home
appRootDir\admin_panel\home.cfm -> for your main admin panel
appRootDir\application.cfm -> for your application.cfm which contains the cfapplication name that enables your session variables as shown in number 1

Note: Make sure there are no other application.cfm(or any files which creates cfapplication tag) inside in any of your forum and admin_panel directories. In short, use one cfapplication for both forum_admin and admin_panel which resides in appRootDir (assuming you have a similar structure of directories as shown above).
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 08, 2008 Jul 08, 2008
Ok what i did is i tried using the setdomaincookies="yes" in the application.cfm but it did not logged into the admin then, then i removed the setdomaincookies, and it logged in the admin.

Thereaftr in the admin, i tries to login through admin into forums but i loose the sessions.

I am using single application.cfm in the website.

<cfapplication name="mysite" clientmanagement="yes" sessionmanagement="yes"
sessiontimeout="#createtimespan(0,20,0,0)#" scriptprotect="yes"
loginstorage="session" setdomaincookies="yes">

i am using the code like above?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 08, 2008 Jul 08, 2008
Your "scriptprotect" parameter value in your cfapplication should be "none", "all", or a comma-delimited list of variable scopes(CGI,FORM,URL, etc.) in CF. You might want to check on that value.

Anyway, where do you put your application.cfm in relation to your directories "main admin" and "forum admin"? can you show us maybe a little info in your directory structure?

I'll give you an example(directory structure) where a session variable(which is enabled in application.cfm) is not recognized in another page:

appRootDir\someDir\admin_panel\home.cfm -> for your main admin panel
appRootDir\someDir\application.cfm -> for your application.cfm
appRootDir\forum\forum_admin\home.cfm -> for your forum admin home

In the above structure, only "appRootDir\someDir\admin_panel\home.cfm" can access the application.cfm since your main admin panel and application.cfm are both under the directory "appRootDir\someDir\".


Another structure similar above will be like this:

appRootDir\someDir\admin_panel\home.cfm -> for your main admin panel
appRootDir\forum\application.cfm -> for your application.cfm
appRootDir\forum\forum_admin\home.cfm -> for your forum admin home

In the above structure, only "appRootDir\forum\forum_admin\home.cfm" can access the application.cfm since your forum admin and application.cfm are both under the directory "appRootDir\forum\".


To make both directories access the same application.cfm, you should have a similar directory structure below which both directories can access application.cfm from it's current directory as below:

appRootDir\someDir\admin_panel\home.cfm -> for your main admin panel
appRootDir\application.cfm -> for your application.cfm
appRootDir\forum\forum_admin\home.cfm -> for your forum admin home

For the above structure, both main admin panel and forum admin can see/access your application.cfm since the application.cfm is accessible in "appRootDir\".

Maybe your directory structure is already similar to this but you might want to check it again. Also, are there any clearing of session variables in any of your files?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 09, 2008 Jul 09, 2008
Ok i show you clearly, What i am doing.

This is my main application: [MainApplication]/application.cfm

I use the application.cfm in admin panel as:

created a new Application.cfm and called the main application.cfm file as:

<cfinclude template = "../Application.cfm">

My forums have no application.cfm file, They are using the main Applilcation.cfm

When i login into forums from the Main adminpanel, it redirects to the forums folder outside the admin folder and then it clear the session variables.

Not know what is going around here.


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 09, 2008 Jul 09, 2008
quote:

Originally posted by: nightwolf666
Ok i show you clearly, What i am doing.
This is my main application: [MainApplication]/application.cfm
I use the application.cfm in admin panel as:
created a new Application.cfm and called the main application.cfm file as:
<cfinclude template = "../Application.cfm">


First of all, I don't think this is how you are supposed to use the Application.cfm. Everytime a cfm page/file is executed in a certain directory, CF server will actually automatically be looking for application.cfm from that current directory. If it doesn't find one, it goes one directory up and the process repeats until it finds the application.cfm and eventually, if no application.cfm is still found, it will reach the root of your cf application to look for that file. I think you need to place your Application.cfm in a similar root directory for your admin app so as not to use the <cfinclude template="../Application.cfm"> which is, I think, not the proper way of using applicaton.cfm.



quote:

Originally posted by: nightwolf666
My forums have no application.cfm file, They are using the main Applilcation.cfm
When i login into forums from the Main adminpanel, it redirects to the forums folder outside the admin folder and then it clear the session variables.
Not know what is going around here.


How do you know that your forum is using the main application.cfm? How does your forum access the application.cfm file then? Is it also by using cfinclude?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 19, 2008 Jul 19, 2008
LATEST
Although I try to make it very Simple?

I am Using Single Application.cfm

All Login Info created and Appended to the Session variables.

By default Forums sessions is set to False.

When User/admin Log in[through admin or separately in forums], It sets to true.



Now what is happening is: I log in the admin panel successfully. and then if I need to go to the forums admin panel, I need to relogin from the already logged in admin panel, that checks another table in the database and sets up the session variables to true if a match is found.

Then It move to the forums folder outside the admin folder root.

and the session got lossed up.

hope u got what i am trying here to say.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources