1

I have two instances of Apache installed as services, using different .conf files and listening on different ports. This is to host version 2 of our software while still having version 1 available for support on our test system.

Everything works OK, except if I log into both instances, PHP session information is being shared across the two sites. This is a problem, as links to cases in our V1 database are showing up on the V2 page.

I suspect that the session info is being stored on the server in the same place for both instances. I think this is a PHP variable - is there any way that I can set this value in the Apache CONF file?

(I am not using Virtual Hosts). Thanks.

OriginalBigBri
  • 163
  • 2
  • 13
  • Set one of the instances to use a different location for the session files. It is in the .conf file for Apache. See here (possible duplicate) http://stackoverflow.com/questions/4927850/location-for-session-files-in-apache-php – Fluffeh Jul 20 '15 at 09:37
  • If they're both storing session data in the same location then change one instance to use another location. Additionally, configure one instance to use a different name for the session ID cookie (it defaults to PHPSESSID) – GordonM Jul 20 '15 at 09:39
  • Quite a lot of the code uses the session variable names, so I didn't want to change that, but I have found how to set the location (ironically after an hour of searching fruitlessly, found it 2 minutes after posting this question). – OriginalBigBri Jul 20 '15 at 09:50

1 Answers1

0

Thanks for the replies. I didn't know where to set the path in the Apache config rather than the PHP.INI, but I have set it here and it works:

<IfModule php5_php5.c>
  php_value session.save_path "C:\APACHE\sessions\v2"
</IfModule>

Thanks again.

OriginalBigBri
  • 163
  • 2
  • 13