Bug #16938: Having trouble with Form variables

2002-05-01 Thread allen

From: [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:  4.2.0
PHP Bug Type: Scripting Engine problem
Bug description:  Having trouble with Form variables

Hello;
 
I'm the developer of a web server called TheServer.  I'm trying to add
support for PHP and I'm having trouble with PHP picking up the INPUT
variables from a posted HTML document.  I support several other scripting
languages and I try to adhere to the standard CGI rules.  You can download
TheServer and the source code at 

http://www.fastlinksoftware.com
 
I appreciate any help you can give me.  
 
Thanks,
 
Allen Rodgers.
 
[EMAIL PROTECTED]
www.fastlinksoftware.com
 
 
-- 
Edit bug report at http://bugs.php.net/?id=16938edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16938r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16938r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16938r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16938r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16938r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16938r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16938r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16938r=submittedtwice




Bug #16939: emalloc causes segfault (example uses tokenizer)

2002-05-01 Thread alan

From: [EMAIL PROTECTED]
Operating system: linux
PHP version:  4.2.0
PHP Bug Type: Reproducible crash
Bug description:  emalloc causes segfault (example uses tokenizer)

A short script to reproduce this
(sorry it not to easy to reproduce without the exact code, I did at one
point get to the situation where adding a extra space in the white space
area solved this!), but I suspect it is that the machine is running low on
memory or something

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmole-ide/phpmole/tools/uml_generator.class?rev=1.2content-type=text/vnd.viewcvs-markup


http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmole-ide/phpmole/tools/uml_dia.xml.php?rev=1.1content-type=text/vnd.viewcvs-markup


-- just use it do do a large number of files. eg.
php uml_generator.class /usr/local/php/pear/

Possible reasons that I could think of:
-the tokenizer extension (which may be leaking memory)
-somewhere not exiting if no memory can be allocated and then emalloc /
malloc being called again.

Configuration on this machine (4.2.0RC2), also reproduced with 4.2 release
version
'./configure' '--prefix=/usr' '--without-mysql'
'--with-config-file-path=/etc/php4/cgi/' '--enable-dba' '--with-db2'
and tokenizer as a dl'd module

Backtrace

Program received signal SIGSEGV, Segmentation fault.
0x4014db2b in malloc () from /lib/libc.so.6
(gdb) bt
#0  0x4014db2b in malloc () from /lib/libc.so.6
#1  0x4014d1e4 in malloc () from /lib/libc.so.6
#2  0x80c4c5c in _emalloc (size=35) at zend_alloc.c:165
#3  0x80d4b1a in zend_hash_index_update_or_next_insert (ht=0x817ae9c,
h=207, 
pData=0xbfffda28, nDataSize=4, pDest=0x0, flag=4) at zend_hash.c:404
#4  0x80d303a in add_next_index_stringl (arg=0x8326d64, str=0x8268c08 ),
length=1, 
duplicate=1) at zend_API.c:847
#5  0x401ffc61 in tokenize () from /usr/lib/php4/cgi/tokenizer.so
#6  0x402005ac in zif_token_get_all () from
/usr/lib/php4/cgi/tokenizer.so
#7  0x80eb4b0 in execute (op_array=0x816631c) at ./zend_execute.c:1598
#8  0x80eb679 in execute (op_array=0x8166a84) at ./zend_execute.c:1638
#9  0x80eb679 in execute (op_array=0x816004c) at ./zend_execute.c:1638
#10 0x80d19e8 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at zend.c:810
#11 0x805e1dd in php_execute_script (primary_file=0xbb98) at
main.c:1381
#12 0x805c0ac in main (argc=3, argv=0xbc14) at cgi_main.c:785
#13 0x400f86cf in __libc_start_main () from /lib/libc.so.6


-- 
Edit bug report at http://bugs.php.net/?id=16939edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16939r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16939r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16939r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16939r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16939r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16939r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16939r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16939r=submittedtwice




Bug #16937 Updated: PHP with GD 2.0.1 will not compile

2002-05-01 Thread mfischer

 ID:   16937
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: GD related
 Operating System: Linux 2.4.9
 PHP Version:  4.2.0
 New Comment:

Where is your gd.h located? Does it containe the following line

#define gdPie   gdArc

?


Previous Comments:


[2002-05-01 01:30:09] [EMAIL PROTECTED]

PHP is what won't compile, not GD :)



[2002-05-01 01:27:39] [EMAIL PROTECTED]

Trying to compile GD 2.0.1 into PHP 4.2.0, 4.1.2, or 4.0.6 produces
this error:

4.2.0 ERROR:
gd.c: In function `zm_startup_gd':
gd.c:303: `gdArc' undeclared (first use in this function)
gd.c:303: (Each undeclared identifier is reported only once
gd.c:303: for each function it appears in.)
gd.c:304: `gdPie' undeclared (first use in this function)
gd.c:305: `gdChord' undeclared (first use in this function)
gd.c:306: `gdNoFill' undeclared (first use in this function)
gd.c:307: `gdEdged' undeclared (first use in this function)
gd.c: In function `zif_imagecreatetruecolor':
gd.c:588: warning: assignment makes pointer from integer without a
cast
gd.c: In function `zif_imagecolorat':
gd.c:1626: structure has no member named `tpixels'
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/usr/local/src/php-4.2.0/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/php-4.2.0/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/php-4.2.0/ext'
make: *** [all-recursive] Error 1

4.0.6 ERROR:
gd.c: In function `php_minit_gd':
gd.c:296: `gdPie' undeclared (first use in this function)
gd.c:296: (Each undeclared identifier is reported only once
gd.c:296: for each function it appears in.)
gd.c:297: `gdChord' undeclared (first use in this function)
gd.c:298: `gdNoFill' undeclared (first use in this function)
gd.c:299: `gdEdged' undeclared (first use in this function)
gd.c: In function `php_if_imagecreatetruecolor':
gd.c:577: warning: assignment makes pointer from integer without a
cast
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/usr/local/src/php-4.0.6/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/php-4.0.6/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/php-4.0.6/ext'
make: *** [all-recursive] Error 1

I have completely wiped out the gd and php installs, and even went
through tons of steps with some folks from #php. Other reports of this
elsewhere on the web have gone unanswered.




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




Bug #16938 Updated: Having trouble with Form variables

2002-05-01 Thread mfischer

 ID:   16938
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Windows 2000
 PHP Version:  4.2.0
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.



Previous Comments:


[2002-05-01 02:17:25] [EMAIL PROTECTED]

Hello;
 
I'm the developer of a web server called TheServer.  I'm trying to
add support for PHP and I'm having trouble with PHP picking up the
INPUT variables from a posted HTML document.  I support several other
scripting languages and I try to adhere to the standard CGI rules.  You
can download TheServer and the source code at 

http://www.fastlinksoftware.com
 
I appreciate any help you can give me.  
 
Thanks,
 
Allen Rodgers.
 
[EMAIL PROTECTED]
www.fastlinksoftware.com
 
 




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




Bug #16926 Updated: Shuffle doesn't work

2002-05-01 Thread derick

 ID:   16926
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: *Math Functions
 Operating System: WinXP
 PHP Version:  4.2.0
 New Comment:

I could not reproduce this, are you sure the browser is not caching
your page?

Derick


Previous Comments:


[2002-04-30 08:14:09] [EMAIL PROTECTED]

As of PHP 4.2.0, shuffle() doesn't seem to work for me.
The following code always produce the same output:
function make_seed() { // Taken directly from the manual
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 10);
}

srand(make_seed());
$arr = range(1, 10);
shuffle($arr);
print_r($arr);


Further testing shows that I get the same output if I uncomment the
srand(), if that's any help.




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




Bug #16939 Updated: emalloc causes segfault (example uses tokenizer)

2002-05-01 Thread alan

 ID:   16939
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: linux
 PHP Version:  4.2.0
 New Comment:

Workaround:

Original code did this
$this-tokens = token_get_all($filename)

by not reassigning the same variable on each file, but rather really
storing the token array in a huge array it works around this issue...
(albiet with a huge memory overhead)
  
$this-all_tokens[$filename] = token_get_all($contents);
$this-tokens = $this-all_tokens[$filename];


Previous Comments:


[2002-05-01 02:40:23] [EMAIL PROTECTED]

A short script to reproduce this
(sorry it not to easy to reproduce without the exact code, I did at one
point get to the situation where adding a extra space in the white
space area solved this!), but I suspect it is that the machine is
running low on memory or something

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmole-ide/phpmole/tools/uml_generator.class?rev=1.2content-type=text/vnd.viewcvs-markup


http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmole-ide/phpmole/tools/uml_dia.xml.php?rev=1.1content-type=text/vnd.viewcvs-markup


-- just use it do do a large number of files. eg.
php uml_generator.class /usr/local/php/pear/

Possible reasons that I could think of:
-the tokenizer extension (which may be leaking memory)
-somewhere not exiting if no memory can be allocated and then emalloc /
malloc being called again.

Configuration on this machine (4.2.0RC2), also reproduced with 4.2
release version
'./configure' '--prefix=/usr' '--without-mysql'
'--with-config-file-path=/etc/php4/cgi/' '--enable-dba' '--with-db2'
and tokenizer as a dl'd module

Backtrace

Program received signal SIGSEGV, Segmentation fault.
0x4014db2b in malloc () from /lib/libc.so.6
(gdb) bt
#0  0x4014db2b in malloc () from /lib/libc.so.6
#1  0x4014d1e4 in malloc () from /lib/libc.so.6
#2  0x80c4c5c in _emalloc (size=35) at zend_alloc.c:165
#3  0x80d4b1a in zend_hash_index_update_or_next_insert (ht=0x817ae9c,
h=207, 
pData=0xbfffda28, nDataSize=4, pDest=0x0, flag=4) at
zend_hash.c:404
#4  0x80d303a in add_next_index_stringl (arg=0x8326d64, str=0x8268c08
), length=1, 
duplicate=1) at zend_API.c:847
#5  0x401ffc61 in tokenize () from /usr/lib/php4/cgi/tokenizer.so
#6  0x402005ac in zif_token_get_all () from
/usr/lib/php4/cgi/tokenizer.so
#7  0x80eb4b0 in execute (op_array=0x816631c) at ./zend_execute.c:1598
#8  0x80eb679 in execute (op_array=0x8166a84) at ./zend_execute.c:1638
#9  0x80eb679 in execute (op_array=0x816004c) at ./zend_execute.c:1638
#10 0x80d19e8 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at zend.c:810
#11 0x805e1dd in php_execute_script (primary_file=0xbb98) at
main.c:1381
#12 0x805c0ac in main (argc=3, argv=0xbc14) at cgi_main.c:785
#13 0x400f86cf in __libc_start_main () from /lib/libc.so.6






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




Bug #16940: openssl_private_decrypt segsev

2002-05-01 Thread isilva

From: [EMAIL PROTECTED]
Operating system: Slackware Linux 2.4.18
PHP version:  4.2.0
PHP Bug Type: OpenSSL related
Bug description:  openssl_private_decrypt segsev

When trying to decrypt a wrong cypher php sigsev's. As far as I could
analyse, when decrypting if something goes wrong the actual code leave
just garbage on the memory area where should some data. The backtrace
folows.

'./configure' '--with-apache=../apache_1.3.24'
'--with-config-file-path=/var/lib/apache/conf' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sigchild' '--enable-shmop'
'--enable-mailparse' '--enable-magic-quotes' '--enable-bcmath'
'--enable-trans-sid' '--enable-track-vars' '--enable-sockets'
'--enable-calendar' '--enable-dbase' '--enable-ftp'
'--with-zip=../zziplib-0.10.27' '--with-zlib' '--with-bz2' '--with-gzip'
'--with-db' '--with-db2' '--with-gdbm' '--with-mysql=/usr/local'
'--with-xml' '--with-expat-dir=../expat-1.95.2' '--with-gd=../gd-1.8.4'
'--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-imap=../c-client'
'--with-imap-ssl=/etc/ssl' '--with-mcrypt=../libmcrypt-2.5.0'
'--with-openssl=/usr' '--with-gettext=/usr' '--with-mcal=../libmcal'
'--enable-debug'


Program received signal SIGSEGV, Segmentation fault.
0x08192395 in _efree (ptr=0x17, __zend_filename=0x829a43a openssl.c,
__zend_lineno=2413, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at zend_alloc.c:222
222   CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p-size);
(gdb) bt
#0  0x08192395 in _efree (ptr=0x17, __zend_filename=0x829a43a
openssl.c,
__zend_lineno=2413, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at zend_alloc.c:222
#1  0x0811de8a in zif_openssl_private_decrypt (ht=4,
return_value=0x84c3e4c,
this_ptr=0x0, return_value_used=0) at openssl.c:2413
#2  0x081c9023 in execute (op_array=0x84c1c1c) at ./zend_execute.c:1598
#3  0x081a3c90 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at zend.c:810
#4  0x080cc4d6 in php_execute_script (primary_file=0xb3d0) at
main.c:1381
#5  0x081aee57 in apache_php_module_main (r=0x847d334,
display_source_mode=0)
at sapi_apache.c:90
#6  0x080c8c26 in send_php ()
#7  0x080c8c83 in send_parsed_php ()
#8  0x081d31f3 in ap_invoke_handler ()
#9  0x081e7ba1 in process_request_internal ()
#10 0x081e7fcc in ap_internal_redirect ()
#11 0x0808ba4b in mod_gzip_redir1_handler ()
#12 0x0808a3d5 in mod_gzip_handler ()
#13 0x081d31f3 in ap_invoke_handler ()
#14 0x081e7ba1 in process_request_internal ()
#15 0x081e7c00 in ap_process_request ()
#16 0x081def65 in child_main ()
#17 0x081df114 in make_child ()
#18 0x081df26f in startup_children ()
#19 0x081df8c0 in standalone_main ()
#20 0x081e0087 in main ()
#21 0x4033d74f in __libc_start_main () from /lib/libc.so.6

-- 
Edit bug report at http://bugs.php.net/?id=16940edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16940r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16940r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16940r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16940r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16940r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16940r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16940r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16940r=submittedtwice




Bug #16940 Updated: openssl_private_decrypt segsev

2002-05-01 Thread isilva

 ID:   16940
 Updated by:   [EMAIL PROTECTED]
-Reported By:  [EMAIL PROTECTED]
+Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: OpenSSL related
 Operating System: Slackware Linux 2.4.18
 PHP Version:  4.2.0
 New Comment:

will try to fix.


Previous Comments:


[2002-05-01 03:14:33] [EMAIL PROTECTED]

When trying to decrypt a wrong cypher php sigsev's. As far as I could
analyse, when decrypting if something goes wrong the actual code leave
just garbage on the memory area where should some data. The backtrace
folows.

'./configure' '--with-apache=../apache_1.3.24'
'--with-config-file-path=/var/lib/apache/conf' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sigchild' '--enable-shmop'
'--enable-mailparse' '--enable-magic-quotes' '--enable-bcmath'
'--enable-trans-sid' '--enable-track-vars' '--enable-sockets'
'--enable-calendar' '--enable-dbase' '--enable-ftp'
'--with-zip=../zziplib-0.10.27' '--with-zlib' '--with-bz2'
'--with-gzip' '--with-db' '--with-db2' '--with-gdbm'
'--with-mysql=/usr/local' '--with-xml'
'--with-expat-dir=../expat-1.95.2' '--with-gd=../gd-1.8.4'
'--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-imap=../c-client'
'--with-imap-ssl=/etc/ssl' '--with-mcrypt=../libmcrypt-2.5.0'
'--with-openssl=/usr' '--with-gettext=/usr' '--with-mcal=../libmcal'
'--enable-debug'


Program received signal SIGSEGV, Segmentation fault.
0x08192395 in _efree (ptr=0x17, __zend_filename=0x829a43a openssl.c,
__zend_lineno=2413, __zend_orig_filename=0x0,
__zend_orig_lineno=0)
at zend_alloc.c:222
222   CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p-size);
(gdb) bt
#0  0x08192395 in _efree (ptr=0x17, __zend_filename=0x829a43a
openssl.c,
__zend_lineno=2413, __zend_orig_filename=0x0,
__zend_orig_lineno=0)
at zend_alloc.c:222
#1  0x0811de8a in zif_openssl_private_decrypt (ht=4,
return_value=0x84c3e4c,
this_ptr=0x0, return_value_used=0) at openssl.c:2413
#2  0x081c9023 in execute (op_array=0x84c1c1c) at
./zend_execute.c:1598
#3  0x081a3c90 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at zend.c:810
#4  0x080cc4d6 in php_execute_script (primary_file=0xb3d0) at
main.c:1381
#5  0x081aee57 in apache_php_module_main (r=0x847d334,
display_source_mode=0)
at sapi_apache.c:90
#6  0x080c8c26 in send_php ()
#7  0x080c8c83 in send_parsed_php ()
#8  0x081d31f3 in ap_invoke_handler ()
#9  0x081e7ba1 in process_request_internal ()
#10 0x081e7fcc in ap_internal_redirect ()
#11 0x0808ba4b in mod_gzip_redir1_handler ()
#12 0x0808a3d5 in mod_gzip_handler ()
#13 0x081d31f3 in ap_invoke_handler ()
#14 0x081e7ba1 in process_request_internal ()
#15 0x081e7c00 in ap_process_request ()
#16 0x081def65 in child_main ()
#17 0x081df114 in make_child ()
#18 0x081df26f in startup_children ()
#19 0x081df8c0 in standalone_main ()
#20 0x081e0087 in main ()
#21 0x4033d74f in __libc_start_main () from /lib/libc.so.6





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




Bug #15259 Updated: PHP fails if RLimitMEM directive is used

2002-05-01 Thread rob-phpbugs

 ID:   15259
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Apache related
 Operating System: RedHat Linux 7.2
 PHP Version:  4.0.6
 New Comment:

I don't think this should be classified as a bogus bug. I ran into
the same issue when using resource limits in cgiwrap, sbox, and a
custom version of suexec that calls setrlimit(RLIMIT_AS, ...).

For some reason I can't determine, PHP refuses to parse POSTed CGI
parameters from STDIN when the RLIMIT_AS value is less than 40 MB (on
my machine), despite the fact that PHP itself never uses more than
about 8 MB. If I raise the RLIMIT_AS value above 40 MB, it works with
no trouble.

Perl CGI scripts do not have the same problem.

As with the previous poster, using PHP's built-in memory limit is not
an option for me -- I'm allowing customers to run their own PHP scripts
on shared servers, and the memory limit must be enforced at the OS
level to prevent users from running system calls, etc., that exceed the
limit. This issue is unfortunately preventing me from offering PHP to
several thousand customers.

I hope that this bug can be reopened and fixed. I have spent several
hours trying to figure out the cause of it in the hope that I could
send a patch, but alas, I can't see where the problem is.


Previous Comments:


[2002-01-28 18:22:49] [EMAIL PROTECTED]

I can't just use PHP Limit.. I need to be able to LIMIT the resources
on Memory for other things (Perl, FrontPage, and other cgi programs)




[2002-01-28 17:56:48] [EMAIL PROTECTED]

This cannot be implemented.
Use PHP memory limit.



[2002-01-28 14:45:33] [EMAIL PROTECTED]

I have php compiled as cgi and calling the php binary from apache via
AddHandler.
I have thousands of users on this box and I have RLimitMEM directives.
Using 4.0.6 and 4.1.1 I noticed if I have RLimitMEM defined, having a
form
POST to
the php binary, i get : premature end of script headers.

If I remark out the RLimitMEM entry in the VirtualHost directive, all
is
good?

Any work arounds?





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




Bug #16940 Updated: openssl_private_decrypt segsev

2002-05-01 Thread wez

 ID:   16940
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: OpenSSL related
 Operating System: Slackware Linux 2.4.18
 PHP Version:  4.2.0
 New Comment:

Please include a short script that reproduces this error.


Previous Comments:


[2002-05-01 03:15:44] [EMAIL PROTECTED]

will try to fix.



[2002-05-01 03:14:33] [EMAIL PROTECTED]

When trying to decrypt a wrong cypher php sigsev's. As far as I could
analyse, when decrypting if something goes wrong the actual code leave
just garbage on the memory area where should some data. The backtrace
folows.

'./configure' '--with-apache=../apache_1.3.24'
'--with-config-file-path=/var/lib/apache/conf' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sigchild' '--enable-shmop'
'--enable-mailparse' '--enable-magic-quotes' '--enable-bcmath'
'--enable-trans-sid' '--enable-track-vars' '--enable-sockets'
'--enable-calendar' '--enable-dbase' '--enable-ftp'
'--with-zip=../zziplib-0.10.27' '--with-zlib' '--with-bz2'
'--with-gzip' '--with-db' '--with-db2' '--with-gdbm'
'--with-mysql=/usr/local' '--with-xml'
'--with-expat-dir=../expat-1.95.2' '--with-gd=../gd-1.8.4'
'--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-imap=../c-client'
'--with-imap-ssl=/etc/ssl' '--with-mcrypt=../libmcrypt-2.5.0'
'--with-openssl=/usr' '--with-gettext=/usr' '--with-mcal=../libmcal'
'--enable-debug'


Program received signal SIGSEGV, Segmentation fault.
0x08192395 in _efree (ptr=0x17, __zend_filename=0x829a43a openssl.c,
__zend_lineno=2413, __zend_orig_filename=0x0,
__zend_orig_lineno=0)
at zend_alloc.c:222
222   CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p-size);
(gdb) bt
#0  0x08192395 in _efree (ptr=0x17, __zend_filename=0x829a43a
openssl.c,
__zend_lineno=2413, __zend_orig_filename=0x0,
__zend_orig_lineno=0)
at zend_alloc.c:222
#1  0x0811de8a in zif_openssl_private_decrypt (ht=4,
return_value=0x84c3e4c,
this_ptr=0x0, return_value_used=0) at openssl.c:2413
#2  0x081c9023 in execute (op_array=0x84c1c1c) at
./zend_execute.c:1598
#3  0x081a3c90 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at zend.c:810
#4  0x080cc4d6 in php_execute_script (primary_file=0xb3d0) at
main.c:1381
#5  0x081aee57 in apache_php_module_main (r=0x847d334,
display_source_mode=0)
at sapi_apache.c:90
#6  0x080c8c26 in send_php ()
#7  0x080c8c83 in send_parsed_php ()
#8  0x081d31f3 in ap_invoke_handler ()
#9  0x081e7ba1 in process_request_internal ()
#10 0x081e7fcc in ap_internal_redirect ()
#11 0x0808ba4b in mod_gzip_redir1_handler ()
#12 0x0808a3d5 in mod_gzip_handler ()
#13 0x081d31f3 in ap_invoke_handler ()
#14 0x081e7ba1 in process_request_internal ()
#15 0x081e7c00 in ap_process_request ()
#16 0x081def65 in child_main ()
#17 0x081df114 in make_child ()
#18 0x081df26f in startup_children ()
#19 0x081df8c0 in standalone_main ()
#20 0x081e0087 in main ()
#21 0x4033d74f in __libc_start_main () from /lib/libc.so.6





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




Bug #16885 Updated: OpenSSL : function `X509_PURPOSE_ANY´ undeclared

2002-05-01 Thread denis . goffinet

 ID:   16885
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Solaris 8
 PHP Version:  4.1.2
 New Comment:

my openssl version is 0.9.5


Previous Comments:


[2002-04-29 12:49:57] [EMAIL PROTECTED]

I've just place under comment the line and all worked fine. 

I've looked after X509_PURPOSE_ANY key words in any of the openssl
headers files and didn't find it 

Will post here tomorrow my openssl version

Regards
Denis

PS to Jani : Thanks for your tip, I'm just a little newbie in this big
big world



[2002-04-28 20:19:43] [EMAIL PROTECTED]

Which openssl version is this?

--Jani

p.s. Always use the install prefix in configure paths..
(Not /usr/local/lib but /usr/local)




[2002-04-28 06:05:59] [EMAIL PROTECTED]

Configure : ./configure --with-apxs=/usr/local/apache/bin/apxs
--with-mysql=/usr/local/mysql --with-gd=/usr/local
--zith-png-dir=/usr/local/lib --with-zlib-dir=/usr/local/lib
--with-snmp=/usr/local --with-openssl=/usr/local/ssl

There all works great

Then I compile using GCC and a lot of errors 

/bin/sh /appl/php-4.1.2/libtool --silent --mode= compile gcc -I.
-I/appl/php-4.1.2/ext/openssl -I/appl/php-4.1.2/main -I/appl/php-4.1.2
-I/usr/local/apache/include -I/appl/php-4.1.2/Zend
-I/usr/local/ssl/include -I/usr/local/include
-I/usr/local/mysql/include -I/usr/local/include/ucd-snmp
-I/appl/php-4.1.2/ext/xml/expat -D_POSIX_PTHREAD_SEMANTICS
-DSOLARIS2=280 -DMOD_SSL=208105 -DEAPI -DUSE_EXPAT
-I/appl/php-4.1.2/TSRM -g -02 -prefer-pic -c openssl.c
openssl.c: In function `zm_startup_openssl´:
openssl.c:136: `X509_PURPOSE_ANY´ undeclared (first use in ths
function)
openssl.c:136: (Each undeclared identifier is reported only once
openssl.c:136: for each function it appears in.)
*** Error code 1
make: Fatal error: Command failed for target`openssl.lo´ Current
working directory /appl/php-4.1.2/ext/openssl ***Error code 1
make: Fatal error: Command failed for target `all-recursive´






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




Bug #16930 Updated: Add line to install.txt

2002-05-01 Thread goba

 ID:   16930
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Documentation problem
 Operating System: windows + apache
 PHP Version:  4.2.0
 New Comment:

Thomas, you are mixing two kind of setups, the module version, and the
CGI version. You'd better read the documentation wit more attention.

Goba


Previous Comments:


[2002-04-30 17:31:07] [EMAIL PROTECTED]

This is not a bug. Please double-check the documentation available
at http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php



[2002-04-30 11:35:04] [EMAIL PROTECTED]

install.txt of php4.2.0-win32 says on installing
php with apache on windows:

Then you should add the following three lines to your Apache
conf file: (swap c:/php/ for your PHP install path)

   LoadModule php4_module c:/php/sapi/php4apache.dll
   AddModule mod_php4.c
   AddType application/x-httpd-php .php

To get it working I had to add theses lines, too:

ScriptAlias/php4/C:/php/
Action application/x-httpd-php/php4/sapi/php.exe

I use:
apache_1.3.24-win32-x86-no_src.msi

Thank you for developing this software!

 thomas




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




Bug #16940 Updated: openssl_private_decrypt segsev

2002-05-01 Thread wez

 ID:   16940
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: OpenSSL related
 Operating System: Slackware Linux 2.4.18
 PHP Version:  4.2.0
 New Comment:

I believe that I have found the problem; the zend_error call uses a %s
format specifier, but does not provide a string to print out.
I've committed a fix; please try a stable snapshot from snaps.php.net
created some time after this report is dated (to make sure you have one
with the fix).



Previous Comments:


[2002-05-01 03:34:52] [EMAIL PROTECTED]

Please include a short script that reproduces this error.



[2002-05-01 03:15:44] [EMAIL PROTECTED]

will try to fix.



[2002-05-01 03:14:33] [EMAIL PROTECTED]

When trying to decrypt a wrong cypher php sigsev's. As far as I could
analyse, when decrypting if something goes wrong the actual code leave
just garbage on the memory area where should some data. The backtrace
folows.

'./configure' '--with-apache=../apache_1.3.24'
'--with-config-file-path=/var/lib/apache/conf' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sigchild' '--enable-shmop'
'--enable-mailparse' '--enable-magic-quotes' '--enable-bcmath'
'--enable-trans-sid' '--enable-track-vars' '--enable-sockets'
'--enable-calendar' '--enable-dbase' '--enable-ftp'
'--with-zip=../zziplib-0.10.27' '--with-zlib' '--with-bz2'
'--with-gzip' '--with-db' '--with-db2' '--with-gdbm'
'--with-mysql=/usr/local' '--with-xml'
'--with-expat-dir=../expat-1.95.2' '--with-gd=../gd-1.8.4'
'--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-imap=../c-client'
'--with-imap-ssl=/etc/ssl' '--with-mcrypt=../libmcrypt-2.5.0'
'--with-openssl=/usr' '--with-gettext=/usr' '--with-mcal=../libmcal'
'--enable-debug'


Program received signal SIGSEGV, Segmentation fault.
0x08192395 in _efree (ptr=0x17, __zend_filename=0x829a43a openssl.c,
__zend_lineno=2413, __zend_orig_filename=0x0,
__zend_orig_lineno=0)
at zend_alloc.c:222
222   CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p-size);
(gdb) bt
#0  0x08192395 in _efree (ptr=0x17, __zend_filename=0x829a43a
openssl.c,
__zend_lineno=2413, __zend_orig_filename=0x0,
__zend_orig_lineno=0)
at zend_alloc.c:222
#1  0x0811de8a in zif_openssl_private_decrypt (ht=4,
return_value=0x84c3e4c,
this_ptr=0x0, return_value_used=0) at openssl.c:2413
#2  0x081c9023 in execute (op_array=0x84c1c1c) at
./zend_execute.c:1598
#3  0x081a3c90 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at zend.c:810
#4  0x080cc4d6 in php_execute_script (primary_file=0xb3d0) at
main.c:1381
#5  0x081aee57 in apache_php_module_main (r=0x847d334,
display_source_mode=0)
at sapi_apache.c:90
#6  0x080c8c26 in send_php ()
#7  0x080c8c83 in send_parsed_php ()
#8  0x081d31f3 in ap_invoke_handler ()
#9  0x081e7ba1 in process_request_internal ()
#10 0x081e7fcc in ap_internal_redirect ()
#11 0x0808ba4b in mod_gzip_redir1_handler ()
#12 0x0808a3d5 in mod_gzip_handler ()
#13 0x081d31f3 in ap_invoke_handler ()
#14 0x081e7ba1 in process_request_internal ()
#15 0x081e7c00 in ap_process_request ()
#16 0x081def65 in child_main ()
#17 0x081df114 in make_child ()
#18 0x081df26f in startup_children ()
#19 0x081df8c0 in standalone_main ()
#20 0x081e0087 in main ()
#21 0x4033d74f in __libc_start_main () from /lib/libc.so.6





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




Bug #16940 Updated: openssl_private_decrypt segsev

2002-05-01 Thread isilva

 ID:   16940
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: OpenSSL related
 Operating System: Slackware Linux 2.4.18
 PHP Version:  4.2.0
 New Comment:

I did found the error.

cryptedbuf should be initialized as NULL, but was being initialized as
a normal, out of bounds pointer.

lines 2362 and 2483, where is written

unsigned char *cryptedbuf;

should be

unsigned char *cryptedbuf = NULL;

That solve the problem.


Previous Comments:


[2002-05-01 03:58:11] [EMAIL PROTECTED]

I believe that I have found the problem; the zend_error call uses a %s
format specifier, but does not provide a string to print out.
I've committed a fix; please try a stable snapshot from snaps.php.net
created some time after this report is dated (to make sure you have one
with the fix).




[2002-05-01 03:34:52] [EMAIL PROTECTED]

Please include a short script that reproduces this error.



[2002-05-01 03:15:44] [EMAIL PROTECTED]

will try to fix.



[2002-05-01 03:14:33] [EMAIL PROTECTED]

When trying to decrypt a wrong cypher php sigsev's. As far as I could
analyse, when decrypting if something goes wrong the actual code leave
just garbage on the memory area where should some data. The backtrace
folows.

'./configure' '--with-apache=../apache_1.3.24'
'--with-config-file-path=/var/lib/apache/conf' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sigchild' '--enable-shmop'
'--enable-mailparse' '--enable-magic-quotes' '--enable-bcmath'
'--enable-trans-sid' '--enable-track-vars' '--enable-sockets'
'--enable-calendar' '--enable-dbase' '--enable-ftp'
'--with-zip=../zziplib-0.10.27' '--with-zlib' '--with-bz2'
'--with-gzip' '--with-db' '--with-db2' '--with-gdbm'
'--with-mysql=/usr/local' '--with-xml'
'--with-expat-dir=../expat-1.95.2' '--with-gd=../gd-1.8.4'
'--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-imap=../c-client'
'--with-imap-ssl=/etc/ssl' '--with-mcrypt=../libmcrypt-2.5.0'
'--with-openssl=/usr' '--with-gettext=/usr' '--with-mcal=../libmcal'
'--enable-debug'


Program received signal SIGSEGV, Segmentation fault.
0x08192395 in _efree (ptr=0x17, __zend_filename=0x829a43a openssl.c,
__zend_lineno=2413, __zend_orig_filename=0x0,
__zend_orig_lineno=0)
at zend_alloc.c:222
222   CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p-size);
(gdb) bt
#0  0x08192395 in _efree (ptr=0x17, __zend_filename=0x829a43a
openssl.c,
__zend_lineno=2413, __zend_orig_filename=0x0,
__zend_orig_lineno=0)
at zend_alloc.c:222
#1  0x0811de8a in zif_openssl_private_decrypt (ht=4,
return_value=0x84c3e4c,
this_ptr=0x0, return_value_used=0) at openssl.c:2413
#2  0x081c9023 in execute (op_array=0x84c1c1c) at
./zend_execute.c:1598
#3  0x081a3c90 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at zend.c:810
#4  0x080cc4d6 in php_execute_script (primary_file=0xb3d0) at
main.c:1381
#5  0x081aee57 in apache_php_module_main (r=0x847d334,
display_source_mode=0)
at sapi_apache.c:90
#6  0x080c8c26 in send_php ()
#7  0x080c8c83 in send_parsed_php ()
#8  0x081d31f3 in ap_invoke_handler ()
#9  0x081e7ba1 in process_request_internal ()
#10 0x081e7fcc in ap_internal_redirect ()
#11 0x0808ba4b in mod_gzip_redir1_handler ()
#12 0x0808a3d5 in mod_gzip_handler ()
#13 0x081d31f3 in ap_invoke_handler ()
#14 0x081e7ba1 in process_request_internal ()
#15 0x081e7c00 in ap_process_request ()
#16 0x081def65 in child_main ()
#17 0x081df114 in make_child ()
#18 0x081df26f in startup_children ()
#19 0x081df8c0 in standalone_main ()
#20 0x081e0087 in main ()
#21 0x4033d74f in __libc_start_main () from /lib/libc.so.6





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




Bug #16940 Updated: openssl_private_decrypt segsev

2002-05-01 Thread isilva

 ID:   16940
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: OpenSSL related
 Operating System: Slackware Linux 2.4.18
 PHP Version:  4.2.0
 New Comment:

I did saw that error and thought that that was the error at first, but
was not successfull. initializing cryptedbuf as NULL did solve the
problem.

Thanks for the help.


Previous Comments:


[2002-05-01 03:59:45] [EMAIL PROTECTED]

I did found the error.

cryptedbuf should be initialized as NULL, but was being initialized as
a normal, out of bounds pointer.

lines 2362 and 2483, where is written

unsigned char *cryptedbuf;

should be

unsigned char *cryptedbuf = NULL;

That solve the problem.



[2002-05-01 03:58:11] [EMAIL PROTECTED]

I believe that I have found the problem; the zend_error call uses a %s
format specifier, but does not provide a string to print out.
I've committed a fix; please try a stable snapshot from snaps.php.net
created some time after this report is dated (to make sure you have one
with the fix).




[2002-05-01 03:34:52] [EMAIL PROTECTED]

Please include a short script that reproduces this error.



[2002-05-01 03:15:44] [EMAIL PROTECTED]

will try to fix.



[2002-05-01 03:14:33] [EMAIL PROTECTED]

When trying to decrypt a wrong cypher php sigsev's. As far as I could
analyse, when decrypting if something goes wrong the actual code leave
just garbage on the memory area where should some data. The backtrace
folows.

'./configure' '--with-apache=../apache_1.3.24'
'--with-config-file-path=/var/lib/apache/conf' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sigchild' '--enable-shmop'
'--enable-mailparse' '--enable-magic-quotes' '--enable-bcmath'
'--enable-trans-sid' '--enable-track-vars' '--enable-sockets'
'--enable-calendar' '--enable-dbase' '--enable-ftp'
'--with-zip=../zziplib-0.10.27' '--with-zlib' '--with-bz2'
'--with-gzip' '--with-db' '--with-db2' '--with-gdbm'
'--with-mysql=/usr/local' '--with-xml'
'--with-expat-dir=../expat-1.95.2' '--with-gd=../gd-1.8.4'
'--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-imap=../c-client'
'--with-imap-ssl=/etc/ssl' '--with-mcrypt=../libmcrypt-2.5.0'
'--with-openssl=/usr' '--with-gettext=/usr' '--with-mcal=../libmcal'
'--enable-debug'


Program received signal SIGSEGV, Segmentation fault.
0x08192395 in _efree (ptr=0x17, __zend_filename=0x829a43a openssl.c,
__zend_lineno=2413, __zend_orig_filename=0x0,
__zend_orig_lineno=0)
at zend_alloc.c:222
222   CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p-size);
(gdb) bt
#0  0x08192395 in _efree (ptr=0x17, __zend_filename=0x829a43a
openssl.c,
__zend_lineno=2413, __zend_orig_filename=0x0,
__zend_orig_lineno=0)
at zend_alloc.c:222
#1  0x0811de8a in zif_openssl_private_decrypt (ht=4,
return_value=0x84c3e4c,
this_ptr=0x0, return_value_used=0) at openssl.c:2413
#2  0x081c9023 in execute (op_array=0x84c1c1c) at
./zend_execute.c:1598
#3  0x081a3c90 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at zend.c:810
#4  0x080cc4d6 in php_execute_script (primary_file=0xb3d0) at
main.c:1381
#5  0x081aee57 in apache_php_module_main (r=0x847d334,
display_source_mode=0)
at sapi_apache.c:90
#6  0x080c8c26 in send_php ()
#7  0x080c8c83 in send_parsed_php ()
#8  0x081d31f3 in ap_invoke_handler ()
#9  0x081e7ba1 in process_request_internal ()
#10 0x081e7fcc in ap_internal_redirect ()
#11 0x0808ba4b in mod_gzip_redir1_handler ()
#12 0x0808a3d5 in mod_gzip_handler ()
#13 0x081d31f3 in ap_invoke_handler ()
#14 0x081e7ba1 in process_request_internal ()
#15 0x081e7c00 in ap_process_request ()
#16 0x081def65 in child_main ()
#17 0x081df114 in make_child ()
#18 0x081df26f in startup_children ()
#19 0x081df8c0 in standalone_main ()
#20 0x081e0087 in main ()
#21 0x4033d74f in __libc_start_main () from /lib/libc.so.6





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




Bug #16885 Updated: OpenSSL : function `X509_PURPOSE_ANY´ undeclared

2002-05-01 Thread wez

 ID:   16885
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Compile Failure
 Operating System: Solaris 8
 PHP Version:  4.1.2
 New Comment:

This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/




Previous Comments:


[2002-05-01 03:41:58] [EMAIL PROTECTED]

my openssl version is 0.9.5



[2002-04-29 12:49:57] [EMAIL PROTECTED]

I've just place under comment the line and all worked fine. 

I've looked after X509_PURPOSE_ANY key words in any of the openssl
headers files and didn't find it 

Will post here tomorrow my openssl version

Regards
Denis

PS to Jani : Thanks for your tip, I'm just a little newbie in this big
big world



[2002-04-28 20:19:43] [EMAIL PROTECTED]

Which openssl version is this?

--Jani

p.s. Always use the install prefix in configure paths..
(Not /usr/local/lib but /usr/local)




[2002-04-28 06:05:59] [EMAIL PROTECTED]

Configure : ./configure --with-apxs=/usr/local/apache/bin/apxs
--with-mysql=/usr/local/mysql --with-gd=/usr/local
--zith-png-dir=/usr/local/lib --with-zlib-dir=/usr/local/lib
--with-snmp=/usr/local --with-openssl=/usr/local/ssl

There all works great

Then I compile using GCC and a lot of errors 

/bin/sh /appl/php-4.1.2/libtool --silent --mode= compile gcc -I.
-I/appl/php-4.1.2/ext/openssl -I/appl/php-4.1.2/main -I/appl/php-4.1.2
-I/usr/local/apache/include -I/appl/php-4.1.2/Zend
-I/usr/local/ssl/include -I/usr/local/include
-I/usr/local/mysql/include -I/usr/local/include/ucd-snmp
-I/appl/php-4.1.2/ext/xml/expat -D_POSIX_PTHREAD_SEMANTICS
-DSOLARIS2=280 -DMOD_SSL=208105 -DEAPI -DUSE_EXPAT
-I/appl/php-4.1.2/TSRM -g -02 -prefer-pic -c openssl.c
openssl.c: In function `zm_startup_openssl´:
openssl.c:136: `X509_PURPOSE_ANY´ undeclared (first use in ths
function)
openssl.c:136: (Each undeclared identifier is reported only once
openssl.c:136: for each function it appears in.)
*** Error code 1
make: Fatal error: Command failed for target`openssl.lo´ Current
working directory /appl/php-4.1.2/ext/openssl ***Error code 1
make: Fatal error: Command failed for target `all-recursive´






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




Bug #16796 Updated: missing extension dlls in the distribution package

2002-05-01 Thread edink

 ID:   16796
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Critical
 Bug Type: *General Issues
 Operating System: Windows 2000
 PHP Version:  4.2.0
 New Comment:

FYI: Most of these dlls can be found in the STABLE win32 snapshot at
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip


Previous Comments:


[2002-04-29 15:31:13] [EMAIL PROTECTED]

php_snmp.dll is also missing.




[2002-04-28 18:43:37] [EMAIL PROTECTED]

I too have been looking for the php-imap.dll and php_ldap.dll. Also,
did anyone else have to rename the php_gd.dll in their php.ini to read
php_gd2.dll?

Can we just use the old dll's then? 
This is quite critical for my usage.



[2002-04-28 00:51:01] [EMAIL PROTECTED]

updated the short description.




[2002-04-25 22:08:52] [EMAIL PROTECTED]

Also php_imap.dll is missing.




[2002-04-25 07:20:27] [EMAIL PROTECTED]

php_ldap.dll is also gone...



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/16796

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




Bug #16926 Updated: Shuffle doesn't work

2002-05-01 Thread joseppo

 ID:   16926
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: *Math Functions
 Operating System: WinXP
 PHP Version:  4.2.0
 New Comment:

Yes, I'm sure. I've tried running it from the command line with the
same result.
I've done a little more testing, and it seems that rand() seems to work
just fine, so that should more or less exclude the possibility of a bug
in srand().

I've also done a full reinstall (just to make sure) without any luck.


Previous Comments:


[2002-05-01 03:08:01] [EMAIL PROTECTED]

I could not reproduce this, are you sure the browser is not caching
your page?

Derick



[2002-04-30 08:14:09] [EMAIL PROTECTED]

As of PHP 4.2.0, shuffle() doesn't seem to work for me.
The following code always produce the same output:
function make_seed() { // Taken directly from the manual
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 10);
}

srand(make_seed());
$arr = range(1, 10);
shuffle($arr);
print_r($arr);


Further testing shows that I get the same output if I uncomment the
srand(), if that's any help.




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




Bug #16941: The php4ts.lib is missing

2002-05-01 Thread kip_zombie

From: [EMAIL PROTECTED]
Operating system: Win98
PHP version:  4.2.0
PHP Bug Type: *General Issues
Bug description:  The php4ts.lib is missing

I downloaded the php version 4.2.0 and wanted to copy the php4ts.lib into
win/system. Then i searched for it but i dindt found...
-- 
Edit bug report at http://bugs.php.net/?id=16941edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16941r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16941r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16941r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16941r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16941r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16941r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16941r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16941r=submittedtwice




Bug #16906 Updated: Warning: MySQL: Unable to save result set in ...

2002-05-01 Thread vermut

 ID:   16906
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: MySQL related
-Operating System: FreeBSD 4.5
+Operating System: FreeBSD
-PHP Version:  4.1.2
+PHP Version:  4.1.2, 4.2.0
 New Comment:

The problem is: _every_ UPDATE query executed from PHP reports this
warning. Data become updated, but execution stops. The same query
executed in plain mysql does the same, but does not report a warning.


Previous Comments:


[2002-04-30 20:12:41] [EMAIL PROTECTED]

This error occured with me, when synching topics in phpBB admin. But my
theory is, that for some MySQL errors, php is unable to get the right
error string and defaults to 'unable to get result'.
The error does show, when you use the mysql client CLI.

Could you test that, by executing the exact query that fails, via the
mysql client CLI?



[2002-04-29 11:35:39] [EMAIL PROTECTED]

mysql CHECK TABLE wpm_tree_en;
+--+---+--+--+
| Table| Op| Msg_type | Msg_text |
+--+---+--+--+
| project3.wpm_tree_en | check | status   | OK   |
+--+---+--+--+
1 row in set (0.03 sec)

Everything fine, as i see. I do run phpBB, but i run a completely
different and unrelated test script. I've done myisamchk -r on all
tables.



[2002-04-29 11:28:42] [EMAIL PROTECTED]

Just for fun:
on the query that fails, run a CHECK TABLE on the tables involved.

See if you get a 'error 134' from table handler.

Are you by any chance running phpBB-1.4.x?

I've seen this error 'unable to save result set' a few times, while it
is actually the above table handler error in mysql.



[2002-04-29 11:01:08] [EMAIL PROTECTED]

This is a follow-up to bug 
http://bugs.php.net/bug.php?id=12029

The problem do exists. I've got plenty of them on my FreeBSD, and never
got a clue how i fixed it.

Now i'm upgrading to php-4.1.2 (with apache 1.3.14), and problem arises
again. Everything was compiled using standard FreeBSD ports Makefile. 

Summary:

Everything works as long as i not include any of mhash, mcrypt and gd2.
Tested on 4.1.2 and 4.2.0.

Here are results of some tests:

1. Plugging in old already compiled libphp4.so (4.0.1 i suppose)
works.

./configure \
--with-apxs=/usr/local/sbin/apxs \
--with-config-file-path=/usr/local/etc \
--enable-versioning \
--with-system-regex \
--disable-debug \
--enable-track-vars \
--disable-pear \
--with-gd=/usr/local \
--with-zlib \
--with-mcrypt=/usr/local \
--with-mhash=/usr/local \
--with-imap=/usr/local \
--with-mysql=/usr/local \
--prefix=/usr/local \
i386--freebsd4.3 \
$@

libphp4.so  1271565

2. Compiling with mysql only:

CFLAGS='-O -pipe  -I/usr/local/include' \
CXXFLAGS=' -O -pipe  -I/usr/local/include' \
CC='cc' \ 
CXX='c++' \
'./configure' \
'--with-apxs=/usr/local/sbin/apxs' \
'--with-config-file-path=/usr/local/etc' \
'--enable-versioning' \
'--with-regex=system' \
'--without-gd' \
'--with-mysql=/usr/local' \
'--prefix=/usr/local' \
'i386-portbld-freebsd4.5' \
$@

works.

libphp4.so  1006173


3. The same, but manually running ./configure:

'./configure' \
'--with-apxs=/usr/local/sbin/apxs' \
'--with-config-file-path=/usr/local/etc' \
'--with-mysql=/usr/local' \
'--without-gd' \
$@

! libphp4.so2598686 (very strange!!!)

works.

4. FreeBSD port make: zlib, mysql, mcrypt, mhash:

CFLAGS='-O -pipe  -I/usr/local/include' \
CXXFLAGS=' -O -pipe  -I/usr/local/include' \
CC='cc' \
CXX='c++' \
'./configure' \
'--with-apxs=/usr/local/sbin/apxs' \
'--with-config-file-path=/usr/local/etc' \
'--enable-versioning' \
'--with-regex=system' \
'--without-gd' \
'--without-mysql' \
'--with-zlib' \
'--with-mcrypt=/usr/local' \
'--with-mhash=/usr/local' \
'--with-mysql=/usr/local' \
'--prefix=/usr/local' \
'i386-portbld-freebsd4.5' \
$@

libphp4.so  1054805

DOESN'T WORK.

Let's try and remove some components. zlib, mcrypt, mhash seem to
cause an error. Start from mhash.

5. FreeBSD port make: zlib, mysql, mcrypt:

CFLAGS='-O -pipe  -I/usr/local/include' \
CXXFLAGS=' -O -pipe  -I/usr/local/include' \
CC='cc' \
CXX='c++' \
'./configure' \
'--with-apxs=/usr/local/sbin/apxs' \
'--with-config-file-path=/usr/local/etc' \
'--enable-versioning' \
'--with-regex=system' \
'--without-gd' \
'--without-mysql' \
'--with-zlib' \
'--with-mcrypt=/usr/local' \
'--with-mysql=/usr/local' \
'--prefix=/usr/local' \
'i386-portbld-freebsd4.5' \
$@


Bug #15259 Updated: PHP fails if RLimitMEM directive is used

2002-05-01 Thread yohgaki

 ID:   15259
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Bogus
+Status:   Open
-Bug Type: Apache related
+Bug Type: Feature/Change Request
 Operating System: RedHat Linux 7.2
-PHP Version:  4.0.6
+PHP Version:  4.1.x
 New Comment:

Please research about the error message
premature end of script headers also.

It seems this could be Change Request.






Previous Comments:


[2002-05-01 03:19:16] [EMAIL PROTECTED]

I don't think this should be classified as a bogus bug. I ran into
the same issue when using resource limits in cgiwrap, sbox, and a
custom version of suexec that calls setrlimit(RLIMIT_AS, ...).

For some reason I can't determine, PHP refuses to parse POSTed CGI
parameters from STDIN when the RLIMIT_AS value is less than 40 MB (on
my machine), despite the fact that PHP itself never uses more than
about 8 MB. If I raise the RLIMIT_AS value above 40 MB, it works with
no trouble.

Perl CGI scripts do not have the same problem.

As with the previous poster, using PHP's built-in memory limit is not
an option for me -- I'm allowing customers to run their own PHP scripts
on shared servers, and the memory limit must be enforced at the OS
level to prevent users from running system calls, etc., that exceed the
limit. This issue is unfortunately preventing me from offering PHP to
several thousand customers.

I hope that this bug can be reopened and fixed. I have spent several
hours trying to figure out the cause of it in the hope that I could
send a patch, but alas, I can't see where the problem is.



[2002-01-28 18:22:49] [EMAIL PROTECTED]

I can't just use PHP Limit.. I need to be able to LIMIT the resources
on Memory for other things (Perl, FrontPage, and other cgi programs)




[2002-01-28 17:56:48] [EMAIL PROTECTED]

This cannot be implemented.
Use PHP memory limit.



[2002-01-28 14:45:33] [EMAIL PROTECTED]

I have php compiled as cgi and calling the php binary from apache via
AddHandler.
I have thousands of users on this box and I have RLimitMEM directives.
Using 4.0.6 and 4.1.1 I noticed if I have RLimitMEM defined, having a
form
POST to
the php binary, i get : premature end of script headers.

If I remark out the RLimitMEM entry in the VirtualHost directive, all
is
good?

Any work arounds?





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




Bug #16842 Updated: header() function doesn`t work

2002-05-01 Thread yohgaki

 ID:   16842
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Bogus
+Status:   Open
 Bug Type: HTTP related
 Operating System: Windows XP
 PHP Version:  4.2.0
 New Comment:

Reopened to confirm. 


Previous Comments:


[2002-05-01 00:45:47] [EMAIL PROTECTED]

I have experienced this same bug on my systems.  I upgraded from PHP
4.1.2 on W2k Professional running Apache 1.3.20 to PHP 4.2.0.  header()
function seems to stop working.

? header(Location: http://www.queenstown.com;); ?

In any browser, no workie, workie, just blank page.

Downgrade to PHP 4.2.1 and the problem disappears.

A search of bug database on version 4.2.0 on all issues and all status'
returns 244 results as of May 1, 2002 and this is the only mention of
header() not working.



[2002-04-27 14:46:17] [EMAIL PROTECTED]

?php
header(Location: http://localhost/;);
?

WinXP/Apache1.3.22/Apache module/Standard setup, standard modules

On MSIE 6.0 and Netscape 6 nothings happen. Script start and normal end
without any error (error_reporting  =  E_ALL). But I'm still on testing
page. It seems just don't work and without any errors. I check
configuration hundred times but with nothing :(



[2002-04-26 02:25:16] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.




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

You are supposed to search bug DB, first
There are sevral duplicated reports for this.



[2002-04-26 01:20:02] [EMAIL PROTECTED]

It seem that header() function doesn`t work. Test was quite simle
script with few lines of code (server-side redirection).



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/16842

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




Bug #16788 Updated: Error compiling libmysql

2002-05-01 Thread willem . vanpelt

 ID:   16788
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: MySQL related
 Operating System: HP-UX 11.00
 PHP Version:  4.2.0
 New Comment:

It works now. Thanks.


Previous Comments:


[2002-04-25 22:17:21] [EMAIL PROTECTED]

Can you please try with fresh 4.2.0 sources and replace
the configure file with this one:

http://www.edin.dk/php/configure.gz





[2002-04-25 05:40:58] [EMAIL PROTECTED]

Here are the snippets of the config.log that address the uint check:

configure:41798: checking for type uint
configure:41819: g++ -o conftest   -DHPUX11 -DUSE_HSREGEX -DUSE_EXPAT 
-L/user/d
dts/local/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.1
-L/user/ddts/local/gnu/lib
/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.1 conftest.cc -lcrypt -lm -lnsl 
-lgcc -lcryp
t 5
./configure[41820]: g++:  not found.
configure:41822: $? = 127
configure: program exited with status 127
configure: failed program was:
#line 41807 configure
#include confdefs.h
#include stdio.h
#include sys/types.h
main()
{
  uint foo;
  foo++;
  exit(0);
}
configure:41840: result: no


configure:76486: checking for uint
configure:76507: gcc -c -g -O2  -DHPUX11 -DUSE_HSREGEX -DUSE_EXPAT
conftest.c 
5
configure:76510: $? = 0
configure:76513: test -s conftest.o
configure:76516: $? = 0
configure:76526: result: yes


ac_cv_type_size_t=yes
ac_cv_type_uid_t=yes
ac_cv_type_uint=yes
ac_cv_type_ulong=no
ac_cv_uchar=no
ac_cv_uint=no
ac_cv_ulong=no
ac_cv_ushort=no


...plus a few lines from main/php_config.h:

/* #undef uint */
#define ulong unsigned long

/* */
/* #undef HAVE_UINT */
/* Define to `unsigned int ' if sys/types.h does not define. */
/* #undef uint */


The type uint is defined in sys/types.h, although there is a remark
that says you should try to avoid using it (and probably use types like
uint16_t instead).



[2002-04-24 22:00:32] [EMAIL PROTECTED]

Can you check config.log for the uint check?
Is HAVE_UINT defined in main/php_config.h ?

--Jani




[2002-04-24 06:33:29] [EMAIL PROTECTED]

While compiling PHP 4.2.0 (using gcc 3.0.1), I get the following
error:

Making all in libmysql
make[3]: Entering directory
`/volumes/v1/users/ddtsbase/ddts_4.6.3/local/src/php/php-4.2.0/ext/mysql/libmysql'
make[4]: Entering directory
`/volumes/v1/users/ddtsbase/ddts_4.6.3/local/src/php/php-4.2.0/ext/mysql/libmysql'
/bin/sh /user/ddts/local/src/php/php-4.2.0/libtool --silent
--mode=compile gcc  -I.
-I/user/ddts/local/src/php/php-4.2.0/ext/mysql/libmysql
-I/user/ddts/local/src/php/php-4.2.0/main
-I/user/ddts/local/src/php/php-4.2.0
-I/user/ddts/local/apache_1.3.24/include
-I/user/ddts/local/src/php/php-4.2.0/Zend
-I/user/ddts/local/gnu/include
-I/user/ddts/local/src/php/php-4.2.0/ext/mysql/libmysql
-I/user/ddts/local/src/php/php-4.2.0/ext/xml/expat  -DHPUX11
-DUSE_HSREGEX -DUSE_EXPAT -I/user/ddts/local/src/php/php-4.2.0/TSRM -g
-O2 -prefer-pic  -c libmysql.c
In file included from libmysql.c:5:
global.h:256: warning: redefinition of `uint'
/user/ddts/local/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.1/include/sys/types.h:322:
warning: `uint' previously declared here
global.h:257: warning: redefinition of `ushort'
/user/ddts/local/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.1/include/sys/types.h:323:
warning: `ushort' previously declared here
In file included from libmysql.c:5:
global.h:590: redefinition of `ulong'
global.h:258: `ulong' previously declared here
libmysql.c: In function `net_safe_read':
libmysql.c:290: warning: passing arg 2 of `signal' from incompatible
pointer type
libmysql.c: In function `net_field_length_ll':
libmysql.c:397: warning: left shift count = width of type
libmysql.c: In function `simple_command':
libmysql.c:421: warning: passing arg 2 of `signal' from incompatible
pointer type
libmysql.c: In function `pipe_sig_handler':
libmysql.c:605: warning: passing arg 2 of `signal' from incompatible
pointer type
libmysql.c: In function `end_server':
libmysql.c:622: warning: passing arg 2 of `signal' from incompatible
pointer type
libmysql.c: In function `mysql_real_connect':
libmysql.c:1158: warning: passing arg 2 of `signal' from incompatible
pointer type
make[4]: *** [libmysql.lo] Error 1
make[4]: Leaving directory
`/volumes/v1/users/ddtsbase/ddts_4.6.3/local/src/php/php-4.2.0/ext/mysql/libmysql'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/volumes/v1/users/ddtsbase/ddts_4.6.3/local/src/php/php-4.2.0/ext/mysql/libmysql'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory

Bug #16788 Updated: Error compiling libmysql

2002-05-01 Thread edink

 ID:   16788
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: MySQL related
 Operating System: HP-UX 11.00
 PHP Version:  4.2.0


Previous Comments:


[2002-05-01 06:43:50] [EMAIL PROTECTED]

It works now. Thanks.



[2002-04-25 22:17:21] [EMAIL PROTECTED]

Can you please try with fresh 4.2.0 sources and replace
the configure file with this one:

http://www.edin.dk/php/configure.gz





[2002-04-25 05:40:58] [EMAIL PROTECTED]

Here are the snippets of the config.log that address the uint check:

configure:41798: checking for type uint
configure:41819: g++ -o conftest   -DHPUX11 -DUSE_HSREGEX -DUSE_EXPAT 
-L/user/d
dts/local/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.1
-L/user/ddts/local/gnu/lib
/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.1 conftest.cc -lcrypt -lm -lnsl 
-lgcc -lcryp
t 5
./configure[41820]: g++:  not found.
configure:41822: $? = 127
configure: program exited with status 127
configure: failed program was:
#line 41807 configure
#include confdefs.h
#include stdio.h
#include sys/types.h
main()
{
  uint foo;
  foo++;
  exit(0);
}
configure:41840: result: no


configure:76486: checking for uint
configure:76507: gcc -c -g -O2  -DHPUX11 -DUSE_HSREGEX -DUSE_EXPAT
conftest.c 
5
configure:76510: $? = 0
configure:76513: test -s conftest.o
configure:76516: $? = 0
configure:76526: result: yes


ac_cv_type_size_t=yes
ac_cv_type_uid_t=yes
ac_cv_type_uint=yes
ac_cv_type_ulong=no
ac_cv_uchar=no
ac_cv_uint=no
ac_cv_ulong=no
ac_cv_ushort=no


...plus a few lines from main/php_config.h:

/* #undef uint */
#define ulong unsigned long

/* */
/* #undef HAVE_UINT */
/* Define to `unsigned int ' if sys/types.h does not define. */
/* #undef uint */


The type uint is defined in sys/types.h, although there is a remark
that says you should try to avoid using it (and probably use types like
uint16_t instead).



[2002-04-24 22:00:32] [EMAIL PROTECTED]

Can you check config.log for the uint check?
Is HAVE_UINT defined in main/php_config.h ?

--Jani




[2002-04-24 06:33:29] [EMAIL PROTECTED]

While compiling PHP 4.2.0 (using gcc 3.0.1), I get the following
error:

Making all in libmysql
make[3]: Entering directory
`/volumes/v1/users/ddtsbase/ddts_4.6.3/local/src/php/php-4.2.0/ext/mysql/libmysql'
make[4]: Entering directory
`/volumes/v1/users/ddtsbase/ddts_4.6.3/local/src/php/php-4.2.0/ext/mysql/libmysql'
/bin/sh /user/ddts/local/src/php/php-4.2.0/libtool --silent
--mode=compile gcc  -I.
-I/user/ddts/local/src/php/php-4.2.0/ext/mysql/libmysql
-I/user/ddts/local/src/php/php-4.2.0/main
-I/user/ddts/local/src/php/php-4.2.0
-I/user/ddts/local/apache_1.3.24/include
-I/user/ddts/local/src/php/php-4.2.0/Zend
-I/user/ddts/local/gnu/include
-I/user/ddts/local/src/php/php-4.2.0/ext/mysql/libmysql
-I/user/ddts/local/src/php/php-4.2.0/ext/xml/expat  -DHPUX11
-DUSE_HSREGEX -DUSE_EXPAT -I/user/ddts/local/src/php/php-4.2.0/TSRM -g
-O2 -prefer-pic  -c libmysql.c
In file included from libmysql.c:5:
global.h:256: warning: redefinition of `uint'
/user/ddts/local/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.1/include/sys/types.h:322:
warning: `uint' previously declared here
global.h:257: warning: redefinition of `ushort'
/user/ddts/local/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.1/include/sys/types.h:323:
warning: `ushort' previously declared here
In file included from libmysql.c:5:
global.h:590: redefinition of `ulong'
global.h:258: `ulong' previously declared here
libmysql.c: In function `net_safe_read':
libmysql.c:290: warning: passing arg 2 of `signal' from incompatible
pointer type
libmysql.c: In function `net_field_length_ll':
libmysql.c:397: warning: left shift count = width of type
libmysql.c: In function `simple_command':
libmysql.c:421: warning: passing arg 2 of `signal' from incompatible
pointer type
libmysql.c: In function `pipe_sig_handler':
libmysql.c:605: warning: passing arg 2 of `signal' from incompatible
pointer type
libmysql.c: In function `end_server':
libmysql.c:622: warning: passing arg 2 of `signal' from incompatible
pointer type
libmysql.c: In function `mysql_real_connect':
libmysql.c:1158: warning: passing arg 2 of `signal' from incompatible
pointer type
make[4]: *** [libmysql.lo] Error 1
make[4]: Leaving directory
`/volumes/v1/users/ddtsbase/ddts_4.6.3/local/src/php/php-4.2.0/ext/mysql/libmysql'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/volumes/v1/users/ddtsbase/ddts_4.6.3/local/src/php/php-4.2.0/ext/mysql/libmysql'
make[2]: *** [all-recursive] Error 

Bug #16941 Updated: The php4ts.lib is missing

2002-05-01 Thread edink

 ID:   16941
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: Win98
 PHP Version:  4.2.0
 New Comment:

You're supposed to copy php4ts.dll (not .lib) to your win/system dir.
If the documentation states somewhere that you should copy php4ts.lib,
please reopen this bug report.


Previous Comments:


[2002-05-01 05:27:09] [EMAIL PROTECTED]

I downloaded the php version 4.2.0 and wanted to copy the php4ts.lib
into win/system. Then i searched for it but i dindt found...




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




Bug #16942 Updated: natsort broken

2002-05-01 Thread derick

 ID:   16942
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Arrays related
 Operating System: Linux
 PHP Version:  4.1.2
 New Comment:

natsort() retains the keys, use foreach ($array as $value) { echo
$value.\n; }

Derick


Previous Comments:


[2002-05-01 07:01:48] [EMAIL PROTECTED]

There's something wrong with the natsort() algorithm.  I sorted an
array and echo'ed it out using the following code:


-
$array = array(d02, d3, j_j, d04, d03);
natsort($array);

for ($i=0; $array[$i]; $i++) {
echo [.$i.]: .$array[$i].\n;
}
-

Here's what it spit out:


[0]: d02
[1]: d3 
[2]: j_j 
[3]: d04 
[4]: d03


I'm not sure what kind of ordering it used, but it doesn't seem to
follow any pattern that I know of.  =)




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




Bug #16943: Undefined variable

2002-05-01 Thread krizz

From: [EMAIL PROTECTED]
Operating system: Windows XP
PHP version:  4.2.0
PHP Bug Type: Compile Warning
Bug description:  Undefined variable

Hello

The following programm works, but not on my computer...
the variable email always is empty on my system, even if i filled the
input box. A friend of mine testet it too, and it works fine on his
system.But on my system the Html output appears in the browser. I fill
something in the inputform, i press on the OK button , but nothing
happens... I  use this programm with Apache/1.3.24 (Win32) PHP/4.2.0RC4
running...

can u find a mistake? i cannot... 


?
  echo Newsletter;
if (!isset($email))
  { 
  echo form action=index.php method=post;
  echo input type=text name=email;
  echo br;
  echo input type=submit value =OK;
  echo /form;
  }

if (isset($email) ) echo $email;

if (!isset($email) ) echo no;

/*mail($email,WWW.38HQ.DE - NEWS -, Danke Oskar \n du bist nun auf dem
38hq newsletter);*/
?




-- 
Edit bug report at http://bugs.php.net/?id=16943edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16943r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16943r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16943r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16943r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16943r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16943r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16943r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16943r=submittedtwice




Bug #16943 Updated: Undefined variable

2002-05-01 Thread jan

 ID:   16943
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Compile Warning
 Operating System: Windows XP
 PHP Version:  4.2.0
 New Comment:

this is not a bug; bogus. please check
http://www.php.net/release_4_2_0.php


Previous Comments:


[2002-05-01 08:44:32] [EMAIL PROTECTED]

Hello

The following programm works, but not on my computer...
the variable email always is empty on my system, even if i filled the
input box. A friend of mine testet it too, and it works fine on his
system.But on my system the Html output appears in the browser. I fill
something in the inputform, i press on the OK button , but nothing
happens... I  use this programm with Apache/1.3.24 (Win32) PHP/4.2.0RC4
running...

can u find a mistake? i cannot... 


?
  echo Newsletter;
if (!isset($email))
  { 
  echo form action=index.php method=post;
  echo input type=text name=email;
  echo br;
  echo input type=submit value =OK;
  echo /form;
  }

if (isset($email) ) echo $email;

if (!isset($email) ) echo no;

/*mail($email,WWW.38HQ.DE - NEWS -, Danke Oskar \n du bist nun auf
dem 38hq newsletter);*/
?








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




Bug #16937 Updated: PHP with GD 2.0.1 will not compile

2002-05-01 Thread mfurdyk

 ID:   16937
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: GD related
 Operating System: Linux 2.4.9
 PHP Version:  4.2.0
 New Comment:

I'm pointing directly to the GD src directory, as mentioned here:

http://www.php.net/~rasmus/gd.html

gd.h is here:
/usr/local/src/gd-2.0.1/gd.h

And i'm pointing directly there (to gd-2.0.1 dir) when compiling.

Yes, it does have the line.


Previous Comments:


[2002-05-01 02:44:16] [EMAIL PROTECTED]

Where is your gd.h located? Does it containe the following line

#define gdPie   gdArc

?



[2002-05-01 01:30:09] [EMAIL PROTECTED]

PHP is what won't compile, not GD :)



[2002-05-01 01:27:39] [EMAIL PROTECTED]

Trying to compile GD 2.0.1 into PHP 4.2.0, 4.1.2, or 4.0.6 produces
this error:

4.2.0 ERROR:
gd.c: In function `zm_startup_gd':
gd.c:303: `gdArc' undeclared (first use in this function)
gd.c:303: (Each undeclared identifier is reported only once
gd.c:303: for each function it appears in.)
gd.c:304: `gdPie' undeclared (first use in this function)
gd.c:305: `gdChord' undeclared (first use in this function)
gd.c:306: `gdNoFill' undeclared (first use in this function)
gd.c:307: `gdEdged' undeclared (first use in this function)
gd.c: In function `zif_imagecreatetruecolor':
gd.c:588: warning: assignment makes pointer from integer without a
cast
gd.c: In function `zif_imagecolorat':
gd.c:1626: structure has no member named `tpixels'
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/usr/local/src/php-4.2.0/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/php-4.2.0/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/php-4.2.0/ext'
make: *** [all-recursive] Error 1

4.0.6 ERROR:
gd.c: In function `php_minit_gd':
gd.c:296: `gdPie' undeclared (first use in this function)
gd.c:296: (Each undeclared identifier is reported only once
gd.c:296: for each function it appears in.)
gd.c:297: `gdChord' undeclared (first use in this function)
gd.c:298: `gdNoFill' undeclared (first use in this function)
gd.c:299: `gdEdged' undeclared (first use in this function)
gd.c: In function `php_if_imagecreatetruecolor':
gd.c:577: warning: assignment makes pointer from integer without a
cast
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/usr/local/src/php-4.0.6/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/php-4.0.6/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/php-4.0.6/ext'
make: *** [all-recursive] Error 1

I have completely wiped out the gd and php installs, and even went
through tons of steps with some folks from #php. Other reports of this
elsewhere on the web have gone unanswered.




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




Bug #16768 Updated: mysql_connect(localhost, ...) doesn't connect to localhost!

2002-05-01 Thread jason

 ID:   16768
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: MySQL related
 Operating System: Red Hat Linux 7.2
 PHP Version:  4.2.0
 New Comment:

My load is doing the same thing on Mandrake 8.2.  Any ideas of what I
can check to make sure this isn't a user error?


Previous Comments:


[2002-04-25 17:23:44] [EMAIL PROTECTED]

4.2.0 was packed with configure script made by autoconf 2.52 which
doesn't seem to work correcly.
configure built with autoconf 2.13 works fine.

Resolutions:
* wait for 4.2.1 (due in a week or so)
* if you have autoconf 2.13 on you system, delete configure and run
./buildconf
* download configure script from http://www.edin.dk/php/configure.gz




[2002-04-24 13:45:55] [EMAIL PROTECTED]

As others have stated on the dev list, the problem seems to be that PHP
4.2.0 is trying to connect using TCP instead of using the UNIX socket.
I can confirm that this is what's happening on my end too. With PHP
4.1.2, tcpdump shows no TCP traffic and everything works correctly.
With PHP 4.2.0, tcpdump shows connections to the MySQL port (3306) and
it doesn't work.

In both PHP versions, MYSQL_SOCKET is set the same way according to
phpinfo(): /var/lib/mysql/mysql.sock, which is correct for my system.
And both PHP versions show the same configure output:

checking for MySQL support... yes
checking for MySQL UNIX socket... /var/lib/mysql/mysql.sock



[2002-04-23 17:25:48] [EMAIL PROTECTED]

Hmm, I tested again and now I'm getting this slightly different
message:

Warning: Host 'my.fully.qualified.name' is not allowed to connect to
this MySQL server

Also, I found these calls result in the same error message:

mysql_connect(127.0.0.1, username, password);
mysql_connect(:/var/lib/mysql/mysql.sock, username, password);

This can't be the correct behavior. When I connect to localhost, MySQL
should see the PHP connection as being from localhost, NOT my
machine's fully-qualified DNS name. This is what happens when I use the
command-line mysql program, or any prior version of PHP (3.x -
4.1.2).

This is a critical problem because it breaks all of my existing PHP
scripts that use MySQL. I'm reluctant to start playing around with my
MySQL permissions tables, because if/when this bug is addressed, I'd
have to put everything back. So for now, I'm back to 4.1.2.



[2002-04-23 15:50:29] [EMAIL PROTECTED]

After upgrading from PHP 4.1.2 to PHP 4.2.0, MySQL connections fail
with this error:

Warning: Access denied for user: '[EMAIL PROTECTED]' 

Apparently, it is trying to connect to 'my.fully.qualified.name'
instead of 'localhost' as before. This seems wrong because my
mysql_connect() call uses 'localhost' as the host name:

mysql_connect(localhost, username, password);

I can work around this by changing all my MySQL grants from
'username'@'localhost' to 'username'@'my.fully.qualified.name', but
that seems unnecessary; this should be fixed in PHP.

BTW, I've used the same above mysql_connect() call since the PHP 3.x
days and it's always worked fine, until now.


My PHP configure line:
./configure --with-apache=../apache_1.3.24 --enable-track-vars \
  --with-mysql --with-zlib --with-gd

All PHP configuration settings are defaults. (i.e. php.ini =
php.ini-dist)

Apache version is 1.3.24. MySQL version is 3.23.49a.




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




Bug #16944: pow

2002-05-01 Thread johnl

From: [EMAIL PROTECTED]
Operating system: linux
PHP version:  4.2.0
PHP Bug Type: *Math Functions
Bug description:  pow

pow works fine before 4.20, but in 4.20 it broke -
Warning: Invalid argument(s) passed to pow() 

It works pow(11,2) but breaks if
I passed pow($N, 2), where $N=11.
-- 
Edit bug report at http://bugs.php.net/?id=16944edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16944r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16944r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16944r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16944r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16944r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16944r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16944r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16944r=submittedtwice




Bug #16945: bug in syntax highlight

2002-05-01 Thread goba

From: [EMAIL PROTECTED]
Operating system: win2k
PHP version:  4.1.2
PHP Bug Type: Unknown/Other Function
Bug description:  bug in syntax highlight

While generating the new CHM highlights I came across a bug. Seems like the
syntax highliter does not like backslashes in strings, or something like
that...
This example was on the preg_match_all() page.

The original source:

preg_match_all (/(([\w]+)[^]*)(.*)(\/\\2)/, $html, $matches);

The output of the highlight:

preg_match_all (/(([
Warning:  Unexpected character in input:  '\' (ASCII=92) state=1 in
E:\phpcvs\phpdoc\htmlhelp\filter_files.php on line 180
w]+)[^]*)(.*)(
Warning:  Unexpected character in input:  '\' (ASCII=92) state=1 in
E:\phpcvs\phpdoc\htmlhelp\filter_files.php on line 180
/
Warning:  Unexpected character in input:  '\' (ASCII=92) state=1 in
E:\phpcvs\phpdoc\htmlhelp\filter_files.php on line 180

Warning:  Unexpected character in input:  '\' (ASCII=92) state=1 in
E:\phpcvs\phpdoc\htmlhelp\filter_files.php on line 180
2)/, $html, $matches);

-- 
Edit bug report at http://bugs.php.net/?id=16945edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16945r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16945r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16945r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16945r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16945r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16945r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16945r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16945r=submittedtwice




Bug #16943 Updated: Undefined variable

2002-05-01 Thread krizz

 ID:   16943
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Compile Warning
 Operating System: Windows XP
 PHP Version:  4.2.0
 New Comment:

Thanks for your helpbut i cannot find something..its my first time
doing PHP.so...dont think i am crazy ..:-)

but can u give me an example how to solve this basic problem?


Previous Comments:


[2002-05-01 08:52:45] [EMAIL PROTECTED]

this is not a bug; bogus. please check
http://www.php.net/release_4_2_0.php



[2002-05-01 08:44:32] [EMAIL PROTECTED]

Hello

The following programm works, but not on my computer...
the variable email always is empty on my system, even if i filled the
input box. A friend of mine testet it too, and it works fine on his
system.But on my system the Html output appears in the browser. I fill
something in the inputform, i press on the OK button , but nothing
happens... I  use this programm with Apache/1.3.24 (Win32) PHP/4.2.0RC4
running...

can u find a mistake? i cannot... 


?
  echo Newsletter;
if (!isset($email))
  { 
  echo form action=index.php method=post;
  echo input type=text name=email;
  echo br;
  echo input type=submit value =OK;
  echo /form;
  }

if (isset($email) ) echo $email;

if (!isset($email) ) echo no;

/*mail($email,WWW.38HQ.DE - NEWS -, Danke Oskar \n du bist nun auf
dem 38hq newsletter);*/
?








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




Bug #16943 Updated: Undefined variable

2002-05-01 Thread jan

 ID:   16943
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Compile Warning
 Operating System: Windows XP
 PHP Version:  4.2.0
 New Comment:

the bug system is not the apropriate place for support questions. mail
[EMAIL PROTECTED] for help.
A hint on your problem:
Substitute $email with $_POST['email']


Previous Comments:


[2002-05-01 10:35:53] [EMAIL PROTECTED]

Thanks for your helpbut i cannot find something..its my first time
doing PHP.so...dont think i am crazy ..:-)

but can u give me an example how to solve this basic problem?



[2002-05-01 08:52:45] [EMAIL PROTECTED]

this is not a bug; bogus. please check
http://www.php.net/release_4_2_0.php



[2002-05-01 08:44:32] [EMAIL PROTECTED]

Hello

The following programm works, but not on my computer...
the variable email always is empty on my system, even if i filled the
input box. A friend of mine testet it too, and it works fine on his
system.But on my system the Html output appears in the browser. I fill
something in the inputform, i press on the OK button , but nothing
happens... I  use this programm with Apache/1.3.24 (Win32) PHP/4.2.0RC4
running...

can u find a mistake? i cannot... 


?
  echo Newsletter;
if (!isset($email))
  { 
  echo form action=index.php method=post;
  echo input type=text name=email;
  echo br;
  echo input type=submit value =OK;
  echo /form;
  }

if (isset($email) ) echo $email;

if (!isset($email) ) echo no;

/*mail($email,WWW.38HQ.DE - NEWS -, Danke Oskar \n du bist nun auf
dem 38hq newsletter);*/
?








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




Bug #16037 Updated: random parse errors on dual xeon machine

2002-05-01 Thread chris

 ID:   16037
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Win
 PHP Version:  4.1.2
 New Comment:

Well I've finally found the problem, having lived with all the hell
this has caused all these months...

Let's say you have a line such as:
echo $blah-blah!!!\n\n;

That line of code may work, but THAT is what is causing the random
failures - if PHP 4.1 onward (including PHP 4.2) is used that line will
randomly fail with parse errors.  As a result of those parse errors,
the scripts would not have been fully loaded into memory and what ends
up executing causes even more errors.

I have edited such references in a third-party script we purchased to
instead read as follows:
echo $blah-blah . !!!\n\n;

As a result of this, instead of my error log filling up thick and fast
per MINUTE with all these weird parse errors (and as a result 90% or so
of page requests working, the remainder failing with a blank page or
partial page) the error log has been dead silent this past couple of
hours and I've not yet seen a single page failure!


Previous Comments:


[2002-04-30 22:26:04] [EMAIL PROTECTED]

We have EXACTLY the same problem, and it is 100% specific to PHP 4.1
onward (ie both PHP 4.1 and now PHP 4.2 do this).  For example sake
let's compare 4.0.6 to 4.2 - install PHP 4.2 and everything works fine,
but every so often (let's say 10% of the time) they get nothing/part of
a page and the error log shows a parse error (whinges about all sorts
of stuff that isn't true) - a simple refresh solves this problem.  It's
easily reproducable, though as per the original repor there it might be
load related as we get a lot of activity.  Now here's the thing - PHP
4.1 introduced this, if you put PHP 4.0.6 back on everything is 100%
PERFECT.  Put 4.1 or 4.2 back on and 10% or so of requests fail, put
4.0.6 back on and it's perfect, put 4.1 or 4.2 back on and the problem
is back - this has been major hell for us and I hoped to heck 4.2 would
fix it, but alas the problem still exists HELP  Running as a
module under Apache, was Apache 1.3.24 until last night - as of last
night we're now under Apache 2.0.35, with the same problem.



[2002-03-13 06:28:26] [EMAIL PROTECTED]

I am using Php in a Win enviornment. The machine has a Raid 5 system,
1GB 
Ram and two Xeon 700 CPUs. PHP runs in Apache (1.3.23) as Module. I am

using official binaries PHP and Apache.

There are very strang parse errors in files that are 100% ok. The files
are used 
in three other installations and there are no errors at all.

I think there is something bad with threading. I noticed the error when
a 
session is accessed within a frame e.g. 3 or more independant PHP files

usind the same data.

There is a newsgroup posting dealing with the same problem:

http://groups.google.com/groups?q=php+xeon+parse+errorhl=deselm=Pine.BSF.4.10.10203070837300.22588-10%40sea-incorporated.comrnum=1






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




Bug #16944 Updated: pow

2002-05-01 Thread jimw

 ID:   16944
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: *Math Functions
 Operating System: linux
 PHP Version:  4.2.0
 New Comment:

This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/

in 4.2.0, pow() doesn't handle strings as arguments, so you may need to
cast the arguments you're passing in.


Previous Comments:


[2002-05-01 10:07:01] [EMAIL PROTECTED]

pow works fine before 4.20, but in 4.20 it broke -
Warning: Invalid argument(s) passed to pow() 

It works pow(11,2) but breaks if
I passed pow($N, 2), where $N=11.




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




Bug #16947: array issue in object

2002-05-01 Thread max

From: [EMAIL PROTECTED]
Operating system: Solaris i think
PHP version:  4.1.2
PHP Bug Type: *General Issues
Bug description:  array issue in object

i have created a class called filter. i have two variables in the class
which are arrays. i have an method named approve which sets the values of
both arrays. however the arrays both get set to the same value.

here is the relevant portion of the filter class code.

class Filter{

  var $filter_name = Basic Filter;
  var $allowed_number = 0;
  var $filter_word_file; // file name string
  var $violations; // array of strings of violating keywords
  var $keywords; // array of strings of keywords in content

  // Basic filter constructor.
  // Returns : nothing
  // Parameters :   $file_name File containing restricted words. 
  function Filter($file_name){
$this-filter_word_file=$file_name;
  }

  // Compares passed content to restricted file. Approved if unwanted
content falls
  // in range specified by $violation_count.
  // Returns :  true if approved
  //false if not approved
  // Parameters :   $content the content to test
  function approve($content){
$word_arr = file($this-filter_word_file);
$content_arr = split( ,$content);
$violation_count = 0;
$violation_arr;
$keyword_arr;
$run_once = true;
for($i=0;$icount($word_arr);$i++){
  for($j=0;$jcount($content_arr);$j++){
if(ereg(trim($word_arr[$i]),$content_arr[$j])){
  $violation_arr[$violation_count] = $content_arr[$j];
  $violation_count++;
}else{
  if((strlen($content_arr[$j])4) ($run_once == true)){
$keyword_arr[] = $content_arr[$j];
  }
}
  }
  $run_once = false;  
}
 //* THIS IS THE CODE THAT IS BUGGY **
$this-$violations = $violation_arr;
$this-$keywords = $keyword_arr;
 //* NOW HERE BOTH $keywords and $violations ARE SET TO THE VALUE OF
$keyword_arr *
if($violation_count$allowed_number){
  return false;
}
return true;  
  } 
  
  // Sets the number of allowed violations.
  // Return :   nothing
  // Parameters :   $number Amount of violations to allow.
  function setAllowedViolationNumber($number){
$this-$allowed_number = $number;  
  }

  // Returns an array of content violations.
  // Return :   array of strings
  // Parameters :   none
  function getViolatingContent(){
return $this-$violations;
  }
   
  // Returns an array of keywords for content.
  // Return :   array of strings
  // Parameters :   none
  function getKeywords(){
echo count($keywords);
return $this-$keywords;
  }

}

Anyway I can always re-produce this bug and I think there is something
seriously wrong here.



-- 
Edit bug report at http://bugs.php.net/?id=16947edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16947r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16947r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16947r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16947r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16947r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16947r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16947r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16947r=submittedtwice




Bug #16926 Updated: Shuffle doesn't work

2002-05-01 Thread rodif_bl

 ID:   16926
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Duplicate
 Bug Type: *Math Functions
 Operating System: WinXP
 PHP Version:  4.2.0
 New Comment:

I made patch for this awhile ago. It never was commited.

http://bugs.php.net/bug.php?id=7045


Previous Comments:


[2002-05-01 05:06:50] [EMAIL PROTECTED]

Yes, I'm sure. I've tried running it from the command line with the
same result.
I've done a little more testing, and it seems that rand() seems to work
just fine, so that should more or less exclude the possibility of a bug
in srand().

I've also done a full reinstall (just to make sure) without any luck.



[2002-05-01 03:08:01] [EMAIL PROTECTED]

I could not reproduce this, are you sure the browser is not caching
your page?

Derick



[2002-04-30 08:14:09] [EMAIL PROTECTED]

As of PHP 4.2.0, shuffle() doesn't seem to work for me.
The following code always produce the same output:
function make_seed() { // Taken directly from the manual
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 10);
}

srand(make_seed());
$arr = range(1, 10);
shuffle($arr);
print_r($arr);


Further testing shows that I get the same output if I uncomment the
srand(), if that's any help.




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




Bug #16704 Updated: Screwed up handles while connection multiple DBs

2002-05-01 Thread thomas . hoppe

 ID:   16704
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: OCI8 related
 Operating System: Windows 2000
 PHP Version:  4.1.2
 New Comment:

I'm happy to report, that I've minimized the problem to one lil script
in order to demonstrate it easily.

I sent a description and the script to [EMAIL PROTECTED]
If someone else needs it - drop a message!


Previous Comments:


[2002-04-23 03:19:57] [EMAIL PROTECTED]

Hi,

I'll send you a nice testsript tomorrow (European Time).

cu



[2002-04-22 14:45:55] [EMAIL PROTECTED]

please send me a shot _selfcontained_ php script that 
shows and explains your problem! 
 



[2002-04-22 14:06:13] [EMAIL PROTECTED]

I also tried OCINLogon, but there was no difference.

Addition: As the documentation implies: it should be no problem for any
OCI*logon function to make more than one connections!



[2002-04-22 13:55:31] [EMAIL PROTECTED]

 use OCINlogon to force session isolation. 
 



[2002-04-22 13:53:13] [EMAIL PROTECTED]

Bah! Bug in bug report:

5.) echo out connection one $con1 - you get Resource id # 2
___^



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/16704

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




Bug #16704 Updated: Screwed up handles while connection multiple DBs

2002-05-01 Thread thomas . hoppe

 ID:   16704
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: OCI8 related
 Operating System: Windows 2000
 PHP Version:  4.1.2
 New Comment:

x


Previous Comments:


[2002-05-01 12:50:20] [EMAIL PROTECTED]

I'm happy to report, that I've minimized the problem to one lil script
in order to demonstrate it easily.

I sent a description and the script to [EMAIL PROTECTED]
If someone else needs it - drop a message!



[2002-04-23 03:19:57] [EMAIL PROTECTED]

Hi,

I'll send you a nice testsript tomorrow (European Time).

cu



[2002-04-22 14:45:55] [EMAIL PROTECTED]

please send me a shot _selfcontained_ php script that 
shows and explains your problem! 
 



[2002-04-22 14:06:13] [EMAIL PROTECTED]

I also tried OCINLogon, but there was no difference.

Addition: As the documentation implies: it should be no problem for any
OCI*logon function to make more than one connections!



[2002-04-22 13:55:31] [EMAIL PROTECTED]

 use OCINlogon to force session isolation. 
 



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/16704

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




Bug #16704 Updated: Screwed up handles while connection multiple DBs

2002-05-01 Thread thomas . hoppe

 ID:   16704
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: OCI8 related
 Operating System: Windows 2000
 PHP Version:  4.1.2
 New Comment:

Arggh, There was an error in my testscript. Gotta search on :(


Previous Comments:


[2002-05-01 12:59:25] [EMAIL PROTECTED]

x



[2002-05-01 12:50:20] [EMAIL PROTECTED]

I'm happy to report, that I've minimized the problem to one lil script
in order to demonstrate it easily.

I sent a description and the script to [EMAIL PROTECTED]
If someone else needs it - drop a message!



[2002-04-23 03:19:57] [EMAIL PROTECTED]

Hi,

I'll send you a nice testsript tomorrow (European Time).

cu



[2002-04-22 14:45:55] [EMAIL PROTECTED]

please send me a shot _selfcontained_ php script that 
shows and explains your problem! 
 



[2002-04-22 14:06:13] [EMAIL PROTECTED]

I also tried OCINLogon, but there was no difference.

Addition: As the documentation implies: it should be no problem for any
OCI*logon function to make more than one connections!



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/16704

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




Bug #16704 Updated: Screwed up handles while connection multiple DBs

2002-05-01 Thread thomas . hoppe

 ID:   16704
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: OCI8 related
 Operating System: Windows 2000
 PHP Version:  4.1.2
 New Comment:

This is not my day. I figured out that the bug is not in php but in my
code.

So sorry for the time I've wasted and please close the ticket.


Previous Comments:


[2002-05-01 13:01:36] [EMAIL PROTECTED]

Arggh, There was an error in my testscript. Gotta search on :(



[2002-05-01 12:59:25] [EMAIL PROTECTED]

x



[2002-05-01 12:50:20] [EMAIL PROTECTED]

I'm happy to report, that I've minimized the problem to one lil script
in order to demonstrate it easily.

I sent a description and the script to [EMAIL PROTECTED]
If someone else needs it - drop a message!



[2002-04-23 03:19:57] [EMAIL PROTECTED]

Hi,

I'll send you a nice testsript tomorrow (European Time).

cu



[2002-04-22 14:45:55] [EMAIL PROTECTED]

please send me a shot _selfcontained_ php script that 
shows and explains your problem! 
 



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/16704

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




Bug #16947 Updated: array issue in object

2002-05-01 Thread msopacua

 ID:   16947
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: *General Issues
 Operating System: Solaris i think
 PHP Version:  4.1.2
 New Comment:

So what are you trying to do in those lines?

$this-$violations expands to $this-array(.).
You want to make assign several properties all at once?
Or is:
$this-violations=$arr_violations;

the code you're looking for? And if so, does that fix the bug?


Previous Comments:


[2002-05-01 12:22:44] [EMAIL PROTECTED]

i have created a class called filter. i have two variables in the class
which are arrays. i have an method named approve which sets the values
of both arrays. however the arrays both get set to the same value.

here is the relevant portion of the filter class code.

class Filter{

  var $filter_name = Basic Filter;
  var $allowed_number = 0;
  var $filter_word_file; // file name string
  var $violations; // array of strings of violating keywords
  var $keywords; // array of strings of keywords in content

  // Basic filter constructor.
  // Returns : nothing
  // Parameters :   $file_name File containing restricted words. 
  function Filter($file_name){
$this-filter_word_file=$file_name;
  }

  // Compares passed content to restricted file. Approved if unwanted
content falls
  // in range specified by $violation_count.
  // Returns :  true if approved
  //false if not approved
  // Parameters :   $content the content to test
  function approve($content){
$word_arr = file($this-filter_word_file);
$content_arr = split( ,$content);
$violation_count = 0;
$violation_arr;
$keyword_arr;
$run_once = true;
for($i=0;$icount($word_arr);$i++){
  for($j=0;$jcount($content_arr);$j++){
if(ereg(trim($word_arr[$i]),$content_arr[$j])){
  $violation_arr[$violation_count] = $content_arr[$j];
  $violation_count++;
}else{
  if((strlen($content_arr[$j])4) ($run_once == true)){
$keyword_arr[] = $content_arr[$j];
  }
}
  }
  $run_once = false;  
}
 //* THIS IS THE CODE THAT IS BUGGY **
$this-$violations = $violation_arr;
$this-$keywords = $keyword_arr;
 //* NOW HERE BOTH $keywords and $violations ARE SET TO THE VALUE
OF $keyword_arr *
if($violation_count$allowed_number){
  return false;
}
return true;  
  } 
  
  // Sets the number of allowed violations.
  // Return :   nothing
  // Parameters :   $number Amount of violations to allow.
  function setAllowedViolationNumber($number){
$this-$allowed_number = $number;  
  }

  // Returns an array of content violations.
  // Return :   array of strings
  // Parameters :   none
  function getViolatingContent(){
return $this-$violations;
  }
   
  // Returns an array of keywords for content.
  // Return :   array of strings
  // Parameters :   none
  function getKeywords(){
echo count($keywords);
return $this-$keywords;
  }

}

Anyway I can always re-produce this bug and I think there is something
seriously wrong here.







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




Bug #15259 Updated: PHP fails if RLimitMEM directive is used

2002-05-01 Thread rob-phpbugs

 ID:   15259
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: RedHat Linux 7.2
 PHP Version:  4.1.x
 New Comment:

I have done some more investigation and found that the problem only
occurs when PHP is compiled --with-mm (which is the Red Hat
default).

If PHP is compiled without mm support, the problem does not happen
(which is an acceptable workaround for me, and which should be useful
for others who experience this problem).

I still do not quite understand why the original problem happens,
though. I suspect that PHP is using mm to allocate a large chunk of
shared memory (perhaps around 32 MB?), and that allocation somehow
fails in a silent manner. Then PHP tries to use that memory to read the
POSTed data on STDIN, which fails.

When this problem happens, I don't receive a premature end of script
headers message or anything like that. PHP seems to work normally (in
my limited testing) -- it is simply unable to see the POSTed data from
the form. It acts as though the POSTed data was never sent (data sent
by method GET works properly). I suspect if I tried some more extensive
testing, I'd find that other parts of PHP that rely on mm memory
allocation would fail under these circumstances, too (but I don't know
what those are to be able to test specifics).

Anyway, I've found my workaround and am happy, but it does seem that
something in the mm code isn't quite right to cause silent failures.
It's possible that this problem (apparent silent failure when memory
can't be allocated by mm) might also occur in other low-memory
situations, too, and that the artificially imposed RLimit limitation
perhaps just makes it extremely visible and repeatable.

If it helps others to test, this problem is easily duplicated by:

1. Set up Apache with the directive RLimitMEM 2000 (for example
-- anything above 10 MB and below 40 MB shows the problem on my
machine).

2. Compile PHP as a CGI --with-mm (I'm also using the rest of the
default build options from the Red Hat 7.2 package; I suppose it's
theoretically possible that those are affecting it, too -- if you can't
duplicate, use the full-blown Red Hat build options).

3. Create a trivial test page that uses method POST to send data to any
PHP script.

4. The PHP script will incorrectly act as if no parameters were
POSTed.

5. Recompile PHP without the --with-mm line and the problem goes
away.

Hope this is useful.


Previous Comments:


[2002-05-01 06:14:57] [EMAIL PROTECTED]

Please research about the error message
premature end of script headers also.

It seems this could be Change Request.







[2002-05-01 03:19:16] [EMAIL PROTECTED]

I don't think this should be classified as a bogus bug. I ran into
the same issue when using resource limits in cgiwrap, sbox, and a
custom version of suexec that calls setrlimit(RLIMIT_AS, ...).

For some reason I can't determine, PHP refuses to parse POSTed CGI
parameters from STDIN when the RLIMIT_AS value is less than 40 MB (on
my machine), despite the fact that PHP itself never uses more than
about 8 MB. If I raise the RLIMIT_AS value above 40 MB, it works with
no trouble.

Perl CGI scripts do not have the same problem.

As with the previous poster, using PHP's built-in memory limit is not
an option for me -- I'm allowing customers to run their own PHP scripts
on shared servers, and the memory limit must be enforced at the OS
level to prevent users from running system calls, etc., that exceed the
limit. This issue is unfortunately preventing me from offering PHP to
several thousand customers.

I hope that this bug can be reopened and fixed. I have spent several
hours trying to figure out the cause of it in the hope that I could
send a patch, but alas, I can't see where the problem is.



[2002-01-28 18:22:49] [EMAIL PROTECTED]

I can't just use PHP Limit.. I need to be able to LIMIT the resources
on Memory for other things (Perl, FrontPage, and other cgi programs)




[2002-01-28 17:56:48] [EMAIL PROTECTED]

This cannot be implemented.
Use PHP memory limit.



[2002-01-28 14:45:33] [EMAIL PROTECTED]

I have php compiled as cgi and calling the php binary from apache via
AddHandler.
I have thousands of users on this box and I have RLimitMEM directives.
Using 4.0.6 and 4.1.1 I noticed if I have RLimitMEM defined, having a
form
POST to
the php binary, i get : premature end of script headers.

If I remark out the RLimitMEM entry in the VirtualHost directive, all
is
good?

Any work arounds?



Bug #16704 Updated: Screwed up handles while connection multiple DBs

2002-05-01 Thread derick

 ID:   16704
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: OCI8 related
 Operating System: Windows 2000
 PHP Version:  4.1.2
 New Comment:

Closing per user request.


Previous Comments:


[2002-05-01 13:36:11] [EMAIL PROTECTED]

This is not my day. I figured out that the bug is not in php but in my
code.

So sorry for the time I've wasted and please close the ticket.



[2002-05-01 13:01:36] [EMAIL PROTECTED]

Arggh, There was an error in my testscript. Gotta search on :(



[2002-05-01 12:59:25] [EMAIL PROTECTED]

x



[2002-05-01 12:50:20] [EMAIL PROTECTED]

I'm happy to report, that I've minimized the problem to one lil script
in order to demonstrate it easily.

I sent a description and the script to [EMAIL PROTECTED]
If someone else needs it - drop a message!



[2002-04-23 03:19:57] [EMAIL PROTECTED]

Hi,

I'll send you a nice testsript tomorrow (European Time).

cu



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/16704

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




Bug #16947 Updated: array issue in object

2002-05-01 Thread max

 ID:   16947
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: *General Issues
 Operating System: Solaris i think
 PHP Version:  4.1.2
 New Comment:

i am trying to set the object variables $violations and $keywords to be
$violation_arr and $keyword_arr respectively. the assignment itself
works however it assigns the last value in this case $keyword_arr to
both. if i invert the order of the assignments doing the $violation
assignment last then both are set to that value. 

i do not believe the problem has anything to do with my use of this-
because again a value is being assigned but it is assigning to more
than one variable. 

of additonal note it does not set any of the other variables
$filter_name, $allowed_number and $filter_word_file.


Previous Comments:


[2002-05-01 14:04:12] [EMAIL PROTECTED]

So what are you trying to do in those lines?

$this-$violations expands to $this-array(.).
You want to make assign several properties all at once?
Or is:
$this-violations=$arr_violations;

the code you're looking for? And if so, does that fix the bug?



[2002-05-01 12:22:44] [EMAIL PROTECTED]

i have created a class called filter. i have two variables in the class
which are arrays. i have an method named approve which sets the values
of both arrays. however the arrays both get set to the same value.

here is the relevant portion of the filter class code.

class Filter{

  var $filter_name = Basic Filter;
  var $allowed_number = 0;
  var $filter_word_file; // file name string
  var $violations; // array of strings of violating keywords
  var $keywords; // array of strings of keywords in content

  // Basic filter constructor.
  // Returns : nothing
  // Parameters :   $file_name File containing restricted words. 
  function Filter($file_name){
$this-filter_word_file=$file_name;
  }

  // Compares passed content to restricted file. Approved if unwanted
content falls
  // in range specified by $violation_count.
  // Returns :  true if approved
  //false if not approved
  // Parameters :   $content the content to test
  function approve($content){
$word_arr = file($this-filter_word_file);
$content_arr = split( ,$content);
$violation_count = 0;
$violation_arr;
$keyword_arr;
$run_once = true;
for($i=0;$icount($word_arr);$i++){
  for($j=0;$jcount($content_arr);$j++){
if(ereg(trim($word_arr[$i]),$content_arr[$j])){
  $violation_arr[$violation_count] = $content_arr[$j];
  $violation_count++;
}else{
  if((strlen($content_arr[$j])4) ($run_once == true)){
$keyword_arr[] = $content_arr[$j];
  }
}
  }
  $run_once = false;  
}
 //* THIS IS THE CODE THAT IS BUGGY **
$this-$violations = $violation_arr;
$this-$keywords = $keyword_arr;
 //* NOW HERE BOTH $keywords and $violations ARE SET TO THE VALUE
OF $keyword_arr *
if($violation_count$allowed_number){
  return false;
}
return true;  
  } 
  
  // Sets the number of allowed violations.
  // Return :   nothing
  // Parameters :   $number Amount of violations to allow.
  function setAllowedViolationNumber($number){
$this-$allowed_number = $number;  
  }

  // Returns an array of content violations.
  // Return :   array of strings
  // Parameters :   none
  function getViolatingContent(){
return $this-$violations;
  }
   
  // Returns an array of keywords for content.
  // Return :   array of strings
  // Parameters :   none
  function getKeywords(){
echo count($keywords);
return $this-$keywords;
  }

}

Anyway I can always re-produce this bug and I think there is something
seriously wrong here.







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




Bug #16948: include interprets commented php tags

2002-05-01 Thread steve

From: [EMAIL PROTECTED]
Operating system: WinNT 4, IRIX64 vega 6.5 07091
PHP version:  4.1.2
PHP Bug Type: *Compile Issues
Bug description:  include interprets commented php tags

I have a few PHP files that have a common header and footer which I pull in
using an include().  After our web host upgraded from 4.0.6 to 4.1.2 I
realized that include() was not working properly.

My included file had a section with PHP tags that was commented out,
like:

//?php
//echo hello;
//?
echo hello2;

  4.0.6 would ignore these, but 4.1.2 ignores that there is a comment
marker, and ends the PHP interpreter in the comment  line, sending the
'echo hello2;' and remaining code as TEXT to the browser.  I am not sure
if this qualifies as a bug but is definitely different that the behavior
of 4.0.6 which ignored all commented lines.

I have duplicated this on a Windows NT 4 server also.

-- 
Edit bug report at http://bugs.php.net/?id=16948edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16948r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16948r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16948r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16948r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16948r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16948r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16948r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16948r=submittedtwice




Bug #16948 Updated: include interprets commented php tags

2002-05-01 Thread derick

 ID:   16948
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
-Bug Type: *Compile Issues
+Bug Type: Scripting Engine problem
 Operating System: WinNT 4, IRIX64 vega 6.5 07091
 PHP Version:  4.1.2
 New Comment:

This is not a bug, see the manual:

http://www.php.net/manual/en/language.basic-syntax.comments.php

it says:
 The one-line comment styles actually only comment to the end of the
line or the current block of PHP code, whichever comes first.

and ? is the end of a php block, so it drops out of PHP mode there and
continues in HTML mode.

AFAIK this also worked like this in 4.0.6 (and always in 4.x).

Derick


Previous Comments:


[2002-05-01 14:53:47] [EMAIL PROTECTED]

I have a few PHP files that have a common header and footer which I
pull in using an include().  After our web host upgraded from 4.0.6 to
4.1.2 I realized that include() was not working properly.

My included file had a section with PHP tags that was commented out,
like:

//?php
//echo hello;
//?
echo hello2;

  4.0.6 would ignore these, but 4.1.2 ignores that there is a comment
marker, and ends the PHP interpreter in the comment  line, sending the
'echo hello2;' and remaining code as TEXT to the browser.  I am not
sure if this qualifies as a bug but is definitely different that the
behavior of 4.0.6 which ignored all commented lines.

I have duplicated this on a Windows NT 4 server also.





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




Bug #16947 Updated: array issue in object

2002-05-01 Thread msopacua

 ID:   16947
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: *General Issues
 Operating System: Solaris i think
 PHP Version:  4.1.2
 New Comment:

Looking at your code, your assigning $this-$violations which is very
different from $this-violations (NOTICE: the dollar sign AFTER the
arrow).

At the time of assignment, the $violations, is an empty var even. So
what would happen is that $this-=$arr_violations.

If that does anything usefull, it would probably be, something like:
foreach($violations as $key = $value)
{
   $this-$key=$value;
}

The object would then get property '0', '1','2' etc.

But that is more speculation than fact, because what you're trying to
do here is incorrect.

use:
$this-violations=$arr_violations;

then report back.


Previous Comments:


[2002-05-01 14:34:19] [EMAIL PROTECTED]

i am trying to set the object variables $violations and $keywords to be
$violation_arr and $keyword_arr respectively. the assignment itself
works however it assigns the last value in this case $keyword_arr to
both. if i invert the order of the assignments doing the $violation
assignment last then both are set to that value. 

i do not believe the problem has anything to do with my use of this-
because again a value is being assigned but it is assigning to more
than one variable. 

of additonal note it does not set any of the other variables
$filter_name, $allowed_number and $filter_word_file.



[2002-05-01 14:04:12] [EMAIL PROTECTED]

So what are you trying to do in those lines?

$this-$violations expands to $this-array(.).
You want to make assign several properties all at once?
Or is:
$this-violations=$arr_violations;

the code you're looking for? And if so, does that fix the bug?



[2002-05-01 12:22:44] [EMAIL PROTECTED]

i have created a class called filter. i have two variables in the class
which are arrays. i have an method named approve which sets the values
of both arrays. however the arrays both get set to the same value.

here is the relevant portion of the filter class code.

class Filter{

  var $filter_name = Basic Filter;
  var $allowed_number = 0;
  var $filter_word_file; // file name string
  var $violations; // array of strings of violating keywords
  var $keywords; // array of strings of keywords in content

  // Basic filter constructor.
  // Returns : nothing
  // Parameters :   $file_name File containing restricted words. 
  function Filter($file_name){
$this-filter_word_file=$file_name;
  }

  // Compares passed content to restricted file. Approved if unwanted
content falls
  // in range specified by $violation_count.
  // Returns :  true if approved
  //false if not approved
  // Parameters :   $content the content to test
  function approve($content){
$word_arr = file($this-filter_word_file);
$content_arr = split( ,$content);
$violation_count = 0;
$violation_arr;
$keyword_arr;
$run_once = true;
for($i=0;$icount($word_arr);$i++){
  for($j=0;$jcount($content_arr);$j++){
if(ereg(trim($word_arr[$i]),$content_arr[$j])){
  $violation_arr[$violation_count] = $content_arr[$j];
  $violation_count++;
}else{
  if((strlen($content_arr[$j])4) ($run_once == true)){
$keyword_arr[] = $content_arr[$j];
  }
}
  }
  $run_once = false;  
}
 //* THIS IS THE CODE THAT IS BUGGY **
$this-$violations = $violation_arr;
$this-$keywords = $keyword_arr;
 //* NOW HERE BOTH $keywords and $violations ARE SET TO THE VALUE
OF $keyword_arr *
if($violation_count$allowed_number){
  return false;
}
return true;  
  } 
  
  // Sets the number of allowed violations.
  // Return :   nothing
  // Parameters :   $number Amount of violations to allow.
  function setAllowedViolationNumber($number){
$this-$allowed_number = $number;  
  }

  // Returns an array of content violations.
  // Return :   array of strings
  // Parameters :   none
  function getViolatingContent(){
return $this-$violations;
  }
   
  // Returns an array of keywords for content.
  // Return :   array of strings
  // Parameters :   none
  function getKeywords(){
echo count($keywords);
return $this-$keywords;
  }

}

Anyway I can always re-produce this bug and I think there is something
seriously wrong here.







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




Bug #16947 Updated: array issue in object

2002-05-01 Thread max

 ID:   16947
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: *General Issues
 Operating System: Solaris i think
 PHP Version:  4.1.2
 New Comment:

three test results...

test case html
html
head
titleFilter Test/title
/head
body bgcolor=#ff
?php
$input_to_test = Here are some words. here is a naughty words. Some
final ending content.;
require(includes/old_filter.php);
$my_filter = new Filter(word_files/basicwords.txt);
$my_filter - approve($input_to_test);
$v = $my_filter -getViolatingContent();
echo H4Violating/H4;
for($i=0;$icount($v);$i++){
  printf(%sbr,$v[$i]);
}
echo h4Keywords/h4;
$keywords = $my_filter -getKeywords($input_to_test);
for($i=0;$icount($keywords);$i++){
  printf(%sbr,$keywords[$i]);
}
?
/body
/html


TEST #1
 changing code as you suggested -

$this-violations = $violation_arr;
$this-keywords = $keyword_arr;

produces the following output

Violating
Keywords
0 

TEST #2
 my posted code-

$this-$violations = $violation_arr;
$this-$keywords = $keyword_arr;

produces the following output

Violating
words.
naughty
words.
final
ending
content.

Keywords
0words.
naughty
words.
final
ending
content.

TEST #3
 using my code but inverting the two assignment statements-

$this-$keywords = $keyword_arr;
$this-$violations = $violation_arr;

produces the following output

Violating
naughty

Keywords
0naughty

again i remain pretty convinced this is some sort of bug...


Previous Comments:


[2002-05-01 15:03:25] [EMAIL PROTECTED]

Looking at your code, your assigning $this-$violations which is very
different from $this-violations (NOTICE: the dollar sign AFTER the
arrow).

At the time of assignment, the $violations, is an empty var even. So
what would happen is that $this-=$arr_violations.

If that does anything usefull, it would probably be, something like:
foreach($violations as $key = $value)
{
   $this-$key=$value;
}

The object would then get property '0', '1','2' etc.

But that is more speculation than fact, because what you're trying to
do here is incorrect.

use:
$this-violations=$arr_violations;

then report back.



[2002-05-01 14:34:19] [EMAIL PROTECTED]

i am trying to set the object variables $violations and $keywords to be
$violation_arr and $keyword_arr respectively. the assignment itself
works however it assigns the last value in this case $keyword_arr to
both. if i invert the order of the assignments doing the $violation
assignment last then both are set to that value. 

i do not believe the problem has anything to do with my use of this-
because again a value is being assigned but it is assigning to more
than one variable. 

of additonal note it does not set any of the other variables
$filter_name, $allowed_number and $filter_word_file.



[2002-05-01 14:04:12] [EMAIL PROTECTED]

So what are you trying to do in those lines?

$this-$violations expands to $this-array(.).
You want to make assign several properties all at once?
Or is:
$this-violations=$arr_violations;

the code you're looking for? And if so, does that fix the bug?



[2002-05-01 12:22:44] [EMAIL PROTECTED]

i have created a class called filter. i have two variables in the class
which are arrays. i have an method named approve which sets the values
of both arrays. however the arrays both get set to the same value.

here is the relevant portion of the filter class code.

class Filter{

  var $filter_name = Basic Filter;
  var $allowed_number = 0;
  var $filter_word_file; // file name string
  var $violations; // array of strings of violating keywords
  var $keywords; // array of strings of keywords in content

  // Basic filter constructor.
  // Returns : nothing
  // Parameters :   $file_name File containing restricted words. 
  function Filter($file_name){
$this-filter_word_file=$file_name;
  }

  // Compares passed content to restricted file. Approved if unwanted
content falls
  // in range specified by $violation_count.
  // Returns :  true if approved
  //false if not approved
  // Parameters :   $content the content to test
  function approve($content){
$word_arr = file($this-filter_word_file);
$content_arr = split( ,$content);
$violation_count = 0;
$violation_arr;
$keyword_arr;
$run_once = true;
for($i=0;$icount($word_arr);$i++){
  for($j=0;$jcount($content_arr);$j++){
if(ereg(trim($word_arr[$i]),$content_arr[$j])){
  $violation_arr[$violation_count] = $content_arr[$j];

Bug #16947 Updated: array issue in object

2002-05-01 Thread max

 ID:   16947
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: *General Issues
-Operating System: Solaris i think
+Operating System: SunOS 5.8 Generic_108528-
 PHP Version:  4.1.2
 New Comment:

checked the os with phpinfo()


Previous Comments:


[2002-05-01 15:24:17] [EMAIL PROTECTED]

three test results...

test case html
html
head
titleFilter Test/title
/head
body bgcolor=#ff
?php
$input_to_test = Here are some words. here is a naughty words. Some
final ending content.;
require(includes/old_filter.php);
$my_filter = new Filter(word_files/basicwords.txt);
$my_filter - approve($input_to_test);
$v = $my_filter -getViolatingContent();
echo H4Violating/H4;
for($i=0;$icount($v);$i++){
  printf(%sbr,$v[$i]);
}
echo h4Keywords/h4;
$keywords = $my_filter -getKeywords($input_to_test);
for($i=0;$icount($keywords);$i++){
  printf(%sbr,$keywords[$i]);
}
?
/body
/html


TEST #1
 changing code as you suggested -

$this-violations = $violation_arr;
$this-keywords = $keyword_arr;

produces the following output

Violating
Keywords
0 

TEST #2
 my posted code-

$this-$violations = $violation_arr;
$this-$keywords = $keyword_arr;

produces the following output

Violating
words.
naughty
words.
final
ending
content.

Keywords
0words.
naughty
words.
final
ending
content.

TEST #3
 using my code but inverting the two assignment statements-

$this-$keywords = $keyword_arr;
$this-$violations = $violation_arr;

produces the following output

Violating
naughty

Keywords
0naughty

again i remain pretty convinced this is some sort of bug...



[2002-05-01 15:03:25] [EMAIL PROTECTED]

Looking at your code, your assigning $this-$violations which is very
different from $this-violations (NOTICE: the dollar sign AFTER the
arrow).

At the time of assignment, the $violations, is an empty var even. So
what would happen is that $this-=$arr_violations.

If that does anything usefull, it would probably be, something like:
foreach($violations as $key = $value)
{
   $this-$key=$value;
}

The object would then get property '0', '1','2' etc.

But that is more speculation than fact, because what you're trying to
do here is incorrect.

use:
$this-violations=$arr_violations;

then report back.



[2002-05-01 14:34:19] [EMAIL PROTECTED]

i am trying to set the object variables $violations and $keywords to be
$violation_arr and $keyword_arr respectively. the assignment itself
works however it assigns the last value in this case $keyword_arr to
both. if i invert the order of the assignments doing the $violation
assignment last then both are set to that value. 

i do not believe the problem has anything to do with my use of this-
because again a value is being assigned but it is assigning to more
than one variable. 

of additonal note it does not set any of the other variables
$filter_name, $allowed_number and $filter_word_file.



[2002-05-01 14:04:12] [EMAIL PROTECTED]

So what are you trying to do in those lines?

$this-$violations expands to $this-array(.).
You want to make assign several properties all at once?
Or is:
$this-violations=$arr_violations;

the code you're looking for? And if so, does that fix the bug?



[2002-05-01 12:22:44] [EMAIL PROTECTED]

i have created a class called filter. i have two variables in the class
which are arrays. i have an method named approve which sets the values
of both arrays. however the arrays both get set to the same value.

here is the relevant portion of the filter class code.

class Filter{

  var $filter_name = Basic Filter;
  var $allowed_number = 0;
  var $filter_word_file; // file name string
  var $violations; // array of strings of violating keywords
  var $keywords; // array of strings of keywords in content

  // Basic filter constructor.
  // Returns : nothing
  // Parameters :   $file_name File containing restricted words. 
  function Filter($file_name){
$this-filter_word_file=$file_name;
  }

  // Compares passed content to restricted file. Approved if unwanted
content falls
  // in range specified by $violation_count.
  // Returns :  true if approved
  //false if not approved
  // Parameters :   $content the content to test
  function approve($content){
$word_arr = file($this-filter_word_file);
$content_arr = split( ,$content);
$violation_count = 0;
$violation_arr;
$keyword_arr;
$run_once = true;

Bug #16949: mysql_query SELECT returns Resource ID

2002-05-01 Thread Vipervirus

From: [EMAIL PROTECTED]
Operating system: ?
PHP version:  4.1.2
PHP Bug Type: *General Issues
Bug description:  mysql_query SELECT returns Resource ID

I've been trying for a week now to fix this, finally gave up on it:

$sql = mysql_query(SELECT pass FROM users WHERE name = '$user');
echo $sql[pass] . br;

when ran, $sql = Resource ID #2 instead of the actual value, I couldn't
get any help from #php on irc.gamesnet.net  
-- 
Edit bug report at http://bugs.php.net/?id=16949edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16949r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16949r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16949r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16949r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16949r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16949r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16949r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16949r=submittedtwice




Bug #16949 Updated: mysql_query SELECT returns Resource ID

2002-05-01 Thread derick

 ID:   16949
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: ?
 PHP Version:  4.1.2
 New Comment:

The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php


Previous Comments:


[2002-05-01 16:23:24] [EMAIL PROTECTED]

I've been trying for a week now to fix this, finally gave up on it:

$sql = mysql_query(SELECT pass FROM users WHERE name = '$user');
echo $sql . br;

when ran, $sql = Resource ID #2 instead of the actual value, I
couldn't
get any help from #php on irc.gamesnet.net



[2002-05-01 16:22:30] [EMAIL PROTECTED]

I've been trying for a week now to fix this, finally gave up on it:

$sql = mysql_query(SELECT pass FROM users WHERE name = '$user');
echo $sql[pass] . br;

when ran, $sql = Resource ID #2 instead of the actual value, I couldn't
get any help from #php on irc.gamesnet.net  




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




Bug #16941 Updated: The php4ts.lib is missing

2002-05-01 Thread utirpan

 ID:   16941
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: *General Issues
 Operating System: Win98
 PHP Version:  4.2.0
 New Comment:

I need php4ts.lib to recompile sybase_ct.dll. But it is missing in this
version.


Previous Comments:


[2002-05-01 06:54:13] [EMAIL PROTECTED]

You're supposed to copy php4ts.dll (not .lib) to your win/system dir.
If the documentation states somewhere that you should copy php4ts.lib,
please reopen this bug report.



[2002-05-01 05:27:09] [EMAIL PROTECTED]

I downloaded the php version 4.2.0 and wanted to copy the php4ts.lib
into win/system. Then i searched for it but i dindt found...




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




Bug #16950: socket_fd_*() functions

2002-05-01 Thread daveletourneau

From: [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:  4.2.0
PHP Bug Type: Sockets related
Bug description:  socket_fd_*() functions

I'm trying to develop a multi-client socket server and this requires using
some trick to manage all the client sockets at one time...

I am on Win2k so all the functions to fork in the program are not
available.  I decided to use the socket_select() way that needs calls to
socket_fd_*() functions but these do not seem to exist : Call to
undefined function:  socket_fd_alloc().  Apparently, all other socket
functions ARE available...  is this a bug or the win32 socket library just
doesn't contain these functions?  If you have any alternatives, it would
be very great...
-- 
Edit bug report at http://bugs.php.net/?id=16950edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16950r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16950r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16950r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16950r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16950r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16950r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16950r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16950r=submittedtwice




Bug #16949 Updated: mysql_query SELECT returns Resource ID

2002-05-01 Thread daniel

 ID:   16949
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: *General Issues
 Operating System: ?
 PHP Version:  4.1.2
 New Comment:

I give some help anyway. 

Vipervirus, mysql_query returns the connection id. You must use
mysql_fetch_array() to get the values. Please have a look at the
example provided in the manual:

  http://www.php.net/manual/en/ref.mysql.php

or

  http://www.php.net/manual/en/function.mysql-fetch-array.php

which has some shorter examples. good luck.

Next time please consult the PHP General mailinglist:

  http://www.php.net/support.php



Previous Comments:


[2002-05-01 16:23:26] [EMAIL PROTECTED]

The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php



[2002-05-01 16:23:24] [EMAIL PROTECTED]

I've been trying for a week now to fix this, finally gave up on it:

$sql = mysql_query(SELECT pass FROM users WHERE name = '$user');
echo $sql . br;

when ran, $sql = Resource ID #2 instead of the actual value, I
couldn't
get any help from #php on irc.gamesnet.net



[2002-05-01 16:22:30] [EMAIL PROTECTED]

I've been trying for a week now to fix this, finally gave up on it:

$sql = mysql_query(SELECT pass FROM users WHERE name = '$user');
echo $sql[pass] . br;

when ran, $sql = Resource ID #2 instead of the actual value, I couldn't
get any help from #php on irc.gamesnet.net  




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




Bug #16951: php4ts.lib is missing

2002-05-01 Thread utirpan

From: [EMAIL PROTECTED]
Operating system: WinNT
PHP version:  4.2.0
PHP Bug Type: *Compile Issues
Bug description:  php4ts.lib is missing

I need php4ts.lib to recompile sybase_ct.dll, it is missing in this
version.

-- 
Edit bug report at http://bugs.php.net/?id=16951edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16951r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16951r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16951r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16951r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16951r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16951r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16951r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16951r=submittedtwice




Bug #16950 Updated: socket_fd_*() functions

2002-05-01 Thread mfischer

 ID:   16950
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Sockets related
 Operating System: Windows 2000
 PHP Version:  4.2.0
 New Comment:

They have been removed. socket_select(), for which is the only call you
actually would need those sets, simply accepts arrays of sockets and
will manipulate them so the array will only contain the changed sockets
afterwards. Wait a few days until the documentation for
http://php.net/socket_select shows up.


Previous Comments:


[2002-05-01 16:31:59] [EMAIL PROTECTED]

I'm trying to develop a multi-client socket server and this requires
using some trick to manage all the client sockets at one time...

I am on Win2k so all the functions to fork in the program are not
available.  I decided to use the socket_select() way that needs calls
to socket_fd_*() functions but these do not seem to exist : Call to
undefined function:  socket_fd_alloc().  Apparently, all other socket
functions ARE available...  is this a bug or the win32 socket library
just doesn't contain these functions?  If you have any alternatives, it
would be very great...




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




Bug #16954: Scope loss when using layered/arrayed objects.

2002-05-01 Thread fhirsch

From: [EMAIL PROTECTED]
Operating system: Linux 2.4
PHP version:  4.2.0
PHP Bug Type: Class/Object related
Bug description:  Scope loss when using layered/arrayed objects.

I am having difficulty writing a test case for this problem, as it is
somewhat complex. Here is the scenario:

I have an object that contains an array of data. Some array elements may
be scalar, some arrays and some objects. The object of the array contains
in itself another array of objects (containing core data) and accessor
methods to act on the data objects. My script uses the following
methodology on this object:

$var = PHP Rules;
$test = ;
while ($mydata = $obj-arrayname[object_key]-fields) {
  // Do some work
  $test = HERE I AM!;
  $var .= $mydata[xyz] . MODIFIED;
  $obj-arrayname[object_key]-MoveNext();
}
print $var$test;

I might get concerned here that my object layering is too deep. However,
the key issue here is that $var and for that matter ANY variable used or
modified inside the while loop does not carry its changes outside. This
means the print statement outputs PHP Rules only. Adding prints inside
the while loop outputs fine. I will try to find a workaround for now.

Thanks for your help,
Fred


-- 
Edit bug report at http://bugs.php.net/?id=16954edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16954r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16954r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16954r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16954r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16954r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16954r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16954r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16954r=submittedtwice




Bug #16955: 0 == NULL, but only sometimes! :)

2002-05-01 Thread claudio . frizziero

From: [EMAIL PROTECTED]
Operating system: Red Hat 6.2
PHP version:  4.2.0
PHP Bug Type: Scripting Engine problem
Bug description:  0 == NULL, but only sometimes! :)

Hello!
i might have found a problem dealing with 0 and NULL values while using a
recursive function in a class that i have created.

I have found some bugs related to this problem in the php-bugs database
about 0 and NULL, but the problem i have found goes more into depth:
i've noticed that 0 == NULL only if the value 0 only if the value 0
comes from the array passed to the recurvise function. i try to explain
with an example:

$temp = $a[$p];

if ($temp == ) {
 if ($temp == 0) {
  echo (impossible);
 }
}

it happens that the output will be impossible.

instead, if i set $temp = 0 or NULL before the IF structures, i won't
get the output impossible:

$temp = $a[$p];

$temp = 0;
   // or  $temp = NULL;
   // or without declaring at all the variable $temp

if ($temp == ) {
 if ($temp == 0) {
  echo (Impossible);
 }
}



$a is an array which can be modified or not by the recursive function, and
is then passed as a parameter to the function itself

I have tested it both with version 4.0.5 and 4.2.0

If you would like to receive more details about this, i will be glad to
send you the complete source code. i have tried to reduce the lenght of
the code, anyway it's still too long to write here. if you are interested,
i could send you all the code by email or i could give you an account to
access my server and work by ftp/http

best regards,
and thank you for developing PHP :)
Claudo Frizziero

---

configure line:

configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs
--with-jpeg-dir=/usr/local/bin --with-gd=/usr/ --enable-ftp

-- 
Edit bug report at http://bugs.php.net/?id=16955edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16955r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16955r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16955r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16955r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16955r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16955r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16955r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16955r=submittedtwice




Bug #16923 Updated: mysql_fetch_object returning incomplete data

2002-05-01 Thread mark

 ID:   16923
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: MySQL related
 Operating System: slackware 8.0 (modified)
 PHP Version:  4.2.0
 New Comment:

I finally tracked this down... it was a bad sql call on my 
part (sort of) and a change in behaviour in 
mysql_fetch_object

I did a call like select * from products left join details 
on products.prodId=details.prodId

which returns 2 different prodId (one from each 
table)because of the join and the fact the details 
doesn't always include prodId (i.e. if there is not a 
matching join) the second prodId was NULL

in php 4.0.4pl1 mysql_fetch_object still set a valid prodId 
for everything ( I am assuming it ignored the NULL 
value)...in php 4.0.6 and newer it sets it to the last 
value it got for prodId (again assuming) which is sometimes 
NULL, sometimes a good value

not sure whether this should be a bug or not.  Anyone?

Mark


Previous Comments:


[2002-04-30 01:28:59] [EMAIL PROTECTED]

This was found in an ongoing project I am upgrading from php 4.0.4pl1

code sample:

$sql='select prodId, prodNum from products';
$result = mysql_query($sql);

do {
print_r($product);
print $product-prodId . . $product-prodNum
} while ($product = mysql_fetch_object($result));

print_r ($product) returns:
stdClass Object ( [prodId] = [prodNum] = E-U-00-002)
stdClass Object ( [prodId] = [prodNum] = E-U-00-003)
stdClass Object ( [prodId] = [prodNum] = E-U-00-004)

the real data would be prodId = 1, prodId = 2

the same thing done with mysql_fetch_array works perfectly (exact same
sql, etc) 

I tried various loops (do..while, if, while) no changes.

Tested this with php 4.1.2 and 4.2.0 w/ same errors.  Works fine on
4.0.4pl1.

php configure options as follows:

'./configure' \
'--with-mysql=/usr/local' \
'--enable-track-vars' \
'--with-dbase' \
'--with-gd=/usr/local/gd-1.8.4' \
'--with-ttf' \
'--with-t1lib' \
'--with-jpeg-dir' \
'--with-png-dir' \
'--with-tiff-dir' \
'--with-apxs=/usr/local/apache/bin/apxs' \
'--with-config-file-path=/usr/local/apache/conf' \
'--with-pdflib' \
'--enable-ftp' \
'--with-zlib-dir' 

I am unable to provide a backtrace (production server, sorry)





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




Bug #16956: Debug symbols enabled by default in build

2002-05-01 Thread roshan_naik

From: [EMAIL PROTECTED]
Operating system: HPUX 11.20
PHP version:  4.1.2
PHP Bug Type: *Compile Issues
Bug description:  Debug symbols enabled by default in build

The -g option is passed by default to the compiler even if --enable-debug
is NOT used. Using --disable-debug is of no help[ either.

Compiling PHP against Apache 2.0. as follows

./configure --with-apxs2=/opt/apache2/bin/apxs \
--prefix=/opt/apache2/php
make

When performing make , every compilation command has -g
The following doesnt help either.

./configure --with-apxs2=/opt/apache2/bin/apxs \
--prefix=/opt/apache2/php  \
--diable-debug
make
-- 
Edit bug report at http://bugs.php.net/?id=16956edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16956r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16956r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16956r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16956r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16956r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16956r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16956r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16956r=submittedtwice




Bug #16923 Updated: mysql_fetch_object returning incomplete data

2002-05-01 Thread mark

 ID:   16923
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: slackware 8.0 (modified)
 PHP Version:  4.2.0
 New Comment:

Can someone check to see if this needs attention or not?


Previous Comments:


[2002-05-01 17:21:05] [EMAIL PROTECTED]

I finally tracked this down... it was a bad sql call on my 
part (sort of) and a change in behaviour in 
mysql_fetch_object

I did a call like select * from products left join details 
on products.prodId=details.prodId

which returns 2 different prodId (one from each 
table)because of the join and the fact the details 
doesn't always include prodId (i.e. if there is not a 
matching join) the second prodId was NULL

in php 4.0.4pl1 mysql_fetch_object still set a valid prodId 
for everything ( I am assuming it ignored the NULL 
value)...in php 4.0.6 and newer it sets it to the last 
value it got for prodId (again assuming) which is sometimes 
NULL, sometimes a good value

not sure whether this should be a bug or not.  Anyone?

Mark



[2002-04-30 01:28:59] [EMAIL PROTECTED]

This was found in an ongoing project I am upgrading from php 4.0.4pl1

code sample:

$sql='select prodId, prodNum from products';
$result = mysql_query($sql);

do {
print_r($product);
print $product-prodId . . $product-prodNum
} while ($product = mysql_fetch_object($result));

print_r ($product) returns:
stdClass Object ( [prodId] = [prodNum] = E-U-00-002)
stdClass Object ( [prodId] = [prodNum] = E-U-00-003)
stdClass Object ( [prodId] = [prodNum] = E-U-00-004)

the real data would be prodId = 1, prodId = 2

the same thing done with mysql_fetch_array works perfectly (exact same
sql, etc) 

I tried various loops (do..while, if, while) no changes.

Tested this with php 4.1.2 and 4.2.0 w/ same errors.  Works fine on
4.0.4pl1.

php configure options as follows:

'./configure' \
'--with-mysql=/usr/local' \
'--enable-track-vars' \
'--with-dbase' \
'--with-gd=/usr/local/gd-1.8.4' \
'--with-ttf' \
'--with-t1lib' \
'--with-jpeg-dir' \
'--with-png-dir' \
'--with-tiff-dir' \
'--with-apxs=/usr/local/apache/bin/apxs' \
'--with-config-file-path=/usr/local/apache/conf' \
'--with-pdflib' \
'--enable-ftp' \
'--with-zlib-dir' 

I am unable to provide a backtrace (production server, sorry)





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




Bug #16949 Updated: mysql_query SELECT returns Resource ID

2002-05-01 Thread Vipervirus

 ID:   16949
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: *General Issues
 Operating System: ?
 PHP Version:  4.1.2
 New Comment:

I didn't post here intending to ask for help, I was posting a bug
because 

$sql = mysql_query(SELECT * FROM users); works just fine

but $sql = mysql_eury(SELECT * FROM users WHERE name = '$user');
doesn't work

I've tried this on completely diff servers and got the same result


Previous Comments:


[2002-05-01 16:37:57] [EMAIL PROTECTED]

I give some help anyway. 

Vipervirus, mysql_query returns the connection id. You must use
mysql_fetch_array() to get the values. Please have a look at the
example provided in the manual:

  http://www.php.net/manual/en/ref.mysql.php

or

  http://www.php.net/manual/en/function.mysql-fetch-array.php

which has some shorter examples. good luck.

Next time please consult the PHP General mailinglist:

  http://www.php.net/support.php




[2002-05-01 16:23:26] [EMAIL PROTECTED]

The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php



[2002-05-01 16:23:24] [EMAIL PROTECTED]

I've been trying for a week now to fix this, finally gave up on it:

$sql = mysql_query(SELECT pass FROM users WHERE name = '$user');
echo $sql . br;

when ran, $sql = Resource ID #2 instead of the actual value, I
couldn't
get any help from #php on irc.gamesnet.net



[2002-05-01 16:22:30] [EMAIL PROTECTED]

I've been trying for a week now to fix this, finally gave up on it:

$sql = mysql_query(SELECT pass FROM users WHERE name = '$user');
echo $sql[pass] . br;

when ran, $sql = Resource ID #2 instead of the actual value, I couldn't
get any help from #php on irc.gamesnet.net  




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




Bug #16848 Updated: POST vars not in $_REQUEST[]

2002-05-01 Thread sthomas

 ID:   16848
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: Variables related
 Operating System: Linux
 PHP Version:  4.2.0
 New Comment:

This error only occurs on multipart/form-data forms
that submit array containers and contain at least one
file-upload field, and occurs whether a file is
uploaded or not.  It appears as if PHP ignores the array
name, and uses it as a straight variable name,
overwriting everything that used that array name.

Note that $_POST is not affected by this bug.  Only
$_REQUEST.  The field marked as a file upload will not
appear in $_POST, but I'm not sure that's a bug.

Here is a sample script:

-- CUT HERE --
form action=?PHP print $_SERVER['REQUEST_URI']; ?
  method=post enctype=multipart/form-data
input type=text name=TEST[stuff]BR
input type=text name=TEST[moo]BR
input type=file name=TEST[uploadme]BR
input type=submit value=Test
/form

?PHP
var_dump($_REQUEST);
var_dump($_POST);
?
-- CUT HERE --


Previous Comments:


[2002-04-26 14:04:59] [EMAIL PROTECTED]

Can you please add a short and simple script which can be
used to reproduce this?




[2002-04-26 09:31:05] [EMAIL PROTECTED]

safe_mode   =   Off
Setting:

variables_order =   EGPCS 
register_globals=   On  
post_max_size   =   8M  
gpc_order   =   GPC   
magic_quotes_gpc=   On  


p.s.: I am on vacation and will be back at 6 march for further
questions



[2002-04-26 08:42:07] [EMAIL PROTECTED]

What is the POST/GET related ini setting?



[2002-04-26 07:34:56] [EMAIL PROTECTED]

With PHP 4.1.2 the post vars from a form are found in $_REQUEST[], but
with 4.2.0 only get vars seem to be there.
(same php.ini file for both versions used).





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




Bug #16955 Updated: 0 == NULL, but only sometimes! :)

2002-05-01 Thread claudio . frizziero

 ID:   16955
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Red Hat 6.2
 PHP Version:  4.2.0
 New Comment:

I find the problem:

$temp = 0; // is not // $temp = 0;

Sorry :)

However, I'd like to have 0  NULL in the future :) Don't you think?


Previous Comments:


[2002-05-01 17:20:37] [EMAIL PROTECTED]

Hello!
i might have found a problem dealing with 0 and NULL values while using
a recursive function in a class that i have created.

I have found some bugs related to this problem in the php-bugs database
about 0 and NULL, but the problem i have found goes more into
depth: i've noticed that 0 == NULL only if the value 0 only if the
value 0 comes from the array passed to the recurvise function. i try
to explain with an example:

$temp = $a[$p];

if ($temp == ) {
 if ($temp == 0) {
  echo (impossible);
 }
}

it happens that the output will be impossible.

instead, if i set $temp = 0 or NULL before the IF structures, i won't
get the output impossible:

$temp = $a[$p];

$temp = 0;
   // or  $temp = NULL;
   // or without declaring at all the variable $temp

if ($temp == ) {
 if ($temp == 0) {
  echo (Impossible);
 }
}



$a is an array which can be modified or not by the recursive function,
and is then passed as a parameter to the function itself

I have tested it both with version 4.0.5 and 4.2.0

If you would like to receive more details about this, i will be glad to
send you the complete source code. i have tried to reduce the lenght of
the code, anyway it's still too long to write here. if you are
interested, i could send you all the code by email or i could give you
an account to access my server and work by ftp/http

best regards,
and thank you for developing PHP :)
Claudo Frizziero

---

configure line:

configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs
--with-jpeg-dir=/usr/local/bin --with-gd=/usr/ --enable-ftp





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




Bug #15702 Updated: Segmentation fault (using jdk1.4 with php 4.1.1) libphp_java.so not created

2002-05-01 Thread sukhruprai

 ID:   15702
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Java related
 Operating System: Red Hat Linux 7.1
 PHP Version:  4.1.1
 New Comment:

I tried --with-java this time with php-4.2.0 and apache/2.0.35 (Unix) 
mod_ssl/2.0.35 OpenSSL/0.9.6 DAV/2 but instead of producing errors this
time when sample file php jver.php is accessed page returned contains
only single line HTML and response is http 1.1 ok. Other
configuration were same as before.

--
CONFIGURE
--
 ./configure --with-apxs2=/wwwroot/bin/apxs --prefix=/wwwroot/php 
--with-config-file-path=/wwwroot/php --enable-bcmath --enable-calendar

--enable-dbase --enable-dbx --enable-dio --enable-exif --enable-filepro

--enable-ftp --enable-gd-native-ttf --enable-mbstring 
--enable-mbstr-enc-trans --enable--mbregex --enable-overload 
--enable-shmop --enable-ucd-snmp-hack --enable-sockets
--enable-aggregate 
--enable-sysvsem --enable-sysvshm --enable-tokenizer --enable-wddx 
--enable-xslt --enable-yp --enable-versioning --with-mod-charset 
--with-openssl --with-zlib-dir --with-zlib --with-bz2 --with-cpdflib 
--with-jpeg-dir --with-tiff-dir --with-curl --with-db --with-db3 
--with-dom --with-dom-xslt --with-dom-exslt --with-gd --with-png-dir 
--with-xpm-dir --with-freetype-dir --with-ttf --with-t1lib
--with-gettext 
--with-gmp --with-hyperwave --with-imap --with-kerberos --with-imap-ssl

--with-ircg --with-ircg-config=/usr/local/bin/ircg-config --with-java 
--with-ldap --with-mcal=/usr/src/libmcal --with-mcrypt --with-mhash 
--with-ming --with-mnogosearch=/usr/local/mnogosearch --with-mysql 
--with-pdflib --with-pgsql --with-pspell --with-qtdom --with-snmp 
--with-regex=php --with-xmlrpc --with-xslt-sablot --with-sablot-js 
--with-yaz=/usr/local/lib --with-zip --with-iconv --enable-track-vars 
--enable-trans-sid --enable-debug

No error nothing is displayed. I have enabled php error logging also.
But 
no error message added to this file.
When I used gdb then only I was able to know that it was unable to find

libjvm.so

(gdb)
(gdb) run -X
Starting program: /wwwroot/bin/httpd -X
[New Thread 1024 (LWP 788)]
Error occurred during initialization of VM
Unable to load native library: libjvm.so: cannot load shared object
file: 
No such file or directory

After I exported these java libraries path and again ran gdb response
returned was http 1.1 ok But gdb produced this:

(gdb) run -X
Starting program: /wwwroot/bin/httpd -X
[New Thread 1024 (LWP 842)]
[New Thread 2049 (LWP 848)]
Delayed SIGSTOP caught for LWP 848.
[New Thread 1026 (LWP 849)]
Delayed SIGSTOP caught for LWP 849.
[New Thread 2051 (LWP 850)]
Delayed SIGSTOP caught for LWP 850.
[New Thread 3076 (LWP 851)]
Delayed SIGSTOP caught for LWP 851.
[New Thread 4101 (LWP 852)]
[New Thread 5126 (LWP 853)]
Delayed SIGSTOP caught for LWP 853.
[New Thread 6151 (LWP 854)]
Delayed SIGSTOP caught for LWP 854.
[New Thread 7176 (LWP 855)]
Delayed SIGSTOP caught for LWP 855.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 7176 (LWP 855)]
__pthread_mutex_lock (mutex=0x400040e) at mutex.c:99
99  mutex.c: No such file or directory.
in mutex.c

--
BACKTRACE
--

(gdb) bt
#0  __pthread_mutex_lock (mutex=0x400040e) at mutex.c:99
#1  0x403d17ac in __libc_free (mem=0x40479490) at malloc.c:3052
#2  0x409063aa in Arena::dispose (this=0x8313220) at arena.cpp:67
#3  0x409063f8 in Arena::~Arena (this=0x8313220, __in_chrg=3) at 
arena.cpp:79
#4  0x41a36a87 in ciEnv::~ciEnv ()
   from /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#5  0x41a4bea5 in CompileBroker::invoke_compiler_on_method ()
   from /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#6  0x41a4b9c8 in CompileBroker::compiler_thread_loop ()
   from /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#7  0x41a1997a in compiler_thread_entry ()
   from /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#8  0x41a162fb in JavaThread::thread_main_inner ()
   from /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#9  0x41a162a6 in JavaThread::run ()
   from /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#10 0x419dd799 in _start ()
   from /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#11 0x40346078 in pthread_start_thread_event (arg=0xbebffc00) at 
manager.c:262


Previous Comments:


[2002-03-08 14:48:46] [EMAIL PROTECTED]

I have generated backtrace this time which showed that problem was
related 
to mutex.c. I used Apache 2.0 because there was also a problem in swf.c
which 
resulted in segmentation fault when using Apache 2 only not Apache
1.3.

After I removed --with-swf from configure Apache and php worked fine. I

have also submitted that bug report.

Then I decided to find the source of segmentation fault caused by Java

Bug #16807 Updated: Sessions not working

2002-05-01 Thread chris

 ID:   16807
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Session related
 Operating System: Windows 2000 SP2
 PHP Version:  4.2.0
 New Comment:

I'm having a similar issue - every since switching to PHP 4.2 I've got
sh#tloads of viewers reporting login problems to our forums
(vBulletin), they keep getting prompted to login.  Weird part is it's
not everyone, I and others have no problems at all.  Reverting back to
PHP 4.1.x solves it, upgrading to PHP 4.2 brings it back.

register_globals is ON


Previous Comments:


[2002-04-30 16:45:24] [EMAIL PROTECTED]

The 'solution' above is not valid for this case.

PHP should not generate the 'headers already sent' message at all in
this case.



[2002-04-30 14:27:10] [EMAIL PROTECTED]

Can someone please fix this, since it is not a configuration problem.



[2002-04-30 05:29:02] [EMAIL PROTECTED]

Found solution here:
http://bugs.php.net/bug.php?id=16839
Thx

Renato



[2002-04-30 04:48:41] [EMAIL PROTECTED]

I'v got the same problem here.
Same configuration W2K SP2 IIS5 same recomended php.ini file.

When a script calls for:
session_start or setcookie  
like Jelsoft vBulletin nothing happen.
The same things for all my scripts.



[2002-04-25 04:00:49] [EMAIL PROTECTED]

My ini file is the php.ini-recommended

The session stuff is:
session.save_handler = files
session.save_path = c:\winnt\temp  (tried c:/winnt/temp too)
session.use.cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session_cookie_domain =
session.serialize_handler = php
session_gc_probability = 1
session.gc_maxfiletime = 1440
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 1

output_buffering = 4096
output_handler =

zlib.output_compression = Off

auto_prepend_file = 
auto_append_file =

I hope this is enough info. As I say, it is the recommended ini file
with a few minor changes.



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/16807

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




Bug #14594 Updated: Failed to compile/run when using Apache 2.x, unresolved symbols

2002-05-01 Thread erkan . boga

 ID:   14594
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Apache2 related
 Operating System: FreeBSD 4.4-STABLE
 PHP Version:  4.1.0
 New Comment:

I am using FreeBSD 4.5, Apache 2.0.35, GNU Pth 1.4.1 and PHP 4.2

I still get the error 
Cannot load /prog/httpd/modules/libphp4.so into server:
/prog/httpd/modules/libphp4.so: Undefined symbol pthread_getspecific
./apachectl start: httpd could not be started

even if i have installed php 4.2 with the --with-tsrm-pth option
I have spend now 5 hours to find a solution but i couldn't find any
workaround... 
any ideas ?

regards,

erkan


Previous Comments:


[2002-04-19 11:36:18] [EMAIL PROTECTED]

This bug has already been fixed in the latest released version of
PHP, which you can download at http://www.php.net/downloads.php

The apache2filter is known to work with Apache 2.0.35
and either CVS HEAD or the 4.2.0 branch (or the latest 
release candidate). Please report back if you have any
problems related to FreeBSD 4.x and these versions.



[2002-04-15 16:30:23] [EMAIL PROTECTED]

My installation worked!

installed gnu pth and used 
--with-tsrm-pth=/usr/local/libs/pth in the configure script.

Note that this is warned in the end of the configure process.

[]



[2002-04-15 09:36:17] [EMAIL PROTECTED]

Same results on FreeBSD 4.2-RELEASE with Apache 2.0.35 / PHP 4.2.0RC4



[2002-04-15 08:15:12] [EMAIL PROTECTED]

Exactly the same error here.

FreeBSD 4.5 / Release
Apache 2.0.35
PHP 4.2.0RC4

Tried:

./configure --with-apache=/usr/local/apache2/bin/apxs --with-tsrm-pth

Didn't work:

./apachectl configtest
Syntax error on line 217 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp4.so into server:
/usr/local/apache2/modules/libphp4.so: Undefined symbol
pthread_getspecific



[2002-04-14 19:30:10] [EMAIL PROTECTED]

i had the same problem.

using freebsd 4.5, apache 2.0.25, php 4.2.0RC3

trying with gnu-pth



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/14594

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




Bug #16480 Updated: strings should remember whether they are magic_quoted, htmlized or neither

2002-05-01 Thread vdhome

 ID:   16480
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Bogus
+Status:   Open
 Bug Type: Feature/Change Request
 Operating System: any
-PHP Version:  4.1.2
+PHP Version:  4.3.0
 New Comment:

Bogus? BOGUS?!?! Whaddaya mean, bogus?! I'm offended!

;-) OK, I'm not. But Bugzilla's WONTFIX is certainly much more polite,
though just as disappointing.

Anyway, as the saying goes, talk is cheap but code is free. (Of course,
not all code is free and some talk can get you into prison...) Well,
the saying doesn't mention code, but after all, we're extending
languages, aren't we?

OK, I'm getting to the point. You can download the patch at:
http://nebuchadnezzar.zion.cz/php_strings.php

Try it, test it, read what I have to say about it, perhaps even use it,
make an opinion and tell me what it is! Just don't forget it's early
alpha, nearly untested code.

Sniper, why do you want to remove magic_quotes _and_ not implement
string types? That's cruel!

Is it a definitive and shared opinion that This feature is not the way
to go.? Has there been any debate? (Sorry, I'm not subscribed to the
mailing lists.) What do the other developers think? Have you even
seriously considered it?


Previous Comments:


[2002-04-19 11:20:40] [EMAIL PROTECTED]

Real solution is to remove those magic_* options altogether.
And write your code using the addslashes(), etc.

This feature is not the way to go.




[2002-04-09 13:42:45] [EMAIL PROTECTED]

Clarification: to preserve backward compatibility, string literals
without a string type specification would have an undefined or
unknown type and PHP wouldn't do any automatic conversion on them.
This makes it necessary to add a type specifier for normal,
non-escaped, non-HTMLized strings: n... or (NormalString)..., or
perhaps (PlainString)



[2002-04-07 19:09:06] [EMAIL PROTECTED]

Idea: any string should know whether AddSlashes (or magic quotes) or
HtmlSpecialChars or neither has been applied to it. Then you could have
functions declare what kind of string they expect as parameters and
what kind of string they return, and PHP would automatically do the
conversion. When writing string literals, one could indicate the type
by prepending a letter: q... for magic-quoted (or s... for added
slashes, which is the same), and h... for HTMLized string. When
including variables in a string literal, PHP would convert them, if
necessary, to the same string type as the literal. Then you could
write:

mysql_query(qINSERT INTO table VALUES('$var'));

and PHP would do the right thing regardless of whether $var has the
quotes escaped or not, because it would _know_ if it has, and escape
them if it has not.

The example for HTMLized string goes like this:
echo hINPUT TYPE=HIDDEN NAME=whatever VALUE=\$var\;

Of course, PHP would also have to correctly handle string
concatenations etc. - when you join several strings of different kinds,
it should convert all of them to the kind of the first one...

If you don't like the q... syntax, the same could be done with
typecasting: (EscapedString)... and (HTMLizedString)... - in fact,
it's probably better, because that way you could typecast any strings
(or any values, in fact), not just string literals.

I think it is a problem that now the behaviour of applications is
seriously dependent on PHP's configuration of magic_quotes - this would
solve it! (I.e. now, when I write a script that expects magic_quotes
on, it will have serious security holes when run with magic_quotes
off!)

Wow, isn't that a brilliant idea! ;-) (You can't expect praise from
anyone but yourself.)




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




Bug #16957: Scripts do not seem to run

2002-05-01 Thread rudy

From: [EMAIL PROTECTED]
Operating system: PowerMac os 8.6
PHP version:  4.2.0
PHP Bug Type: *General Issues
Bug description:  Scripts do not seem to run

I have scripts that run fine in windows environment but don't seem to be
processed in a Mac environment.
-- 
Edit bug report at http://bugs.php.net/?id=16957edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16957r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16957r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16957r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16957r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16957r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16957r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16957r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16957r=submittedtwice




Bug #15644 Updated: Wrong behaviour session.gc_maxlifetime

2002-05-01 Thread php-bugs

 ID:   15644
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Session related
 Operating System: Redhat Linux
 PHP Version:  4.1.1
 New Comment:

No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.


Previous Comments:


[2002-02-21 05:32:12] [EMAIL PROTECTED]

I need to take a look at code...
But before I do that, could you verify if this problem exists in CVS
version?

http://snaps.php.net/



[2002-02-21 04:01:05] [EMAIL PROTECTED]

The default (files).



[2002-02-21 03:19:45] [EMAIL PROTECTED]

What is your save handler? files or user or else?



[2002-02-20 08:23:33] [EMAIL PROTECTED]

The value for gc_maxlifetime specifies after how long php sees stored
session data as garbage. This is not correct behaviour. Example:

Say, I have set gc_maxlifetime to 24 minutes. I start using an
application that stores something in the session. I continue working
for the next 24 minutes. Suddenly, the earliest session data (stored 24
minutes ago, but still used!) will be seen as garbage and disappears,
rendering the application useless.

It should only see the session data if the session is not used for
gc_maxlifetime seconds. If I keep using the application, the session
data should not be thrown away.

(current workaround is to set gc_maxlifetime to something big, but
that's not the correct solution in my opinion)




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




Bug #14499 Updated: encoding with XSLT problem

2002-05-01 Thread tim

 ID:   14499
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: XSLT related
 Operating System: windows 2000
 PHP Version:  4.1.0
 New Comment:

Same problem occurs with PHP 4.2.0 on Win2K.

Updating with the proposed dll by [EMAIL PROTECTED] doesn't fix it either. 
Neither does setting the encoding in the xml and/or the xslt file.

Sorry Sterling, but I'd say it definitely is a bug


Previous Comments:


[2002-03-28 15:29:44] [EMAIL PROTECTED]

i run into the same problem with the php-4.1.1/2 windows binaries. i
tried to solve the problem by getting the latest sablotron binaries for
windows (http://www.gingerall.com/charlie/ga/xml/d_sab.xml) - which do
include encoding support - but still got the xslt_set_encoding() is
not supported in this PHP build. a look into the sources revealed the
problem:

ext\xslt\sablot.c

#ifdef HAVE_SABLOT_SET_ENCODING
PHP_FE(xslt_set_encoding,NULL)
#else
PHP_FALIAS(xslt_set_encoding, warn_not_available, NULL)
#endif

etc.

so i recompiled php_xslt with #define HAVE_SABLOT_SET_ENCODING - and
voila - it works perfectly! (fyi: the dll is available from
http://kollm.org/php_xslt/php_xslt.dll)

as windows user typically dont compile php - they get the windows
binaries and expect them to work ;) - i would recommend to include the
appropriate changes (sablotron dll's with encoding support;
HAVE_SABLOT_SET_ENCODING defined) into the next binary release. this
error is really frustrating for windows users because most of them dont
have the possibility to recompile php.

thanks!



[2001-12-14 11:59:35] [EMAIL PROTECTED]

In order to use utf-8 you must set the encoding from within your ?xml
? block.. If you want to use the xslt_set_encoding() function than you
must compile sablotron itself with encoding support.

not a bug.



[2001-12-13 17:52:07] [EMAIL PROTECTED]

I got this error using XSLT in PHP-4.1.0 on Windows 2000. 

Warning: Sablotron error on line 1: unknown encoding '' in 
e:\www\htdocs\home.php on line 151 
Warning: Unknown persistent list entry type in module shutdown (11) in
Unknown on line 0 

and when I add an encoding statement, 

Warning: xslt_set_encoding() is not supported in this PHP build in 
e:\www\htdocs\home.php on line 150 

My code:

$xml = $doc-dumpmem();

$arguments = array(
 '/_xml' = $xml,
);

// Allocate a new XSLT processor
$xh = xslt_create();

#xslt_set_encoding($xh, utf-8);

// Process the document
$result = xslt_process($xh, 'arg:/_xml', $include_dir . $xslt_filename,
NULL, $arguments); 

var_dump($result);

xslt_free($xh);




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




Bug #14965 Updated: Sablotron XLST encoding error

2002-05-01 Thread tim

 ID:   14965
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Documentation problem
 Operating System: Windows 2000
 PHP Version:  4.1.1
 New Comment:

To get this to work under Win2K and PHP 4.2.0, you must put have
file:// prefixed to every parameter that requires a file.  This
includes the xml, xsl and the output files.

This does NOT however require to upgrade you php_xslt dll to the
version suggested by the person in bug 14499.


Previous Comments:


[2002-04-26 05:23:39] [EMAIL PROTECTED]

Hi, the same problem here on PWS on winodws ME, the code is 
?php
//create processor
$my_xslt=xslt_create();
//output the processing result
echo
xslt_process($my_xslt,getcwd().//cd_catalog.xml,getcwd().\\cd_catalog.xsl);
//free the processor
xslt_free($my_xslt);
?
returned
Warning: sablotron error on line 1, unknown encoding...

using this code the problem was completely solved...

?php
//create the processor
$my_xslt=xslt_create();

//process the fiel and echo the result
echo
xslt_process($my_xslt,file://.getcwd().//cd_catalog.xml,file://.getcwd().\\cd_catalog.xsl);


//free the processor
xslt_free($my_xslt);
?
thank u,



[2002-01-18 17:25:52] [EMAIL PROTECTED]

Hi folks (please be gentle, my first post to bugs.php.net).

I've got exactly the same mayhem happening on my machine too.  Running
with Apache 1.3.22, and php as a cgi binary.

Here's the example code, commented, shows all that I've found this
evening.  Basically the only way I can get xslt_process() to work is
using the arguments array, putting file names in with getcwd(),
file://, include path just doesn't work :o(

?

error_reporting (E_ALL);

// My include path is 
// include_path = .;E:\Webserver\public_html
//
// PHP is installed to D:\Program Files\Php

$xmlFile=Php.XPathDocumentation.xml; 
$xslFile=Php.XPathDocumentation.xsl; 

echo 'hrRead filebr';

// Get the contents of the files, 
// Both calls work ok.
$xslData = implode('',file($xslFile));
$xmlData = implode('',file($xmlFile));

echo 'hrCreate parserbr';

$hXslt = xslt_create();

echo 'hrProcess with filenames (no path)br';

// This gives me a error:
// Warning: Sablotron error on line none: cannot open file 
// 'd:/program files/php/Php.XPathDocumentation.xml' 
// in e:\cvs\php.xpath\xpath-develop\doc\Php.XPathDocumentation.php on
line 79
// $result contains nothing
$result = xslt_process($hXslt, $xslFile, $xmlFile);
echo $result;

echo 'hrGet current working directorybr';

// This returns e:\cvs\php.xpath\xpath-develop\doc
echo getcwd();

echo 'hrUse getcwd() and with filenames (no path)br';

// Warning: Sablotron error on line 1: unknown encoding '' in 
// e:\cvs\php.xpath\xpath-develop\doc\Php.XPathDocumentation.php on
line 82
// $result contains nothing
$result = xslt_process($hXslt, getcwd().'\\'.$xslFile,
getcwd().'\\'.$xmlFile);
echo $result;

echo 'hrUse file:// getcwd and with filenames (no path)br';

// This call succeeds with no error.
// $result contains the entire xml file unprocessed (whitespace
trimmed).
$result = xslt_process($hXslt, 'file://'.getcwd().'/'.$xslFile,
'file://'.getcwd().'/'.$xmlFile);
echo $result;

echo 'hrUse the xml and xsl as argumentsbr';

// But this works fine and produces the transformation as I expect
$arguments = array(
 '/_xml' = $xmlData,
 '/_xsl' = $xslData
);
$result = xslt_process($hXslt, 'arg:/_xml', 'arg:/_xsl', NULL,
$arguments);

if ($result) {
echo $result;
} else {
echo There was an error that occurred in the XSL
transformation...\n;
echo \tError number:  . xslt_errno() . \n;
echo \tError string:  . xslt_error() . \n;
exit;
}

echo 'hr';

xslt_free($hXslt);

?

If you want any copies of the files that I've been using, drop me a
mail.  I feel fairly confident that these bugs occur regardless of the
xml and xsl file, given that the final version produces exactly the
expected transformed output. 

Nigel



[2002-01-14 13:17:46] [EMAIL PROTECTED]

Unless the below is a typo, it's quite logical:
while (!feof ($xmlfile)) {
$xml_file_contents = fgets($xmlfile, 4096);
//echo $xml_file_contents;
}

should read:
while (!feof ($xmlfile)) {
/notice the dot
$xml_file_contents .= fgets($xmlfile, 4096);
//echo $xml_file_contents;
}
Unless you have an xmlfile, consisting of 1 line, smaller that 4096
bytes, $xml_file_contents, will consist of the last line only.



[2002-01-14 08:21:44] [EMAIL PROTECTED]

Hi,

I can confrim Feddy's code works fine on Windows 2000 (thanks Freddy
:), however the code I submitted earlier 

Bug #16957 Updated: Scripts do not seem to run

2002-05-01 Thread mfischer

 ID:   16957
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: PowerMac os 8.6
 PHP Version:  4.2.0
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.



Previous Comments:


[2002-05-01 22:42:40] [EMAIL PROTECTED]

I have scripts that run fine in windows environment but don't seem to
be processed in a Mac environment.




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




Bug #16955 Updated: 0 == NULL, but only sometimes! :)

2002-05-01 Thread derick

 ID:   16955
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Red Hat 6.2
 PHP Version:  4.2.0
 New Comment:

Already exists, try if (NULL !== 0) { ... } else { ... }

bogussing.

Derick


Previous Comments:


[2002-05-01 19:14:40] [EMAIL PROTECTED]

I find the problem:

$temp = 0; // is not // $temp = 0;

Sorry :)

However, I'd like to have 0  NULL in the future :) Don't you think?



[2002-05-01 17:20:37] [EMAIL PROTECTED]

Hello!
i might have found a problem dealing with 0 and NULL values while using
a recursive function in a class that i have created.

I have found some bugs related to this problem in the php-bugs database
about 0 and NULL, but the problem i have found goes more into
depth: i've noticed that 0 == NULL only if the value 0 only if the
value 0 comes from the array passed to the recurvise function. i try
to explain with an example:

$temp = $a[$p];

if ($temp == ) {
 if ($temp == 0) {
  echo (impossible);
 }
}

it happens that the output will be impossible.

instead, if i set $temp = 0 or NULL before the IF structures, i won't
get the output impossible:

$temp = $a[$p];

$temp = 0;
   // or  $temp = NULL;
   // or without declaring at all the variable $temp

if ($temp == ) {
 if ($temp == 0) {
  echo (Impossible);
 }
}



$a is an array which can be modified or not by the recursive function,
and is then passed as a parameter to the function itself

I have tested it both with version 4.0.5 and 4.2.0

If you would like to receive more details about this, i will be glad to
send you the complete source code. i have tried to reduce the lenght of
the code, anyway it's still too long to write here. if you are
interested, i could send you all the code by email or i could give you
an account to access my server and work by ftp/http

best regards,
and thank you for developing PHP :)
Claudo Frizziero

---

configure line:

configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs
--with-jpeg-dir=/usr/local/bin --with-gd=/usr/ --enable-ftp





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