Jump to content

stuartmarsh

Members
  • Posts

    49
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

stuartmarsh's Achievements

Member

Member (2/5)

0

Reputation

  1. Hmmm I've just renamed the .htaccess to old.htaccess and the problem persists.
  2. I think your right, this may be a .htaccess issue as I've just created another sub-domain and the problem does not occur. So are these rules redirecting regardless? It should only redirect if the domain ends .com or doesn't begin www.
  3. I don't think its cookies. The code in the first post is the only code in the files and register Globals is off. I've tried a few different names and they all result in the same problem.
  4. I've echoed session_id and it remains the same at all times. Only one .htaccess in the root, code below: RewriteEngine on RewriteCond %{HTTP_HOST} ^domain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.domain.com$ [OR] RewriteCond %{HTTP_HOST} ^domain.co.uk$ RewriteRule ^/?$ "http\:\/\/www\.domain\.co\.uk" [R=301,L] #Route HTML pages through index.php (page.html -> index.php?page) RewriteRule ^(.+)\.html$ index.php?file=$1 [NC]
  5. I've added those lines of code to both files, run them, and I still experience the problem.
  6. Sorry didn't mean switching domains, meant url. Both url's are on a dev sub-domain (dev.domain.co.uk/test.php & dev.domain.co.uk/admin/test.php). Code is at the bottom of the first post.
  7. Hi, I'm not switching between domains and phpinfo() shows session.cookie_path set as /.
  8. Hi all, I have two PHP files, one in root and the other in a folder called admin. If I set $_SESSION in a file in the admin folder and then view $_SESSION in any other file within the admin folder, everything is OK. However, if I then go to a file in root $_SESSION is blank, and it is blank if I then go back to a file in admin. This problem only exists on my hosting and doesn't happen on a local dev machine. I've compared the php.ini session settings and there both the same. Any ideas? Files admin/test.php <?php session_start(); if( empty($_SESSION) ) { echo "Session not set<br />"; $_SESSION['test'] = "test"; } echo "<pre>";var_dump($_SESSION);echo "</pre>"; /test.php <?php session_start(); echo "<pre>";var_dump($_SESSION);echo "</pre>";
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.