[PHP] CRC values update by readfile function?

2003-12-21 Thread ermelir
hello list,

I have a problem with file integrity in my url.
I try to force download file with the following script:

$sFile = $dSession['DOWNLOAD'][$id][$type];
if (is_file($sFile))
{
  header("Content-disposition: attachment; 
filename=".basename($sFile));
  header("Content-Type: force-download");
  header("Content-Transfer-Encoding: binary");
  header("Content-Length: ".filesize($sFile));
  header("Pragma: no-cache");
  header("Cache-Control: no-store, no-cache, must-revalidate, 
post-check=0, pre-check=0");
  header("Expires: 0");
  readfile($sFile);
  }
-
nothing very hard to understand, but
if I try to donwload the file with a ftp application, CRC checksum is 
different from file download with this script (there is only one file to 
download in the folder read, it's not a bad file read).
have you an idea to fix this?
thanks in advance for your help
best regards

Matthieu

_
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] CRC values update by readfile function?

2003-12-21 Thread ermelir
hello list,

I have a problem with file integrity in my url.
I try to force download file with the following script:

 $sFile = $dSession['DOWNLOAD'][$id][$type];
 if (is_file($sFile))
 {
   header("Content-disposition: attachment; 
filename=".basename($sFile));
   header("Content-Type: force-download");
   header("Content-Transfer-Encoding: binary");
   header("Content-Length: ".filesize($sFile));
   header("Pragma: no-cache");
   header("Cache-Control: no-store, no-cache, must-revalidate, 
post-check=0, pre-check=0");
   header("Expires: 0");
   readfile($sFile);
   }
-
nothing very hard to understand, but
if I try to donwload the file with a ftp application, CRC checksum is 
different from file download with this script (there is only one file to 
download in the folder read, it's not a bad file read).
have you an idea to fix this?
thanks in advance for your help
best regards

Matthieu

_
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] fileowner function and Windows OS

2003-09-22 Thread ermelir
Hello list,

I try to use fileower function on php 4.3.2 + Apache 2.047+ Xp pro system.
this function doesn't seem to work : for each existing files, function 
always returns 0.
documentation doesn't notice some  bugs  on Windows OS, and I would 
share your experience about your use on these OS.
thanks in advance for yours answers
best regards

Ermelir

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] mime_content_type error

2003-08-20 Thread Ermelir
Hi list,

I've a problem with the mime_content_type function.
each time I use them, my script bug
but in my php.ini the extension php_mime_magic.dll is load;
and function_exists return true on the mime_content_type
I have any details about the error, but my script exit each time.
Have you any idea on what's wrong, I lost...
thanks in advance for yours tips
best regards

_
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] command line or http browser?

2003-07-24 Thread ermelir
thanks for your answer and sorry for my poor english ;)
in the list of returns values, there somes I can't determine if command line
or server values
* isapi
* nsapi
* embed
* milter
* activescript
* java_servlet
do you know?
thanks for your help


- Original Message -
From: "Curt Zirzow" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 24, 2003 6:22 PM
Subject: Re: [PHP] command line or http browser?


> * Thus wrote ermelir ([EMAIL PROTECTED]):
> > Hi list,
> >
> > I search to detect if a script is call from command line or if the call
from
> > a client http browser.
> > for doing that, I test if:
> > php_sapi_name()=='cli'
> > which returns TRUE if script calls from command line; this work fine
with
> > PHP 4.2, but with PHP 5 php_sapi_name() returns cgi-fcgi
> > so, I would know if with others php version there is others returns
values?
> > and if there is another way to detect if script is call from command
line?
> > thanks in advance for yours answers
>
> This is a good point. I'm not aware of any other names, although I
> have to admit i wan't aware of the sapi_name function either..  :)
>
> There aught to be a better method of detecting whether you are in
> cli mode or module mode. If this is the only way to determain it I
> would make a suggestion to the php developers to have a way to
> detect what mode your in.  Detecting by a string value is very poor
> method of doing it.
>
> Ok, now after reading the docs, I see why its a string Some one
> came up with a list of names, I have no clue where he got it his
> reference tells me nothing.
>
> - aolserver
> - activescript
> - apache
> - cgi-fcgi
> - cgi
> - isapi
> - nsapi
> - phttpd
> - roxen
> - java_servlet
> - thttpd
> - pi3web
> - apache2filter
> - caudium
> - apache2handler
> - tux
> - webjames
> - cli
> - embed
> - milter
>
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> _
> Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
> http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France

_
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] command line or http browser?

2003-07-24 Thread ermelir
Hi list,

I search to detect if a script is call from command line or if the call from
a client http browser.
for doing that, I test if:
php_sapi_name()=='cli'
which returns TRUE if script calls from command line; this work fine with
PHP 4.2, but with PHP 5 php_sapi_name() returns cgi-fcgi
so, I would know if with others php version there is others returns values?
and if there is another way to detect if script is call from command line?
thanks in advance for yours answers
best regards



_
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1čre messagerie instantanée de France


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] implement gpgext

2003-02-13 Thread Ermelir
hello everybody,

I'm very interesting in using gpg to encrypt my mails in my php script.
so I have download the gpgext file
http://www.sourceforge.net/projects/gpgext/

but I don't understand how use it? I suppose that I must inform my php.ini
that I want using this librairy, but I don't uderstant how do it, and how
making the librairy.
could you explain me please, I'm lost...
thanks in advance

PS: I work under windows OS.

_
GRAND JEU SMS : Pour gagner un NOKIA 7650, envoyez le mot IF au 61321
(prix d'un SMS + 0.35 euro). Un SMS vous dira si vous avez gagné.
Règlement : http://www.ifrance.com/_reloc/sign.sms


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Fw: [PHP] encrypt data with pgp

2003-01-21 Thread Ermelir
just for explain me another better: if I had post in this mailing list, it's
just because I want to find another way to use this function under windows
system

 function pgp_encrypt($keyring_location, $public_key_id, $plain_text) {
$key_id = EscapeShellArg($public_key_id);
putenv("PGPPATH=$keyring_location");
// encrypt the message
 $pipe = popen("pgpe -r $key_id -af", "r");
fwrite($pipe, $plain_text);
$encrypted_text = '';
 while($s = fgets($pipe, 1024)) {
 // read from the pipe
 $encrypted_text .= $s;
}
 pclose($pipe);
return $encrypted_text; }

thanks for the tip on winPT, I will try it and will post the code of the
function I will developp if some are interest in...

_
GRAND JEU SMS : Pour gagner un NOKIA 7650, envoyez le mot IF au 61321
(prix d'un SMS + 0.35 euro). Un SMS vous dira si vous avez gagné.
Règlement : http://www.ifrance.com/_reloc/sign.sms


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] encrypt data with pgp

2003-01-21 Thread ermelir
Hello everyody,

I search to encode a string with a strong alogrythm. I choose pgp my 
desktop is a windows computer; I have found a function but I can't use it 
because on windows, pgp can"t encrypt on commandline.
have you found something for windows station?
your help will be helpfull.

greetings




_
GRAND JEU SMS : Pour gagner un NOKIA 7650, envoyez le mot IF au 61321
(prix d'un SMS + 0.35 euro). Un SMS vous dira si vous avez gagné.
Règlement : http://www.ifrance.com/_reloc/sign.sms


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php