Session Not Working In Folders? [message #176203] |
Sat, 03 December 2011 18:42 |
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 |
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 |
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 |
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 |
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.
|
|
|