[PHP-DEV] Bug #14699 Updated: mcrypt.c:254: `td' undeclared

2001-12-26 Thread derick

ID: 14699
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Compile Failure
Operating System: FreeBSD v4.1.1
PHP Version: 4.1.0
New Comment:

This is fixed in CVS, an dwill be in the upcoming 4.1.1

Derick

Previous Comments:


[2001-12-26 02:04:03] [EMAIL PROTECTED]

The following, config line + make works fine under php v4.0.6, 

mcrypt Version 2.2.6

PHP Configure :
./configure --with-curl=/home/reserve/.usr --with-mcrypt=/home/reserve/.usr 
--with-zlib-dir=../zlib --with-png-dir=../libpng --with-gd=../gd-1.8.4 
--with-jpeg-dir=/home/reserve/.usr --with-gettext 
--with-config-file-path=/home/reserve/.usr/etc/php410 --enable-track-vars 
--enable-force-cgi-redirect --enable-ftp

make

Build Error :

gcc -I. -I/usr/www/users/reserve/users/anders/.install/php-4.1.0/ext/mcrypt 
-I/usr/www/users/reserve/users/anders/.install/php-4.1.0/main 
-I/usr/www/users/reserve/users/anders/.install/php-4.1.0 
-I/usr/www/users/reserve/users/anders/.install/php-4.1.0/Zend 
-I/home/reserve/.usr/include -I/usr/www/users/reserve/users/anders/.install/gd-1.8.4 
-I/usr/local/include 
-I/usr/www/users/reserve/users/anders/.install/php-4.1.0/ext/mysql/libmysql 
-I/usr/www/users/reserve/users/anders/.install/php-4.1.0/ext/xml/expat  
-I/usr/www/users/reserve/users/anders/.install/php-4.1.0/TSRM -g -O2  -c mcrypt.c  
touch mcrypt.lo
mcrypt.c: In function `php_mcrypt_module_dtor':
mcrypt.c:253: syntax error before `td'
mcrypt.c:254: `td' undeclared (first use in this function)
mcrypt.c:254: (Each undeclared identifier is reported only once
mcrypt.c:254: for each function it appears in.)
*** Error code 1

Stop in /usr/www/users/reserve/users/anders/.install/php-4.1.0/ext/mcrypt.
*** Error code 1

Stop in /usr/www/users/reserve/users/anders/.install/php-4.1.0/ext/mcrypt.
*** Error code 1

Stop in /usr/www/users/reserve/users/anders/.install/php-4.1.0/ext.
*** Error code 1

Stop in /usr/www/users/reserve/users/anders/.install/php-4.1.0.






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


-- 
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] Bug #14692 Updated: Crash

2001-12-26 Thread derick

ID: 14692
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old Status: Closed
Status: Suspended
Bug Type: mcrypt related
Operating System: Linux
PHP Version: 4.1.0
New Comment:

From: Nikos Mavroyanopoulos [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [mcrypt-dev] Crash

On Tue, 25 Dec 2001 18:57:29 +0100 (CET)
Derick Rethans [EMAIL PROTECTED] wrote:

 Hello,
 I get a crash with the 2nd program (and I know gost is not a
 algorithm_mode, but it shouldn't crash IMO).
Yes, it shouldn't crash. I'll check it (after the vacations!).
Thank you.

Previous Comments:


[2001-12-25 11:41:06] [EMAIL PROTECTED]

This is not a PHP bug, but in libmcrypt. I reported this to the author of the library.
This is the C code I used for it:

#include unistd.h
#include mcrypt.h

void main (void)
{
int res;

res = mcrypt_module_is_block_algorithm (gost, NULL);
}

This one works, the next does not (segfaults):

#include unistd.h
#include mcrypt.h

void main (void)
{
int res;

res = mcrypt_module_is_block_algorithm_mode (gost, NULL);
}


regards,
Derick



[2001-12-25 11:18:30] [EMAIL PROTECTED]

i use php-4.1.1



[2001-12-25 11:18:16] [EMAIL PROTECTED]

I know what it is buggy script, but it not the justification for Segmentation.

Your script work for me and print false





[2001-12-25 11:09:03] [EMAIL PROTECTED]

Hello,

your script is buggy, GOST, is not a mode, but an algorithm.
It indeed crashes with this code, but to me it seems like it is an libmcrypt problem.

If you use this:
?
if (mcrypt_module_is_block_algorithm(MCRYPT_GOST))
echo true\n;
else
echo false\n;
?

it works, but it returns true if it is NOT a block algorithm, which is a bug in the 
extension.
(mcrypt returns 1 if it is a block algorithm).

Can you confirm that it does not crash with the script I pasted?

Derick



[2001-12-25 10:29:26] [EMAIL PROTECTED]

libmcrypt-2.4.18



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=14692


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


-- 
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] Bug #14700 Updated: help

2001-12-26 Thread mfischer

ID: 14700
Updated by: mfischer
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Apache related
Operating System: win98,winXP
PHP Version: 4.1.0
New Comment:

Ask support questions at [EMAIL PROTECTED]

Previous Comments:


[2001-12-26 04:23:08] [EMAIL PROTECTED]

I can not open a page .php , with my Apache server.The browser send me a message that 
can not open that pages.





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


-- 
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] Getting rid of --disable-session configure option.

2001-12-26 Thread Derick Rethans

Hello,

in your code you can easily do this:

#ifndef HAVE_PHP_SESSION
#error: no session support in this PHP build
#endif

there is no need to get rid of --disable-session then


I only wonder how exactly do you build that pgsql_session handler, and how
is it supposed to be enabled in PHP, as a .so object?

Derick


On Wed, 26 Dec 2001, Yasuo Ohgaki wrote:

 Hi all,

 I keep posting about undefiend symbol error with sub module
 at start up

 Since, session is internal module now. How about get rid of
 --disable-session option from configure?

 This prevents undefined symbol error at runtime. This does
 not solve sub module related issues, though...

 --
 Yasuo Ohgaki


 --
 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 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] Bug #14697 Updated: no HAVE_SYS_RESOURCE_H

2001-12-26 Thread derick

ID: 14697
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Bogus
Bug Type: Compile Failure
Operating System: RHL6.1/X86
PHP Version: 4.1.0
New Comment:

http://www.php.net/manual/en/faq.build.php#AEN74774

Previous Comments:


[2001-12-26 00:52:25] [EMAIL PROTECTED]

Does config.log shows any special hints why sys/resource.h wasn't found?

Feedback.



[2001-12-26 00:29:31] [EMAIL PROTECTED]

It appears to be a bug in the configure script for 4.1.0

This is an extract from the ./configure output:

checking for sys/mman.h... yes
checking for sys/mount.h... yes
checking for sys/resource.h... no   -- creates the failure
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/statfs.h... yes

Here is a listing of those files

#vdir /usr/include/sys/mman.h /usr/include/sys/mount.h /usr/include/sys/resource.h 
/usr/include/sys\
/select.h /usr/include/sys/socket.h /usr/include/sys/statfs.h
-rw-r--r--   1 root root 4175 Sep 20  1999 /usr/include/sys/mman.h
-rw-r--r--   1 root root 3825 Sep 20  1999 /usr/include/sys/mount.h
-rw-r--r--   1 root root 3185 Sep 20  1999 /usr/include/sys/resource.h
-rw-r--r--   1 root root 3359 Sep 20  1999 /usr/include/sys/select.h
-rw-r--r--   1 root root 8340 Sep 20  1999 /usr/include/sys/socket.h
-rw-r--r--   1 root root 2066 Sep 20  1999 /usr/include/sys/statfs.h
#




[2001-12-26 00:12:23] [EMAIL PROTECTED]

With gcc version egcs-2.91.66 on RHL6.1/X86, apparently HAVE_SYS_RESOURCE_H is not 
being defined when it comes time to compile 

   /ext/standard/microtime.c

as in: 

#./configure --with-apxs
#make

resulting in make aborting as follows -

/bin/sh /home/src/site/webserver/php-4.1.0/libtool --silent --mode=compile gcc  -I. 
-I/home/src/site/webserver/php-4.1.0/ext/\
standard -I/home/src/site/webserver/php-4.1.0/main 
-I/home/src/site/webserver/php-4.1.0 -I/usr/include/apache -I/home/src/sit\
e/webserver/php-4.1.0/Zend -I/home/src/site/webserver/php-4.1.0/ext/mysql/libmysql 
-I/home/src/site/webserver/php-4.1.0/ext/x\
ml/expat  -DLINUX=22 -DMOD_SSL=208105 -DUSE_HSREGEX -DEAPI -DEAPI_MM -DUSE_EXPAT 
-I/home/src/site/webserver/php-4.1.0/TSRM -g\
 -O2 -prefer-pic  -c microtime.c
microtime.c: In function `zif_getrusage':
microtime.c:98: storage size of `usg' isn't known
microtime.c:101: `RUSAGE_SELF' undeclared (first use in this function)
microtime.c:101: (Each undeclared identifier is reported only once
microtime.c:101: for each function it appears in.)
microtime.c:107: `RUSAGE_CHILDREN' undeclared (first use in this function)
make[3]: *** [microtime.lo] Error 1
make[3]: Leaving directory `/home/src/site/webserver/php-4.1.0/ext/standard'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/src/site/webserver/php-4.1.0/ext/standard'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/src/site/webserver/php-4.1.0/ext'
make: *** [all-recursive] Error 1
#

NotE: by manually editing microtime.c and _forcing_ the inclusion of sys/resource.h 
this problem goes away and the build completes as expected.






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


-- 
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: Suggestion: Adding fmt like linebreak algorithm

2001-12-26 Thread derick

On Wed, 26 Dec 2001, Markus Fischer wrote:

 On Wed, Dec 26, 2001 at 02:22:02AM -, Dominik Roettsches wrote :
  Another suggestion is to replace the wordwrap code by the algorithm of
  Knuth.

 This would break BC and therefore isn't an option.

Only changin the algorithm, but not touching the parameters will not break
BC IMO. It just outputs something different, but that isn't a problem with
wrapping lines IMO.

Derick


-- 
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] Bug #14697 Updated: no HAVE_SYS_RESOURCE_H

2001-12-26 Thread support

ID: 14697
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Compile Failure
Operating System: RHL6.1/X86
PHP Version: 4.1.0
New Comment:

Here is the bit from config.log that is causing all of this:

configure:6304: checking for sys/resource.h
configure:6314: gcc -E  -DLINUX=22 -DMOD_SSL=208105 -DUSE_HSREGEX -DEAPI -DEAPI_MM 
-DUSE_EXPAT conftest.c /dev/null 2conftest.out
In file included from /usr/include/sys/resource.h:25,
 from configure:6310:
/usr/include/bits/resource.h:109: warning: `RLIM_INFINITY' redefined
/usr/include/asm/resource.h:26: warning: this is the location of the previous 
definition
configure: failed program was:
#line 6309 configure
#include confdefs.h
#include sys/resource.h


Previous Comments:


[2001-12-26 06:13:36] [EMAIL PROTECTED]

http://www.php.net/manual/en/faq.build.php#AEN74774



[2001-12-26 00:52:25] [EMAIL PROTECTED]

Does config.log shows any special hints why sys/resource.h wasn't found?

Feedback.



[2001-12-26 00:29:31] [EMAIL PROTECTED]

It appears to be a bug in the configure script for 4.1.0

This is an extract from the ./configure output:

checking for sys/mman.h... yes
checking for sys/mount.h... yes
checking for sys/resource.h... no   -- creates the failure
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/statfs.h... yes

Here is a listing of those files

#vdir /usr/include/sys/mman.h /usr/include/sys/mount.h /usr/include/sys/resource.h 
/usr/include/sys\
/select.h /usr/include/sys/socket.h /usr/include/sys/statfs.h
-rw-r--r--   1 root root 4175 Sep 20  1999 /usr/include/sys/mman.h
-rw-r--r--   1 root root 3825 Sep 20  1999 /usr/include/sys/mount.h
-rw-r--r--   1 root root 3185 Sep 20  1999 /usr/include/sys/resource.h
-rw-r--r--   1 root root 3359 Sep 20  1999 /usr/include/sys/select.h
-rw-r--r--   1 root root 8340 Sep 20  1999 /usr/include/sys/socket.h
-rw-r--r--   1 root root 2066 Sep 20  1999 /usr/include/sys/statfs.h
#




[2001-12-26 00:12:23] [EMAIL PROTECTED]

With gcc version egcs-2.91.66 on RHL6.1/X86, apparently HAVE_SYS_RESOURCE_H is not 
being defined when it comes time to compile 

   /ext/standard/microtime.c

as in: 

#./configure --with-apxs
#make

resulting in make aborting as follows -

/bin/sh /home/src/site/webserver/php-4.1.0/libtool --silent --mode=compile gcc  -I. 
-I/home/src/site/webserver/php-4.1.0/ext/\
standard -I/home/src/site/webserver/php-4.1.0/main 
-I/home/src/site/webserver/php-4.1.0 -I/usr/include/apache -I/home/src/sit\
e/webserver/php-4.1.0/Zend -I/home/src/site/webserver/php-4.1.0/ext/mysql/libmysql 
-I/home/src/site/webserver/php-4.1.0/ext/x\
ml/expat  -DLINUX=22 -DMOD_SSL=208105 -DUSE_HSREGEX -DEAPI -DEAPI_MM -DUSE_EXPAT 
-I/home/src/site/webserver/php-4.1.0/TSRM -g\
 -O2 -prefer-pic  -c microtime.c
microtime.c: In function `zif_getrusage':
microtime.c:98: storage size of `usg' isn't known
microtime.c:101: `RUSAGE_SELF' undeclared (first use in this function)
microtime.c:101: (Each undeclared identifier is reported only once
microtime.c:101: for each function it appears in.)
microtime.c:107: `RUSAGE_CHILDREN' undeclared (first use in this function)
make[3]: *** [microtime.lo] Error 1
make[3]: Leaving directory `/home/src/site/webserver/php-4.1.0/ext/standard'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/src/site/webserver/php-4.1.0/ext/standard'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/src/site/webserver/php-4.1.0/ext'
make: *** [all-recursive] Error 1
#

NotE: by manually editing microtime.c and _forcing_ the inclusion of sys/resource.h 
this problem goes away and the build completes as expected.






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


-- 
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] Bug #14697 Updated: no HAVE_SYS_RESOURCE_H

2001-12-26 Thread derick

ID: 14697
Updated by: derick
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Compile Failure
Operating System: RHL6.1/X86
PHP Version: 4.1.0
New Comment:

As that FAQ entry describes, your kernel headers are messed up.

Derick

Previous Comments:


[2001-12-26 06:25:22] [EMAIL PROTECTED]

Here is the bit from config.log that is causing all of this:

configure:6304: checking for sys/resource.h
configure:6314: gcc -E  -DLINUX=22 -DMOD_SSL=208105 -DUSE_HSREGEX -DEAPI -DEAPI_MM 
-DUSE_EXPAT conftest.c /dev/null 2conftest.out
In file included from /usr/include/sys/resource.h:25,
 from configure:6310:
/usr/include/bits/resource.h:109: warning: `RLIM_INFINITY' redefined
/usr/include/asm/resource.h:26: warning: this is the location of the previous 
definition
configure: failed program was:
#line 6309 configure
#include confdefs.h
#include sys/resource.h




[2001-12-26 06:13:36] [EMAIL PROTECTED]

http://www.php.net/manual/en/faq.build.php#AEN74774



[2001-12-26 00:52:25] [EMAIL PROTECTED]

Does config.log shows any special hints why sys/resource.h wasn't found?

Feedback.



[2001-12-26 00:29:31] [EMAIL PROTECTED]

It appears to be a bug in the configure script for 4.1.0

This is an extract from the ./configure output:

checking for sys/mman.h... yes
checking for sys/mount.h... yes
checking for sys/resource.h... no   -- creates the failure
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/statfs.h... yes

Here is a listing of those files

#vdir /usr/include/sys/mman.h /usr/include/sys/mount.h /usr/include/sys/resource.h 
/usr/include/sys\
/select.h /usr/include/sys/socket.h /usr/include/sys/statfs.h
-rw-r--r--   1 root root 4175 Sep 20  1999 /usr/include/sys/mman.h
-rw-r--r--   1 root root 3825 Sep 20  1999 /usr/include/sys/mount.h
-rw-r--r--   1 root root 3185 Sep 20  1999 /usr/include/sys/resource.h
-rw-r--r--   1 root root 3359 Sep 20  1999 /usr/include/sys/select.h
-rw-r--r--   1 root root 8340 Sep 20  1999 /usr/include/sys/socket.h
-rw-r--r--   1 root root 2066 Sep 20  1999 /usr/include/sys/statfs.h
#




[2001-12-26 00:12:23] [EMAIL PROTECTED]

With gcc version egcs-2.91.66 on RHL6.1/X86, apparently HAVE_SYS_RESOURCE_H is not 
being defined when it comes time to compile 

   /ext/standard/microtime.c

as in: 

#./configure --with-apxs
#make

resulting in make aborting as follows -

/bin/sh /home/src/site/webserver/php-4.1.0/libtool --silent --mode=compile gcc  -I. 
-I/home/src/site/webserver/php-4.1.0/ext/\
standard -I/home/src/site/webserver/php-4.1.0/main 
-I/home/src/site/webserver/php-4.1.0 -I/usr/include/apache -I/home/src/sit\
e/webserver/php-4.1.0/Zend -I/home/src/site/webserver/php-4.1.0/ext/mysql/libmysql 
-I/home/src/site/webserver/php-4.1.0/ext/x\
ml/expat  -DLINUX=22 -DMOD_SSL=208105 -DUSE_HSREGEX -DEAPI -DEAPI_MM -DUSE_EXPAT 
-I/home/src/site/webserver/php-4.1.0/TSRM -g\
 -O2 -prefer-pic  -c microtime.c
microtime.c: In function `zif_getrusage':
microtime.c:98: storage size of `usg' isn't known
microtime.c:101: `RUSAGE_SELF' undeclared (first use in this function)
microtime.c:101: (Each undeclared identifier is reported only once
microtime.c:101: for each function it appears in.)
microtime.c:107: `RUSAGE_CHILDREN' undeclared (first use in this function)
make[3]: *** [microtime.lo] Error 1
make[3]: Leaving directory `/home/src/site/webserver/php-4.1.0/ext/standard'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/src/site/webserver/php-4.1.0/ext/standard'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/src/site/webserver/php-4.1.0/ext'
make: *** [all-recursive] Error 1
#

NotE: by manually editing microtime.c and _forcing_ the inclusion of sys/resource.h 
this problem goes away and the build completes as expected.






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


-- 
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: Suggestion: Adding fmt like linebreak algorithm

2001-12-26 Thread Markus Fischer

On Wed, Dec 26, 2001 at 01:10:47PM +0100, [EMAIL PROTECTED] wrote : 
 On Wed, 26 Dec 2001, Markus Fischer wrote:
 
  On Wed, Dec 26, 2001 at 02:22:02AM -, Dominik Roettsches wrote :
   Another suggestion is to replace the wordwrap code by the algorithm of
   Knuth.
 
  This would break BC and therefore isn't an option.
 
 Only changin the algorithm, but not touching the parameters will not break
 BC IMO. It just outputs something different, but that isn't a problem with
 wrapping lines IMO.

Err, changing exit() also doesn't touch its parameters (at
least, there would be a way to do it so) and still it breaks
BC because the output is different (which was my point).

-- 
Please always Cc to me when replying to me on the lists.

-- 
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] Bug #14697 Updated: no HAVE_SYS_RESOURCE_H

2001-12-26 Thread support

ID: 14697
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Compile Failure
Operating System: RHL6.1/X86
PHP Version: 4.1.0
New Comment:

An update to the user's glibc and headers appears to be in order so as to eliminate 
the annoying warnings concerning redefinition of values by the latest kernel headers.

However, a harmless warning for sys/resource.h should not be able to trick the 
otherwise superb PHP4 configure script into generating a non-functional build.  A 
compromise solution would be to emit a configure error checking sys/resource.h 
(error discovered, check log) rather than checking sys/resource.h(no).


Previous Comments:


[2001-12-26 06:27:35] [EMAIL PROTECTED]

As that FAQ entry describes, your kernel headers are messed up.

Derick



[2001-12-26 06:25:22] [EMAIL PROTECTED]

Here is the bit from config.log that is causing all of this:

configure:6304: checking for sys/resource.h
configure:6314: gcc -E  -DLINUX=22 -DMOD_SSL=208105 -DUSE_HSREGEX -DEAPI -DEAPI_MM 
-DUSE_EXPAT conftest.c /dev/null 2conftest.out
In file included from /usr/include/sys/resource.h:25,
 from configure:6310:
/usr/include/bits/resource.h:109: warning: `RLIM_INFINITY' redefined
/usr/include/asm/resource.h:26: warning: this is the location of the previous 
definition
configure: failed program was:
#line 6309 configure
#include confdefs.h
#include sys/resource.h




[2001-12-26 06:13:36] [EMAIL PROTECTED]

http://www.php.net/manual/en/faq.build.php#AEN74774



[2001-12-26 00:52:25] [EMAIL PROTECTED]

Does config.log shows any special hints why sys/resource.h wasn't found?

Feedback.



[2001-12-26 00:29:31] [EMAIL PROTECTED]

It appears to be a bug in the configure script for 4.1.0

This is an extract from the ./configure output:

checking for sys/mman.h... yes
checking for sys/mount.h... yes
checking for sys/resource.h... no   -- creates the failure
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/statfs.h... yes

Here is a listing of those files

#vdir /usr/include/sys/mman.h /usr/include/sys/mount.h /usr/include/sys/resource.h 
/usr/include/sys\
/select.h /usr/include/sys/socket.h /usr/include/sys/statfs.h
-rw-r--r--   1 root root 4175 Sep 20  1999 /usr/include/sys/mman.h
-rw-r--r--   1 root root 3825 Sep 20  1999 /usr/include/sys/mount.h
-rw-r--r--   1 root root 3185 Sep 20  1999 /usr/include/sys/resource.h
-rw-r--r--   1 root root 3359 Sep 20  1999 /usr/include/sys/select.h
-rw-r--r--   1 root root 8340 Sep 20  1999 /usr/include/sys/socket.h
-rw-r--r--   1 root root 2066 Sep 20  1999 /usr/include/sys/statfs.h
#




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=14697


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


-- 
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] Bug #9185 Updated: postgresql backend process become stale after php page loads

2001-12-26 Thread lobbin

ID: 9185
Updated by: lobbin
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: PostgreSQL related
Operating System: NetBSD/Alpha 1.5.1-current
PHP Version: 4.0.4pl1
New Comment:

No feedback. Closed.

Previous Comments:


[2001-12-05 19:09:17] [EMAIL PROTECTED]

Status = Feedback



[2001-12-05 18:34:21] [EMAIL PROTECTED]

Does this happen with 4.1.0RC5?
http://www.php.net/~zeev/php-4.1.0RC5.tar.gz





[2001-02-15 21:33:25] [EMAIL PROTECTED]

note that 'apachectl graceful' will get rid of the stale processes.



[2001-02-09 02:26:51] [EMAIL PROTECTED]

with persistent connection on, i notice that with a web page load, it starts a new 
postgresql backend and detaches from it. therefore, the postgresql backend becomes 
stale and just hangs there for hours and days.

upon reloading the page, a new pgsql backend starts. within a minute, all the pgsql 
connection is maxed out, because all the processes become stale and were never 
released. this is from just me pressing reload 15 or so times. no one else have access 
to this server.

if i do 'apachectl stop' then 'apachectl start' again, the stale pgsql processes do 
get freed up. i didn't compile pgql with php as a loadable module. though it's using 
pgsql's dynamic library:

./configure \
--with-apxs \
--with-sablot=/usr/local/install/Sablot-0.44 \
--with-mnogosearch=/usr/local \
--with-pgsql=/usr/local \
--with-mysql=/usr/local \
--enable-libgcc \
--with-gnu-ld \
--with-zlib \
--with-system-regex \
--with-config-file-path=/usr/local/etc \
--enable-track-vars \
--enable-force-cgi-redirect \
--enable-discard-path \
--enable-memory-limit \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--with-gd=/usr/pkg \
--with-ttf=/usr/pkg \
--enable-freetype-4bit-antialias-hack

# ldd /usr/pkg/lib/httpd/libphp4.so
/usr/pkg/lib/httpd/libphp4.so:
 -lz.0 = /usr/lib/libz.so.0
 -lxmltok = /usr/local/install/Sablot-0.44/lib/libxmltok.so
 -lxmlparse = /usr/local/install/Sablot-0.44/lib/libxmlparse.so
 -lsablot = /usr/local/install/Sablot-0.44/lib/libsablot.so
 -lcrypt.0 = /usr/lib/libcrypt.so.0
 -lpq.2 = /usr/local/lib/libpq.so.2
 -lmysqlclient = /usr/local/lib/mysql/libmysqlclient.so
 -ludmsearch = /usr/local/lib/libudmsearch.so
 -lm.0 = /usr/lib/libm.so.0
 -lc.12 = /usr/lib/libc.so.12
 -lintl.1 = /usr/pkg/lib/libintl.so.1
 -lttf.4 = /usr/pkg/lib/libttf.so.4
 -lpng.1 = /usr/pkg/lib/libpng.so.1
 -ljpeg.62 = /usr/pkg/lib/libjpeg.so.62
 -lXpm.4 = /usr/X11R6/lib/libXpm.so.4
 -lX11.6 = /usr/X11R6/lib/libX11.so.6
 -lgd.1 = /usr/pkg/lib/libgd.so.1
 -lresolv.1 = /usr/lib/libresolv.so.1

also note that the regular pgsql clients do release the backend postmaster right away 
after it quits.

there is a bug related to this one which showed similar symptoms: bug id# 8769





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


-- 
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] Bug #11328 Updated: can't create large object

2001-12-26 Thread lobbin

ID: 11328
Updated by: lobbin
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: PostgreSQL related
Operating System: Linux
PHP Version: 4.0.5
New Comment:

No feedback. Closing.

Previous Comments:


[2001-12-05 18:43:44] [EMAIL PROTECTED]

Could you try 4.1.0RC5? 
http://www.php.net/~zeev/php-4.1.0RC5.tar.gz



[2001-06-07 11:32:18] [EMAIL PROTECTED]

pg-locreate($conn)  returns me -1.
Connection is ok.
PostgreSQl 7.0.3
//
  pg_Exec($conn,begin);

  $img_oid=pg_locreate($conn);

  echo img_oid=.$img_oid;
  pg_lounlink($conn);
  pg_Exec($conn,commit);

//-
./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-mysql' '--with-gd' 
'--with-freetype' '--enable-track-vars' '--with-jpeg-dir=/usr' '--with-gif-dir=/usr' 
'--with-tiff-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' 
'--with-openssl=/usr/local/ssl' '--with-mcrypt=/usr/local/lib' '--with-xml' 
'--enable-gd-imgstrttf' '--enable-exif' '--enable-ftp' '--enable-sockets' 
'--with-sysvshm' '--with-sysvsem' '--with-imap' '--with-curl' '--with-filepro' 
'--enable-safe-mode' '--enable-track-vars' '--enable-magic-quotes' '--enable-bcmath' 
'--enable-force-cgi-redirect' '--enable-memory-limit=yes' '--with-yp' 
'--enable-inline-optimization' '--enable-wddx' '--enable-shmop' '--enable-trans-sid' 
'--with-readline' '--with-tsrm-pthreads' '--enable-memory-limit' '--enable-calendar' 
'--enable-discard-path' '--with-mcrypt' '--with-pgsql=/usr/local' '--with-bz2' 
'--with-mhash' '--with-zlib' '--with-java=/usr/local/java'





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


-- 
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] Bug #14697 Updated: no HAVE_SYS_RESOURCE_H

2001-12-26 Thread support

ID: 14697
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Compile Failure
Operating System: RHL6.1/X86
PHP Version: 4.1.0
New Comment:

An update to the user's glibc and headers appears to be in order so as to eliminate 
the annoying warnings concerning redefinition of values by the latest kernel headers.

However, a harmless warning for sys/resource.h should not be able to trick the 
otherwise superb PHP4 configure script into generating a non-functional build.  A 
compromise solution would be to emit a configure error checking sys/resource.h 
(error discovered, check log) rather than checking sys/resource.h(no).


Previous Comments:


[2001-12-26 06:58:07] [EMAIL PROTECTED]

An update to the user's glibc and headers appears to be in order so as to eliminate 
the annoying warnings concerning redefinition of values by the latest kernel headers.

However, a harmless warning for sys/resource.h should not be able to trick the 
otherwise superb PHP4 configure script into generating a non-functional build.  A 
compromise solution would be to emit a configure error checking sys/resource.h 
(error discovered, check log) rather than checking sys/resource.h(no).




[2001-12-26 06:27:35] [EMAIL PROTECTED]

As that FAQ entry describes, your kernel headers are messed up.

Derick



[2001-12-26 06:25:22] [EMAIL PROTECTED]

Here is the bit from config.log that is causing all of this:

configure:6304: checking for sys/resource.h
configure:6314: gcc -E  -DLINUX=22 -DMOD_SSL=208105 -DUSE_HSREGEX -DEAPI -DEAPI_MM 
-DUSE_EXPAT conftest.c /dev/null 2conftest.out
In file included from /usr/include/sys/resource.h:25,
 from configure:6310:
/usr/include/bits/resource.h:109: warning: `RLIM_INFINITY' redefined
/usr/include/asm/resource.h:26: warning: this is the location of the previous 
definition
configure: failed program was:
#line 6309 configure
#include confdefs.h
#include sys/resource.h




[2001-12-26 06:13:36] [EMAIL PROTECTED]

http://www.php.net/manual/en/faq.build.php#AEN74774



[2001-12-26 00:52:25] [EMAIL PROTECTED]

Does config.log shows any special hints why sys/resource.h wasn't found?

Feedback.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=14697


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


-- 
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] Bug #14697 Updated: no HAVE_SYS_RESOURCE_H

2001-12-26 Thread support

ID: 14697
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Compile Failure
Operating System: RHL6.1/X86
PHP Version: 4.1.0
New Comment:

whoops, accidentally reposted while closing browser.  please ignore duplicate posting.

Previous Comments:


[2001-12-26 08:21:42] [EMAIL PROTECTED]

An update to the user's glibc and headers appears to be in order so as to eliminate 
the annoying warnings concerning redefinition of values by the latest kernel headers.

However, a harmless warning for sys/resource.h should not be able to trick the 
otherwise superb PHP4 configure script into generating a non-functional build.  A 
compromise solution would be to emit a configure error checking sys/resource.h 
(error discovered, check log) rather than checking sys/resource.h(no).




[2001-12-26 06:58:07] [EMAIL PROTECTED]

An update to the user's glibc and headers appears to be in order so as to eliminate 
the annoying warnings concerning redefinition of values by the latest kernel headers.

However, a harmless warning for sys/resource.h should not be able to trick the 
otherwise superb PHP4 configure script into generating a non-functional build.  A 
compromise solution would be to emit a configure error checking sys/resource.h 
(error discovered, check log) rather than checking sys/resource.h(no).




[2001-12-26 06:27:35] [EMAIL PROTECTED]

As that FAQ entry describes, your kernel headers are messed up.

Derick



[2001-12-26 06:25:22] [EMAIL PROTECTED]

Here is the bit from config.log that is causing all of this:

configure:6304: checking for sys/resource.h
configure:6314: gcc -E  -DLINUX=22 -DMOD_SSL=208105 -DUSE_HSREGEX -DEAPI -DEAPI_MM 
-DUSE_EXPAT conftest.c /dev/null 2conftest.out
In file included from /usr/include/sys/resource.h:25,
 from configure:6310:
/usr/include/bits/resource.h:109: warning: `RLIM_INFINITY' redefined
/usr/include/asm/resource.h:26: warning: this is the location of the previous 
definition
configure: failed program was:
#line 6309 configure
#include confdefs.h
#include sys/resource.h




[2001-12-26 06:13:36] [EMAIL PROTECTED]

http://www.php.net/manual/en/faq.build.php#AEN74774



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=14697


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


-- 
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-WIN] MSSQL connect

2001-12-26 Thread Thomas \omega\ Henning

?php
$h = server adr; //don't forget 2 change this
$u = user; //don't forget 2 chage this
$p = passw; //don't forget 2 change this
$b = db; //don't forget 2 change this
$connexion = mssql_connect($h, $u, $p);

 Why do you uses quotes here?

mssql_select_db($b);

$sql_temp = select * from test;
//.
$result = mssql_query($sql_temp);
//  ^^

//??

mssql_close($connexion);
?

Here is the problem $sql != $sql_temp
so the $result = NULL; because mssql_query( ) has no query to send to the
MsSQL server.
This should work try it out!!!

Thomas omega Henning




-- 
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-WIN] MSSQL connect

2001-12-26 Thread Svensson, B.A.T. (HKG)

You must be an extremely intelligent person, almost literary quoting my
answer, and then pinpointing down things I already pointed out! Moron...

From: Thomas omega Henning
Sent: Wednesday, December 26, 2001 8:50 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: [PHP-WIN] MSSQL connect


?php
$h = server adr; //don't forget 2 change this
$u = user; //don't forget 2 chage this
$p = passw; //don't forget 2 change this
$b = db; //don't forget 2 change this
$connexion = mssql_connect($h, $u, $p);

 Why do you uses quotes here?

mssql_select_db($b);

$sql_temp = select * from test;
//.
$result = mssql_query($sql_temp);
//  ^^

//??

mssql_close($connexion);
?

Here is the problem $sql != $sql_temp
so the $result = NULL; because mssql_query( ) has no query 
to send to the MsSQL server.
This should work try it out!!!

Thomas omega Henning

-- 
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] Bug #14489 Updated: DSO PHP module compiling with gettext support is blocking Apache start

2001-12-26 Thread misch

ID: 14489
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Apache related
Operating System: Cobalt Raq 3
PHP Version: 4.1.0
New Comment:

I've solved this problem by installation second Apache (1.3.22) on other port . And 
there were no problems.

Thank you

Previous Comments:


[2001-12-17 11:01:13] [EMAIL PROTECTED]

It`s nothing about SSL and certificates. As you can see these messages are for both 
cases - when it is working and when it is not working either.

WHAT IS STRANGE IS THAT THESE MESSAGES ARE   CHANGED !!!


When I just add gettext support in PHP modul, how can it change these messages whenb 
Apache is starting.

Please look on these messages again.



[2001-12-16 18:53:14] [EMAIL PROTECTED]

status - feedback.



[2001-12-16 12:34:38] [EMAIL PROTECTED]

I assume site7 has an ssl certificate defined, right?
So what happens when you remove that certificate?

As a note: I can not reproduce this bug on a Cobalt Raq 3 but I do not have hosts 
running ssl.



[2001-12-16 10:57:59] [EMAIL PROTECTED]

I'm still wondering about this: when I compile php 4.1.0 as dso without --with-gettext 
and start Apache I can see this:

[root@cobalt apache]# /etc/rc.d/init.d/httpd start
Setting up Web Service: Site home has invalid certificate: 4999 Certificate files do 
not exist.
Site site7 has invalid certificate: 4999 Certificate files do not exist.
/usr/sbin/httpd

and Apache IS working

But when I compile it with optiion --with-gettext I see this (see messages):

[root@cobalt apache]# /etc/rc.d/init.d/httpd start
Setting up Web Service: Site home has invalid certificate: 4999 ssl_cant_files_missing
Site site7 has invalid certificate: 4999 ssl_cant_files_missing
/usr/sbin/httpd

and Apache is NOT running (no errors no records in error log)
Why are these apache messages changed ??



I was wondering about some mess in gettext versions so I  compiled 0.10.40 again and 
install in new dir and after use : --with-gettext=/home/michal/gettext  , but with the 
same reasult.






[2001-12-16 10:10:52] [EMAIL PROTECTED]

It's the same.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=14489


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


-- 
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] Bug #14701: Execute program

2001-12-26 Thread ngotau

From: [EMAIL PROTECTED]
Operating system: Windows2000
PHP version:  4.1.0
PHP Bug Type: Unknown/Other Function
Bug description:  Execute program

I tried to exec simple program like as :
exec(dir C:,$results,$status)
but the $results return [Array] with out any string .
and $status return 0 .
How I can handle result ? 
-- 
Edit bug report at: http://bugs.php.net/?id=14701edit=1


-- 
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: Bug #14333: Apache processes consume all CPU

2001-12-26 Thread John Lim


Hi

I am back in the office and have confirmed that with PHP 4.0.6,
the 99% cpu  bug only occurs with mm. With the files session
handler it doesn't happen. This was on the SMP server with the
given config below...

Bye, John

John Lim [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello,

 I have also been experiencing the same problem with PHP 4.0.6.
 A httpd process will start taking over 99% of the CPU on my
 SMP processor on RH 7.2, Apache 1.3.20 (standard RH RPM)
 when I run some complex scripts with apachebench:

ab -n1000 -c20 http://url/to/php/script/gone/crazy.php

 These scripts are accessing Oracle (oci8). I thought it might
 be some bottleneck in the configuration so I checked my Oracle
 sessions and they are ok (I am using non-persistent connections).
 Memory usage is stable at about 11 Mb max for the greedy httpd
 process.

 The only other thing that i can think of that might be a
 bottleneck is the mm session handler...

 I remember having problems previously with the file session
 handler because my benchmarks caused the /tmp directory to
 and /tmp ran out of hard disk space (!) and am wondering whether this
 could happen with mm. Incidentally the SMP monster has 1 Gig of
 RAM, and I have always have more than 400Mb free memory even
 with my most stringent benchmarks that are causing problems.
 Are there any constants in shared memory or mm source code
 that I can tweak?

 Another point is that some simpler PHP scripts accessing Oracle
 and sessions do not cause these problems. I can bang away with

  ab -n4000 -c40 http://url/to/simpler/script.php

 with no problems.

 I will test with 4.1.0 next week when I get back to the office.

 -- John Lim

 [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  From: [EMAIL PROTECTED]
  Operating system: RH 6.2 SMP
  PHP version:  4.0.6
  PHP Bug Type: Apache related
  Bug description:  Apache processes consume all CPU
 
  I've been experiencing the exact same problem that is described in bug
  #14290 and #8446 for quite some time now but did not know which Apache
  module was causing it.  Up until now, I've had a cron job that simply
 kills
  off (with a -9) any httpd processes that are using 99% or more cpu time.
 
  Today I've been trying to track down what exactly is causing the
problem.
  I've eliminated all extra Apache modules and did not experience the
  problem.  When I added PHP back in, the problem started immediately.
  Within one minute of starting Apache back up, the high-CPU processes
  started appearing again.
 
  The Apache server-status didn't indicate that ANY php script had been
  hit.  The processes just start going out of control after some time.  In
  fact, there isn't even a single *.php* file on the server.  I really
don't
  think this is happening because of a PHP script being run.
 
  I'm currently testing this out on a Red Hat 6.2 Linux (SMP) box with
dual
  CPUs.  From the sound of things in the other bug reports (#14290 and
  #8446), the problem only seems to be happening on SMP servers.  I did
not
  compile with any extra PHP modules except for the core PHP 4.0.6.
 
  I haven't really done a lot with PHP, so I'm not sure how to help debug
  this problem.  But I do want a stable Apache environment with PHP
support
  for my hosting customers.  If there is anything I can do to help debug
  things, please let me know.
 
  I've read the page on using gdb, but I'm think this is a different kind
of
  situation.  Apache isn't crashing, but certain processes are going
  out-of-control.  Is there a way to get a backtrace of a particular
  process while it is still running?
 
  Until this problem can be resolved, I'm going to have to remove PHP from
 my
  servers.  I really don't want to have to do this, but the instabilities

 are
  becoming too much to handle and very hard to explain to our customers.
 
  Please let me know what I can do to help debug and solve this problem.
 
  Thanks!
  Tauren
 
 
  --
  Edit bug report at: http://bugs.php.net/?id=14333edit=1
 





-- 
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] Bug #14702: segfault in OCIFetchStatement with 1 or 2 chars CLOB

2001-12-26 Thread ora

From: [EMAIL PROTECTED]
Operating system: Linux 2.4
PHP version:  4.1.0
PHP Bug Type: OCI8 related
Bug description:  segfault in OCIFetchStatement with 1 or 2 chars CLOB

php segfault with the following code :

$stmt = OCIParse($conn,select myclob from I18N);
OCIExecute($stmt);
OCIFetchStatement($stmt,$results);

when myclob contains at least one row with one or two characters. work fine
when clob length = 0 or = 3.
oracle and php use utf-8.

php : 4.1.0 and 4.0.6 on linux x86
oracle : 8.1.7.2 on sparc64

-- 
Edit bug report at: http://bugs.php.net/?id=14702edit=1


-- 
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-WIN] MSSQL connect

2001-12-26 Thread Thomas \omega\ Henning

I don't know who's a moron that can;t even see straight
B.A.T. Svensson [EMAIL PROTECTED] wrote in message
27E647E5629ED211BF78009027289C6302157DAB@mail1">news:27E647E5629ED211BF78009027289C6302157DAB@mail1...
 You must be an extremely intelligent person, almost literary quoting my
 answer, and then pinpointing down things I already pointed out! Moron...

 From: Thomas omega Henning
 Sent: Wednesday, December 26, 2001 8:50 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: Re: [PHP-WIN] MSSQL connect
 
 
 ?php
 $h = server adr; //don't forget 2 change this
 $u = user; //don't forget 2 chage this
 $p = passw; //don't forget 2 change this
 $b = db; //don't forget 2 change this
 $connexion = mssql_connect($h, $u, $p);
 
  Why do you uses quotes here?
 
 mssql_select_db($b);
 
 $sql_temp = select * from test;
 //.
 $result = mssql_query($sql_temp);
 //  ^^
 
 //??
 
 mssql_close($connexion);
 ?
 
 Here is the problem $sql != $sql_temp
 so the $result = NULL; because mssql_query( ) has no query
 to send to the MsSQL server.
 This should work try it out!!!
 
 Thomas omega Henning



-- 
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-WIN] MSSQL connect

2001-12-26 Thread Svensson, B.A.T. (HKG)

What the heck are you talking about?


-Original Message-
From: Thomas omega Henning [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 26, 2001 7:50 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: [PHP-WIN] MSSQL connect


I don't know who's a moron that can;t even see straight
B.A.T. Svensson [EMAIL PROTECTED] wrote in message
27E647E5629ED211BF78009027289C6302157DAB@mail1">news:27E647E5629ED211BF78009027289C6302157DAB@mail1...
 You must be an extremely intelligent person, almost literary 
quoting my
 answer, and then pinpointing down things I already pointed 
out! Moron...

 From: Thomas omega Henning
 Sent: Wednesday, December 26, 2001 8:50 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: Re: [PHP-WIN] MSSQL connect
 
 
 ?php
 $h = server adr; //don't forget 2 change this
 $u = user; //don't forget 2 chage this
 $p = passw; //don't forget 2 change this
 $b = db; //don't forget 2 change this
 $connexion = mssql_connect($h, $u, $p);
 
  Why do you uses quotes here?
 
 mssql_select_db($b);
 
 $sql_temp = select * from test;
 //.
 $result = mssql_query($sql_temp);
 //  ^^
 
 //??
 
 mssql_close($connexion);
 ?
 
 Here is the problem $sql != $sql_temp
 so the $result = NULL; because mssql_query( ) has no query
 to send to the MsSQL server.
 This should work try it out!!!
 
 Thomas omega Henning



-- 
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 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] Bug #14693 Updated: Problem with searchin single signed LDAP base name dc=something

2001-12-26 Thread venaas

ID: 14693
Updated by: venaas
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: LDAP related
Operating System: Sun Solaris 2.7 (32 bit)
PHP Version: 4.1.0
New Comment:

You are right, there is one problem with PHP's ldap_search(). This is a bit hard to 
explain, but when you search at dc=hr, there are both entries returned, and referrals 
(continuation references).
If you're using LDAPv2 (which is default with OpenLDAP API), the result of the search 
won't be LDAP_SUCCESS, and PHP's ldap_search() won't return any results (even though 
some entries were found).

I wanted to fix this a while ago, and at the same time be backwards compatible. I also 
wanted to have a way of doing parallel searches. ldap_search() will do a parallel 
search if the first argument is an array of link identifiers. It will then return an 
array of results instead of a single result. You can also use arrays for bases and 
filters if you don't want the same base and filter for all. I also  made ldap_search() 
return results even if not LDAP_SUCCESS.

Here is an example on how this can be used to get both entries and referrals with 
LDAPv2:

$ds=ldap_connect(ds.carnet.hr);
ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
$r=ldap_bind($ds);
$dn = 'dc=hr';
$filter=(ou=*);
$srs=ldap_search(array($ds), $dn, $filter);
$sr=$srs[0];
$info = ldap_get_entries($ds, $sr);
ldap_parse_result($ds, $sr, $errcode, $matcheddn, $errmsg, $referrals);
var_dump($info, $errcode, $matcheddn, $errmsg, $referrals);

Here I use parallel search, even though I only have one server, just to get hold of 
the results. ldap_parse_result() is used to get the referrals and possibly other info 
in the result message. It could be possible to search all the referrals (even in 
parallel) to get more data, but when using LDAPv2 you don't get the bases, so that is 
problematic. Compare output of
ldapsearch  -hds.carnet.hr -bdc=hr
with
ldapsearch -x -P2  -hds.carnet.hr -bdc=hr
Using LDAPv3 for the initial search you would get the bases also. You can tell 
OpenLDAP to chase the referrals (if v3) or give them back to you. It can't chase them 
with v2, it would then try with wrong base and get no such object. Because of this 
mess, I've only added referrals for v3 servers at ldap://ldap.uninett.no/dc=no

There is one problem with PHP and parallel searches though. It was added in 4.0.5, and 
works in 4.0.6, but is broken in 4.1.0. I noticed this thanks to you, and I've nox 
fixed it so that hopefully it will work again in 4.1.1. You can make it work in 4.1.0 
by changing ldap.c as shown at
http://cvs.php.net/diff.php/php4/ext/ldap/ldap.c?r1=1.112r2=1.113ty=u

Everything I said about ldap_search() also hold for ldap_list() and ldap_read().


Previous Comments:


[2001-12-25 18:27:32] [EMAIL PROTECTED]

Thanks for fast answer, right now it works.

Why I think it is bug, simply I write code you saw in bug report, but I also test with 
dc=srce,dc=hr (few more) and it worked fine, I only got warnings when I put dc=hr .

I use OpenLdap 2.0.19, and v2 and v3 protocol, with referrals, ds.carnet.hr is 
national LDAP server with base DN dc=hr.
So in one moment LDAP function use v3 and on onther v2 protocol, that is very 
confused. 

Right away I check my configuration, and I think maybe is misfunctionality (bug) :) 
... whay I think so 

1. My server a able to answer on v2 and v3 standard, in that case at least I will 
expect to got 0 for answer
2. Ldap Browser 2.8.2 by Jarek Gawor (jar) return No entries mached for same search 
using v2 protocol.

My I sugest to implement that feature in some of next realeas of LDAP functions for 
PHP.



[2001-12-25 17:35:36] [EMAIL PROTECTED]

The problem has to do with continuation reference and which
LDAP version you use. Most LDAP libs default to v2. Please
try the following script (worked for me):

$ds=ldap_connect(ds.carnet.hr);
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ds, LDAP_OPT_REFERRALS, 1);
$r=ldap_bind($ds);
$dn = 'dc=hr';
$filter=(o=*);
$justthese = array( dc);
$sr=ldap_search($ds, $dn, $filter, $justthese);
$info = ldap_get_entries($ds, $sr);
ldap_close($ds);
var_dump($info);

I've told it to use v3, and also to follow referrals. You
can probably omit the referrals setting, I think that's
the default, but depends on library.

I also suggest you try:

$ds=ldap_connect(ds.carnet.hr);
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
$r=ldap_bind($ds);
$dn = 'dc=hr';
$filter=(objectclass=*);
$justthese = array( dc);
$sr=ldap_search($ds, $dn, $filter, $justthese);
$info = ldap_get_entries($ds, $sr);
ldap_close($ds);
var_dump($info);
I'm closing this since I don't think there's a problem.
Reopen if you disagree.


Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak algorithm

2001-12-26 Thread Stig Venaas

On Wed, Dec 26, 2001 at 01:10:47PM +0100, [EMAIL PROTECTED] wrote:
 On Wed, 26 Dec 2001, Markus Fischer wrote:
 
  On Wed, Dec 26, 2001 at 02:22:02AM -, Dominik Roettsches wrote :
   Another suggestion is to replace the wordwrap code by the algorithm of
   Knuth.
 
  This would break BC and therefore isn't an option.
 
 Only changin the algorithm, but not touching the parameters will not break
 BC IMO. It just outputs something different, but that isn't a problem with
 wrapping lines IMO.

I think it's okay if you just use the wordwrap part of fmt. I don't like
the idea of wordwrap() doing the other stuff fmt does. Better add a new
function then.

Stig

-- 
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] Recursive count - diffs.

2001-12-26 Thread Vlad Bosinceanu

Hacked count() to count all the elements in an array in a recursive manner.
It takes two arguments; the second is optional, and can be one of 
COUNT_NORMAL (good old count) or COUNT_RECURSIVE.

- Vlad


Index: zend_hash.c
===
RCS file: /repository/Zend/zend_hash.c,v
retrieving revision 1.82
diff -u -r1.82 zend_hash.c
--- zend_hash.c 2001/12/04 17:56:19 1.82
+++ zend_hash.c 2001/12/26 15:42:00
@@ -19,13 +19,14 @@
 
 
 #include zend.h
+#include zend_operators.h
 
 #include stdio.h
 
 #ifdef HAVE_STDLIB_H
 # include stdlib.h
 #endif
-
+#include zend_API.h
 #define HANDLE_NUMERIC(key, length, func) {   
 \
register char *tmp=key;
 \
   
   
  \
@@ -1257,6 +1258,30 @@
return SUCCESS;
 }
 
+ZEND_API int zend_hash_count_recursive(zval **array, zval **mode)
+{
+   long cnt = 0, i;
+   zval **element;
+HashTable *target_hash;
+   target_hash = HASH_OF(*array);
+   if(Z_TYPE_PP(array)==IS_ARRAY  Z_LVAL_PP(mode)==1)
+   {
+   cnt += zend_hash_num_elements(target_hash);
+   for(i=0;izend_hash_num_elements(target_hash);i++)
+   {
+   if(zend_hash_index_find(Z_ARRVAL_PP(array), i, (void **) 
+element)==SUCCESS)
+   {
+   (*mode)-type = IS_LONG;
+   (*mode)-value.lval = 1;
+   cnt += zend_hash_count_recursive(element, mode);
+   }
+   }
+   }
+   else if(Z_TYPE_PP(array)==IS_ARRAY  Z_LVAL_PP(mode)==0)
+   cnt += zend_hash_num_elements(target_hash);
+   return cnt;
+}
+   
 ZEND_API ulong zend_hash_next_free_element(HashTable *ht)
 {
IS_CONSISTENT(ht);


Index: array.c
===
RCS file: /repository/php4/ext/standard/array.c,v
retrieving revision 1.149
diff -u -r1.149 array.c
--- array.c 22 Dec 2001 11:49:56 -  1.149
+++ array.c 26 Dec 2001 15:39:12 -
@@ -25,7 +25,6 @@
 
 #include php.h
 #include php_ini.h
-#include zend_operators.h
 #include stdarg.h
 #include stdlib.h
 #include math.h
@@ -68,6 +67,8 @@
 #define CASE_LOWER  0
 #define CASE_UPPER  1
 
+#define COUNT_NORMAL   0
+#define COUNT_RECURSIVE1
 
 PHP_MINIT_FUNCTION(array)
 {
@@ -90,6 +91,9 @@
REGISTER_LONG_CONSTANT(CASE_LOWER, CASE_LOWER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(CASE_UPPER, CASE_UPPER, CONST_CS | CONST_PERSISTENT);
 
+   REGISTER_LONG_CONSTANT(COUNT_NORMAL, COUNT_NORMAL, CONST_CS | 
+CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(COUNT_RECURSIVE, COUNT_RECURSIVE, CONST_CS | 
+CONST_PERSISTENT);
+   
return SUCCESS;
 }
 
@@ -223,26 +227,27 @@
 }
 /* }}} */
 
-/* {{{ proto int count(mixed var)
+/* {{{ proto int count(mixed var [, int mode])
Count the number of elements in a variable (usually an array) */
 PHP_FUNCTION(count)
 {
-   pval **array;
-   HashTable *target_hash;
+   pval **array, **mode;
 
-   if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, array) == FAILURE) {
+   if (ZEND_NUM_ARGS()  1 || ZEND_NUM_ARGS()  2 || zend_get_parameters_ex(1, 
+array) == FAILURE) {
WRONG_PARAM_COUNT;
}
-   target_hash = HASH_OF(*array);
-   if (!target_hash) {
-   if (Z_TYPE_PP(array) == IS_NULL) {
-   RETURN_LONG(0);
-   } else {
-   RETURN_LONG(1);
-   }
+   if(ZEND_NUM_ARGS() == 2) {
+   zend_get_parameters_ex(2, array, mode);
+   } else {
+   (*mode)-type = IS_LONG;
+   (*mode)-value.lval = 1;
+   }
+   if(Z_TYPE_PP(array)==IS_ARRAY) {
+   RETURN_LONG(zend_hash_count_recursive(array, mode));
+   } else {
+   /* return 1 for non-array arguments */
+   RETURN_LONG(1);
}
-
-   RETURN_LONG(zend_hash_num_elements(target_hash));
 }
 /* }}} */
 



-- 
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] Bug #14703: PHP Crash when print_r (get_defined_constants());

2001-12-26 Thread roberto

From: [EMAIL PROTECTED]
Operating system: windows ME
PHP version:  4.1.0
PHP Bug Type: Reproducible crash
Bug description:  PHP Crash when print_r (get_defined_constants());

?PHP

print_r (get_defined_constants());

?


I get the binary distr. of PHP and I use APACHE and MySQL.


When I run a Script with this routine Windows CLose PHP.
-- 
Edit bug report at: http://bugs.php.net/?id=14703edit=1


-- 
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] Bug #14704: phpversion (bool Float) request

2001-12-26 Thread roberto

From: [EMAIL PROTECTED]
Operating system: windows ME
PHP version:  4.1.0
PHP Bug Type: Feature/Change Request
Bug description:  phpversion (bool Float) request

Look:
?PHP

// return 4.1
print (float)PHP_VERSION;

$v = 4.1.4;
// return 4.1
print (float)$v;
?

If someone wants to compare the versions of PHP, so he need to create a
preg-like routine to change the string of PHP version to double numbers.

So, you can rewrite in C the phpversion to

function phpversion($withFloat = FALSE) {
  if ($withFloat == TRUE) {
return 4.14;
  }
  return 4.1.4;
}

So, if someone want a float number, he will call phpversion(1); 

?PHP

// output 4.14
print phpversion(1);

// output 4.1.4
print phpversion();
?

Thanx.
-- 
Edit bug report at: http://bugs.php.net/?id=14704edit=1


-- 
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] Bug #14705: func_get_args(): return references to params?

2001-12-26 Thread nick_eby

From: [EMAIL PROTECTED]
Operating system: linux
PHP version:  4.0.5
PHP Bug Type: Feature/Change Request
Bug description:  func_get_args(): return references to params?

function pointerTest()
{
$args = func_get_args();
pointerTest2($args[0]);

$myP = $args[0];
pointerTest2($myP);
}

function pointerTest2($arg1)
{
$arg1++;
}

$myVal = 10;
pointerTest($myVal);
echo $myVal;
-
i believe that currently func_get_args() can't return an array of
references.  it also applies to func_get_arg(int) which can't return a
reference to the parameter in question.  could that be changed to allow
user-defined functions on variable-length argument lists that operate on
their parameters by reference?

-- 
Edit bug report at: http://bugs.php.net/?id=14705edit=1


-- 
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.1.1 released (minor update)

2001-12-26 Thread Derick Rethans


Due to a few bugs in PHP 4.1.0, we decided to release PHP 4.1.1.  The bugs
that were fixed are not major ones but minor ones, which could be annoying
if you get bitten by them.

Our recommendation is that people who already upgraded to PHP 4.1.0 do
*not* upgrade to PHP 4.1.1, unless they're experiencing one of the
described bugs.

*No* new features or security updates are available in this release.

Full list of fixes:

- Fixed incompatibility with Windows .NET / IIS 6 - may improve stability
  under other versions of IIS. (Zeev)
- Fixed bug that caused crashes or error notices on shutdown on threaded
  platforms. (Zeev)
- Fixed several crash bugs in the xslt extension. (Markus, Derick)
- Fixed problem with dbase not returning very large (larger than long)
  integers properly. (Vlad)
- Fixed several bugs and memleaks in the domxml extension. (Markus)
- Fixed bug in gmmktime() which was one hour off during standard time -
  bug #9878. Patch by [EMAIL PROTECTED] (jmoore)
- Fixed bug in gmdate() timezone handling on Windows - bug #13885. (jmoore)
- Fixed several crash bugs in the mcrypt extension. (Derick)
- Made the mcrypt extension compile with the libmcrypt 2.2 series again.
  (Sterling)
- Fixed a bug where the is_file() family of functions would in-correctly give
  an error when they were given filenames that didn't exist. (Sterling)
- Fixed a bug in the strtotime() function where it was incorrectly recognizing
  GMT +0100 and GMT -0100. (Derick)



Derick


-- 
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] Bug #14703 Updated: PHP Crash when print_r (get_defined_constants());

2001-12-26 Thread mfischer

ID: 14703
Updated by: mfischer
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Reproducible crash
Operating System: windows ME
PHP Version: 4.1.0
New Comment:

Does only 'get_defined_constants()' crash do or only with print_r() ?

Feedback.

Previous Comments:


[2001-12-26 15:05:41] [EMAIL PROTECTED]

?PHP

print_r (get_defined_constants());

?


I get the binary distr. of PHP and I use APACHE and MySQL.


When I run a Script with this routine Windows CLose PHP.





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


-- 
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] PHP 4.1.1 released (minor update)

2001-12-26 Thread Markus Fischer

Also, the annoying script shutdown message when using
mysql_pconnect() has been fixed on win32. (by Zeev)

-- 
Please always Cc to me when replying to me on the lists.

-- 
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] Bug #14690 Updated: Crash in many functions

2001-12-26 Thread derick

ID: 14690
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: mcrypt related
Operating System: Linux
PHP Version: 4.1.0
New Comment:

This is fixed in php 4.1.1 and php 4.2.0dev.

Derick

Previous Comments:


[2001-12-25 12:26:54] [EMAIL PROTECTED]

Starting program: /export/work/php-4.1.1/./php -f t.php

Program received signal SIGSEGV, Segmentation fault.
0x0814cd43 in zif_mcrypt_module_self_test (ht=2, return_value=0x83c6144, this_ptr=0x0, 
return_value_used=0) at mcrypt.c:851
851 MCRYPT_GET_MODE_DIR_ARGS(algorithms_dir);
(gdb) bt
#0  0x0814cd43 in zif_mcrypt_module_self_test (ht=2, return_value=0x83c6144, 
this_ptr=0x0, return_value_used=0)
at mcrypt.c:851
#1  0x081aae4a in execute (op_array=0x83c1e6c) at ./zend_execute.c:1590
#2  0x080e5239 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at 
zend.c:814
#3  0x080801c1 in php_execute_script (primary_file=0xb7f0) at main.c:1307
#4  0x0807a8cc in main (argc=3, argv=0xb864) at cgi_main.c:738
#5  0x404f19cb in __libc_start_main (main=0x8079f34 main, argc=3, argv=0xb864, 
init=0x8076e1c _init, 
fini=0x82310b0 _fini, rtld_fini=0x4000aea0 _dl_fini, stack_end=0xb85c) at 
../sysdeps/generic/libc-start.c:92



[2001-12-25 12:26:04] [EMAIL PROTECTED]

(gdb) bt
#0  0x0814cd43 in zif_mcrypt_module_self_test (ht=2, return_value=0x83c6144, 
this_ptr=0x0, return_value_used=0)
at mcrypt.c:851
#1  0x081aae4a in execute (op_array=0x83c1e6c) at ./zend_execute.c:1590
#2  0x080e5239 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at 
zend.c:814
#3  0x080801c1 in php_execute_script (primary_file=0xb7f0) at main.c:1307
#4  0x0807a8cc in main (argc=3, argv=0xb864) at cgi_main.c:738
#5  0x404f19cb in __libc_start_main (main=0x8079f34 main, argc=3, argv=0xb864, 
init=0x8076e1c _init, 
fini=0x82310b0 _fini, rtld_fini=0x4000aea0 _dl_fini, stack_end=0xb85c) at 
../sysdeps/generic/libc-start.c:92


(gdb) bt full 
#0  0x0814cd43 in zif_mcrypt_module_self_test (ht=2, return_value=0x83c6144, 
this_ptr=0x0, return_value_used=0)
at mcrypt.c:851
arg1 = (struct _zval_struct **) 0x8277e01
lib_dir = (struct _zval_struct **) 0xc
lib_dir_s = 0x81aadbb \203Ä \211À\213Mü\213Q\b\211Ó\215\fÝ
argc = 2
#1  0x081aae4a in execute (op_array=0x83c1e6c) at ./zend_execute.c:1590
original_return_value = (struct _zval_struct **) 0x83c60b4
return_value_used = 0
opline = (struct _zend_op *) 0x83c609c
function_state = {function_symbol_table = 0x0, function = 0x83953b8, reserved 
= {0xb7f0, 0x80ea508, 0x0, 0x0}}
fbc = (union _zend_function *) 0x0
object = {ptr = 0x0}
Ts = (union _temp_variable *) 0xbfffe480
original_in_execution = 0 '\000'
#2  0x080e5239 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at 
zend.c:814
files = (void *) 0xbfffe5d4
i = 1
file_handle = (struct _zend_file_handle *) 0xb7f0
orig_op_array = (struct _zend_op_array *) 0x0
local_retval = (struct _zval_struct *) 0x0
#3  0x080801c1 in php_execute_script (primary_file=0xb7f0) at main.c:1307
orig_bailout = {{__jmpbuf = {1079808588, 1073786528, -1073743772, -1073743848, 
-1073744176, 134717703}, 
__mask_was_saved = 0, __saved_mask = {__val = {0 repeats 32 times
orig_bailout_set = 1 '\001'
prepend_file_p = (struct _zend_file_handle *) 0x0
append_file_p = (struct _zend_file_handle *) 0x0
prepend_file = {type = 1 '\001', filename = 0x4000aea0 U\211å\203ì\004WVSè, 
  opened_path = 0xb864 \210ùÿ¿¥ùÿ¿¨ùÿ¿, handle = {fd = 4096, fp = 0x1000}, 
free_filename = 0 '\000'}
append_file = {type = 0 '\000', filename = 0x0, opened_path = 0x0, handle = 
{fd = 3, fp = 0x3}, 
  free_filename = 240 'ð'}
old_cwd = 0xbfffe5e0 
#4  0x0807a8cc in main (argc=3, argv=0xb864) at cgi_main.c:738
orig_bailout = {{__jmpbuf = {0, 0, 0, 0, 0, 0}, __mask_was_saved = 0, 
__saved_mask = {__val = {
0 repeats 32 times
orig_bailout_set = 0 '\000'
exit_status = 0
cgi = 0
c = 60
i = 3
len = 0
file_handle = {type = 2 '\002', filename = 0x83ba5d4 t.php, 
  opened_path = 0x83c1e1c 'Z' repeats 29 times, \204Ì\217*, handle = {fd = 
138157296, fp = 0x83c1cf0}, 
  free_filename = 0 '\000'}
retval = 0
s = 0x83ba5e8 t.php
behavior = 1
no_headers = 1
orig_optind = 1
orig_optarg = 0x0
---Type return to continue, or q return to quit---  
argv0 = 0x0
script_file = 0x83ba5d4 t.php
global_vars = {head = 0x0, tail = 0x0, size = 4, count = 0, dtor = 0, 
persistent = 0 '\000', 
  

[PHP-DEV] Bug #14706: Apache won't load php4apache.dll

2001-12-26 Thread daniel . steylemans

From: [EMAIL PROTECTED]
Operating system: Windows 98 SE
PHP version:  4.1.0
PHP Bug Type: Apache related
Bug description:  Apache won't load php4apache.dll

Apache can't start because it cannot load php4apache.dll.

I installed PHP 4.1.0 and Apache 1.3.22 (both cases: .msi install files).

Syntax error on line 1 of c:/program files/apache
group/apache/conf/httpd.conf:
Cannot load c:/program files/php/sapi/php4apache.dll into server: (31) Un
périphérique attaché au système ne fonctionne pas correctement:

(Translation of last line: a peripherial attached to the system doesn't
work properly).

Apache website analyze this as a problem with PHP.

The other .dll's (from php/dll directory) have been copied in
windows\system _and_ in windows\system32.

The command line in Apache config file is:
LoadModule php4_module c:/progra~1/php/sapi/php4apache.dll

Apache finds the .dll at the correct place (tested).

If I delete the command line, Apache works fine (tested), but PHP won't
work...

I tried to replace php4apache.dll with the one provided with PHP 1.0.6 but
it doesn't help.

Thank you for helping.
-- 
Edit bug report at: http://bugs.php.net/?id=14706edit=1


-- 
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] Bug #9888 Updated: Error from Apache when work with PostgreSQL

2001-12-26 Thread lobbin

ID: 9888
Updated by: lobbin
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: PostgreSQL related
Operating System: Win NT4.0 WS
PHP Version: 4.0.4pl1
New Comment:

No feedback. Closing.

Previous Comments:


[2001-12-05 19:12:20] [EMAIL PROTECTED]

Could you try later versions? 4.0.6 or 4.1.0RC?



[2001-03-21 01:10:34] [EMAIL PROTECTED]

I have Windows NT4.0 workstation with apache-1.3.19  php-4.0.4pl1-win32.
Also i have Postgresql for win32 from cygwin package.
When i include in php.ini support for PostgreSQL, start my
server and try to connect to any page (work she with PostgreSQL or not), i get in 
Explorer error message.
Server break connect. If i cut off support for PostgreSQL
all work correct.





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


-- 
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] Bug #12448 Updated: Disturbing memory corruption/crash

2001-12-26 Thread lobbin

ID: 12448
Updated by: lobbin
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: Reproducible crash
Operating System: Linux 2 2.16
PHP Version: 4.0.6
New Comment:

No feedback. Closing.

Previous Comments:


[2001-12-05 19:46:43] [EMAIL PROTECTED]

Could you try 4.1.0RC5? 
http://www.php.net/~zeev/php-4.1.0RC5.tar.gz



[2001-07-28 07:46:13] [EMAIL PROTECTED]

I've been attemping to track down a case of memory corruption that showed itself with 
'new ClassName' returning null or 'gettype()' on the result returning a garbage 
string. I'm using php as a module with apache, and with the zend optimiser, although 
the effect is the same with or without the optimiser enabled. Apart from other bugs in 
4.0.6 that I've reported, up until now things have been fine with some largish runs of 
up to a few 1000 lines of code.

Whilst this is reproduceable 100% with my application, unfortunately I can't 
contribute a smaller program yet to demonstrate this despite various attempts, but 
I'll try some more on this as there's not a lot to go on otherwise.  Perhaps someone 
can do a purify run with a solaris build?

The effect of getting a null result from new or garbage from gettype() first showed 
when new'ing a trivial class before one that amongst other things used shared memory 
and semaphores via the put_var/get_var routine family. Something that has aparantly 
been working well and flawlessly so far. It was the result of newing the complex class 
that was corrupted. Curiously, moving the trivial (empty) class construction after the 
more complex one 'cured' the problem.

The complex constructor was calling a function returning array data by reference that 
came from calling a function that returned array data by value. This had been obtained 
via shm_get_var. Another change that made the problem disappear was to return the data 
either by value or by reference in *both* cases, although performance analysis showed 
this to be slower in both cases.

The presumed crash (the browser lost its connection to the server) occured when I 
called the function twice that ultimately returned the data from shared memory. Again 
this didn't happen when returning consistently by value or reference.

Of course the workarounds don't mean that the problem wasn't still happening, but 
perhaps that what is probably corruption didn't have an impact at that point.

So the problem may be related to the use of the sem and shm routines, returning 300 
element associative arrays of integer to strings by a mixture or reference/value or 
something else. It may also be in the code outside of php  of course. 

Sorry that I can't give more to go on but there is most definitely a problem lurking 
somewhere.

Please feel free to email me with any things that I might try to get a further handle 
on the problem with my own application in the (currently likely) event that I can't 
reproduce with a simpler application.

For library versions, ldd on httpd gives the following:

libpam.so.0 = /lib/libpam.so.0 (0x40019000)
libdl.so.2 = /lib/libdl.so.2 (0x40021000)
libz.so.1 = /usr/lib/libz.so.1 (0x40025000)
libcrypt.so.1 = /lib/libcrypt.so.1 (0x40034000)
libresolv.so.2 = /lib/libresolv.so.2 (0x40061000)
libm.so.6 = /lib/libm.so.6 (0x4007)
libnsl.so.1 = /lib/libnsl.so.1 (0x4008e000)
libgdbm.so.2 = /usr/lib/libgdbm.so.2 (0x400a5000)
libc.so.6 = /lib/libc.so.6 (0x400ac000)
/lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x4000)   

Cheers,
Nick






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


-- 
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] Bug #12793 Updated: __sleep causing problems

2001-12-26 Thread lobbin

ID: 12793
Updated by: lobbin
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: Session related
Operating System: 
PHP Version: 4.0.6
New Comment:

No feedback. Closing.

Previous Comments:


[2001-12-05 10:19:18] [EMAIL PROTECTED]

Can you provide a _simple_ sample-script?



[2001-08-16 10:28:56] [EMAIL PROTECTED]

When I create a db connection object, call it conn, with a __sleep function to close 
the connection when the object is serialized for a session, any object which has an 
instance of conn fails to load properly. For instance, if I have an object 
permissions that has a conn object, when I unserialize permissions from a 
session the class appears to never be defined. I don't get any error messages until I 
try to use permissions, in which case it says Call to a function of a non-object 
whenever I try to use a function of permissions. Never do I get an error from conn 
or permissions.

Comment out the __sleep function in conn and things work fine.


My configure line:
 './configure' '--with-postgres' '--with-gd' '--with-pspell' '--with-apxs'





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


-- 
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] Bug #13482 Updated: apache processes SEGFAULT

2001-12-26 Thread lobbin

ID: 13482
Updated by: lobbin
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: Output Control
Operating System: Linux RH7.1 -  2.4 SMP
PHP Version: 4.0.6
New Comment:

No feedback. Closing.

Previous Comments:


[2001-12-05 07:19:40] [EMAIL PROTECTED]

Please add a GDB backtrace of this crash.
(compile PHP with --enable-debug first)

--Jani




[2001-12-05 05:54:00] [EMAIL PROTECTED]

Looks same bug than #8334 but it is not closed for me
(even with 4.0.5, 4.0.6 or latest snapshot)




[2001-12-05 04:34:51] [EMAIL PROTECTED]

I tried with latest CVS snapshot from http://snaps.php.net/ 
(date : 2001-12-03)
and it's the same thing

[notice] child pid 11785 exit signal Segmentation fault (11)



[2001-10-02 08:24:14] [EMAIL PROTECTED]

I can't tell you that because on my test server (with 
very small load) I can't reproduce that... It seems to
only happen on middle/high load. And I can't test 
last snapshot on my production server (but the problem
exists in 4.0.5 and also in 4.0.6),
regards,
Jerome



[2001-10-01 23:24:48] [EMAIL PROTECTED]

Does this happen with latest CVS snapshot from http://snaps.php.net/ ?




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=13482


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


-- 
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] Bug #14168 Updated: child segfaults on php_xbithack_handler ()

2001-12-26 Thread lobbin

ID: 14168
Updated by: lobbin
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: Reproducible crash
Operating System: slackware linux 2.2.19
PHP Version: 4.0.6
New Comment:

No feedback. Closing.

Previous Comments:


[2001-12-05 19:26:33] [EMAIL PROTECTED]

it works for me.
Could you try 4.1.0RC5? 
http://www.php.net/~zeev/php-4.1.0RC5.tar.gz




[2001-11-21 23:41:44] [EMAIL PROTECTED]

oops, forgot to include what the actual problem is, heh

the page never loads in the browser, but the server doesn't get shut down; it just 
reports the following line in error_log:

[date] [notice] child pid  eit signal Segmentation fault (11)



[2001-11-21 17:24:02] [EMAIL PROTECTED]

oops, forgot to include what the actual problem is, heh

the page never loads in the browser, but the server doesn't get shut down; it just 
reports the following line in error_log:

[date] [notice] child pid  eit signal Segmentation fault (11)



[2001-11-21 17:20:38] [EMAIL PROTECTED]

this problem occurs when loading any page, even just html.
i can't even get the you've successfully installed apache! page to come up

./configure --with-mysql=/usr/local/mysql --with-apxs --with-zlib

# httpd -v
Server version: Apache/1.3.22 (Unix)
# uname -a
Linux lxbox 2.2.19 #4 Sun Oct 7 21:02:09 EDT 2001 i486 unknown

gdb backtrace:
Starting program: /usr/bin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x401e69b1 in php_xbithack_handler (r=0x8240f3c) at mod_php4.c:694
694 conf = (php_apache_info_struct *) get_module_config(r-per_dir_config, 
php4_module);
(gdb) bt
#0  0x401e69b1 in php_xbithack_handler (r=0x8240f3c) at mod_php4.c:694
#1  0x8098339 in ap_invoke_handler () at eval.c:88
#2  0x80ad1ff in process_request_internal () at eval.c:88
#3  0x80ad656 in ap_internal_redirect () at eval.c:88
#4  0x8072e3c in handle_dir () at eval.c:88
#5  0x8098339 in ap_invoke_handler () at eval.c:88
#6  0x80ad1ff in process_request_internal () at eval.c:88
#7  0x80ad266 in ap_process_request () at eval.c:88
#8  0x80a4156 in child_main () at eval.c:88
#9  0x80a4311 in make_child () at eval.c:88
#10 0x80a448c in startup_children () at eval.c:88
#11 0x80a4b1d in standalone_main () at eval.c:88
#12 0x80a537c in main () at eval.c:88
#13 0x400a02eb in __libc_start_main (main=0x80a4fe8 main, argc=2,
ubp_av=0xb9e4, init=0x80627b4 _init, fini=0x8144a9c _fini,
rtld_fini=0x4000c130 _dl_fini, stack_end=0xb9dc)
at ../sysdeps/generic/libc-start.c:129





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


-- 
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] Bug #14707: A very serious PHP bug that can turn down almost any web server !!!

2001-12-26 Thread sorin

From: [EMAIL PROTECTED]
Operating system: Any OS, any PHP version
PHP version:  4.1.0
PHP Bug Type: Scripting Engine problem
Bug description:  A very serious PHP bug that can turn down almost any web server !!!

  I discovered the bug when I tried to make a script that creates new PHP
processes that runs at the same time. Save the following script in
http://127.0.0.1/a.php, launch a.php and close the browser window:

?$a=fsockopen(127.0.0.1, 80,$b,$c,99);fputs($a,GET /a.php /
HTTP/1.1\r\nConnection: Keep-Alive\r\n\r\n);while(1);?

  Even if you have set execution script time for only several seconds, my
script will run forever and creates a huge number of instances of itself
that will create more instances. Practicaly the code above is a 120 bytes
php virus that can turn down a web server in minutes.

  The idea is that my script open a socket connection on port 80 on the web
server and sends command get file a.php and then waits until its
execution time gets end. Meanwhile, the web server tries to return a.php so
it executes it first so 2 instances of a.php will exists. The new instance
will open a new socket connection and so on. 

  My script can be modified to this (a.php):
?while(1){$a=fsockopen(127.0.0.1, 80,$b,$c,99);fputs($a,GET /a.php /
HTTP/1.1\r\nConnection: Keep-Alive\r\n\r\n);}?

and then every new instance of the script will launch as many instances it
can until it get ended by the maximum execution time end.

  To fix the bug, when a PHP script ends, naturaly or forced, like you
unset all variables of the script, in the same way, you have to close all
opened sockets of the script and NOT let them pending. This will only
reduce the effects of the script

  practicaly, if I make a script that registers 100 accounts or more at
www.MyCgiServer.com or at www.f2s.com and run an instance of a.php in every
account, that will mean the turning down of those web servers.

  Conclusion: it is possible to build a php worm virus. Also it is possible
to make a script that runs forever, no matter what maximum execution time
is set. When running on my local Apache server, it consumes 100% of my
sistem's resources and my HDD is makeing a terrible noise all time.

  Author and copiright of the bug: Sorin Facaoaru -  [EMAIL PROTECTED],
www.sorin.tv

  Regards.
-- 
Edit bug report at: http://bugs.php.net/?id=14707edit=1


-- 
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] Bug #14707 Updated: A very serious PHP bug that can turn down almost any web server !!!

2001-12-26 Thread daniel

ID: 14707
Updated by: daniel
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Scripting Engine problem
Operating System: Any OS, any PHP version
PHP Version: 4.1.0
New Comment:

well, DoS is nothing new. thanks for re-descovering it. this is not a PHP bug (same 
problem applies to virtually any language: C, Python, Perl ..). it's a general 
security issue. you might solve it by limiting the amount of connections for an IP.

Kind Regards,
  Daniel Lorch

Previous Comments:


[2001-12-26 19:00:58] [EMAIL PROTECTED]

  I discovered the bug when I tried to make a script that creates new PHP processes 
that runs at the same time. Save the following script in http://127.0.0.1/a.php, 
launch a.php and close the browser window:

?$a=fsockopen(127.0.0.1, 80,$b,$c,99);fputs($a,GET /a.php / 
HTTP/1.1\r\nConnection: Keep-Alive\r\n\r\n);while(1);?

  Even if you have set execution script time for only several seconds, my script will 
run forever and creates a huge number of instances of itself that will create more 
instances. Practicaly the code above is a 120 bytes php virus that can turn down a web 
server in minutes.

  The idea is that my script open a socket connection on port 80 on the web server and 
sends command get file a.php and then waits until its execution time gets end. 
Meanwhile, the web server tries to return a.php so it executes it first so 2 instances 
of a.php will exists. The new instance will open a new socket connection and so on. 

  My script can be modified to this (a.php):
?while(1){$a=fsockopen(127.0.0.1, 80,$b,$c,99);fputs($a,GET /a.php / 
HTTP/1.1\r\nConnection: Keep-Alive\r\n\r\n);}?

and then every new instance of the script will launch as many instances it can until 
it get ended by the maximum execution time end.

  To fix the bug, when a PHP script ends, naturaly or forced, like you unset all 
variables of the script, in the same way, you have to close all opened sockets of the 
script and NOT let them pending. This will only reduce the effects of the script

  practicaly, if I make a script that registers 100 accounts or more at 
www.MyCgiServer.com or at www.f2s.com and run an instance of a.php in every account, 
that will mean the turning down of those web servers.

  Conclusion: it is possible to build a php worm virus. Also it is possible to make a 
script that runs forever, no matter what maximum execution time is set. When running 
on my local Apache server, it consumes 100% of my sistem's resources and my HDD is 
makeing a terrible noise all time.

  Author and copiright of the bug: Sorin Facaoaru -  [EMAIL PROTECTED], www.sorin.tv

  Regards.





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


-- 
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] Bug #14707 Updated: A very serious PHP bug that can turn down almost any web server !!!

2001-12-26 Thread daniel

ID: 14707
Updated by: daniel
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Any OS, any PHP version
PHP Version: 4.1.0
New Comment:

I forgot to /bogus

Previous Comments:


[2001-12-26 19:04:23] [EMAIL PROTECTED]

well, DoS is nothing new. thanks for re-descovering it. this is not a PHP bug (same 
problem applies to virtually any language: C, Python, Perl ..). it's a general 
security issue. you might solve it by limiting the amount of connections for an IP.

Kind Regards,
  Daniel Lorch



[2001-12-26 19:00:58] [EMAIL PROTECTED]

  I discovered the bug when I tried to make a script that creates new PHP processes 
that runs at the same time. Save the following script in http://127.0.0.1/a.php, 
launch a.php and close the browser window:

?$a=fsockopen(127.0.0.1, 80,$b,$c,99);fputs($a,GET /a.php / 
HTTP/1.1\r\nConnection: Keep-Alive\r\n\r\n);while(1);?

  Even if you have set execution script time for only several seconds, my script will 
run forever and creates a huge number of instances of itself that will create more 
instances. Practicaly the code above is a 120 bytes php virus that can turn down a web 
server in minutes.

  The idea is that my script open a socket connection on port 80 on the web server and 
sends command get file a.php and then waits until its execution time gets end. 
Meanwhile, the web server tries to return a.php so it executes it first so 2 instances 
of a.php will exists. The new instance will open a new socket connection and so on. 

  My script can be modified to this (a.php):
?while(1){$a=fsockopen(127.0.0.1, 80,$b,$c,99);fputs($a,GET /a.php / 
HTTP/1.1\r\nConnection: Keep-Alive\r\n\r\n);}?

and then every new instance of the script will launch as many instances it can until 
it get ended by the maximum execution time end.

  To fix the bug, when a PHP script ends, naturaly or forced, like you unset all 
variables of the script, in the same way, you have to close all opened sockets of the 
script and NOT let them pending. This will only reduce the effects of the script

  practicaly, if I make a script that registers 100 accounts or more at 
www.MyCgiServer.com or at www.f2s.com and run an instance of a.php in every account, 
that will mean the turning down of those web servers.

  Conclusion: it is possible to build a php worm virus. Also it is possible to make a 
script that runs forever, no matter what maximum execution time is set. When running 
on my local Apache server, it consumes 100% of my sistem's resources and my HDD is 
makeing a terrible noise all time.

  Author and copiright of the bug: Sorin Facaoaru -  [EMAIL PROTECTED], www.sorin.tv

  Regards.





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


-- 
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] Bug #14707 Updated: A very serious PHP bug that can turn down almost any web server !!!

2001-12-26 Thread daniel

ID: 14707
Updated by: daniel
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Any OS, any PHP version
PHP Version: 4.1.0
New Comment:

here's another discovery:

while(true)
  mail([EMAIL PROTECTED], this is a mailbomb, blub);



Previous Comments:


[2001-12-26 19:06:19] [EMAIL PROTECTED]

I forgot to /bogus



[2001-12-26 19:04:23] [EMAIL PROTECTED]

well, DoS is nothing new. thanks for re-descovering it. this is not a PHP bug (same 
problem applies to virtually any language: C, Python, Perl ..). it's a general 
security issue. you might solve it by limiting the amount of connections for an IP.

Kind Regards,
  Daniel Lorch



[2001-12-26 19:00:58] [EMAIL PROTECTED]

  I discovered the bug when I tried to make a script that creates new PHP processes 
that runs at the same time. Save the following script in http://127.0.0.1/a.php, 
launch a.php and close the browser window:

?$a=fsockopen(127.0.0.1, 80,$b,$c,99);fputs($a,GET /a.php / 
HTTP/1.1\r\nConnection: Keep-Alive\r\n\r\n);while(1);?

  Even if you have set execution script time for only several seconds, my script will 
run forever and creates a huge number of instances of itself that will create more 
instances. Practicaly the code above is a 120 bytes php virus that can turn down a web 
server in minutes.

  The idea is that my script open a socket connection on port 80 on the web server and 
sends command get file a.php and then waits until its execution time gets end. 
Meanwhile, the web server tries to return a.php so it executes it first so 2 instances 
of a.php will exists. The new instance will open a new socket connection and so on. 

  My script can be modified to this (a.php):
?while(1){$a=fsockopen(127.0.0.1, 80,$b,$c,99);fputs($a,GET /a.php / 
HTTP/1.1\r\nConnection: Keep-Alive\r\n\r\n);}?

and then every new instance of the script will launch as many instances it can until 
it get ended by the maximum execution time end.

  To fix the bug, when a PHP script ends, naturaly or forced, like you unset all 
variables of the script, in the same way, you have to close all opened sockets of the 
script and NOT let them pending. This will only reduce the effects of the script

  practicaly, if I make a script that registers 100 accounts or more at 
www.MyCgiServer.com or at www.f2s.com and run an instance of a.php in every account, 
that will mean the turning down of those web servers.

  Conclusion: it is possible to build a php worm virus. Also it is possible to make a 
script that runs forever, no matter what maximum execution time is set. When running 
on my local Apache server, it consumes 100% of my sistem's resources and my HDD is 
makeing a terrible noise all time.

  Author and copiright of the bug: Sorin Facaoaru -  [EMAIL PROTECTED], www.sorin.tv

  Regards.





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


-- 
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 #14707 Updated: A very serious PHP bug that can turn down almost any web server !!!

2001-12-26 Thread Mike Robinson

Is the snark really necessary?
It accomplishes what?

Mike Robinson


[EMAIL PROTECTED] writes:
 ID: 14707
 Updated by: daniel
 Reported By: [EMAIL PROTECTED]
 Status: Bogus
 Bug Type: Scripting Engine problem
 Operating System: Any OS, any PHP version
 PHP Version: 4.1.0
 New Comment:
 
 here's another discovery:
 
 while(true)
   mail([EMAIL PROTECTED], this is a mailbomb, blub);
 
 
 
 Previous Comments:
 
 
 [2001-12-26 19:06:19] [EMAIL PROTECTED]
 
 I forgot to /bogus
 
 
 
 [2001-12-26 19:04:23] [EMAIL PROTECTED]
 
 well, DoS is nothing new. thanks for re-descovering it. this is 
 not a PHP bug (same problem applies to virtually any language: C, 
 Python, Perl ..). it's a general security issue. you might solve 
 it by limiting the amount of connections for an IP.
 
 Kind Regards,
   Daniel Lorch


-- 
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 #14707 Updated: A very serious PHP bug that can turn down almost any web server !!!

2001-12-26 Thread Daniel Lorch

Hi,

 Is the snark really necessary?
 It accomplishes what?

someone has to do the dirty work and put such bug reports to bogus.

Kind Regards,
  Daniel Lorch
-- 
if(empty($a) == true ? true : false)



-- 
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] Bug #14703 Updated: PHP Crash when print_r (get_defined_constants());

2001-12-26 Thread mfischer

ID: 14703
Updated by: mfischer
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Reproducible crash
Operating System: windows ME
PHP Version: 4.1.0
New Comment:

Fixed in CVS.

Previous Comments:


[2001-12-26 18:29:03] [EMAIL PROTECTED]

Sorry, get_defined_constants() crash.



[2001-12-26 17:59:03] [EMAIL PROTECTED]

Does only 'get_defined_constants()' crash do or only with print_r() ?

Feedback.



[2001-12-26 15:05:41] [EMAIL PROTECTED]

?PHP

print_r (get_defined_constants());

?


I get the binary distr. of PHP and I use APACHE and MySQL.


When I run a Script with this routine Windows CLose PHP.





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


-- 
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: Suggestion: Adding fmt like linebreak algorithm

2001-12-26 Thread Dominik Roettsches

[EMAIL PROTECTED] (Stig Venaas) schrieb in
[EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: 

 On Wed, Dec 26, 2001 at 01:10:47PM +0100, [EMAIL PROTECTED] wrote:
 On Wed, 26 Dec 2001, Markus Fischer wrote:
 
  On Wed, Dec 26, 2001 at 02:22:02AM -, Dominik Roettsches wrote :
   Another suggestion is to replace the wordwrap code by the
   algorithm of Knuth.
 
  This would break BC and therefore isn't an option.
 
 Only changin the algorithm, but not touching the parameters will not
 break BC IMO. It just outputs something different, but that isn't a
 problem with wrapping lines IMO. 
 
 I think it's okay if you just use the wordwrap part of fmt. I don't
 like the idea of wordwrap() doing the other stuff fmt does. Better add
 a new function then.

ACK. but who would do that, are there any volunteers? I could be of
assistance but I'm not skilled enough in C...
It would be nice if someone who's interested could help!

Thanks in advance,

Dominik

-- 
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] Bug #14708: pkzip2.exe for Windows reports errors in php-4.1.0-Win32.zip

2001-12-26 Thread wayne . smith

From: [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:  4.1.0
PHP Bug Type: Reproducible crash
Bug description:  pkzip2.exe for Windows reports errors in php-4.1.0-Win32.zip

pkzip25.exe for Windows reports errors in php-4.1.0-Win32.zip

I tried to use the fix utility included with the pkzip25.exe.  The
resulting (new) zip does start the
uncompression process, but still doesn't complete.  The uncompression
process
aborts with the /pear/System.php file.

All other prior PHP versions unzip fine with pkzip25.exe

Wayne

P.S.  I guess this issue can be addressed with the impending release
of the 4.11 binaries.

-- 
Edit bug report at: http://bugs.php.net/?id=14708edit=1


-- 
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] Bug #14708 Updated: pkzip2.exe for Windows reports errors in php-4.1.0-Win32.zip

2001-12-26 Thread mfischer

ID: 14708
Updated by: mfischer
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Reproducible crash
Operating System: Windows 2000
PHP Version: 4.1.0
New Comment:

There's nothing wrong with the ZIPs; your client is broken.

Bogus.

Previous Comments:


[2001-12-26 22:04:19] [EMAIL PROTECTED]

pkzip25.exe for Windows reports errors in php-4.1.0-Win32.zip

I tried to use the fix utility included with the pkzip25.exe.  The resulting (new) zip 
does start the
uncompression process, but still doesn't complete.  The uncompression process
aborts with the /pear/System.php file.

All other prior PHP versions unzip fine with pkzip25.exe

Wayne

P.S.  I guess this issue can be addressed with the impending release
of the 4.11 binaries.






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


-- 
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: Suggestion: Adding fmt like linebreak algorithm

2001-12-26 Thread Sean R. Bright

I need to find a plaintext version of Knuth's paper, then maybe I could
help.  I don't want to look at fmt's code.

Sean

 -Original Message-
 From: Dominik Roettsches [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 26, 2001 8:15 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP-DEV] Re: Suggestion: Adding fmt like linebreak
 algorithm


 [EMAIL PROTECTED] (Stig Venaas) schrieb in
 [EMAIL PROTECTED]:">news:[EMAIL PROTECTED]:

  On Wed, Dec 26, 2001 at 01:10:47PM +0100, [EMAIL PROTECTED] wrote:
  On Wed, 26 Dec 2001, Markus Fischer wrote:
 
   On Wed, Dec 26, 2001 at 02:22:02AM -, Dominik
 Roettsches wrote :
Another suggestion is to replace the wordwrap code by the
algorithm of Knuth.
  
   This would break BC and therefore isn't an option.
 
  Only changin the algorithm, but not touching the
 parameters will not
  break BC IMO. It just outputs something different, but that isn't a
  problem with wrapping lines IMO.
 
  I think it's okay if you just use the wordwrap part of fmt. I don't
  like the idea of wordwrap() doing the other stuff fmt does.
 Better add
  a new function then.

 ACK. but who would do that, are there any volunteers? I could be of
 assistance but I'm not skilled enough in C...
 It would be nice if someone who's interested could help!

 Thanks in advance,

 Dominik

 --
 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 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] Support for Berkeley DB V1.85

2001-12-26 Thread David Robinson (AU)

Hello


I am trying to build a PHP4 extension DLL that supports version 1.85 of the
Berkeley database.

The db185 code compiles cleanly under Cygwin using the GCC compiler but not
the MSVC compiler.

Any ideas on how to proceed appreciated.


Thanks
David Robinson


-- 
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: Suggestion: Adding fmt like linebreak algorithm

2001-12-26 Thread Markus Fischer

On Wed, Dec 26, 2001 at 11:32:22PM -0500, Sean R. Bright wrote : 
 I need to find a plaintext version of Knuth's paper, then maybe I could
 help.  I don't want to look at fmt's code.

You should. It's pretty straightforward to bind.

-- 
Please always Cc to me when replying to me on the lists.

-- 
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] Bug #14709: segmentation fault

2001-12-26 Thread vvo

From: [EMAIL PROTECTED]
Operating system: Linux 2.4.3-12 (Apache/1.3.20)
PHP version:  4.1.0
PHP Bug Type: XSLT related
Bug description:  segmentation fault

[Note: PHP version is 4.1.1 -- the drop-down box has 4.1.0 as latest
version]

Script:
?
$processor = xslt_create();

$args = array();
$args[ '/xml' ] = '?xml version=1.0?root /';
$args[ '/xsl' ] = '?xml version=1.0?root /';

for( $i = 0; $i  1000; ++$i )
{
if( !$result = xslt_process( $processor, 'arg:/xml', 'arg:/xsl',
NULL, $args ) )
{
echo 'failed';
}
}

xslt_free( $processor );

echo 'done';
?


Config line:
'./configure' '--with-config-file-path=/etc' '--with-pgsql'
'--with-apxs=/usr/apache/bin/apxs' '--with-xml' '--enable-xslt'
'--with-xslt-sablot' '--with-mysql=no' '--with-gd' '--enable-debug'


Description:
When I visit this script, and hit refresh (several times) Apache terminates
with a segmentation fault. The bug appears to be random because there are
times when the script finishes without a crash.


Backtrace:
#0  __libc_free (mem=0x2) at malloc.c:3036
#1  0x0809ab8e in hashTableDestroy () at eval.c:41
#2  0x08099b4d in dtdDestroy () at eval.c:41
#3  0x0809425d in XML_ParserFree () at eval.c:41
#4  0x40370e4a in TreeConstructer::parseDataLineUsingExpat
(this=0xbfffdd90, S=@0x811cff8, t=0x8130520,
d=0x81304c0) at parser.cpp:126
#5  0x40383034 in Tree::parse (this=0x8130520, S=@0x811cff8, d=0x81304c0)
at tree.cpp:600
#6  0x40375951 in Processor::addLineParse (this=0x811d0a8, S=@0x811cff8,
newTree=@0x811d0a8,
absolute=@0xbfffde40, isXSL=0) at guard.h:157
#7  0x4037602e in Processor::readTreeFromURI (this=0x811d0a8, S=@0x811cff8,
newTree=@0x811d0a8,
location=@0xbfffdf10, base=@0xbfffdef0, isXSL=0) at proc.cpp:602
#8  0x40373d91 in Processor::open (this=0x811d0a8, S=@0x811cff8,
sheetURI=0x811dadc arg:/xsl,
inputURI=0x811dc14 arg:/xml) at proc.cpp:277
#9  0x40379633 in SablotRunProcessor (processor_=0x811d0a8,
sheetURI=0x811dadc arg:/xsl,
inputURI=0x811dc14 arg:/xml, resultURI=0x402d9683 arg:/_result,
params=0x0, arguments=0x811dc54)
at sablot.cpp:407
#10 0x402af84a in zif_xslt_process (ht=5, return_value=0x811db5c,
this_ptr=0x0, return_value_used=1)
at sablot.c:514
#11 0x401dcca1 in execute (op_array=0x81123a4) at ./zend_execute.c:1590
#12 0x401ed66c in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at zend.c:814
#13 0x401ff82a in php_execute_script (primary_file=0xb6e0) at
main.c:1307
#14 0x401fa65a in apache_php_module_main (r=0x810a034,
display_source_mode=0) at sapi_apache.c:90
#15 0x401fb4c8 in send_php (r=0x810a034, display_source_mode=0,
filename=0x810f5e4 /home/apache/html/geeba/crash.php) at
mod_php4.c:575
#16 0x401fb535 in send_parsed_php (r=0x810a034) at mod_php4.c:590
#17 0x0806a7ff in ap_invoke_handler () at eval.c:41
#18 0x0807e5eb in process_request_internal () at eval.c:41
#19 0x0807e64c in ap_process_request () at eval.c:41
#20 0x08075a9d in child_main () at eval.c:41
#21 0x08075c48 in make_child () at eval.c:41
#22 0x08075dbc in startup_children () at eval.c:41
#23 0x0807640f in standalone_main () at eval.c:41
#24 0x08076c37 in main () at eval.c:41
#25 0x4008f177 in __libc_start_main (main=0x8076898 main, argc=2,
ubp_av=0xbb14,
init=0x804ed14 _init, fini=0x80abac0 _fini, rtld_fini=0x4000e184
_dl_fini, stack_end=0xbb0c)
at ../sysdeps/generic/libc-start.c:129


Hope this helps. Thank you very much,
Valeriy
-- 
Edit bug report at: http://bugs.php.net/?id=14709edit=1


-- 
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] Bug #14710: Please either change include/require/virtual directive, or create new one!

2001-12-26 Thread nocrapo

From: [EMAIL PROTECTED]
Operating system: 
PHP version:  4.0.6
PHP Bug Type: Feature/Change Request
Bug description:  Please either change include/require/virtual directive, or create 
new one!

I have been searching the php.net forums, bug tracker, etc for a way to do
the following, and perhaps misread the virtual php operator, but in any
case:

Php needs to include SSI functionality in regards to using relative paths
on files being included, eg:

If I have a php file, $HOME/htdocs/static/header.php, and have a tree
structure below htdocs, I cannot find a legit way to include header.php
in a relative fashion, eg include /header.php.  ../../../../header.php
or /full/path/to/header.php are not solutions I am looking for :)

That being said, virtual seems to encompass what I am looking to do at a
cursory glance, but i'm concerned that I may lose some functionality down
the road.  From the current php.net manual on the virtual function:

virtual() cannot be used to include a document which is itself a PHP
file.

Please, please, PLEASE either create a new directive/option:
 (? php ssi(/static/header.php) ?

... or modify the existing ones.

If virtual *is* intended to be the fix, please update the documentation as
it is either outdated or misleading (to me anyhew :)

Basically, I need full php functionality *AND* the ability to include other
php files in a fully relative nature (EXACTLY like SSI is currently
implemented).

Thanks!

Further diags:

If I try the following:

?php include (/static/header.php); ?

I get:

Warning: Failed opening '/static/header.php' for inclusion
(include_path='.:/web/htdocs/user/static') in /web/htdocs/user/index.php on
line 0

-- 
Edit bug report at: http://bugs.php.net/?id=14710edit=1


-- 
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] Bug #14711: format currency

2001-12-26 Thread haplo232

From: [EMAIL PROTECTED]
Operating system: 
PHP version:  4.0.6
PHP Bug Type: Unknown/Other Function
Bug description:  format currency

can u tell me how to define the data which the data type is currency
format, i have try to use currency_symbol but still cant get the result.
-- 
Edit bug report at: http://bugs.php.net/?id=14711edit=1


-- 
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] Bug #14712: allways global scope

2001-12-26 Thread roberto

From: [EMAIL PROTECTED]
Operating system: all
PHP version:  4.1.0
PHP Bug Type: Feature/Change Request
Bug description:  allways global scope

Will be cool if a new language constructor set global scope to a variable,
like $_REQUEST, $_POST, etc.

This forever global constructor should work with every type of variable
(array,object,resource,string, etc)

So,

?PHP

$smarty-template_dir = /lib/here/;
forever $smarty;

function something() {
// output /lib/here;
 print $smarty-template_dir;
}

// output /lib/here;
 print $smarty-template_dir;

class foo {
function other () {
// output /lib/here;
 print $smarty-template_dir;

}
}

Thanx.
-- 
Edit bug report at: http://bugs.php.net/?id=14712edit=1


-- 
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] Bug #14713: php_oracle.dll

2001-12-26 Thread steven

From: [EMAIL PROTECTED]
Operating system: win2000
PHP version:  4.1.0
PHP Bug Type: Dynamic loading
Bug description:  php_oracle.dll

   when I config my websystem:php4.1.0+win2000 professional using CGI mode,
I found browser tell me:PHP Warning: Unable to load dynamic library
'C:\php4\extensions\php_oracle.dll' - Could not find the specificed module
in Unknown on line 0 .the source file just has one sentence:echo
hello.
   I setup my php4.1.0 into the d:\php4.1.0,so it is very strange when I
set the extensions directory to d:\php4.1.0\extensions.
   even when I add a ; in front of php_oracle.dll,the message is also
displayed.
   when I use ISAPI mode,everythings is OK!
-- 
Edit bug report at: http://bugs.php.net/?id=14713edit=1


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