[PHP-WIN] session lifetime

2001-01-19 Thread DATURA

I have the following settings in PHP.INI:
[Session]
session.save_handler  = files
session.save_path = C:\temp
session.use_cookies   = 1
session.name  = PHPSESSID
session.auto_start= 1
session.cookie_lifetime   = 0
session.cookie_path   = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability= 1
session.gc_maxlifetime= 86400   ; 24 hours
session.referer_check =
session.entropy_length= 0
session.entropy_file  =
; session.entropy_length= 16
; session.entropy_file  = /dev/urandom
session.cache_limiter = nocache
session.cache_expire  = 180
session.use_trans_sid = 1
url_rewriter.tags =
"a=href,area=href,frame=src,input=src,form=fakeentry"

I'm using PHP under Windows 2000 with Apache 1.3.12.

No matter what number is given in the line session.gc_maxlifetime the
session file is deleted after 24 minutes (1440 sec.)

Is 86400 a number too big or can someone tell me what there is to do, so I
can make my own garbage collection?

Thanks, Rolf.




-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-WIN] session lifetime

2001-01-21 Thread DATURA

Never mind! I've found the reason for this erratic behaviour: It's inside
Windows 2000. Obviously Windows itself is deleting the content of its
TEMP-Directory from time to time... So my session files are not deleted by
the PHP garbage collection routine but from this %*&/ Windows.

Since the session.save_path is pointing to another directory outside C:\TEMP
the sessions are alive for more than 15 minutes.

Thanks anyway, Rolf.

""DATURA"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
949cql$3oc$[EMAIL PROTECTED]">news:949cql$3oc$[EMAIL PROTECTED]...
> I have the following settings in PHP.INI:
> [Session]
> session.save_handler  = files
> session.save_path = C:\temp
> session.use_cookies   = 1
> session.name  = PHPSESSID
> session.auto_start= 1
> session.cookie_lifetime   = 0
> session.cookie_path   = /
> session.cookie_domain =
> session.serialize_handler = php
> session.gc_probability= 1
> session.gc_maxlifetime= 86400   ; 24 hours
> session.referer_check =
> session.entropy_length= 0
> session.entropy_file  =
> ; session.entropy_length= 16
> ; session.entropy_file  = /dev/urandom
> session.cache_limiter = nocache
> session.cache_expire  = 180
> session.use_trans_sid = 1
> url_rewriter.tags =
> "a=href,area=href,frame=src,input=src,form=fakeentry"
>
> I'm using PHP under Windows 2000 with Apache 1.3.12.
>
> No matter what number is given in the line session.gc_maxlifetime the
> session file is deleted after 24 minutes (1440 sec.)
>
> Is 86400 a number too big or can someone tell me what there is to do, so I
> can make my own garbage collection?
>
> Thanks, Rolf.
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-WIN] difference ftp_fget() in cgi- and module-mode

2001-01-30 Thread DATURA

Until now I was using PHP4 in CGI-Mode. Now I want to change to Apache
Module. So I made the nessecary changes in httpd.conf and rebotted the
Windows 2000 server.

Since PHP is running as an Apache Module, the function ftp_fget()
doesn't work correctly anymore.

I read a jpg from a FTP Server and display it with the  tag.
In Module Mode the file is transferred and the width and height is
correct, but the content is wrong (wrong colors in the completely wrong
places). When PHP is running in cgi mode, everything is correct.

Thanks for any help, Rolf.

Code Sample:

class Foto_class
{

  var $fotoname;

  function Foto_class( $verwender )
  {
global $const_ftp_host, $const_ftp_user, $const_ftp_passwd,
$const_ftp_dir;
$select_file = "foto.jpg";
$ftp = ftp_connect( $const_ftp_host );
if ( $ftp )
{
  ftp_login( $ftp, $const_ftp_user, urldecode( $const_ftp_passwd )
);
}
if ( $const_ftp_dir == "" )
{
  $const_ftp_dir = FTP_DIRROOT;
}
$const_ftp_dir = $const_ftp_dir . FTP_DIRROOT . $verwender;
if ( ( ! $ftp ) || ( ! @ftp_chdir( $ftp, $const_ftp_dir ) ) )
{
  @ftp_quit( $ftp );
}
else
{
  srand( ( double ) microtime() * 100 );
  $randval = rand();
  $tmpfile = $select_file . "." . $randval;
  $showfile = $this->filename( $tmpfile );
  $fp = fopen( $showfile, "w" );
  if ( ! @ftp_fget( $ftp, $fp, $select_file, FTP_BINARY ) )
  {
ftp_quit( $ftp );
  }
  else
  {
ftp_quit( $ftp );
$this->fotoname = $showfile;
  }
  @fclose( $fp );
}
  }

  function filename($f_name)
  {
$dir = "./temp/sess_".session_id();
if (!file_exists($dir)) mkdir($dir,0700);
return $dir."/".$f_name;
  }

  function out()
  {
return $this->fotoname;
  }

}





-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]