Posted on 2005-05-09
Last Modified: 2006-11-18
How can you make PHP/Apache know that and can share sessions.  It's annoying how you write this code to deal with sessions for your site, and if someone types it in without the www the session data is not accessable.  I am sure there is a clean way, but it escapes me at the moment.  Help out!

Question by:tha_mink
    1 Comment
    LVL 6

    Accepted Solution

    Hi tha_mink,

    You need to change session.cookie_domain to your domain, for example "".
    You can set it using php.ini, or .htaccess or inside your script - ini_set('session.cookie_domain', '')

    German Rumm.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now