Forums / General Questions / Script which loads login page?

Script which loads login page?

Locked

Views: 2,339

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
27 Jun 2008, 9:18 AM
#1
marksu avatar

marksu

Zen Follower

Join Date:
Nov 2007
Posts:
260
Plugin Contributions:
0

Script which loads login page?

How does zen cart verify that user has logged in?

I presume it is by session variable?
Can somebody give me closer details?

My problem is that I have integrated a flash object to my zen cart which runs a page but it return only login page even though I already have logged in?

marksu

28 Jun 2008, 8:53 PM
#3
marksu avatar

marksu

Zen Follower

Join Date:
Nov 2007
Posts:
260
Plugin Contributions:
0

Re: Script which loads login page?

Where can I find the script that autoloads the login page if zen cart can't find login information.

My problem is that my module is using javascript which needs to load a page, but it keeps giving the login page instead.

I been loking it for ages now and it is getting frustrating.

Please pretty please give me some direction.

28 Jun 2008, 9:07 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Script which loads login page?

My problem is that my module is using javascript which needs to load a page
Please fill in some details about what this is??
Is this some "custom" module &/or js or is it that your default install is mis-behaving?

Zen-Venom Get Bitten

28 Jun 2008, 9:12 PM
#5
marksu avatar

marksu

Zen Follower

Join Date:
Nov 2007
Posts:
260
Plugin Contributions:
0

Re: Script which loads login page?

Seems like after I ask for instruction I find the place my self. :)

Correction I do not used javascript but flash object instead, I misswrote in last message.

I wonder how can I fix situation that flash object keeps returning login page and not the page I asked for.

Problem seem that (!isset($_SESSION['admin_id'])) return TRUE meaning that session is not set?

I cant understand why session is empty.
Could it be that flash object uses separate session id?

Any info any one?

28 Jun 2008, 9:14 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Script which loads login page?

What kind of flash?

A flash page or a flash movie as a header or??

Post a link to let us see

Zen-Venom Get Bitten

28 Jun 2008, 9:56 PM
#7
marksu avatar

marksu

Zen Follower

Join Date:
Nov 2007
Posts:
260
Plugin Contributions:
0

Re: Script which loads login page?

Thans for responding. :)

I have not link as it is on my test computer.

This is my case:
Page A and B are first running application_top.php, so in my understanding the session should started. Page B script task would be to upload a file.

Page A includes a flash object and flash object runs Page B which include some upload script.

Instead of running the upload script the application_top.php code redirect the Page B to login page. So flash object gets the login page and not the page B upload script.

My logic so far is that flash might you other session id?
Or can there be other reason login page is activated.

Note: Before comming to Page A I have logged my self in.

28 Jun 2008, 10:02 PM
#8
marksu avatar

marksu

Zen Follower

Join Date:
Nov 2007
Posts:
260
Plugin Contributions:
0

Re: Script which loads login page?

Righ now I test my theory.
I first need to figure out how to get sesion id with PHP and then send that with the URL.

Then I need to have my uplod script update the session id.
Just have to check how session id can be edited etc..

I tried using session_id function but it return 0?

28 Jun 2008, 11:02 PM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Script which loads login page?

Page A includes a flash object and flash object runs Page B which include some upload script.
Upload??? uploading what?? Is this a hack?

Zen-Venom Get Bitten

29 Jun 2008, 5:03 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Script which loads login page?

Moderator note: related threads have been merged.

It's also worth noting that some of the OP's other posts are probably related to the customization that's being attempted in this thread as well.
Perhaps bigger-picture information may help others to help with possible solutions.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Jun 2008, 9:05 AM
#11
marksu avatar

marksu

Zen Follower

Join Date:
Nov 2007
Posts:
260
Plugin Contributions:
0

Re: Script which loads login page?

Thank your for your responses.
O no it is no hack.
The idea is that I have a module which uses YAHOO UI Uploader component. http://developer.yahoo.com/yui/uploader/
It's intension is to provide file with upload process bar.

Flash it self has no upload features so it runs a upload script page in my module. The problem is that I need the zen cart functions and DB with the script.

Well if I dont get this solved I have to return back to regular php upload methods.

29 Jun 2008, 1:10 PM
#13
marksu avatar

marksu

Zen Follower

Join Date:
Nov 2007
Posts:
260
Plugin Contributions:
0

Re: Script which loads login page?

Well maybe it has something to do that zen cart runs session_regenerate_id() command in session.php.

includes/functions/session.php
row 157

function **zen_session_recreate() **{
global $http_domain, $https_domain, $current_domain;
if ($http_domain == $https_domain) {
$saveSession = $_SESSION;
$oldSessID = session_id();
**session_regenerate_id(); **
$newSessID = session_id();
. . .

Well not quite sure how zen cart sesion hanling realy works though?
For example when is zen_session_recreate() run etc..?
Also interesting question why the need to keep changing session id's ?
For security reasons maybe?