[PHP-DEV] include() and sessions

2003-02-11 Thread Lindsey Simon
I have a situation involving my session and an include(). 

I'm trying to include() a page using the full path. My session is
registered and I can verify all is well with it. I want to retain the
session from within the page I'm including. 

So:

I'm pasting my code here (please ignore the variables except the session
stuff at the end.

$this_URL = $URL . index.php?modu=display_shotsshow_ident= .
$_REQUEST['select_ident'] . select_ident= . $_REQUEST['select_ident']
. noheader=1nofooter=1no_print_link=1add_record=1 .
session_name() . = . session_id();
include($this_URL);

my webserver just hangs and I have to restart it in order to get any
more pages from anywhere on the server.

I've tested this in 4.2.3 and 4.3.

Is my syntax correct in terms of what I should append to the
URL when include()ing it? I'm basing it on what I read about passing SID
(which I can't use since it's returning empty on the page where I have
the include() line)

Thanks for your help,
-l


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] include() and sessions

2003-02-11 Thread Lindsey Simon
Hey Chris, sorry - I only included it on this list because of the server
timeout thing. When I pass the session id and name my server hangs on
the include. I thought it might be pertinent. 

 Also, as a guess to your problem, when you include a resource by URL, you are
 going to receive the same output that a browser would (when you view source),
 so any PHP code in that resource is going to be executed prior to receipt. If
 this is a local file, you should use the filesystem path instead. For example:

 include '/home/lindsey/public_html/foo.php';
 
 instead of:
 
 include 'http://www.example.org/~lindsey/foo.php';

This is correct, I want the code to be executed. Specifically, I want to
pass GET variables along with the include that are not the same as the
current state of the GET variables on the page I'm calling include from.

 If you must use a URL and you want to retain session, you will have to pass
 your session identifier on the URL.

(see above)

 Chris
 
 --- Lindsey Simon [EMAIL PROTECTED] wrote:
  I have a situation involving my session and an include(). 
  
  I'm trying to include() a page using the full path. My session is
  registered and I can verify all is well with it. I want to retain the
  session from within the page I'm including. 
  
  So:
  
  I'm pasting my code here (please ignore the variables except the session
  stuff at the end.
  
  $this_URL = $URL . index.php?modu=display_shotsshow_ident= .
  $_REQUEST['select_ident'] . select_ident= . $_REQUEST['select_ident']
  .. noheader=1nofooter=1no_print_link=1add_record=1 .
  session_name() . = . session_id();
  include($this_URL);
  
  my webserver just hangs and I have to restart it in order to get any
  more pages from anywhere on the server.
  
  I've tested this in 4.2.3 and 4.3.
  
  Is my syntax correct in terms of what I should append to the
  URL when include()ing it? I'm basing it on what I read about passing SID
  (which I can't use since it's returning empty on the page where I have
  the include() line)
  
  Thanks for your help,
  -l

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] include() and sessions

2003-02-11 Thread George Schlossnagle
Interesting, I get the same hang when I do this on OSX with head

php 'foo.php?a=b'

Foo is any php script (including an empty file).

This returns no such file foo.php?a=b on linux.

Will open a bug.

George

On Tuesday, February 11, 2003, at 05:31  PM, Lindsey Simon wrote:


Hey Chris, sorry - I only included it on this list because of the 
server
timeout thing. When I pass the session id and name my server hangs on
the include. I thought it might be pertinent.

Also, as a guess to your problem, when you include a resource by URL, 
you are
going to receive the same output that a browser would (when you view 
source),
so any PHP code in that resource is going to be executed prior to 
receipt. If
this is a local file, you should use the filesystem path instead. For 
example:


include '/home/lindsey/public_html/foo.php';

instead of:

include 'http://www.example.org/~lindsey/foo.php';


This is correct, I want the code to be executed. Specifically, I want 
to
pass GET variables along with the include that are not the same as the
current state of the GET variables on the page I'm calling include 
from.

If you must use a URL and you want to retain session, you will have 
to pass
your session identifier on the URL.

(see above)


Chris

--- Lindsey Simon [EMAIL PROTECTED] wrote:

I have a situation involving my session and an include().

I'm trying to include() a page using the full path. My session is
registered and I can verify all is well with it. I want to retain the
session from within the page I'm including.

So:

I'm pasting my code here (please ignore the variables except the 
session
stuff at the end.

$this_URL = $URL . index.php?modu=display_shotsshow_ident= .
$_REQUEST['select_ident'] . select_ident= . 
$_REQUEST['select_ident']
.. noheader=1nofooter=1no_print_link=1add_record=1 .
session_name() . = . session_id();
include($this_URL);

my webserver just hangs and I have to restart it in order to get any
more pages from anywhere on the server.

I've tested this in 4.2.3 and 4.3.

Is my syntax correct in terms of what I should append to the
URL when include()ing it? I'm basing it on what I read about passing 
SID
(which I can't use since it's returning empty on the page where I 
have
the include() line)

Thanks for your help,
-l

--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php