Control Web Panel
WebPanel => Installation => Topic started by: carlmiller on April 30, 2021, 09:36:29 AM
-
Hi,
I recently update my server to use apache + nginx + varnish and notice an error when using ajax to call a php script with session_start and notice an error in the domlog:
[proxy_fcgi:error] [pid 22984:tid 140543510099712] [client 86.18.124.211:34760] AH01071: Got error 'PHP message: PHP Warning: session_start(): open(tmp/sess_9hmfppek9sb9t4tbv9cpos42l2, O_RDWR) failed: No such file or directory (2)
The file exists, but yet I get this message. Is there something in nginx I need to configure?
I only get this error when I call the script using $.ajax post to get results back.
-
Hi,
i've just check the permissions for my /tmp folder (where the php session files are being saved)
I notice on php.ini the session.save_path param is not set, so i assume it defaults to /tmp
If i look at my user folder where the domains are created i see that the domains have the following permissions:
drwxr-xr-x 17 myuser nobody 21 Apr 30 13:38 domain1.com
drwxr-xr-x 17 myuser nobody 21 Apr 30 13:38 domain2.com
drwxr-xr-x 17 myuser nobody 21 Apr 30 13:38 domain3.com
drwxr-xr-x 17 myuser nobody 21 Apr 30 13:38 domain4.com
however tmp has the following permissions:
drwxr-xr-x 3 myuser myuser 21 Apr 30 13:38 tmp
When my php script is executed via ajax, do it need the nobody permission to read the php session file in the tmp folder?
should i set session.save_path to point to another folder where access is open?
-
For info,
i subscribed to support and raised a ticket - which the dev's pretty much immediately sorted for me.
Turns out there is a .users.ini file in the domain root that we needed the session.path setting adding to.
After this, all worked great! so a* for the support if anyone needs it! gr8 response!