Session Error - Permission denied - sites on different ports

1

Hello, good afternoon. I have been trying to solve this problem for some time: I have a website that runs on the default port and an administrative system that runs on port 8080. (ex: link and link )

When in the same browser, I log in to the port site: 8080 and then to the default port site, it does the process normally, it ends the session generated by port: 8080 and generates a new one. When I try the inverse process, log in to the default port and then in: 8080, I get the following error:

  

Warning: session_start () [function.session-start]:   open (C: \ xx \ xx \ sess_malaee35psko2uv3rsjhmfd0e3, O_RDWR) failed:   Permission denied (13) in   C: \ xx \ xx \ login.php on line 2

In both systems, the web user is used, in one I can access the session and in the other it does not. I searched the forums a lot and found nothing concerning the question of doors and the error of permission. I changed the session directory permission to 777 and I did not have the error any more, however, since the access comes from the same place, to the same place, I would like to know the reason for that, on the one hand to be able to delete and on the other not to. p>

Thanks in advance for your attention.

    
asked by anonymous 22.05.2017 / 20:11

1 answer

2

You're probably using or php-built tag in server , probably the way you set PHP to session should be trying to write to c:\windows\temp but IIS is not running with admin privileges, to resolve just point a "not publish" strong> to save the session, you can set this up in php.ini as I explained in Error failed: No space left on device

Change in php.ini to something like ( outra-pasta/pastadetemporarios should exist):

session.save_path = c:/outra-pasta/pastadetemporarios

Or you can adjust at the beginning of your php script:

<?php
session_save_path('c:/outra-pasta/pastadetemporarios');
  

The folder must be in the user that IIS is using (if it is using IIS) or it must be in a folder which the main user who started the server

    
22.05.2017 / 20:21