Re[2]: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-07 Thread Andrew Sitnikov
Hello Dan,

DH Just to prevent any misconception, the code executed through the ZE1 will
DH actually be AAC rather than AAA.
Please run this code and check it output!
It will print AAA, because in function c() you have COPY of object `$a`, NOT 
reference (with ZE1).

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




[PHP-DEV] Object reference

2002-11-26 Thread Andrew Sitnikov
Hello php-dev,

PHP4.3.0RC1

Source

?
$globalref_foo = array();
$globalref_bar = null;

class Foo {
function Foo()
{
global $globalref_foo;
$globalref_foo[] = $this;
}
}

class Bar {
function Bar()
{
global $globalref_bar;
$globalref_bar = $this;
}
}

$o1 = new Foo();
$o2 = new Bar();

var_dump($globalref_foo);
var_dump($globalref_bar);
var_dump($o1);
var_dump($o2);
?

Output:

array(1) {
  [0]=
  object(foo)(0) {
  }
}
NULL
object(foo)(0) {
}
object(bar)(0) {
}

Question:

 Why $globalref_bar===NULL  after  $o2 = new Bar(); ?


Why
Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




[PHP-DEV] PHP-4.3.0RC1 + Oracle client - SIGSERV

2002-11-17 Thread Andrew Sitnikov
Hello php-dev,

OS: SuSE 7.3, Linux gap 2.4.19-rmap14a ()
Ora: 9.2.0.2.0

pre
?

$d = $u = 'si';
$p = '***';

putenv('ORACLE_SID=GAP');

$db = OCILogon($u,$p, GAP);

if ($db)
echo Connected;
else
{
echo Can not connect.;
print_r(OCIError());
}
?

#gdb sapi/cli/php
#run -f c.php
[New Thread 1024 (LWP 20609)]
pre

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 20609)]
0x40a65301 in snauca_check_adapter () from /opt/oracle/lib/libclntsh.so.9.0
(gdb) bt
#0  0x40a65301 in snauca_check_adapter () from /opt/oracle/lib/libclntsh.so.9.0
#1  0x40a63a04 in nau_viat () from /opt/oracle/lib/libclntsh.so.9.0
#2  0x40a5cc5c in nau_gettab () from /opt/oracle/lib/libclntsh.so.9.0
#3  0x40a5b2db in nau_ini () from /opt/oracle/lib/libclntsh.so.9.0
#4  0x40a50c43 in nainit () from /opt/oracle/lib/libclntsh.so.9.0
#5  0x409fd846 in nsnainit () from /opt/oracle/lib/libclntsh.so.9.0
#6  0x409f24c0 in nsopen () from /opt/oracle/lib/libclntsh.so.9.0
#7  0x409db309 in nscall1 () from /opt/oracle/lib/libclntsh.so.9.0
#8  0x409da840 in nscall () from /opt/oracle/lib/libclntsh.so.9.0
#9  0x40a0dd24 in niotns () from /opt/oracle/lib/libclntsh.so.9.0
#10 0x40a7bb59 in nigcall () from /opt/oracle/lib/libclntsh.so.9.0
#11 0x40a12ec3 in osncon () from /opt/oracle/lib/libclntsh.so.9.0
#12 0x40838553 in kpuadef () from /opt/oracle/lib/libclntsh.so.9.0
#13 0x408c7565 in upiini () from /opt/oracle/lib/libclntsh.so.9.0
#14 0x408b685b in upiah0 () from /opt/oracle/lib/libclntsh.so.9.0
#15 0x40810536 in kpuatch () from /opt/oracle/lib/libclntsh.so.9.0
#16 0x408aaaec in OCIServerAttach () from /opt/oracle/lib/libclntsh.so.9.0
#17 0x08100554 in _oci_open_server (dbname=0x83facd4 GAP, persistent=0)
at /home/work/install/php-4.3.0RC1/ext/oci8/oci8.c:2432
#18 0x08100df0 in oci_do_connect (ht=3, return_value=0x83faa54, this_ptr=0x0, 
return_value_used=1, persistent=0, exclusive=0)
at /home/work/install/php-4.3.0RC1/ext/oci8/oci8.c:2588
#19 0x08105daf in zif_ocilogon (ht=3, return_value=0x83faa54, this_ptr=0x0, 
return_value_used=1)
at /home/work/install/php-4.3.0RC1/ext/oci8/oci8.c:4223
#20 0x08248422 in execute (op_array=0x83f617c) at 
/home/work/install/php-4.3.0RC1/Zend/zend_execute.c:1595
#21 0x08234e64 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at 
/home/work/install/php-4.3.0RC1/Zend/zend.c:840
#22 0x081f872e in php_execute_script (primary_file=0xb2e0) at 
/home/work/install/php-4.3.0RC1/main/main.c:1560
#23 0x0824ed27 in main (argc=3, argv=0xb364) at 
/home/work/install/php-4.3.0RC1/sapi/cli/php_cli.c:711
#24 0x410767ee in __libc_start_main () from /lib/libc.so.6

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




Re: [PHP-DEV] Re: $_ENV[] != getenv()

2002-10-18 Thread Andrew Sitnikov
Hello Tom,

reede, 18.10.2002, you wrote:

TS Andrew Sitnikov wrote:
 Any comments please ?
 
 P.S. I know that 'REMOTE_ADDR' exists in $_SERVER[]

TS Are you using the lastest snapshot, I believe this is a bug that is now 
TS fixed...
i use 4.2.3 and will try snapshot for you.



Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




[PHP-DEV] $_ENV[] != getenv()

2002-10-18 Thread Andrew Sitnikov
Hello php-dev,

?
echo getenv('REMOTE_ADDR'): .getenv('REMOTE_ADDR').\n;
echo \$_ENV['REMOTE_ADDR']: .$_ENV['REMOTE_ADDR'].\n;;

echo getenv('PATH'): .getenv('PATH').\n;
echo \$_ENV['PATH']: .$_ENV['PATH'].\n;;
?

Output:

getenv('REMOTE_ADDR'): 212.7.15.36
$_ENV['REMOTE_ADDR']:
getenv('PATH'): /usr/bin/X11:/usr/games:/usr/bin:/bin:/usr/local/bin:
$_ENV['PATH']: /usr/bin/X11:/usr/games:/usr/bin:/bin:/usr/local/bin:

Any comments please ?

P.S. I know that 'REMOTE_ADDR' exists in $_SERVER[]

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




Re[2]: [PHP-DEV] Segfault in 4.2.3RC2

2002-09-04 Thread Andrew Sitnikov

Hello ,

MM http://www.martinjansen.com/php/segfault-4.2.3RC2.txt works for me,
MM and I can see the segfault with 4.2.3RC2, configured only with
MM --enable-debug --disable-mbstring (on Linux).

This crash for me to.

PHP 4.2.3RC1, apache dso, linux

Best regards,
 Andrew Sitnikov 


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




[PHP-DEV] Operator Precedence

2002-05-10 Thread Andrew Sitnikov

Hello php-dev,

  Why  How this code will work?

  ?
   function foo($flag)
   {
  return $flag;
   }

   $a=TRUE;

   echo if (!\$a = foo(FALSE))) is ;

   if (!$a = foo(FALSE))
 echo true;
   else
 echo false;

   echo \n;
   var_dump($a);
   echo \n;
  ?
  
  Output:

  if (!$a = foo(FALSE))) is true
  bool(false)

  http://www.php.net/manual/en/language.operators.php Operator Precedence

  `!` has more precedence than `=`

  And after `!` we must have boolean constant in left side:

  FALSE = foo()

  Explain to me pls that I do not understand

  P.S. in C  Perl (!$a = foo()) is not valid expression

  

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




Re[2]: [PHP-DEV] PHP 4.3 charter and release plan

2002-05-04 Thread Andrew Sitnikov

Hello Stig,

SSB Huh, are you saying PHP _is_ locale-dependant?
Yes.

Example:
1.php
?
  setlocale(LC_ALL,'ru_RU.CP1251');
  include('2.php');
?

2.php
?
  $var = 1.3;
  var_dump($var);
?

gap /home/local/sitnikov GET http://si.infonet.ee/1.php
float(1)

Locale ru_RU.CP1251 has decimal delimiter ',';

I understand why it occurs (thanks to Stanislav Malyshev), but this is
not correct behaviour IMHO, and must be fixed ASAP.


SSB I was not aware of that
SSB (but then again I always use the C locale).
SSB  - Stig

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




Re: [PHP-DEV] PHP 4.3 charter and release plan

2002-05-03 Thread Andrew Sitnikov

Hello Stig,

Why you lose Make everything on the language-level independent of
your locale settings. from TODO list ?

This is very critical i think. If used locale with decimal
separator like `,`, many script will working wrongly.

SSB 1. New build system (Sascha)
SSB 2. PHP Streams (Wez)
SSB 3. Command-line SAPI installed by default (Edin)
SSB 4. PEAR integration including PECL builder (Stig)
SSB 5. MySQL changes (Zak)
SSB 6. PostgreSQL changes (Yasuo)
SSB 7. DOMXML changes? (Christian)


Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




Re[2]: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard basic_functions.c basic_functions.h

2002-03-23 Thread Andrew Sitnikov

Hello Rasmus,

RL Yup, as far as I can see it is a completely useless function other than
RL the fact that it reads an entire file into a string.  This is actually
RL something we should add, but it should be a generic load_file() or
RL str_file() or some other such function.
RL -Rasmus

Probably you have not understood a problem, if is used open_basedir or
safe_mode you have no any possibility to read a file until you move it
in directory which you may read it.

If to you interests only his contents and you do not need to keep this
file it is necessary to do many superfluous movements for this purpose.

Personally I do not have with it problems, but many others people have
such problems.


Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




Re[3]: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard basic_functions.c basic_functions.h

2002-03-23 Thread Andrew Sitnikov

Hello Rasmus,

RL That's where you are wrong.  Look at the php_checkuid() function in
RL safe_mode.c you will find this code:

RL if (SG(rfc1867_uploaded_files)) {
RL if (zend_hash_exists(SG(rfc1867_uploaded_files), (char *) 
filename, strlen(filename)+1)) {
RL return 1;
RL }
RL }
As long ago this appeared there?

RL And for open_basedir sites, the move_uploaded_file() function can be used
RL to move the file into the right directory at which point it can be read.
I know this.

ïË, if you consider that move_uploaded_file () is necessary, though we
have copy(), and read_uploade_file () it is not necessary, this your right ...


Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




[PHP-DEV] [PATCH][NEW FEATURE] read_uploaded_file()

2002-03-22 Thread Andrew Sitnikov

Hello php-dev,

  I created function `read_uploaded_file()`, i think it is useful at
  to work with uploaded file in safe_mode and open_basedir, because if
  i need only file content and safe_mode=on or open_basedir is set, i
  can not read file, i must move it, read and delete then.  

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




[PHP-DEV] [PATCH][NEW FEATURE] read_uploaded_file()

2002-03-22 Thread Andrew Sitnikov

Hello php-dev,

  I created function `read_uploaded_file()`, i think it is useful at
  to work with uploaded file in safe_mode and open_basedir, because if
  i need only file content and safe_mode=on or open_basedir is set, i
  can not read file, i must move it, read and delete then.

  See in attach
  
Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


read_uploaded_file.diff
Description: Binary data

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


[PHP-DEV] PHP audit

2002-03-14 Thread Andrew Sitnikov

Hello php-dev,

  What you think about this:
  http://phpaudit.42-networks.com/


  Big size of patch does not bring pleasure
  
Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




[PHP-DEV] cvs ./buildconf configure failed

2002-03-13 Thread Andrew Sitnikov

Hello php-dev,

sitnikov-gap /home/local/sitnikov/projects/php4 ./buildconf
rebuilding configure
configure.in:823: warning: AC_PROG_LIBTOOL is m4_require'd but is not m4_defun'd
configure.in:151: error: possibly undefined macro: AC_MSG_RESULT
configure.in:285: error: possibly undefined macro: AC_DEFINE
configure.in:1039: error: possibly undefined macro: AC_PROG_LIBTOOL
configure:70112: error: possibly undefined macro: _LT_AC_TRY_DLOPEN_SELF
rebuilding main/php_config.h.in  

sitnikov-gap /home/local/sitnikov/projects/php4 ./configure
...skip...


Configuring Zend
./configure: AC_PROG_LIBTOOL: command not found
.
checking whether dlsym() requires a leading underscore in symbol names... ./configure: 
line 70106: syntax error near unexpected token `_LT_AC_TRY_DLOPEN_SELF('
./configure: line 70106: `_LT_AC_TRY_DLOPEN_SELF('


./configure

line 70106:
EOF

fi

echo $as_me:70110: checking whether dlsym() requires a leading underscore in symbol 
names 5
echo $ECHO_N checking whether dlsym() requires a leading underscore in symbol 
names... $ECHO_C 6
_LT_AC_TRY_DLOPEN_SELF(
  AC_MSG_RESULT(no)
,
  AC_MSG_RESULT(yes)
  AC_DEFINE(DLSYM_NEEDS_UNDERSCORE, 1, [Define if dlsym() requires a leading 
underscore in symbol names. ])
,
  AC_MSG_RESULT(no)
, )

echo $as_me:70121: checking for uint 5




Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




Re[2]: [PHP-DEV] cvs ./buildconf configure failed

2002-03-13 Thread Andrew Sitnikov

Hello Derick,

DR Hello,
DR which buildtools do you use?
DR Derick

sitnikov-gap /home/local/sitnikov/projects/php4 autoconf --version
autoconf (GNU Autoconf) 2.52

sitnikov-gap /home/local/sitnikov/projects/php4 automake --version
automake (GNU automake) 1.5d

sitnikov-gap /home/local/sitnikov/projects/php4 libtool --version
ltmain.sh (GNU libtool) 1.4.1 (1.922.2.34 2001/09/03 01:22:13)


Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




[PHP-DEV] read_uploaded_file();

2002-03-12 Thread Andrew Sitnikov

Hello php-dev,

  I created function `read_uploaded_file()`, i think it is useful at
  to work with uploaded file in safe_mode and open_basedir, because if
  i need only file content and safe_mode=on or open_basedir is set, i
  can not read file, i must move it, read and delete then.

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


read_uploaded_file.diff
Description: Binary data

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


[PHP-DEV] file permissions in function copy()

2002-02-13 Thread Andrew Sitnikov

Hello php-dev,

  Function copy(), when create new file use 0777 permissinos
  instead 0666, as result with umask 022 we have new file with 0755.

  Any comments ?

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




[PHP-DEV] move_uploaded_file(), copy() permissions problem

2002-02-08 Thread Andrew Sitnikov

Hello php-dev,

  Some functions like move_uploaded_file(), copy() creating file with 0777 permissions.

  I thing that copy() must copy permissions too, or if this behavior is
  - features, this must be documented.
  

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




Re: [PHP-DEV] Bug #14807 Updated: core dump

2002-01-02 Thread Andrew Sitnikov

Hello jan,

I have 'segmentation' to with this code on Linix 2.4.16  php 4.1.1

CC=gcc2.95.3 \
CXX=gcc2.95.3 \
./configure \
--prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \
--enable-track-vars \
--enable-magic-quotes \
--enable-safe-mode \
--enable-memory-limit \
--enable-sysvshm \
--enable-sysvsem \
--enable-shmop \
--enable-sockets \
--enable-wddx \
--enable-xslt \
--enable-ctype \
--enable-bcmath \
--enable-mailparse \
--enable-ftp \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-ttf \
--with-t1lib \
--with-mysql=/usr/local/mysql \
--with-openssl=/usr/local/ssl \
--with-epipe \
--with-mcrypt \
--with-mhash \
--with-zlib \
--with-mm \
--with-xmlrpc \
--with-iconv \
--with-curl \
--with-bz2 \
--with-gmp  \
--with-ldap \
--with-xml  \
--with-zip  \
--with-gettext \
--with-dom \
--with-xslt-sablot \
$@


(gdb) bt
0x0806 in _php_math_zvaltobase (arg=0xbfffdfc0, base=2) at math.c:841
841 *ptr = digits[digit];
(gdb) bt
#0  0x0806 in _php_math_zvaltobase (arg=0xbfffdfc0, base=2) at math.c:841
#1  0x080ab5b4 in zif_base_convert (ht=3, return_value=0x831b35c, this_ptr=0x0, 
return_value_used=1) at math.c:1005
#2  0x081a468a in execute (op_array=0x8318d24) at ./zend_execute.c:1590
#3  0x080deab9 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at zend.c:814
#4  0x08079a41 in php_execute_script (primary_file=0xb930) at main.c:1307
#5  0x0807414c in main (argc=3, argv=0xb9a4) at cgi_main.c:738
#6  0x405349cb in __libc_start_main (main=0x80737b4 main, argc=3, argv=0xb9a4, 
init=0x80705f8 _init, 
fini=0x81fcf00 _fini, rtld_fini=0x4000aea0 _dl_fini, stack_end=0xb99c) at 
../sysdeps/generic/libc-start.c:92

jpn ID: 14807
jpn Updated by: jan
jpn Reported By: [EMAIL PROTECTED]
jpn Status: Open
jpn Bug Type: Unknown/Other Function
jpn Operating System: 
jpn PHP Version: 4.1.0
jpn New Comment:

jpn at least for me it doesn't (FreeBSD 4.4 PHP 4.1.0)
jpn can you provide more Information about you environmation (OS, configure options 
e.g.) ?


jpn Previous Comments:
jpn 

jpn [2002-01-02 13:39:24] [EMAIL PROTECTED]

jpn Running the following always causes a core dump:

jpn ?php

jpn $arr = array (
jpn 1 = array (0,0,0,0,0),
jpn 2 = array (0,0,0,0,0),
jpn 3 = array (0,0,0,0,0),
jpn 4 = array (0,0,0,0,0),
jpn 5 = array (0,0,0,0,0)
jpn );

jpn print_r($arr);
jpn echo br\n\nbr\n\n;
jpn $str = serialize($arr);
jpn echo serializedbr\n, $str, brbr\n\n;

jpn function hex2bin($data) {
jpn $len = strlen($data);
jpn return pack(H . $len, $data);
jpn }

jpn $enc = urlencode($str);
jpn echo urlencodedbr, $enc, brbr\n\n;
jpn $gzd = gzcompress($enc);
jpn //echo gzcompressed (urlencoded)br, $gzd, brbr\n\n;
jpn $b64 = base64_encode($gzd);
jpn echo base64_encodedbr, $b64, brbr\n\n;
jpn $b2h = bin2hex($enc);
jpn echo bin2hex (urlencoded)br, $b2h, brbr\n\n;
jpn $binary = base_convert($b2h, 16, 2);
jpn echo $binary, brbr\n\n;
jpn $conv = base_convert($binary, 2, 16);
jpn echo $conv, brbr\n\n;
jpn $h2b = hex2bin($conv);
jpn echo $h2b, brbr\n\n;
jpn $md = md5($str);
jpn echo md5br, $md, brbr\n;

?
jpn 

jpn Edit this bug report at http://bugs.php.net/?id=14807edit=1



Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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-DEV] MOPS Benchmark

2001-12-31 Thread Andrew Sitnikov

Hello Sebastian,

PIII 2x800 Linux 2.4.16-SMP php-4.1.1(cgi)

W/O ZendOptimizer
Iterations:1
Estimated ops: 2
Elapsed time:  219
M op/s:0.91324200913242

With ZendOptimizer
Iterations:1
Estimated ops: 2
Elapsed time:  94
M op/s:2.1276595744681

SB   given the recent benchmark discussion on this list and my stumbling
SB   over Parrot last night (that comes with MOPS benchmark scripts for a
SB   variety of scripting languages), I ran a quick test:

SB Language  | Elapsed time | MOPS
SB --+--+-
SB Python| 88 seconds   | 2.27
SB Perl  | 102 seconds  | 1.96
SB PHP (+ ZendOptimizer) | 142 seconds  | 1.41
SB PHP   | 158 seconds  | 1.27

SB   The scripts used for Perl and Python can be found in the Parrot CVS.
Can you send me this test-suite ?



Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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[2]: [PHP-DEV] MOPS Benchmark

2001-12-31 Thread Andrew Sitnikov

Hello Sebastian,

   Language  | Elapsed time (sec)| MOPS
   --+---+-
   Python|  96.5 | 2.07
   Perl  |  94   | 2.13
   PHP (+ ZendOptimizer) |  94   | 2.13
   PHP   |  220  | 0.90
   C |  0.66 | 304

   Hardware: PIII 2x800
   Software: OS - Linux 2.4.16-SMP
 PHP - 4.1.1
 Zend Optimaizer 1.2.0
 Python 1.5.2
 Perl 5.005_03

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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-DEV] Zend Products for 4.1.x

2001-12-23 Thread Andrew Sitnikov

Hello php-dev,

  When it is possible to expect occurrence of products Zend (Debuger, Accelerator) 
for 4.1.x

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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-DEV] Bug #14651: PHP close tag (?) in a comment acts as a close; this did not happen in 4.0.x

2001-12-21 Thread Andrew Sitnikov

Hello mike,

This is not bug, this is features:
http://www.php.net/manual/en/language.basic-syntax.comments.php
The one-line comment styles actually only comment to the end of the line or the 
current block of PHP code,
whichever comes first.

Please mark this bug as bogus.


mmc From: [EMAIL PROTECTED]
mmc Operating system: FreeBSD 3.4-REL
mmc PHP version:  4.1.0
mmc PHP Bug Type: Reproducible crash
mmc Bug description:  PHP close tag (?) in a comment acts as a close; this did not 
happen in 4.0.x

mmc In 4.0.x, you could do something like:

mmc ?
mmc echo hi; //does this echo hi?
?

mmc and it would work fine.

mmc In 4.1.0 this causes a parse error on the last line of the script.



Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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-DEV] Bug #14546: Segmentation fault in httpd child process when using user authentication

2001-12-16 Thread Andrew Sitnikov

Hello ,

I have similar problem with this code on Apache1.3.22+php4.1.0 linux
2.4.16 RH6.2.  I think this is critical problem.

I configure PHP with:

CC=gcc2.95.3 \
CXX=gcc2.95.3 \
./configure \
--prefix=/usr/local/php \
--with-apxs=/usr/local/httpd/bin/apxs \
--with-config-file-path=/usr/local/php/etc \
--enable-track-vars \
--enable-magic-quotes \
--enable-safe-mode \
--enable-memory-limit \
--enable-sysvshm \
--enable-sysvsem \
--enable-shmop \
--enable-sockets \
--enable-wddx \
--enable-xslt \
--enable-ctype \
--enable-bcmath \
--enable-mailparse \
--enable-ftp \
--with-gd=/export/work/gd-1.8.4-gif \
--with-jpeg-dir=/export/work/jpeg-6b \
--with-png-dir=/export/work/libpng-1.0.9 \
--with-ttf=/export/work/freetype-1.3.1 \
--with-mysql=/usr/local/mysql \
--with-openssl=/usr/local/ssl \
--with-epipe \
--with-mcrypt \
--with-mhash \
--with-zlib \
--with-mm \
--with-xmlrpc \
--with-iconv \
--with-curl \
--with-bz2 \
--with-gmp  \
--with-ldap \
--with-xml  \
--with-zip  \
--with-gettext \
--with-dom \
--with-xslt-sablot \
$@

aucu I am using Apache 1.3.22 and PHP 4.1.0 on RedHat Linux 7.0.
aucu When I view the following script, or any similar scripts with user
aucu authentication features, the page comes up as can't be displayed, a look
aucu in the error_log shows the error child pid 25693 exit signal Segmentation
aucu fault (11) (obviously a different pid each time).

aucu The script is:
aucu ?php
aucu   if(!isset($PHP_AUTH_USER)) {
aucu header(WWW-Authenticate: Basic realm=\My Realm\);
aucu header(HTTP/1.0 401 Unauthorized);
aucu echo Text to send if user hits Cancel button\n;
aucu exit;
aucu   } else {
aucu echo pHello $PHP_AUTH_USER./p;
aucu echo pYou entered $PHP_AUTH_PW as your password./p;
aucu   }
?

aucu My PHP configure line was:
aucu ./configure --prefix=/opt/server/php --with-mysql=/opt/server/mysql
aucu --enable-ftp --enable-safe-mode --enable-track-vars
aucu --with-apache=../apache_1.3.22

aucu My Apache configure line was:
aucu ./configure --prefix=/opt/server/httpd
aucu --activate-module=src/modules/php4/libphp4.a
aucu --activate-module=src/modules/perl/libperl.a

aucu GDB Backtrace:
aucu Program received signal SIGSEGV, Segmentation fault.
aucu 0x80f99ee in _efree ()
aucu (gdb) bt
aucu #0  0x80f99ee in _efree ()
aucu #1  0x80934e3 in sapi_add_header_ex ()
aucu #2  0x80bedd0 in zif_header ()
aucu #3  0x811fbff in execute ()
aucu #4  0x8106179 in zend_execute_scripts ()
aucu #5  0x8091395 in php_execute_script ()
aucu #6  0x810e2a2 in apache_php_module_main ()
aucu #7  0x808e91e in php_restore_umask ()
aucu #8  0x808e979 in php_restore_umask ()
aucu #9  0x8145059 in ap_invoke_handler ()
aucu #10 0x8159ce7 in ap_some_auth_required ()
aucu #11 0x8159d48 in ap_process_request ()
aucu #12 0x8150e69 in ap_child_terminate ()
aucu #13 0x8151014 in ap_child_terminate ()
aucu #14 0x8151184 in ap_child_terminate ()
aucu #15 0x81517fd in ap_child_terminate ()
aucu #16 0x815207b in main ()
aucu #17 0x400d4790 in __libc_start_main (main=0x8151cd4 main, argc=2,
aucu ubp_av=0xbaf4,
aucu init=0x8074e90 _init, fini=0x820675c _fini, rtld_fini=0x4000d35c
aucu _dl_fini,
aucu stack_end=0xbaec) at ../sysdeps/generic/libc-start.c:111



Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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-DEV] Bug #14546 Updated: Segmentation fault in httpd child process when using user authentication

2001-12-16 Thread Andrew Sitnikov

Hello derick,

dpn This was just fixed in CVS, closing.
What you think about  4.1.0pl1 ?


Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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[2]: [PHP-DEV] Bug #14546 Updated: Segmentation fault in httpd child process when using user authentication

2001-12-16 Thread Andrew Sitnikov

Hello Yasuo,

YO I guess there will not be 4.1.0pl1, but will be 4.1.1.
YO Hopefully soon.
I do not see anything encouraging, everyone new build òîò (4.0.3 - 4.0.3pl1, 4.0.4 - 
4.0.4pl, 4.0.6 - memory patch, 4.1.0 - ???)
have more and more serious bugs. In 4.1.0 such quantity of problems what to become 
very sadly ...

Likely it will be useful for all to look at it:
http://www.freebsd.org/internal/releng45.html


P.S. I want to offend nobody, it is really sadly for me ...
P.S.S Sorry for my English

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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[2]: [PHP-DEV] Bug #14546 Updated: Segmentation fault in httpd child process when using user authentication

2001-12-16 Thread Andrew Sitnikov

Hello Markus,

MF IMHO I'm not surprised and it was somehow predictable for
MF this release. It just went unreleased TOO long. You're
MF welcome to join the QA for higher quality release process if
MF your time permits it.
I agree, but I see some problems:
1. Bad knowledge of language (it is my problem, i will fix it)
2. Absence of exactly appointed process of an exit of versions PHP.
3. Absence full test-suite for check of every build/release, like in Mysql.

Some ideas about release process:  release process can not be finished, while 
test-suit give error

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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[2]: [PHP-DEV] Bug #14546 Updated: Segmentation fault in httpd child process when using user authentication

2001-12-16 Thread Andrew Sitnikov

Hello Markus,


 I know it was fixed, but I just thought I'ld add that the
 problem has started producing itself in the new copy of httpd
 that I compiled, strange that it took a while before it started
 occurring.

MF Have you tested the latest fix if it works?
I manually has make changes similar as cvs (for 4.1.0-release) and it
has stopped segmentation.


Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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[2]: [PHP-DEV] Linking PHP with static Libtool libraries

2001-12-14 Thread Andrew Sitnikov

Hello ,

I have similar problem  when compile php4.1.0 as apx (all ok with
cgi), but with mm and mhash libs.

I found workaround:
 after configure completed, I manually remove '-lmm -lmhash' form Zend/Makefile

P.S. I also have many other problem with installation php-4.1. I think
4.1 Has no the right to refer to as 'release'. Very bad result after 6
month work :((

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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[2]: [PHP-DEV] set_time_limit() bug - pending for PHP 4.1.0

2001-11-18 Thread Andrew Sitnikov

Hello ,

This reproducable for me to on: php4.0.5 + Linux 2.4.2 #4 SMP

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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-DEV] Bug #14082: unserialize have problems with negative numbers

2001-11-16 Thread Andrew Sitnikov

Hello alberty,

This working correctly for me with 4.0.5 and php-4.1.0RC2 (CGI)

anc i have detect two annoyingly bugs ;-) with serialize/unserialize.

anc The first bug indicate that unserialize can't work with negative
anc integer numbers.

anc The second problem brings php to crash! Unserialize
anc crash if you manipulate the count of expecting array
anc vars.

anc Bug 1:

anc ?php
anc // Results: 'Warning: unserialize() failed at offset 13 of 39 bytes'
anc //  and an empty result string, but not false 
anc // because $foo['a'] is -1

anc error_reporting(2047);
anc $foo['a']=(int)-1;
anc $foo['b']=(string)'Paris';
anc $bar=serialize($foo);
anc if ($bar!=false){
anc echo $bar;
anc $nop=unserialize($bar);
anc print_r($nop);
anc }
?


anc ---

anc Bug 2:

anc ?php
anc // Result: PHP crash, because the array number is smaller than serialized
anc string

anc error_reporting(2047);
anc $ser_string='a:1:{s:1:a;i:1000;s:1:b;s:5:Paris;}';
anc // ^- actually 2
anc $unser_string=unserialize($ser_string);
?

anc I have tried to make a bt, but gdb notify no fault.
anc In debug mode some of my script warns with this:
anc Warning: String is not zero-terminated (source: ./zend_execute.c:449)
anc but i think that is another problem.




Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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-DEV] Respected developers !

2001-11-14 Thread Andrew Sitnikov

Hello,

Respected developers!

From http://www.php.net/cvs-php.php
=
If you are contributing a patch, a small fix, or another minor change
you do not need to ask for a CVS account before submitting it. Just
send your patch to [EMAIL PROTECTED] 
=

I already twice sent in this list patch, which implements function ftok().
But has not received any the answer :(

I understand, that you are very busy people, and you not have a lot time
for work with similar letters. Maybe I not understand clearly this and should
not distract people on the nonsense's? Really there is nobody, who has
2-3 minutes to give any answer to my letters?


P.S. Sorry for my English.
  
Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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-DEV] [PATCH] ftok() implementation

2001-11-12 Thread Andrew Sitnikov

Hello php-dev,

  I have made small patch which add function ftok if
  used though one of extensions: sysvsem, sysvshm, shmop.

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


ftok.patch
Description: Binary data

-- 
PHP Development 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-DEV] Workaround for Bug 13901

2001-11-10 Thread Andrew Sitnikov

Hello php-dev,

I found workaround for 13901 bug, but because i very bad know php internals,
i think php-developers must verify this code:

--cut--
*** string.c.orgSun Nov 11 01:14:08 2001
--- string.cSun Nov 11 01:12:00 2001
*** PHPAPI char *php_str_to_str(char *haysta
*** 2143,2148 
--- 2143,2157 
char *end = haystack + length;
smart_str result = {0};
  
+   if(!length){
+   smart_str_appendl(result, , 0);
+   smart_str_0(result);
+   if (_new_length) *_new_length = result.len;
+   return result.c;
+   }
+ 
for (p = haystack;
(r = php_memnstr(p, needle, needle_len, end));
p = r + needle_len) {
--cut--


Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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-DEV] array_key and array_value

2001-06-30 Thread Andrew Sitnikov

Hello php-dev,

  $a = array (
 'one'   = '1',
 'two'   = '2',
 'three' = '3',
  );

  $k = array_keys($a);
  $v = array_value($a);

  Whether the condition will be true: $a[$k[$i]] == $v[$i] ?
  for $i from 0 to count($a)-1
  
  P.S. This question has arisen as perl (for example) does not
  guarantee the order elements in hash.

  
Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development 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-DEV] Error including big files.

2001-04-21 Thread Andrew Sitnikov

Hello php-dev,

  $bash: perl -e "print '0' x 10241024;"  data.txt

  test.php
  ?php
 indlude('data.txt');
  ?

  Running script:
  
  $bash: telnet host 80
  Trying xxx.x.x.xxx...
  Connected host
  Escape character is '^]'.
  GET /test.php HTTP/1.1
  Host: host

  Connection closed by foreign host.

  Have same results with php-4.0.4pl1 and php-4.0.5RC7.
  error_log does not contain errors.

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109



-- 
PHP Development 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-DEV] RE: [PHP-QA] Error including big files.

2001-04-21 Thread Andrew Sitnikov

Hello ,

I could determine a problem - memory_limit.
It has suggested an idea to me, that not bad would be to see records in error_log
about it.

L I ran it with the CGI version of php I made, and with 4.0.4p1 it worked, and
L with the 4.0.5RC7.
L So, I tried with the apache module, again, mine worked. If you wanted a huge
L download, I'd post it on my website.  Only thing thats below, I imagine is a
L typo is that you wrote "indlude" not "include".  Is there any chance that
L data.txt is not viewable when running it as a module?

L Liz


Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109



-- 
PHP Development 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-DEV] Re[2]: [PHP-QA] RC7 is out

2001-04-20 Thread Andrew Sitnikov

Hello Andi,

reede, 20.04.2001, you wrote:

AG At 02:59 PM 4/20/2001 -0700, Andrew Sitnikov wrote:
Hello Zeev,

neljapev, 19.04.2001, you wrote:


ZS I rolled RC7 - if there are no surprises (there'd better not be! :), it
ZS can finally go out early next week.

ZS Zeev

Where i can get it ?

AG http://www.php.net/distributions/php-4.0.5RC7.tar.gz

AG Andi



wget http://www.php.net/distributions/php-4.0.5RC7.tar.gz
--16:23:43--  http://www.php.net:80/distributions/php-4.0.5RC7.tar.gz
   = `php-4.0.5RC7.tar.gz'
Connecting to x.x.ee:8080... connected!
Proxy request sent, awaiting response... 404 Not Found
16:25:15 ERROR 404: Not Found.

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109



-- 
PHP Development 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-DEV] Re[2]: [PHP-QA] RC6 available!

2001-04-03 Thread Andrew Sitnikov

Hello Andi,

Compiled successful, but when apache start:
Failed loading /usr/local/Zend/lib/ZendDebugger.so:  
/usr/local/Zend/lib/ZendDebugger.so: undefined symbol: zend_get_ini_entry

and Debuger not loaded :(

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109



-- 
PHP Development 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-DEV] PHP-4.0.5-RC6

2001-04-03 Thread Andrew Sitnikov

Hello php-qa,

  test.php
  ?
echo $test;
  ?

  http://host/test.php?test=1;2;3


  4.0.4pl1
  Result: 1;2;3

  4.0.5RC6
  Result: 1

  
Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109



-- 
PHP Development 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-DEV] Re[2]: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] PHP-4.0.5-RC6

2001-04-03 Thread Andrew Sitnikov

Hello James,

I agree, that standards it is good. You may certainly do such changes
which will break work of the previous programs, but then not in minor versions (4.0.x).
Probably you should release out 4.1.x, 4.2.x, because users have the right to hope,
that at change in minor versions not break them programs.

JM If I come from some other language or where ever and expect test=1;2;3 to
JM work someway and it works differently to the standards "just because it does
JM and we dont want to ram standards down peoples throats" its going to piss me
JM off. I agree it should be optional but should be defaulted to on.

JM -James





Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109



-- 
PHP Development 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[2]: [PHP-DEV] Re: [PHP-QA] PHP-4.0.5-RC6

2001-04-03 Thread Andrew Sitnikov

Hello Rasmus,

RL This is already configurable in php.ini using arg_separator and it
RL defaults to .  We should not be changing the default at this point.

When i run this test, my arg_separator  equal ''.

RL -Rasmus

RL On Tue, 3 Apr 2001, Zeev Suraski wrote:

 My guess is that's the arg_separator fix.  Jani?


 At 19:21 3/4/2001, Andi Gutmans wrote:
 Anyone have an idea why this happens?
 
 Andi
 
 At 05:37 PM 4/3/2001 +0200, Andrew Sitnikov wrote:
 Hello php-qa,
 
test.php
?
  echo $test;
?
 
http://host/test.php?test=1;2;3
 
 
4.0.4pl1
Result: 1;2;3
 
4.0.5RC6
Result: 1
 
 
 Best regards,
   Andrew Sitnikov
   e-mail : [EMAIL PROTECTED]
   GSM: (+372) 56491109
 
 
 
 --
 PHP Quality Assurance 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 Quality Assurance 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]

 --
 Zeev Suraski [EMAIL PROTECTED]
 CTO   co-founder, Zend Technologies Ltd. http://www.zend.com/


 --
 PHP Development 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]




Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109



-- 
PHP Development 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-DEV] Question about flock() on Linux

2001-02-03 Thread Andrew Sitnikov

Hello php-general,

Script flock.php:
?
 $file_name = 'flock.txt';

 for($i=0;$i1000;$i++){
   if ($fd = fopen($file_name,'a+')){
 if (flock($fd,LOCK_EX)){
fseek($fd,0,SEEK_END);
fwrite($fd,$i.' : '.$i."\n");
flock($fd,LOCK_UN);
 }else{
   die('Can not lock file');
 }
 fclose($fd);
   }else{
 echo 'Can not open file';
   }
 }
?

Run it: ab -n 10 -c 10 http://host/flock.php

Why file have similar lines ?

432 : 431 : 431
432
433 : 433
...
84841 : 841
2 : 842

May be flock not working or I do not understand, how it should work ?
How correctly to write in a file from different threads?

P.S I use Linux-2.2.17+PHP4.0.4pl1

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109



-- 
PHP Development 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-DEV] Question about flock() on Linux. Part 2

2001-02-03 Thread Andrew Sitnikov

Hello php-general,

 This also does not work:
 
 flock.php
 ?
 $file_name = '/home/sitnikov/tmp/flock.txt';
 if ($fd = fopen($file_name,'a+')){
   for($i=0;$i1000;$i++){
 if (flock($fd,LOCK_EX)){
fseek($fd,0,SEEK_END);
fwrite($fd,$i.' : '.$i."\n");
flock($fd,LOCK_UN);
usleep(5);
 }else{
   die('Can not lock file');
 }
   }
   fclose($fd);
 }else{
   echo 'Can not open file';
 }
?


Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109



-- 
PHP Development 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-DEV] register_shutdown_function() not working ?

2001-01-27 Thread Andrew Sitnikov

Hello php-general,

 Why this not working (php.4.0.4pl1_Linux)?
 
?
 error_reporting(E_ALL);

 $file_name = '../tmp/text.txt';

 function funct1(){
   global $file_name;
   if ($fd = fopen($file_name,'a+')){
 fwrite($fd,"Funct1\n");
 fclose($fd);
   }else{
 die("Can not open output file");
   }
 }

 function funct2(){
   global $file_name;
   if ($fd = fopen($file_name,'a+')){
 fwrite($fd,"Funct2\n");
 fclose($fd);
   }
 }

 $i = register_shutdown_function('funct2');
 funct1();
?

file have only  "Funct1" ?

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109



-- 
PHP Development 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-DEV] Re: [PHP] register_shutdown_function() not working ?

2001-01-27 Thread Andrew Sitnikov

Hello Andrew,

Sorry, but i forget what I have Zend Debuger :)

Problem in file path, when i use absolute path
/home/user/tmp/tmp/text.txt all works.

It appears, that in shutdown_function getcwd () == '/',
but in script getcwd () == '/home/user/public_html/'

Only not clearly why.


AS Hello php-general,

AS  Why this not working (php.4.0.4pl1_Linux)?
 
AS ?
AS  error_reporting(E_ALL);

AS  $file_name = '../tmp/text.txt';

AS  function funct1(){
ASglobal $file_name;
ASif ($fd = fopen($file_name,'a+')){
AS  fwrite($fd,"Funct1\n");
AS  fclose($fd);
AS}else{
AS  die("Can not open output file");
AS}
AS  }

AS  function funct2(){
ASglobal $file_name;
ASif ($fd = fopen($file_name,'a+')){
AS  fwrite($fd,"Funct2\n");
AS  fclose($fd);
AS}
AS  }

AS  $i = register_shutdown_function('funct2');
AS  funct1();
?

AS file have only  "Funct1" ?

AS Best regards,
AS  Andrew Sitnikov 
AS  e-mail : [EMAIL PROTECTED]
AS  GSM: (+372) 56491109






Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109



-- 
PHP Development 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-DEV] Session, register_globals, $HTTP_SESSION_VARS???

2001-01-17 Thread Andrew Sitnikov

Hello ,

sess.php
?
 $var_name = 'TEST_VAR';

 session_register($var_name);

 if (isset($HTTP_SESSION_VARS[$var_name])){
   $HTTP_SESSION_VARS[$var_name] ++;
 }else{
   $HTTP_SESSION_VARS[$var_name] = 0;
 }

 echo "\$HTTP_SESSION_VARS[$var_name] : ".$HTTP_SESSION_VARS[$var_name];
?

Result:


if register_globals = On

always : $HTTP_SESSION_VARS[TEST_VAR] : 0



if register_globals = Off

reload : $HTTP_SESSION_VARS[TEST_VAR] : 0
reload : $HTTP_SESSION_VARS[TEST_VAR] : 1
reload : $HTTP_SESSION_VARS[TEST_VAR] : 2



Why ?


P.S.
php 4.0.4pl1 Linux, php4.0.3pl1 BSDI, php4.0.4 Win2000

Best regards,
 Andrew Sitnikov 



-- 
PHP Development 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]