V
V
VicTHOR2019-12-10 16:55:24
PHP
VicTHOR, 2019-12-10 16:55:24

How to store multiple sessions for each site? Double demon?

php.d has these settings

session.save_path = "/tmp/php_sessions/www"
upload_tmp_dir = "/tmp/php_upload/www"

Now there (along the indicated paths) are the files of the site, I wanted to raise a new site on the Bitrix CMS, and she complained that she could not record sessions (everything is ok with rights), apparently she wants to record the same names, maybe she checks for availability ..
I can’t just copy the setting, I need to tell a specific site where to store sessions, for example. How to do it?

PS in Linux I do not rummage)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
VicTHOR, 2020-03-24
@VicTHOR

apache settings override php settings, you can specify different session directories for different proxies.

#server1.conf
Listen 127.0.0.1:8888
<VirtualHost 127.0.0.1:8888>
  # ...

  <Directory /home/user/server1/>
    # ...
    php_admin_value session.save_path /tmp/php_sessions/server1
    php_admin_value upload_tmp_dir /tmp/php_upload/server1
  </Directory>

  # ...
</VirtualHost>

#server2.conf
Listen 127.0.0.1:8889
<VirtualHost 127.0.0.1:8889>
  # ...

  <Directory /home/user/server2/>
    # ...
    php_admin_value session.save_path /tmp/php_sessions/server2
    php_admin_value upload_tmp_dir /tmp/php_upload/server2
  </Directory>

  # ...
</VirtualHost>

F
FanatPHP, 2019-12-10
@FanatPHP

and she complained that she could not record sessions (everything is ok with rights), apparently she wants to record the same names,

Here we are seeing a very common cognitive disorder, "taking fantasy for reality."
It is really very common, more than 50% of the "problems" faced by novice programmers are caused by it.
What do we see here?
An unfounded statement is taken, "everything is ok with the rights", is taken on faith, and then the flight of fantasy begins - "apparently the same names." Blues, as usual - instead of a meaningful error message - "she complained." As if not a programmer reporting a problem, but a fifth grader, sniffing, tells his mother about the evil cleaning lady.
We urgently need to wind this whole chain back.
Instead of "she tipped off" we get a specific system error message. After that we fix it. If it doesn’t work out on your own, we write it on a toaster.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question