PDA

View Full Version : session_mm_cgi-fcgi[number].sem file


nerbert
10-03-2014, 01:16 AM
I've been working on a file manager for the adminCP and the directory for it shows a file session_mm_cgi-fcgi[number].sem. From what I was able to find googling it seems to be some temporary file associated with filesystem operations. Does anyone know how to get rid of it or designate a temp directory for such junk?

tbworld
10-03-2014, 02:58 AM
This is fast-cgi under Apache?
What version of PHP?

Most likely your temp directory is not set correctly, however if you are running PHP 5.2x (since this was for vb3) there were quite a few bugs concerning this matter for fast-cgi.

https://bugs.php.net/bug.php?id=43086

nerbert
10-03-2014, 03:09 AM
I put this in the wrong forum. It should be in vb 4 discussions. I'm running PHP 5.4.30

How do I find out if this is fast-cgi?

I seem to remember some setting in the adminCP dealing with designating a temp directory but I can't find it. Or is this at another level?

tbworld
10-03-2014, 03:31 AM
How do I find out if this is fast-cgi?

Look at your "phpinfo" -> Server API (This is in the first block of the report)
It might say something like: Server API: CGI/FastCGI

nerbert
10-03-2014, 03:38 AM
Server API : CGI/FastCGI

Yep.

tbworld
10-03-2014, 03:54 AM
In your php configuration file "php.ini" or equivalent alter the following line.

;session.save_path = "N;/path"

It might be commented out.

(Sorry for the long delays between answers, I am helping my daughter out with her board. At 15 evrything is an emergency!)

nerbert
10-03-2014, 04:06 AM
I've looked many times for a php.ini file and still can't find it (not that I would know what to do with it anyway) Any idea where I might find it? I've looked through several directories.

When I was trying to find something through google I seem to remember you could use ini_set() to handle this.

tbworld
10-03-2014, 04:21 AM
I do not think you can set the temp directory for temp file with "ini_set" as the file is permissions sensitive.

Are you running your own server or hosted? If hosted, what host and plan?

nerbert
10-03-2014, 04:24 AM
I found it under home/XXXXXXXX

Do I just add

session.save_path = "N;/path"

or is there more?

I use the minimal plan from TotalChoice Hosting

tbworld
10-03-2014, 04:25 AM
Well, I just read in a few places that you could, so now I have to check the PHP documentation to see if it is on the list. :)

http://php.net/manual/en/session.configuration.php

--------------- Added 02 Oct 2014 at 22:47 ---------------

I found it under home/XXXXXXXX

Do I just add

session.save_path = "N;/path"

or is there more?


http://php.net/manual/en/session.configuration.php#ini.session.save-path


[Session]
; Handler used to store/retrieve data.
; http://php.net/session.save-handler
session.save_handler = files

; Argument passed to save_handler. In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this
; variable in order to use PHP's session functions.
;
; The path can be defined as:
;
; session.save_path = "N;/path"
;
; where N is an integer. Instead of storing all the session files in
; /path, what this will do is use subdirectories N-levels deep, and
; store the session data in those directories. This is useful if you
; or your OS have problems with lots of files in one directory, and is
; a more efficient layout for servers that handle lots of sessions.
;
; NOTE 1: PHP will not create this directory structure automatically.
; You can use the script in the ext/session dir for that purpose.
; NOTE 2: See the section on garbage collection below if you choose to
; use subdirectories for session storage
;
; The file storage module creates files using mode 600 by default.
; You can change that by using
;
; session.save_path = "N;MODE;/path"
;
; where MODE is the octal representation of the mode. Note that this
; does not overwrite the process's umask.
; http://php.net/session.save-path
;
;
; ### @Nerbert - This is the ticket ###
session.save_path = "/tmp"



Search for it, it is in all default files. If you cannot find it because your host simplified it, then just add it at the bottom of the script.

nerbert
10-03-2014, 05:20 AM
I'm going to think about this. The file is in my "filemanager" directory and it shows the last modified time changing with each change of one of my File Manager files. I think it disappears after a few hours (or maybe I was looking at the wrong filemanager directory at the other site). Maybe when I'm finished with the project it will get cleaned up with the garbage.

I'll keep an eye on this and get back later. Thanks for he help so far.

tbworld
10-03-2014, 05:22 AM
Anytime. :)