I am receiving A call to undefined function error. Please look at the following code and let me know any thoughts on the problem.
global $my_session_save_path;
$my_session_save_path = ("/usr/local/plesk/apache/vhosts/yourdomain.com/httpdocs/"); /wasn't sure if the last slash was needed. I want the directory in side the httpdocs directory /
function get_sessionfile_name_internal()
{
if( !$this->id ) return '';
return $session_save_path()."/sse_{$this->id}";
}
function garbage_collection_internal()
{
//limit garbage collection resource usage.
if( rand(1, 100) > $this->gc_probability )
return false;
dbg("garbage_collection_internal started");
$dir = dir($session_save_path()); /* This is Line 165*/
while($entry = $dir->read())
{
if( strncmp($entry, 'sse_', 4)==0 )
{
$fnam = $session_save_path()."/$entry";
$f = fopen($fnam, 'r');
if( $f )
{
$l1 = fgets($f, 100);
$l2 = fgets($f, 100);
fclose($f);
$this->check_expire_and_delete($l1,$l2,$fnam);
}
}
}//for each file in the dir.
$dir->close();
}