FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Session Not Working In Folders?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Session Not Working In Folders? [message #176203] Sat, 03 December 2011 18:42 Go to next message
Amit Prakash Pawar is currently offline  Amit Prakash Pawar
Messages: 10
Registered: October 2010
Karma: 0
Junior Member
Hi,

I have index.php on root.
Session register using $_session['user']

and redirected to abc/demo.php

but on this location abc/demo.php session not working.
session not working in directories .

is that any setting in php.ini or anything?

Same thing working on local(xampp) but on working on live server.

How to solve this?
Re: Session Not Working In Folders? [message #176205 is a reply to message #176203] Sat, 03 December 2011 20:12 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 12/3/2011 1:42 PM, Amit Prakash Pawar wrote:
> Hi,
>
> I have index.php on root.
> Session register using $_session['user']
>
> and redirected to abc/demo.php
>
> but on this location abc/demo.php session not working.
> session not working in directories .
>
> is that any setting in php.ini or anything?
>
> Same thing working on local(xampp) but on working on live server.
>
> How to solve this?

So you call session_start() on every page before you use anything from
the session or output ANYTHING (including white space) to the client?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Session Not Working In Folders? [message #176206 is a reply to message #176203] Sat, 03 December 2011 20:13 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 12/3/2011 1:42 PM, Amit Prakash Pawar wrote:
> Hi,
>
> I have index.php on root.
> Session register using $_session['user']
>
> and redirected to abc/demo.php
>
> but on this location abc/demo.php session not working.
> session not working in directories .
>
> is that any setting in php.ini or anything?
>
> Same thing working on local(xampp) but on working on live server.
>
> How to solve this?

BTW - session_register() has been deprecated. The correct way to
set/use session variables is the $_SESSION superglobal array.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Session Not Working In Folders? [message #176209 is a reply to message #176203] Mon, 05 December 2011 08:24 Go to previous messageGo to next message
alvaro.NOSPAMTHANX is currently offline  alvaro.NOSPAMTHANX
Messages: 277
Registered: September 2010
Karma: 0
Senior Member
El 03/12/2011 19:42, Amit Prakash Pawar escribió/wrote:
> I have index.php on root.
> Session register using $_session['user']

Variables case case-sensitive. You should be using $_SESSION (uppercase).

> and redirected to abc/demo.php
>
> but on this location abc/demo.php session not working.
> session not working in directories .

But... is it working anywhere else?



--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
Re: Session Not Working In Folders? [message #176212 is a reply to message #176203] Tue, 06 December 2011 04:21 Go to previous message
Hans Olo is currently offline  Hans Olo
Messages: 7
Registered: October 2011
Karma: 0
Junior Member
On 12/3/2011 12:42 PM, Amit Prakash Pawar cried from the depths of the
abyss:
> Hi,
>
> I have index.php on root.
> Session register using $_session['user']
>
> and redirected to abc/demo.php
>
> but on this location abc/demo.php session not working.
> session not working in directories .
>
> is that any setting in php.ini or anything?
>
> Same thing working on local(xampp) but on working on live server.
>
> How to solve this?

Why don't your paste you index & demo code.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Softec Delhi December 10th
Next Topic: Warning: Install folder still exist!
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 27 16:29:12 GMT 2024

Total time taken to generate the page: 0.03607 seconds