Session data not coming on next page

Hi,

I have a simple login script which set $_SESSION[“user_id”] to 1. But on a specifc page in which is using mod-rewrite …does not gets that and session array is empty. But if I goto any other page which does not uses mod-rewrite then it works. My mod-rewrite code is simple:

DirectoryIndex index.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* showpage.php [QSA,L]

It just redirects all to showpage.php which simply extracts the URL but somehow the sessions array is empty in this page. Weird.

How do I debug this or find out why the session data is not coming on this page ???

Thanks.

When mod-rewrite is disabled for the page concerned, does the session data then pick up ok?

Does the page concerned call session_start() before trying to access the $_SESSION array?