#29083 [NEW]: $_SERVER["SERVER_NAME"] and $_SERVER["HTTP_HOST"] Output the same thing

2004-07-10 Thread nathan at inimit dot com
From: nathan at inimit dot com
Operating system: Freebsd 4.8
PHP version:  4.3.7
PHP Bug Type: Apache2 related
Bug description:  $_SERVER["SERVER_NAME"] and $_SERVER["HTTP_HOST"] Output the same 
thing

Description:

Based on the output, SERVER_NAME should output the ServerName value within
the VirtualHost entry within the httpd.conf while instead it is outputing
the current hostname which could be any of the ServerAlias entries.

I have setup PHP 4.3.7 with:

'./configure' '--enable-versioning' '--enable-memory-limit'
'--with-layout=GNU' '--with-zlib-dir=/usr' '--disable-all'
'--with-regex=php' '--with-pear' '--enable-bcmath' '--enable-ctype'
'--with-curl=/usr/local' '--with-db4=/usr/local' '--enable-dba'
'--with-dom=/usr/local' '--with-dom-xslt=/usr/local'
'--with-dom-exslt=/usr/local' '--enable-ftp' '--with-gd'
'--enable-gd-native-ttf' '--with-freetype-dir=/usr/local'
'--with-t1lib=/usr/local' '--with-jpeg-dir=/usr/local'
'--with-png-dir=/usr/local' '--with-xpm-dir=/usr/X11R6'
'--with-iconv-dir=/usr/local' '--enable-mbstring'
'--with-mcrypt=/usr/local' '--with-mhash=/usr/local'
'--with-mime-magic=/usr/share/misc/magic.mime' '--with-mysql=/usr/local'
'--with-openssl-dir=/usr/local' '--with-openssl=/usr/local'
'--enable-overload' '--with-pcre-regex=yes' '--enable-posix'
'--with-pgsql=/usr/local' '--with-pspell=/usr/local' '--enable-session'
'--enable-sockets' '--enable-tokenizer' '--with-expat-dir=/usr/local'
'--enable-xml' '--with-xmlrpc' '--enable-xslt'
'--with-xslt-sablot=/usr/local' '--with-zlib=yes'
'--with-apxs2=/usr/local/sbin/apxs' '--x-libraries=/usr/X11R6/lib'
'--x-includes=/usr/X11R6/include' '--prefix=/usr/local'
'i386-portbld-freebsd4.8' 

nshb# uname -a
FreeBSD nshb.inimit.ca 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Thu Apr  3
10:53:38 GMT 2003
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386


ServerAdmin [EMAIL PROTECTED]
DocumentRoot /domains/inimit.com/www/wwwroot
ServerName inimit.com
ServerAlias www.inimit.com
ErrorLog /domains/inimit.com/www/logs/error.log
CustomLog /domains/inimit.com/www/logs/access.log common
 

Reproduce code:
---


Expected result:

Result: (If on http://inimit.com)

inimit.com

inimit.com

Result: (If on http://www.inimit.com)

inimit.com

www.inimit.com



Actual result:
--
Result: (If on http://inimit.com)

inimit.com

inimit.com

Result: (If on http://www.inimit.com)

www.inimit.com

www.inimit.com



-- 
Edit bug report at http://bugs.php.net/?id=29083&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29083&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29083&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=29083&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=29083&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29083&r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=29083&r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=29083&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=29083&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=29083&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=29083&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=29083&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=29083&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29083&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=29083&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=29083&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=29083&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29083&r=float


#29023 [Asn->Csd]: fread() only reads 8192 bytes from a local file

2004-07-10 Thread wez
 ID:   29023
 Updated by:   [EMAIL PROTECTED]
 Reported By:  benjcarson at digitaljunkies dot ca
-Status:   Assigned
+Status:   Closed
 Bug Type: Filesystem function related
 Operating System: Linux
 PHP Version:  5CVS-2004-07-05 (dev)
 Assigned To:  wez
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2004-07-06 16:42:38] benjcarson at digitaljunkies dot ca

While I realize that file_get_contents() is faster, the code that lead
me to this bug was not my own.  It was Smarty (2.6.2, although 2.6.3
has the same problem), which has worked very well with PHP5 until now.



[2004-07-06 15:26:51] [EMAIL PROTECTED]

I really can't see how this can be CORRECT behaviour as this has worked
(like it says in docs too :) before just fine.

OTOH, you should always use file_get_contents() instead anyway. :)




[2004-07-06 09:14:52] [EMAIL PROTECTED]

Assigning to Wez... although I'd say that this is *correct* behavior,
it shouldn't cause a BC break.



[2004-07-05 22:28:48] benjcarson at digitaljunkies dot ca

Description:

In the latest cvs snap, fread() does not read more than 8192 bytes from
a local file, despite specifying a larger read size as the second
parameter.  If the fread() call is wrapped in a while (!feof) loop the
file can be read correctly, but only 8k at a time.  This contradicts
the first example in the manual
(http://www.php.net/manual/en/function.fread.php) and is a BC break.

As far as I can tell the change was made sometime between the
2004-06-22 snap and the 2004-07-04 snap.

I've tested both using my php.ini file and without (i.e. using the
built-in defaults).  I configured using the following command:

./configure --prefix=/usr --with-apxs=/usr/bin/apxs \
--enable-memory-limit \
--with-layout-GNU\
--enable-bcmath \
--enable-calendar \
--with-curl=/usr \
--enable-exif \
--enable-ftp \
--enable-mbstring \
--enable-shmop \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--with-bz2 \
--with-config-file-path=/etc/php5/apache \
--with-gd=/usr \
--with-freetype-dir=shared,/usr  \
--with-jpeg-dir=/usr \
--with-png-dir=shared,/usr \
--with-ttf=shared,/usr \
--with-xpm-dir=shared,/usr/X11R6 \
--with-gettext \
--with-kerberos=/usr \
--with-ldap=shared,/usr \
--with-mhash=shared,/usr \
--with-mm \
--with-ncurses=/usr \
--with-openssl=/usr \
--with-pcre-regex=/usr \
--with-pear \
--with-pgsql \
--with-pspell=/usr \
--with-zlib \
--with-zlib-dir=/usr


Reproduce code:
---
#!/usr/bin/php


Expected result:

(the file's actual size, in bytes)

Actual result:
--
8192





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


#29084 [NEW]: Error loading many of the modules

2004-07-10 Thread langis at rogers dot com
From: langis at rogers dot com
Operating system: Windows XP Home
PHP version:  5.0.0RC3
PHP Bug Type: Dynamic loading
Bug description:  Error loading many of the modules

Description:

I had to disable loading the following libraies otherwise my Apache Web
Server would not start.  In many cases these libraries could not be found
eventhough they were properly named and in the directory where the server
was looking for them.
;extension=php_exif.dll
;extension=php_iconv.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
;extension=php_java.dll
;extension=php_mcrypt.dll
;extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
;extension=php_pspell.dll
;extension=php_sybase_ct.dll


Reproduce code:
---
When all of these lines were there in the PHP.ini, the server would not
start and not report an error.  I had to start and stop the server
numerous time enabling each dynamic load one at a time to isolate the
libraries which were culprit.

Expected result:

I downloaded a windows binary zip file of the php5 rc43 from your site.


-- 
Edit bug report at http://bugs.php.net/?id=29084&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29084&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29084&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=29084&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=29084&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29084&r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=29084&r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=29084&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=29084&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=29084&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=29084&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=29084&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=29084&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29084&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=29084&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=29084&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=29084&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29084&r=float


#29085 [NEW]: bad default include_path on Windows

2004-07-10 Thread christian at wenz dot org
From: christian at wenz dot org
Operating system: Windows
PHP version:  5.0.0RC3
PHP Bug Type: PHP options/info functions
Bug description:  bad default include_path on Windows

Description:

the default include_path on Windows systems is ".;c:\php5\pear". IMO
that's a bad idea (TM) because most installation tutorials recommend
c:\php and the PEAR installer defaults to that directory, too. 

Looks like a "port" of bug #21609 :-)

Reproduce code:
---
call phpinfo(), look at output for include_path

Expected result:

Directive  Local Value  Master Value
include_path .;C:\php\pear .;C:\php\pear 

Actual result:
--
Directive  Local Value  Master Value
include_path .;C:\php5\pear .;C:\php5\pear 

-- 
Edit bug report at http://bugs.php.net/?id=29085&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29085&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29085&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=29085&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=29085&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29085&r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=29085&r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=29085&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=29085&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=29085&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=29085&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=29085&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=29085&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29085&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=29085&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=29085&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=29085&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29085&r=float


#29052 [Opn]: sqlite blocks make process

2004-07-10 Thread derick
 ID:   29052
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lhesp at tiscali dot nl
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Red Hat 9
 PHP Version:  5.0.0RC3
 New Comment:

Try to do this:
touch /home/download/php-5.0.0RC3/ext/sqlite/libsqlite/src/parse.c

and run "make" again

Also, your --with-zlib-dir directive is wrong, it should not end in
/lib


Previous Comments:


[2004-07-09 19:09:16] lhesp at tiscali dot nl

./configure --prefix=/www/php --with-apxs2=/www/bin/apxs
--with-config-file-path=/www/php --enable-sockets
--with-imap=/usr/local/imap-2001 --with-imap-ssl=/usr/include/openssl
--with-kerberos=/usr/kerberos --with-mysql=/usr/local/mysql
--with-zlib-dir=/usr/local/lib --with-gd 

adding:
--disable-sqlite
did make no difference



[2004-07-08 08:57:57] [EMAIL PROTECTED]

What is your full configure line to ./configure (for PHP)?



[2004-07-07 19:40:37] lhesp at tiscali dot nl

Description:

Configuring goes fine. But Make process stops when working on sqlite
with the following remarks:

/home/download/php-5.0.0RC3/libtool --silent --preserve-dup-deps
--mode=compile gcc
-I/home/download/php-5.0.0RC3/ext/sqlite/libsqlite/src -Iext/sqlite/
-I/home/download/php-5.0.0RC3/ext/sqlite/ -DPHP_ATOM_INC
-I/home/download/php-5.0.0RC3/include
-I/home/download/php-5.0.0RC3/main -I/home/download/php-5.0.0RC3
-I/home/download/php-5.0.0RC3/Zend -I/usr/include/libxml2
-I/usr/local/imap-2001/include -I/usr/kerberos/include
-I/usr/local/mysql/include  -I/home/download/php-5.0.0RC3/TSRM  -g -O2 
-prefer-pic -c
/home/download/php-5.0.0RC3/ext/sqlite/libsqlite/src/opcodes.c -o
ext/sqlite/libsqlite/src/opcodes.lo
no /home/download/php-5.0.0RC3/ext/sqlite/libsqlite/src/parse.y
make: no: Command not found
make: ***
[/home/download/php-5.0.0RC3/ext/sqlite/libsqlite/src/parse.c] Error
127






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


#29052 [Opn->Fbk]: sqlite blocks make process

2004-07-10 Thread derick
 ID:   29052
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lhesp at tiscali dot nl
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Red Hat 9
 PHP Version:  5.0.0RC3


Previous Comments:


[2004-07-10 14:22:16] [EMAIL PROTECTED]

Try to do this:
touch /home/download/php-5.0.0RC3/ext/sqlite/libsqlite/src/parse.c

and run "make" again

Also, your --with-zlib-dir directive is wrong, it should not end in
/lib



[2004-07-09 19:09:16] lhesp at tiscali dot nl

./configure --prefix=/www/php --with-apxs2=/www/bin/apxs
--with-config-file-path=/www/php --enable-sockets
--with-imap=/usr/local/imap-2001 --with-imap-ssl=/usr/include/openssl
--with-kerberos=/usr/kerberos --with-mysql=/usr/local/mysql
--with-zlib-dir=/usr/local/lib --with-gd 

adding:
--disable-sqlite
did make no difference



[2004-07-08 08:57:57] [EMAIL PROTECTED]

What is your full configure line to ./configure (for PHP)?



[2004-07-07 19:40:37] lhesp at tiscali dot nl

Description:

Configuring goes fine. But Make process stops when working on sqlite
with the following remarks:

/home/download/php-5.0.0RC3/libtool --silent --preserve-dup-deps
--mode=compile gcc
-I/home/download/php-5.0.0RC3/ext/sqlite/libsqlite/src -Iext/sqlite/
-I/home/download/php-5.0.0RC3/ext/sqlite/ -DPHP_ATOM_INC
-I/home/download/php-5.0.0RC3/include
-I/home/download/php-5.0.0RC3/main -I/home/download/php-5.0.0RC3
-I/home/download/php-5.0.0RC3/Zend -I/usr/include/libxml2
-I/usr/local/imap-2001/include -I/usr/kerberos/include
-I/usr/local/mysql/include  -I/home/download/php-5.0.0RC3/TSRM  -g -O2 
-prefer-pic -c
/home/download/php-5.0.0RC3/ext/sqlite/libsqlite/src/opcodes.c -o
ext/sqlite/libsqlite/src/opcodes.lo
no /home/download/php-5.0.0RC3/ext/sqlite/libsqlite/src/parse.y
make: no: Command not found
make: ***
[/home/download/php-5.0.0RC3/ext/sqlite/libsqlite/src/parse.c] Error
127






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


#29082 [Opn->Bgs]: Variable call line argument problem

2004-07-10 Thread derick
 ID:   29082
 Updated by:   [EMAIL PROTECTED]
 Reported By:  markem at ev1 dot net
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Windows98se
 PHP Version:  4CVS-2004-07-10 (stable)
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.


Previous Comments:


[2004-07-10 08:10:39] markem at ev1 dot net

Description:

File #1:

#   HTML Library

#   Begin Table

function tb( $alignA, $bgPicA, $bgColorA, $borderA, $borderColorA,
$cellPaddingA, $cellSpacingA, $columnsA, $heightA, $widthA )
{
$theReply = "

Running the above generates:

C:\apache\lib>php test.php
Content-type: text/html
X-Powered-By: PHP/4.3.1

PHP Warning:  Missing argument 4 for tb() in c:\apache\lib\html.php on
line 7
PHP Warning:  Missing argument 5 for tb() in c:\apache\lib\html.php on
line 7
PHP Warning:  Missing argument 6 for tb() in c:\apache\lib\html.php on
line 8
PHP Warning:  Missing argument 7 for tb() in c:\apache\lib\html.php on
line 8
PHP Warning:  Missing argument 8 for tb() in c:\apache\lib\html.php on
line 8
PHP Warning:  Missing argument 9 for tb() in c:\apache\lib\html.php on
line 8
PHP Warning:  Missing argument 10 for tb() in c:\apache\lib\html.php on
line 8




Expected result:

1. If not having to pass arguments to a function (variable call
arguments) is normal, then why does PHP generate a warning about
missing arguments?

2. If variable call arguments are possible - why can you not call the
function in this manner:

  $theLine .= tb(,,"#ff");

???  PHP should treat the empty ",," as two nulls.  Instead, an
error is generated by PHP and PHP dies.






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


#29084 [Opn->Bgs]: Error loading many of the modules

2004-07-10 Thread derick
 ID:   29084
 Updated by:   [EMAIL PROTECTED]
 Reported By:  langis at rogers dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Dynamic loading
 Operating System: Windows XP Home
 PHP Version:  5.0.0RC3
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.


Previous Comments:


[2004-07-10 13:11:10] langis at rogers dot com

Description:

I had to disable loading the following libraies otherwise my Apache Web
Server would not start.  In many cases these libraries could not be
found eventhough they were properly named and in the directory where
the server was looking for them.
;extension=php_exif.dll
;extension=php_iconv.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
;extension=php_java.dll
;extension=php_mcrypt.dll
;extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
;extension=php_pspell.dll
;extension=php_sybase_ct.dll


Reproduce code:
---
When all of these lines were there in the PHP.ini, the server would not
start and not report an error.  I had to start and stop the server
numerous time enabling each dynamic load one at a time to isolate the
libraries which were culprit.

Expected result:

I downloaded a windows binary zip file of the php5 rc43 from your site.






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


#29072 [Opn]: stack of __autoload handlers

2004-07-10 Thread helly
 ID:   29072
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jasbarne at indiana dot edu
 Status:   Open
 Bug Type: Feature/Change Request
-Operating System: Any
+Operating System: *
-PHP Version:  5.0.0RC3
+PHP Version:  5.0
 New Comment:

That occured to me also. But we cannot do anything before 5.0. Until
then you probably need a master __autoload included by
auto_prepend_file ini setting. This one would need to handle an array
of handlersin the other files you'd need to register your
functions.


Previous Comments:


[2004-07-09 09:26:46] jasbarne at indiana dot edu

Description:

I'm using the __autoload function to load my package's files.  However,
if I use another package and that has also implemented __autoload then
PHP barfs

Would it be possible to create a stack of __autoload functions?  As an
alternative, perhaps we could link __autoload methods to class
definitions, and then check class definitions for __autoload functions
whenever a class is not found.

Reproduce code:
---




Expected result:

When user tries to instanciate undefined classes the engine checks all
__autoload() functions to try to load the class file.

Actual result:
--
Fatal error: Cannot redeclare __autoload() (previously declared in
C:\Apache\Apache2\htdocs\DomTools\test.php:5) in
C:\Apache\Apache2\htdocs\DomTools\autoload.php on line 7





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


#29080 [Fbk]: Segmentation Fault when using Interface

2004-07-10 Thread helly
 ID:   29080
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jason at ionzoft dot com
 Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Redhat ES 3.0 (Intel)
 PHP Version:  5.0.0RC3
 New Comment:

Could you also try to run it with Debugger and Optimizer alone to get
them isolated?


Previous Comments:


[2004-07-10 06:51:11] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



[2004-07-09 23:14:46] jason at ionzoft dot com

Description:

Hello,

I discovered this problem tonight while working on a new PHP 5 class
that uses an interface.  The code example came from
http://www.zend.com/php5/articles/engine2-php5-changes.php#Heading5


getMessage();
?>


--


On this server, I get a Segmentation Fault:

[EMAIL PROTECTED] dev]$ php -v
PHP 5.0.0RC3 (cli) (built: Jun 24 2004 17:35:13)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.0RC3, Copyright (c) 1998-2004 Zend Technologies
with Zend Extension Manager v1.0.2, Copyright (c) 2003-2004, by
Zend Technologies
with Zend Optimizer v2.5.2, Copyright (c) 1998-2004, by Zend
Technologies
with Zend Debugger v3.5.0, Copyright (c) 1999-2004, by Zend
Technologies


[EMAIL PROTECTED] dev]$ php -f Interface.php
Segmentation fault

--

On this server, It works fine:

[EMAIL PROTECTED] Jason]$ php -v
PHP 5.0.0RC3 (cli) (built: Jun 14 2004 14:04:10)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.0RC3, Copyright (c) 1998-2004 Zend Technologies


[EMAIL PROTECTED] Jason]$ php -f Interface.php
Hello

--

Could it be a problem with the Debugger?

Thanks,
Jason Garber


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

Reproduce code:
---
getMessage();
?>


Expected result:

Should print "Hello\n"

Actual result:
--
"Segmentation Fault"





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


#28235 [Opn->Fbk]: SQLite returns null error message when database file isn't writable

2004-07-10 Thread wez
 ID:   28235
 Updated by:   [EMAIL PROTECTED]
 Reported By:  simen at lunarlounge dot org
-Status:   Open
+Status:   Feedback
 Bug Type: SQLite related
 Operating System: Debian/GNU testing
 PHP Version:  5.0.0RC2
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

We upgraded the bundled sqlite library; please try the next snapshot
(you might have to wait up to 3 hours) and see if this is fixed.


Previous Comments:


[2004-05-13 12:43:18] nobody at example dot org

Never occured to me that this could be a bug, does the OO API handle
this? 

  function connect(){
try {
  if ( !$this->db_handle = @sqlite_open($this->db_name, 0666, $err)
){
if ($this->db_handle===false){
  throw new DBEx('0: Could not open/create db or directory');
} else {
  throw new DBEx(sqlite_last_error($this->db_handle).': '.
   
sqlite_error_string(sqlite_last_error($this->db_handle)));
}
  } else { return true; }
}
catch (DBEx $ex){ $ex->borkage(); return false; }
  }



[2004-04-30 16:41:07] simen at lunarlounge dot org

Description:

The SQLite extension fail to detect when a database file isn't
writable:

Warning: sqlite_query() [function.sqlite-query]: (null) in test.php on
line 12



Reproduce code:
---
# touch test.sqlite
# chmod 0600 sqlite
# sqlite test.sqlite
> CREATE TABLE store (id INTEGER PRIMARY KEY, doc TEXT);

$db = sqlite_open('test.sqlite');

$sql = "INSERT INTO store (id, doc) VALUES (1, 'foo')";
$result = sqlite_query($db, $sql);

Expected result:

Warning: sqlite_query() [function.sqlite-query]: attempt to write a
readonly database in test.php on line 12

Actual result:
--
Warning: sqlite_query() [function.sqlite-query]: (null) in test.php on
line 12





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


#28402 [Opn->Csd]: configure failure with external SQLite library

2004-07-10 Thread wez
 ID:   28402
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Compile Failure
 Operating System: FreeBSD 5.2.1
 PHP Version:  5CVS-2004-05-14 (dev)
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2004-05-14 17:34:43] [EMAIL PROTECTED]

Description:

PHP 5 configure failure with --with-sqlite=DIR on FreeBSD.

in ext/sqlite/config.m4 line 48:
-L$SQLITE_DIR/lib -lm -ldl

There is NO libdl on FreeBSD.

Reproduce code:
---
./configure --with-sqlite=DIR

Actual result:
--
configure says checks sqlite_open, but fail because -ldl (no libdl on
FreeBSD)





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


#29052 [Fbk->Csd]: sqlite blocks make process

2004-07-10 Thread wez
 ID:   29052
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lhesp at tiscali dot nl
-Status:   Feedback
+Status:   Closed
 Bug Type: Compile Failure
 Operating System: Red Hat 9
 PHP Version:  5.0.0RC3
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Removed custom build steps from latest CVS: this problem should be gone
now.


Previous Comments:


[2004-07-10 14:22:16] [EMAIL PROTECTED]

Try to do this:
touch /home/download/php-5.0.0RC3/ext/sqlite/libsqlite/src/parse.c

and run "make" again

Also, your --with-zlib-dir directive is wrong, it should not end in
/lib



[2004-07-09 19:09:16] lhesp at tiscali dot nl

./configure --prefix=/www/php --with-apxs2=/www/bin/apxs
--with-config-file-path=/www/php --enable-sockets
--with-imap=/usr/local/imap-2001 --with-imap-ssl=/usr/include/openssl
--with-kerberos=/usr/kerberos --with-mysql=/usr/local/mysql
--with-zlib-dir=/usr/local/lib --with-gd 

adding:
--disable-sqlite
did make no difference



[2004-07-08 08:57:57] [EMAIL PROTECTED]

What is your full configure line to ./configure (for PHP)?



[2004-07-07 19:40:37] lhesp at tiscali dot nl

Description:

Configuring goes fine. But Make process stops when working on sqlite
with the following remarks:

/home/download/php-5.0.0RC3/libtool --silent --preserve-dup-deps
--mode=compile gcc
-I/home/download/php-5.0.0RC3/ext/sqlite/libsqlite/src -Iext/sqlite/
-I/home/download/php-5.0.0RC3/ext/sqlite/ -DPHP_ATOM_INC
-I/home/download/php-5.0.0RC3/include
-I/home/download/php-5.0.0RC3/main -I/home/download/php-5.0.0RC3
-I/home/download/php-5.0.0RC3/Zend -I/usr/include/libxml2
-I/usr/local/imap-2001/include -I/usr/kerberos/include
-I/usr/local/mysql/include  -I/home/download/php-5.0.0RC3/TSRM  -g -O2 
-prefer-pic -c
/home/download/php-5.0.0RC3/ext/sqlite/libsqlite/src/opcodes.c -o
ext/sqlite/libsqlite/src/opcodes.lo
no /home/download/php-5.0.0RC3/ext/sqlite/libsqlite/src/parse.y
make: no: Command not found
make: ***
[/home/download/php-5.0.0RC3/ext/sqlite/libsqlite/src/parse.c] Error
127






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


#28882 [Opn->Fbk]: ext/sqlite/libsqlite/src/config.h wrong include; fixed

2004-07-10 Thread wez
 ID:   28882
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sloppy at ister dot org
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Linux
 PHP Version:  5.0.0RC3
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip




Previous Comments:


[2004-06-22 18:45:34] sloppy at ister dot org

Description:

compilation of 5.0.0RC3 fails with error in
ext/sqlite/libsqlite/src/config.h "/config.h" file not found.

Fix: in ext/sqlite/libsqlite/src/config.h line 1
< #include "/config.h"
> #include "php_config.h"

Note:  is obviously set by ./configure to the current build
directory.






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


#27729 [NoF->Sus]: cant compile ext/sqlite as shared

2004-07-10 Thread wez
 ID:   27729
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   No Feedback
+Status:   Suspended
 Bug Type: Compile Failure
 Operating System: IRIX64 6.5.23m
 PHP Version:  5CVS-2004-03-27 (dev)
 New Comment:

If someone submits a patch that allows the extension to build in these
three cases:

1/ static
2/ shared, as part of a php distro
3/ shared, as a self contained extension

it will be accepted.
Right now, (2) is unsupported.

In the meantime, if you want a shared sqlite, disable it while building
the main distro, and once you have installed php5:

cd php5/ext/sqlite
phpize   # make sure this is your php5 phpize
./configure
make
make install



Previous Comments:


[2004-04-21 00:14:28] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2004-04-13 13:09:26] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip





[2004-03-27 08:09:11] [EMAIL PROTECTED]

Description:

I have problems with compiling the ext/sqlite as a shared one with
todays php5 cvs. The build is for a cli version. It makes NO problem
when compiling the extension into the mod_php.


[o2k]:/mnt/MIPS/php-src $ cat config.nice.cli
#! /bin/sh
#
# Created by configure


rm config.cache;
gmake distclean;

CFLAGS='-O3 -mp -OPT:Olimit=0:roundoff=3 
-TARG:platform=IP27:proc=r1 -mips4 -Xcpluscomm 
-I/usr/freeware/include -I/usr/local/include ' \
CXXFLAGS='-O3 -mips4' \
LDFLAGS=' -mp -Wl,-rpath,/usr/local/lib  -Wl,-rpath,/usr/freeware/lib32
-lcrypto ' \
CC='cc' \
CXX='C' \
'./configure' \
'--prefix=/usr/local/php5' \
'--enable-tokenizer' \
'--enable-dio' \
'--enable-aggregate' \
'--enable-memory-limit' \
'--enable-dba' \
'--enable-dbx' \
'--disable-cgi' \
'--enable-exif' \
'--enable-calendar' \
'--enable-bcmath' \
'--enable-shmop' \
'--enable-ftp' \
'--enable-sysvshm=yes' \
'--enable-sysvsem=yes' \
'--enable-track-vars=yes' \
'--enable-url-includes' \
'--enable-versioning' \
'--enable-sockets' \
'--enable-dbase' \
'--enable-memory-limit' \
'--enable-wddx' \
'--with-gd=shared' \
'--with-png-dir=/usr/local' \
'--with-jpeg-dir=/usr/local' \
'--with-freetype-dir=/usr/local' \
'--with-zlib-dir=/usr/freeware' \
'--with-zlib' \
'--with-config-file-path=/etc/php5' \
'--with-pear' \
'--with-sqlite=shared' \
'--with-mcrypt=shared,/usr/local' \
'--with-hash=shared,/usr/local' \
'--with-mysql=/usr/local/mysql' \
'--with-ming=shared,/usr/local' \
'--with-mnogosearch=shared,/usr/local/mnogosearch' \
'--with-imagick-gm=shared,/usr/local' \
'--with-localizer=shared=/usr/local' \
'--with-pgsql=shared,/usr/local/pgsql' \
'--with-pear' \
'--with-curl=shared,/usr/local' \
"$@"

./config.nice.cli
[..]
checking whether to enable UTF-8 support in sqlite (default:
ISO-8859-1)... no
checking for sqlite support... yes, shared
checking size of char *... 4
checking for lemon... no
[..]

gmake -j 16
cc-1005 cc: ERROR File =
/mnt/MIPS/php-src/ext/sqlite/libsqlite/src/config.h, Line = 1
  The source file "/mnt/MIPS/php-src/config.h" is unavailable.
  #include "/mnt/MIPS/php-src/config.h"
   ^
1 catastrophic error detected in the compilation of
"/mnt/MIPS/php-src/ext/sqlite/libsqlite/src/parse.c".

The config.h isnt create on compile time.. but i dont know why.
A workaround is to edit the ext/sqlite/libsqlite/src/config.h file and
include /mnt/MIPS/php-src/main/php_config.h instead of 
#include "/mnt/MIPS/php-src/config.h"







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


#28537 [Opn->Fbk]: "SELECT rowid, * FROM " crashes

2004-07-10 Thread wez
 ID:   28537
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bhoc at tiscali dot ch
-Status:   Open
+Status:   Feedback
 Bug Type: SQLite related
 Operating System: any
 PHP Version:  5.0.0RC2
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip




Previous Comments:


[2004-06-17 10:29:18] bhoc at tiscali dot ch

Same problem in 5.0.0RC3... :-(
-- 
Ben



[2004-05-27 13:19:53] bhoc at tiscali dot ch

Okay, I did manage to create a backtrace. A spare machine was
well-equipped. :)

$ gdb /usr/bin/php
GNU gdb 5.3

(gdb) run selectcrash.php
Starting program: /usr/bin/php selectcrash.php
php: /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/select.c:659:
generateColumnTypes: Assertion `jnSrc' failed.

Program received signal SIGABRT, Aborted.
0x400d1ac1 in kill () from /lib/libc.so.6
(gdb) bt
#0  0x400d1ac1 in kill () from /lib/libc.so.6
#1  0x400d16eb in raise () from /lib/libc.so.6
#2  0x400d3127 in abort () from /lib/libc.so.6
#3  0x400cad6a in __assert_fail () from /lib/libc.so.6
#4  0x080b004e in generateColumnTypes (pParse=0x0, pTabList=0x822f060,
pEList=0x822eb40)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/select.c:662
#5  0x080b262e in sqliteSelect (pParse=0xbfffcce0, p=0x822ef58,
eDest=1,
iParm=0, pParent=0x0, parentTab=0, pParentAgg=0x0)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/select.c:2219
#6  0x08099397 in yy_reduce (yypParser=0x82316a8, yyruleno=100) at
parse.y:270
#7  0x0809a2cb in sqliteParser (yyp=0x82316a8, yymajor=106, yyminor=
  {z = 0x0, dyn = 0, n = 3}, pParse=0x0) at parse.c:3946
#8  0x080b3648 in sqliteRunParser (pParse=0xbfffcce0,
zSql=0x401e9b68 "select rowid, * from allinfo",
pzErrMsg=0xbfffcdcc)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/tokenize.c:458
#9  0x080aa191 in sqliteMain (db=0x822b090,
zSql=0x401e9b68 "select rowid, * from allinfo", xCallback=0,
pArg=0x0,
pzTail=0xbfffcdc8, ppVm=0xbfffcdd4, pzErrMsg=0xbfffcdcc)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/main.c:631
#10 0x080aa306 in sqlite_compile (db=0x822b090,
zSql=0x401e9b68 "select rowid, * from allinfo", pzTail=0xbfffcdc8,
ppVm=0xbfffcdd4, pzErrMsg=0xbfffcdcc)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/main.c:696
#11 0x08095b27 in sqlite_query (object=0x0, db=0x401f05ac,
sql=0x401e9b68 "select rowid, * from allinfo", sql_len=28, mode=0,
buffered=1, return_value=0x401e9c6c, prres=0x0)
at /usr/src/php-5.0.0RC2/ext/sqlite/sqlite.c:1464
#12 0x080961fa in zif_sqlite_query (ht=1075774892,
return_value=0x401e9c6c,
this_ptr=0x0, return_value_used=1)
at /usr/src/php-5.0.0RC2/ext/sqlite/sqlite.c:1669
#13 0x081779a6 in zend_do_fcall_common_helper
(execute_data=0xbfffd580,
opline=0x401f2ca4, op_array=0x822f4e8)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:2699
#14 0x08177f03 in zend_do_fcall_handler (execute_data=0xbfffd580,
opline=0x401f2ca4, op_array=0x822f4e8)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:2828
#15 0x08175032 in execute (op_array=0x822f4e8)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:1391
#16 0x08177ab6 in zend_do_fcall_common_helper
(execute_data=0xbfffd760,
opline=0x401e97e4, op_array=0x401e8d68)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:2728
#17 0x08177f03 in zend_do_fcall_handler (execute_data=0xbfffd760,
opline=0x401e97e4, op_array=0x401e8d68)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:2828
#18 0x08175032 in execute (op_array=0x401e8d68)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:1391
#19 0x0815b3e4 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /usr/src/php-5.0.0RC2/Zend/zend.c:1058
#20 0x0812b912 in php_execute_script (primary_file=0xbb00)
at /usr/src/php-5.0.0RC2/main/main.c:1630
#21 0x0817eec8 in main (argc=2, argv=0xbb94)
at /usr/src/php-5.0.0RC2/sapi/cgi/cgi_main.c:1562
#22 0x400bdd06 in __libc_start_main () from /lib/libc.so.6
(gdb) frame 4
#4  0x080b004e in generateColumnTypes (pParse=0x0, pTabList=0x822f060,
pEList=0x822eb40)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/select.c:662
662   assert( iCol==-1 || (iCol>=0 && iColnCol) );

-- 
Ben



[2004-05-27 12:25:57] bhoc at tiscali dot ch

My currently available environment does not support creating
backtraces, unfortunately.
But I have put a simple php applet in
http://download.pentagroup.ch/phpbug-28537.tar.gz. It will create an
sqlite database, populate it, query it, roll over and die. Hope this
helps.
-- 
Ben



[2004-05-27 08:35:48] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagno

#27990 [Opn->Fbk]: sqlite_open() crashing Apache on non sqlite databases

2004-07-10 Thread wez
 ID:   27990
 Updated by:   [EMAIL PROTECTED]
 Reported By:  csaba at alum dot mit dot edu
-Status:   Open
+Status:   Feedback
 Bug Type: SQLite related
 Operating System: Win 2K
 PHP Version:  5CVS-2004-05-03 (dev)
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip




Previous Comments:


[2004-05-03 23:46:34] csaba at alum dot mit dot edu

The good news is that the behaviour is markedly better.  This time
instead of failing disastrously every other time, it only fails
petulantly every third time.

I tested this both as you asked with the CLI version and also running
PHP as a module.  With the CLI version, testing on my small three file
directory, I got behaviour as expected: I got warnings on files SQLITE
didn't like and when I supressed them with the @ in front of
sqlite_open, the result was that I got a report of the single sqlite
database file in the directory.  Very nice.

Thus encouraged, I went back to the original scenario and ran the same
file through a browser.  Two out of three times, I get the same
behaviour as above.  The third time around, however, I get the
following variable error message:

Fatal error: Unknown function: 8å() in C:\Morph\phpDev\php.php on line
28

There are two things I'd like to mention.  The first is that the "text"
between the ': ' and ' in' seems to always be garbage characters, and
always different

For the second, I have to clear my throat a bit and mutter something
about Heisenberg's uncertainty principle.  The only thing on that line
28 the error message is referring to is the function
sqlite_escape_string.  (Ahem.  Whenever I test, I submit the PHP code
through a preprocessor that logs the submission.  This has been very
stable.  The submission is stuffed into a temporary file and after the
logging is done, the browser gets back a header("Location: ...") to the
temporary file.  (The directory that I was doing this sqlite testing on
is in a separate tree)).

Therefore, I also created a separate file with just the code I
submitted (surrounded in appropriate tags).  The results there were not
so encouraging.  Apache is still crashing, and PHP complains about
trivial things like it can't find this or that variable, always in the
dirList function on different lines.  Let me know if you need more
info.

The good news is that I deal with this by opening up all the files I
find and scanning their header to see if they're SQLite files, and this
is working fine for me.  Why can't SQLite do that?  So, although this
problem isn't affecting me cause of my workaround, I figured you'd like
to know the current status of it on my machine.

Csaba Gabor



[2004-04-29 15:16:53] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2004-04-22 23:30:25] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

What you're trying to do will probably end in tears;
libsqlite has a tendency to clobber files that are not valid sqlite
databases (this is not a PHP problem).

It is possible that PHP is overly sensitive to such a problem, so could
you please try to reproduce this using
the CLI version of PHP?

Use a snapshot from the link above.



[2004-04-22 23:10:32] csaba at alum dot mit dot edu

I have tested this with the latest release (April 22 RC 2 beta), and it
still crashes Apache.  However, I can be a bit more specific about the
symptoms.  I tested on a directory with a small sqlite database log.db
(48K) and a log.php file (6K).  Both files were required to produce the
crashing effect.

If I ran the code below (with or without an @ in front of the
sqlite_open) the first time I would get a warning about: database disk
image is malformed ...
(if the @ was not present, as with the code below).
The NEXT Time I invoked the same code is when the Apache would give me
the error message about restarting (and sometimes die).  This happens
regardless of whether I remove log.php from the directory tree before
running the test the second time.

Csaba Gabor



[2004-04-21 00:15:23] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If t

#28246 [Opn->Csd]: sqlite_query("ATTACH...") returns FALSE even when it succeeds

2004-07-10 Thread wez
 ID:   28246
 Updated by:   [EMAIL PROTECTED]
 Reported By:  derrell dot lipman at unwireduniverse dot com
-Status:   Open
+Status:   Closed
 Bug Type: SQLite related
 Operating System: Linux 2.4
 PHP Version:  5.0.0RC2
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2004-05-01 21:59:42] derrell dot lipman at unwireduniverse dot com

Description:

There is no way to ascertain whether an ATTACH command worked, as
sqlite_query() and sqlite_unbuffered_query() return FALSE whether it
worked or not.

HERE'S THE FIX:
Upgrading the embedded sqlite from 2.8.11 to 2.8.13 solved this problem
(as well as correcting the 2.8.11 bugs, of course).


Reproduce code:
---
";
exit;
}

if (($dbRC =
 sqlite_query($dbConn, "ATTACH '/tmp/test2.db' AS test_db;")) ===
false)
{
echo "This should have returned TRUE, but returned FALSE.  See, it
can get data from t2...";

if (! $dbRC = sqlite_query($dbConn, "SELECT j, t FROM t2;"))
{
echo "Could not retrieve data from t2";
}
else
{
while ($row = @sqlite_fetch_array($dbRC, SQLITE_ASSOC))
{
echo "Got j = " . $row["j"] . ", t = " . $row["t"] .
"";
}
}
exit;
}

echo "ATTACH returned what it should have (this doesn't happen)";
exit;

?>


Expected result:

TRUE

Actual result:
--
FALSE





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


#28264 [Opn->Csd]: SQLite not doing multiple queries

2004-07-10 Thread wez
 ID:   28264
 Updated by:   [EMAIL PROTECTED]
 Reported By:  csaba at alum dot mit dot edu
-Status:   Open
+Status:   Closed
 Bug Type: SQLite related
 Operating System: Win 2K Pro
 PHP Version:  5CVS-2004-05-03 (dev)
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

"Fixed" in CVS.

http://cvs.php.net/diff.php/pecl/sqlite/sqlite.c?r1=1.62.2.21&r2=1.62.2.22&ty=u




Previous Comments:


[2004-05-27 00:15:40] saleh at sfsj dot net

I also want to add that even if you try to use transactions to execute
multiple queries..
I tried to use BEGIN; and BEGIN TRANSACTION; but both of them will not
work and nothing will happen..



[2004-05-03 22:41:50] csaba at alum dot mit dot edu

Description:

The sqlite_query page in a prominent box declares that SQLite will
execute multiple queries separated by semicolons, but this seems not to
be the case according to the test below.  While I posted a workaround
for this, it is not very efficient because you have to send each query
separately.

I have tested the command line version of SQLite (2.8.13) and it does
accept multiple queries separated by semicolons.

Also, if dealing with this problem, I'd like to suggest that if the
final query is a SELECT or other statement which produces some result
normally destined for the user, that it be returned to the caller that
way.  The documentation makes it seems like maybe it will and maybe it
won't, saying it's undefined.  In particular, it would be helpful if
SELECT and PRAGMA returned their results.  If you indulge me on that,
please extend the functionality to sqlite_array_query.

Thanks,
Csaba Gabor

Reproduce code:
---
$db = sqlite_open(':memory:', 0666, $sqliteerror);
$tbl = "delme";
$multiQuery = "CREATE TABLE $tbl (foo INTEGER PRIMARY KEY, bar TEXT);"
.
  "INSERT INTO $tbl VALUES (null, 'Hi Mom');";
$dbRes = sqlite_query ($db, $multiQuery);
$creationTest = "PRAGMA table_info('$tbl');";
$insertTest = "SELECT * FROM $tbl;";
$acT = sqlite_array_query ($db, $creationTest, SQLITE_ASSOC);
var_dump ($acT);
print "Table was created,";
$aiT = sqlite_array_query ($db, $insertTest, SQLITE_ASSOC);
var_dump ($aiT);
print "but nothing was inserted";


Expected result:

I expect to that the SQL INSERT statement was carried out

Actual result:
--
However, SQL statements after the first ';' seem to be ignored.  Thus,
the second var_dump only gets an empty array.





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


#28537 [Fbk->Opn]: "SELECT rowid, * FROM " crashes

2004-07-10 Thread bhoc at tiscali dot ch
 ID:   28537
 User updated by:  bhoc at tiscali dot ch
 Reported By:  bhoc at tiscali dot ch
-Status:   Feedback
+Status:   Open
 Bug Type: SQLite related
 Operating System: any
 PHP Version:  5.0.0RC2
 New Comment:

Still crashes. (checked with windows version) :-(


Previous Comments:


[2004-07-10 15:08:24] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip





[2004-06-17 10:29:18] bhoc at tiscali dot ch

Same problem in 5.0.0RC3... :-(
-- 
Ben



[2004-05-27 13:19:53] bhoc at tiscali dot ch

Okay, I did manage to create a backtrace. A spare machine was
well-equipped. :)

$ gdb /usr/bin/php
GNU gdb 5.3

(gdb) run selectcrash.php
Starting program: /usr/bin/php selectcrash.php
php: /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/select.c:659:
generateColumnTypes: Assertion `jnSrc' failed.

Program received signal SIGABRT, Aborted.
0x400d1ac1 in kill () from /lib/libc.so.6
(gdb) bt
#0  0x400d1ac1 in kill () from /lib/libc.so.6
#1  0x400d16eb in raise () from /lib/libc.so.6
#2  0x400d3127 in abort () from /lib/libc.so.6
#3  0x400cad6a in __assert_fail () from /lib/libc.so.6
#4  0x080b004e in generateColumnTypes (pParse=0x0, pTabList=0x822f060,
pEList=0x822eb40)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/select.c:662
#5  0x080b262e in sqliteSelect (pParse=0xbfffcce0, p=0x822ef58,
eDest=1,
iParm=0, pParent=0x0, parentTab=0, pParentAgg=0x0)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/select.c:2219
#6  0x08099397 in yy_reduce (yypParser=0x82316a8, yyruleno=100) at
parse.y:270
#7  0x0809a2cb in sqliteParser (yyp=0x82316a8, yymajor=106, yyminor=
  {z = 0x0, dyn = 0, n = 3}, pParse=0x0) at parse.c:3946
#8  0x080b3648 in sqliteRunParser (pParse=0xbfffcce0,
zSql=0x401e9b68 "select rowid, * from allinfo",
pzErrMsg=0xbfffcdcc)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/tokenize.c:458
#9  0x080aa191 in sqliteMain (db=0x822b090,
zSql=0x401e9b68 "select rowid, * from allinfo", xCallback=0,
pArg=0x0,
pzTail=0xbfffcdc8, ppVm=0xbfffcdd4, pzErrMsg=0xbfffcdcc)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/main.c:631
#10 0x080aa306 in sqlite_compile (db=0x822b090,
zSql=0x401e9b68 "select rowid, * from allinfo", pzTail=0xbfffcdc8,
ppVm=0xbfffcdd4, pzErrMsg=0xbfffcdcc)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/main.c:696
#11 0x08095b27 in sqlite_query (object=0x0, db=0x401f05ac,
sql=0x401e9b68 "select rowid, * from allinfo", sql_len=28, mode=0,
buffered=1, return_value=0x401e9c6c, prres=0x0)
at /usr/src/php-5.0.0RC2/ext/sqlite/sqlite.c:1464
#12 0x080961fa in zif_sqlite_query (ht=1075774892,
return_value=0x401e9c6c,
this_ptr=0x0, return_value_used=1)
at /usr/src/php-5.0.0RC2/ext/sqlite/sqlite.c:1669
#13 0x081779a6 in zend_do_fcall_common_helper
(execute_data=0xbfffd580,
opline=0x401f2ca4, op_array=0x822f4e8)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:2699
#14 0x08177f03 in zend_do_fcall_handler (execute_data=0xbfffd580,
opline=0x401f2ca4, op_array=0x822f4e8)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:2828
#15 0x08175032 in execute (op_array=0x822f4e8)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:1391
#16 0x08177ab6 in zend_do_fcall_common_helper
(execute_data=0xbfffd760,
opline=0x401e97e4, op_array=0x401e8d68)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:2728
#17 0x08177f03 in zend_do_fcall_handler (execute_data=0xbfffd760,
opline=0x401e97e4, op_array=0x401e8d68)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:2828
#18 0x08175032 in execute (op_array=0x401e8d68)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:1391
#19 0x0815b3e4 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /usr/src/php-5.0.0RC2/Zend/zend.c:1058
#20 0x0812b912 in php_execute_script (primary_file=0xbb00)
at /usr/src/php-5.0.0RC2/main/main.c:1630
#21 0x0817eec8 in main (argc=2, argv=0xbb94)
at /usr/src/php-5.0.0RC2/sapi/cgi/cgi_main.c:1562
#22 0x400bdd06 in __libc_start_main () from /lib/libc.so.6
(gdb) frame 4
#4  0x080b004e in generateColumnTypes (pParse=0x0, pTabList=0x822f060,
pEList=0x822eb40)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/select.c:662
662   assert( iCol==-1 || (iCol>=0 && iColnCol) );

-- 
Ben



[2004-05-27 12:25:57] bhoc at tiscali dot ch

My currently available environment does not support creating
backtraces, unfortunately.
But I have put a simple php applet in
http://download.pentagroup.ch/phpbug-28537.tar.gz. It will create an
sqlite database, populate it, query it, roll over and die. Hope this
helps.
--

#28537 [Opn->Bgs]: "SELECT rowid, * FROM " crashes

2004-07-10 Thread wez
 ID:   28537
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bhoc at tiscali dot ch
-Status:   Open
+Status:   Bogus
 Bug Type: SQLite related
 Operating System: any
 PHP Version:  5.0.0RC2
 New Comment:

In that case, please report the bug to the sqlite developers, since the
crash is inside libsqlite.
I'm marking this as Bogus because it isn't a bug in PHP.
Feel free to reference this report from your sqlite report.

The sqlite bug reporting page is here:
http://www.sqlite.org/cvstrac/tktnew



Previous Comments:


[2004-07-10 15:34:41] bhoc at tiscali dot ch

Still crashes. (checked with windows version) :-(



[2004-07-10 15:08:24] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip





[2004-06-17 10:29:18] bhoc at tiscali dot ch

Same problem in 5.0.0RC3... :-(
-- 
Ben



[2004-05-27 13:19:53] bhoc at tiscali dot ch

Okay, I did manage to create a backtrace. A spare machine was
well-equipped. :)

$ gdb /usr/bin/php
GNU gdb 5.3

(gdb) run selectcrash.php
Starting program: /usr/bin/php selectcrash.php
php: /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/select.c:659:
generateColumnTypes: Assertion `jnSrc' failed.

Program received signal SIGABRT, Aborted.
0x400d1ac1 in kill () from /lib/libc.so.6
(gdb) bt
#0  0x400d1ac1 in kill () from /lib/libc.so.6
#1  0x400d16eb in raise () from /lib/libc.so.6
#2  0x400d3127 in abort () from /lib/libc.so.6
#3  0x400cad6a in __assert_fail () from /lib/libc.so.6
#4  0x080b004e in generateColumnTypes (pParse=0x0, pTabList=0x822f060,
pEList=0x822eb40)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/select.c:662
#5  0x080b262e in sqliteSelect (pParse=0xbfffcce0, p=0x822ef58,
eDest=1,
iParm=0, pParent=0x0, parentTab=0, pParentAgg=0x0)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/select.c:2219
#6  0x08099397 in yy_reduce (yypParser=0x82316a8, yyruleno=100) at
parse.y:270
#7  0x0809a2cb in sqliteParser (yyp=0x82316a8, yymajor=106, yyminor=
  {z = 0x0, dyn = 0, n = 3}, pParse=0x0) at parse.c:3946
#8  0x080b3648 in sqliteRunParser (pParse=0xbfffcce0,
zSql=0x401e9b68 "select rowid, * from allinfo",
pzErrMsg=0xbfffcdcc)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/tokenize.c:458
#9  0x080aa191 in sqliteMain (db=0x822b090,
zSql=0x401e9b68 "select rowid, * from allinfo", xCallback=0,
pArg=0x0,
pzTail=0xbfffcdc8, ppVm=0xbfffcdd4, pzErrMsg=0xbfffcdcc)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/main.c:631
#10 0x080aa306 in sqlite_compile (db=0x822b090,
zSql=0x401e9b68 "select rowid, * from allinfo", pzTail=0xbfffcdc8,
ppVm=0xbfffcdd4, pzErrMsg=0xbfffcdcc)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/main.c:696
#11 0x08095b27 in sqlite_query (object=0x0, db=0x401f05ac,
sql=0x401e9b68 "select rowid, * from allinfo", sql_len=28, mode=0,
buffered=1, return_value=0x401e9c6c, prres=0x0)
at /usr/src/php-5.0.0RC2/ext/sqlite/sqlite.c:1464
#12 0x080961fa in zif_sqlite_query (ht=1075774892,
return_value=0x401e9c6c,
this_ptr=0x0, return_value_used=1)
at /usr/src/php-5.0.0RC2/ext/sqlite/sqlite.c:1669
#13 0x081779a6 in zend_do_fcall_common_helper
(execute_data=0xbfffd580,
opline=0x401f2ca4, op_array=0x822f4e8)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:2699
#14 0x08177f03 in zend_do_fcall_handler (execute_data=0xbfffd580,
opline=0x401f2ca4, op_array=0x822f4e8)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:2828
#15 0x08175032 in execute (op_array=0x822f4e8)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:1391
#16 0x08177ab6 in zend_do_fcall_common_helper
(execute_data=0xbfffd760,
opline=0x401e97e4, op_array=0x401e8d68)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:2728
#17 0x08177f03 in zend_do_fcall_handler (execute_data=0xbfffd760,
opline=0x401e97e4, op_array=0x401e8d68)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:2828
#18 0x08175032 in execute (op_array=0x401e8d68)
at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:1391
#19 0x0815b3e4 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /usr/src/php-5.0.0RC2/Zend/zend.c:1058
#20 0x0812b912 in php_execute_script (primary_file=0xbb00)
at /usr/src/php-5.0.0RC2/main/main.c:1630
#21 0x0817eec8 in main (argc=2, argv=0xbb94)
at /usr/src/php-5.0.0RC2/sapi/cgi/cgi_main.c:1562
#22 0x400bdd06 in __libc_start_main () from /lib/libc.so.6
(gdb) frame 4
#4  0x080b004e in generateColumnTypes (pParse=0x0, pTabList=0x822f060,
pEList=0x822eb40)
at /usr/src/php-5.0.0RC2/ext/sqlite/libsqlite/src/select.c:662
662   assert( iCol==-1 || (iCol>=0 && iColnCol)

#29086 [NEW]: PHP 5.0 crash on long php scripts

2004-07-10 Thread gunnar at greyhound-data dot com
From: gunnar at greyhound-data dot com
Operating system: MorphOS, Windows, Linux
PHP version:  5.0.0RC3
PHP Bug Type: Reproducible crash
Bug description:  PHP 5.0 crash on long php scripts

Description:

PHP crashes on long source scripts.


I use Apache(1.3.31) and PHP 5.0.0rc3 on MorphOS.

I noticed that all long scripts (over 1200 lines)
will crash the Apache/PHP build.

Script with 1000 or less lines run fine in less than
a second, as soon as I add a few hundred more lines PHP 
will die.

The amount of compiled lines of code is the limiting 
factor. A script with 3000 lines of code and 2000 
commented out lines runs fine.
But the same script with just 1200 lines of code (none 
of them commented out) dies.


It looks like a memory problem but my machine has still 
more than 250 MB free... The php memory limit (in 
php.ini) is set to 20MB.




Mr Bert Slagter reproduced the crash on Linux and 
Windows.

He said that:
The same problem exists here, though on a significant 
higher linecount.

Tried it on WinXP, Apache 1.3.29 with PHP 5.0.0-dev 
(built: Jul-2-2004).
With 17.000 lines everything is fine. With 18.000 of the 
above lines apache crashes. Verified it by adding and 
deleting 1.000 lines a few times.

Tried it on Linux, CLI PHP 5.0.0-dev (build: Jul-8
-2004). Here it segfaults exactly on 34517 lines. One 
line less, no problem. Reproducable.

Running under the Zend Debugger Apache doesn't crash.


I hope this report will help you to find and fix the 
problem. If you have any ideas how I extend the number 
of lines which PHP is able to compile on MorphOS, then 
please tell me.

Kind regards

Gunnar

Reproduce code:
---
Any code which is long enough will crash PHP

I verified this with a very simple test script

";
$i++
print "$i";
...[1000 more lines like the above]..
?>

Actual result:
--
PHP crashes.

PHP on MorphOS will crash on scripts longer than 1500 
lines.

PHP on WinXP will crash an script longer 18,000 lines.
Tried it on WinXP, Apache 1.3.29 with PHP 5.0.0-dev 
(built: Jul-2-2004).

On linux PHP will crash an scripts longer than 35,000 
lines.

-- 
Edit bug report at http://bugs.php.net/?id=29086&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29086&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29086&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=29086&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=29086&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29086&r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=29086&r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=29086&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=29086&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=29086&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=29086&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=29086&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=29086&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29086&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=29086&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=29086&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=29086&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29086&r=float


#28025 [Com]: function redeclared when return before its declaration

2004-07-10 Thread patrice at lazareff dot com
 ID:   28025
 Comment by:   patrice at lazareff dot com
 Reported By:  Christian dot Lefebvre at atosorigin dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: linux
 PHP Version:  5.0.0RC1
 New Comment:

Same behavior if exit is used instead of return, i.e:

if(defined("MY_CONSTANT")) exit;

define("MY_CONSTANT", "1");

function foo() {}

The only workaround seems to be using an else statement:

if(defined("MY_CONSTANT") return;

else {
function foo() {}
}

how sad...


Previous Comments:


[2004-04-16 11:08:47] Christian dot Lefebvre at atosorigin dot com

#18590 seems to be the same bug, but without
explanation nor test case. and it's marked "no feedback" :-(



[2004-04-16 11:04:31] Christian dot Lefebvre at atosorigin dot com

Description:

lot of php3 codes begin include files by a
  if(defined(..)) return; define(..)
to simulate include_once behavior

it works fine with php4, but with php5, functions
declared after this return raise "cannot redeclare" error
when the file is included twice.


Reproduce code:
---
t1.php :


t2.php :



Expected result:

with php4 :
in t2
still in t2
Here am I !!
in t2
already went there
Here am I !!


Actual result:
--
with php5 :
in t2
still in t2
Here am I !!

Fatal error: Cannot redeclare toto() (previously declared in t2.php:13)
in t2.php on line 14






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


#29087 [NEW]: DOM + XSL extension doesn't expand entities

2004-07-10 Thread x-penguin at tut dot by
From: x-penguin at tut dot by
Operating system: Linux
PHP version:  5CVS-2004-07-10 (dev)
PHP Bug Type: DOM XML related
Bug description:  DOM + XSL extension doesn't expand entities

Description:

When attempting to do an XSL transformation using the new DOM and XSL
extensions available in PHP 5 RC 3, I've noticed entities are not expanded
in the output. If I import the DOM object into SimpleXML, the entities are
expanded.

I run Apache/2.0.48 (Unix). I don't recall 
seeing any errors when I built and installed Apache, 
PHP, libxml2, or libxslt.

libxslt 1.1.8
libxml  2.6.11
php5cvs-2004-07-10

./configure --prefix=/usr --sysconfdir=/etc/ --with-apxs2
--with-config-file-path=/etc --with-zlib --with-bz2 --enable-ftp
--with-gettext --with-iconv --with-mysql=/usr --with-ncurses
--enable-mbstring=ru --enable-mbregex --enable-mbstr-enc-trans --with-png
--with-pgsql --disable-short-tags --with-xsl --with-libxml --with-gd
--without-sqlite

Reproduce code:
---


]>

  Example Document
  &entity1;
  &entity2;

EOD;

$xsl = <
  
XSL Element 1: 
XSL Element 2: 
XSL Element 3: 
  

EOD;

$xmlDOM = new DomDocument;
$xmlDOM->loadXML($xml);
$xslDOM = new DomDocument;
$xslDOM->loadXML($xsl);
$processor = new XsltProcessor;
$processor->importStyleSheet($xslDOM);
print $processor->transformToXML($xmlDOM);

$xmlDocument = simplexml_import_dom($xmlDOM);
print 'SimpleXML Element 1: ' . $xmlDocument->element1 . '';
print 'SimpleXML Element 2: ' . $xmlDocument->element2 . '';
print 'SimpleXML Element 3: ' . $xmlDocument->element3 . '';
?> 

Expected result:

XSL Element 1: Example Document

XSL Element 2: Entity 1

XSL Element 3: Entity 2

SimpleXML Element 1: Example Document

SimpleXML Element 2: Entity 1

SimpleXML Element 3: Entity 2

Actual result:
--
XSL Element 1: Example Document

XSL Element 2:

XSL Element 3:

SimpleXML Element 1: Example Document

SimpleXML Element 2: Entity 1

SimpleXML Element 3: Entity 2

-- 
Edit bug report at http://bugs.php.net/?id=29087&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29087&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29087&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=29087&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=29087&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29087&r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=29087&r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=29087&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=29087&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=29087&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=29087&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=29087&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=29087&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29087&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=29087&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=29087&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=29087&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29087&r=float


#29088 [NEW]: "php -m" segfaults

2004-07-10 Thread sb at sebastian-bergmann dot de
From: sb at sebastian-bergmann dot de
Operating system: Windows XP
PHP version:  5CVS-2004-07-10 (dev)
PHP Bug Type: Reproducible crash
Bug description:  "php -m" segfaults

Description:

"php -m" shows the correct output and then segfaults.

Reproduce code:
---
php -m

Expected result:

No segfault.

Actual result:
--
php5ts_debug.dll!_zend_is_inconsistent(_hashtable * ht=0xcdcdcdcd, char *
file=0x10559d9c, int line=510)  Zeile 53 + 0x3  C
php5ts_debug.dll!zend_hash_destroy(_hashtable * ht=0xcdcdcdcd)  Zeile 510
+ 0x17  C
php5ts_debug.dll!php_shutdown_stream_wrappers(int module_number=0, void *
* * tsrm_ls=0x00933020)  Zeile 1376 + 0x12  C
php5ts_debug.dll!php_module_shutdown(void * * * tsrm_ls=0x00933020)  Zeile
1516 + 0xd  C
php.exe!main(int argc=2, char * * argv=0x00932cf8)  Zeile 1052 + 0xfC
php.exe!mainCRTStartup()  Zeile 398 + 0x11  C
kernel32.dll!77e614c7() 
ntdll.dll!77f844a8()


-- 
Edit bug report at http://bugs.php.net/?id=29088&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29088&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29088&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=29088&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=29088&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29088&r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=29088&r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=29088&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=29088&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=29088&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=29088&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=29088&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=29088&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29088&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=29088&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=29088&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=29088&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29088&r=float


#29088 [Opn->Ver]: "php -m" segfaults

2004-07-10 Thread sebastian
 ID:   29088
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sb at sebastian-bergmann dot de
-Status:   Open
+Status:   Verified
 Bug Type: Reproducible crash
 Operating System: Windows XP
 PHP Version:  5CVS-2004-07-10 (dev)


Previous Comments:


[2004-07-10 18:28:20] sb at sebastian-bergmann dot de

Description:

"php -m" shows the correct output and then segfaults.

Reproduce code:
---
php -m

Expected result:

No segfault.

Actual result:
--
php5ts_debug.dll!_zend_is_inconsistent(_hashtable * ht=0xcdcdcdcd, char
* file=0x10559d9c, int line=510)  Zeile 53 + 0x3C
php5ts_debug.dll!zend_hash_destroy(_hashtable * ht=0xcdcdcdcd)  Zeile
510 + 0x17  C
php5ts_debug.dll!php_shutdown_stream_wrappers(int module_number=0, void
* * * tsrm_ls=0x00933020)  Zeile 1376 + 0x12C
php5ts_debug.dll!php_module_shutdown(void * * * tsrm_ls=0x00933020) 
Zeile 1516 + 0xdC
php.exe!main(int argc=2, char * * argv=0x00932cf8)  Zeile 1052 + 0xfC
php.exe!mainCRTStartup()  Zeile 398 + 0x11  C
kernel32.dll!77e614c7() 
ntdll.dll!77f844a8()






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


#29087 [Opn->Bgs]: DOM + XSL extension doesn't expand entities

2004-07-10 Thread chregu
 ID:   29087
 Updated by:   [EMAIL PROTECTED]
 Reported By:  x-penguin at tut dot by
-Status:   Open
+Status:   Bogus
 Bug Type: DOM XML related
 Operating System: Linux
 PHP Version:  5CVS-2004-07-10 (dev)
 New Comment:

You have to use

$xmlDOM->substituteEntities = true;

before $xmlDOM->loadXML()




Previous Comments:


[2004-07-10 18:25:28] x-penguin at tut dot by

Description:

When attempting to do an XSL transformation using the new DOM and XSL
extensions available in PHP 5 RC 3, I've noticed entities are not
expanded in the output. If I import the DOM object into SimpleXML, the
entities are expanded.

I run Apache/2.0.48 (Unix). I don't recall 
seeing any errors when I built and installed Apache, 
PHP, libxml2, or libxslt.

libxslt 1.1.8
libxml  2.6.11
php5cvs-2004-07-10

./configure --prefix=/usr --sysconfdir=/etc/ --with-apxs2
--with-config-file-path=/etc --with-zlib --with-bz2 --enable-ftp
--with-gettext --with-iconv --with-mysql=/usr --with-ncurses
--enable-mbstring=ru --enable-mbregex --enable-mbstr-enc-trans
--with-png --with-pgsql --disable-short-tags --with-xsl --with-libxml
--with-gd --without-sqlite

Reproduce code:
---


]>

  Example Document
  &entity1;
  &entity2;

EOD;

$xsl = <
  
XSL Element 1: 
XSL Element 2: 
XSL Element 3: 
  

EOD;

$xmlDOM = new DomDocument;
$xmlDOM->loadXML($xml);
$xslDOM = new DomDocument;
$xslDOM->loadXML($xsl);
$processor = new XsltProcessor;
$processor->importStyleSheet($xslDOM);
print $processor->transformToXML($xmlDOM);

$xmlDocument = simplexml_import_dom($xmlDOM);
print 'SimpleXML Element 1: ' . $xmlDocument->element1 . '';
print 'SimpleXML Element 2: ' . $xmlDocument->element2 . '';
print 'SimpleXML Element 3: ' . $xmlDocument->element3 . '';
?> 

Expected result:

XSL Element 1: Example Document

XSL Element 2: Entity 1

XSL Element 3: Entity 2

SimpleXML Element 1: Example Document

SimpleXML Element 2: Entity 1

SimpleXML Element 3: Entity 2

Actual result:
--
XSL Element 1: Example Document

XSL Element 2:

XSL Element 3:

SimpleXML Element 1: Example Document

SimpleXML Element 2: Entity 1

SimpleXML Element 3: Entity 2





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


#29082 [Bgs]: Variable call line argument problem

2004-07-10 Thread markem at ev1 dot net
 ID:   29082
 User updated by:  markem at ev1 dot net
 Reported By:  markem at ev1 dot net
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Windows98se
 PHP Version:  4CVS-2004-07-10 (stable)
 New Comment:

Ok.  I went back to the O'Reilly book and re-read the section on
"Missing Parameters" on page 69 of the March 2002, First Edition.  I
see where the warning message is stated to occur and I know about the
suppression of the warning messages.  I can live with that.

This leaves me with question #2.  That of why the null parameters are
not being interpreted as null parameters and instead PHP dies when it
attempts to interpret them.  I feel that this is a valid problem as, in
some (but not all) other languages the empty set on call lines simply
becomes a null value.  Further, PHP's dying in this case negates the
"Missing Parameters" section on page 69.

I will though, go talk with people on the help boards and see what they
say about this.

Thanks for you time and sorry about #1.

Later!

Mark


Previous Comments:


[2004-07-10 14:25:08] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.



[2004-07-10 08:10:39] markem at ev1 dot net

Description:

File #1:

#   HTML Library

#   Begin Table

function tb( $alignA, $bgPicA, $bgColorA, $borderA, $borderColorA,
$cellPaddingA, $cellSpacingA, $columnsA, $heightA, $widthA )
{
$theReply = "

Running the above generates:

C:\apache\lib>php test.php
Content-type: text/html
X-Powered-By: PHP/4.3.1

PHP Warning:  Missing argument 4 for tb() in c:\apache\lib\html.php on
line 7
PHP Warning:  Missing argument 5 for tb() in c:\apache\lib\html.php on
line 7
PHP Warning:  Missing argument 6 for tb() in c:\apache\lib\html.php on
line 8
PHP Warning:  Missing argument 7 for tb() in c:\apache\lib\html.php on
line 8
PHP Warning:  Missing argument 8 for tb() in c:\apache\lib\html.php on
line 8
PHP Warning:  Missing argument 9 for tb() in c:\apache\lib\html.php on
line 8
PHP Warning:  Missing argument 10 for tb() in c:\apache\lib\html.php on
line 8




Expected result:

1. If not having to pass arguments to a function (variable call
arguments) is normal, then why does PHP generate a warning about
missing arguments?

2. If variable call arguments are possible - why can you not call the
function in this manner:

  $theLine .= tb(,,"#ff");

???  PHP should treat the empty ",," as two nulls.  Instead, an
error is generated by PHP and PHP dies.






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


#28220 [NoF->Opn]: mb_strwidth() returns wrong width values for some Hangul characters.

2004-07-10 Thread martin dot t dot kutschker at blackbox dot net
 ID:  28220
 User updated by: martin dot t dot kutschker at blackbox dot net
 Reported By: martin dot t dot kutschker at blackbox dot net
-Status:  No Feedback
+Status:  Open
 Bug Type:mbstring related
 PHP Version: Irrelevant
 New Comment:

I never tried the original code (only noticed the problem from reading
the docs), so I did not test the diff. Anyway I'm offline for two
weeks, so I won't be able to give the fix a try for some time.


Previous Comments:


[2004-07-07 01:00:04] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, 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".



[2004-06-29 14:25:26] [EMAIL PROTECTED]

Try this patch and see if it works.

http://www.voltex.jp/patches/bug28220-
preliminary.patch.diff

This patch is only applicable for PHP 4.3.2 or later.


~/src/php-4.3.7 $ patch -p0 -R < bug28220-
preliminary.patch.diff




[2004-05-04 11:53:53] martin dot t dot kutschker at blackbox dot net

I rechecked EastAsianWidth and have found two more wide chars and
noticed that the range 2E80..4DB5 is in fact split by a single
half-width filler space char

1100..115F  Hangul Choseong
2329LEFT-POINTING ANGLE BRACKET
232ARIGHT-POINTING ANGLE BRACKET
2E80-303E   CJK and Kangxi radicals, ideographic chars
3041-4DB5   Hiragana, Katakana, Bopomofo and Hangul letters
4E00..D7A3  CJK ideographs, Yi and Hangul syllables
F900..FA6A  CJK compatibiliy ideographs
FE30..FE6B  presentation forms, punctuations, etc.
FF01..FF60  full-width Latin letters
FFE0FULLWIDTH CENT SIGN
FFE1FULLWIDTH POUND SIGN
FFE2FULLWIDTH NOT SIGN
FFE3FULLWIDTH MACRON
FFE4FULLWIDTH BROKEN BAR
FFE5FULLWIDTH YEN SIGN
FFE6FULLWIDTH WON SIGN

Please also note that Unicode knows about "ambigous" (A) chars. See
quotes from http://www.unicode.org/reports/tr11/

"In a broad sense, wide characters include W, F, and A (when in EA
context), 
 while narrow characters include N, Na, H, and A (when not in EA
context)."

"Ambiguous characters behave like wide or narrow characters depending
on 
 context (language tag, script identification, associated font, source
of 
 data, or explicit markup; all can provide the context). If the context

 cannot be established reliably they should be treated as narrow
characters 
 by default."

So mb_strwidth could try to auto-detect the context (eg. by locale) or
have an optional east-asian context argument.



[2004-05-01 15:30:09] [EMAIL PROTECTED]

This is a valid bug.
# thanks Nuno.




[2004-04-29 18:48:17] martin dot t dot kutschker at blackbox dot net

Description:

The table describing the width of the characters is wrong if you
compare it with the table for Unicode 4.0:

http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt

For the BMP the wide/full-width chars are:

1100..115F  Hangul Choseong
2E80..4DB5  CJK radicals and CJK Ideograph Extension A
4E00..D7A3  CJK Ideographs, Yi syll. and Hangul syll.
F900..FA6A  CJK compatibiliy ideographs
FE30..FE6B  presentation forms, punctuations, etc.
FF01..FF60  full-width Latin letters
FFE0FULLWIDTH CENT SIGN
FFE1FULLWIDTH POUND SIGN
FFE2FULLWIDTH NOT SIGN
FFE3FULLWIDTH MACRON
FFE4FULLWIDTH BROKEN BAR
FFE5FULLWIDTH YEN SIGN
FFE6FULLWIDTH WON SIGN

I didn't check what the actual implementation does, but the docs are
certainly wrong (if they mean Unicoe codepoints).






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


#29089 [NEW]: Configure Warning concerning MySQL Version 4.1.3

2004-07-10 Thread s dot seipel at gmx dot de
From: s dot seipel at gmx dot de
Operating system: Linux Slackware 9.1
PHP version:  5CVS-2004-07-10 (dev)
PHP Bug Type: Compile Failure
Bug description:  Configure Warning concerning MySQL Version 4.1.3

Description:

I downloaded and compile the mysql version 4.1.3 (no snapshot or CVS)
which run without problems. then I checkout the latest PHP 5 CVS and run
the following configure:

./configure --with-apxs2=/usr/local/apache2/bin/apxs
--with-config-file-path=/etc --with-mysql=/usr/local/mysql4.0
--with-mysqli=/usr/local/mysql4.1/bin/mysql_config --with-xmlrpc
--enable-soap --enable-wddx --with-jpeg-dir=/usr/local --with-gd
--with-freetype-dir=/usr/local --with-ttf=/usr/local
--with-zlib-dir=/usr/local --enable-sockets

checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
checking for mysql_set_server_option in -lmysqlclient... yes
checking for mysql_stmt_field_count in -lmysqlclient... no
configure: error: MySQLI doesn't support versions < 4.1.3 anymore. Please
update your libraries.

MySQL 4.1.3 is actually installed, is this a Bug?



-- 
Edit bug report at http://bugs.php.net/?id=29089&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29089&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29089&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=29089&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=29089&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29089&r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=29089&r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=29089&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=29089&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=29089&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=29089&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=29089&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=29089&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29089&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=29089&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=29089&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=29089&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29089&r=float


#29089 [Opn->Fbk]: Configure Warning concerning MySQL Version 4.1.3

2004-07-10 Thread curt
 ID:   29089
 Updated by:   [EMAIL PROTECTED]
 Reported By:  s dot seipel at gmx dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Linux Slackware 9.1
 PHP Version:  5CVS-2004-07-10 (dev)
 New Comment:

You can't compile the mysql4.0 client and mysql4.1 client together, try
changing your --with-mysql to /usr/local/mysql4.1/

Also, check your config.log, it will show you how mysql.4.1.x was
tested.



Previous Comments:


[2004-07-10 20:51:16] s dot seipel at gmx dot de

Description:

I downloaded and compile the mysql version 4.1.3 (no snapshot or CVS)
which run without problems. then I checkout the latest PHP 5 CVS and
run the following configure:

./configure --with-apxs2=/usr/local/apache2/bin/apxs
--with-config-file-path=/etc --with-mysql=/usr/local/mysql4.0
--with-mysqli=/usr/local/mysql4.1/bin/mysql_config --with-xmlrpc
--enable-soap --enable-wddx --with-jpeg-dir=/usr/local --with-gd
--with-freetype-dir=/usr/local --with-ttf=/usr/local
--with-zlib-dir=/usr/local --enable-sockets

checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
checking for mysql_set_server_option in -lmysqlclient... yes
checking for mysql_stmt_field_count in -lmysqlclient... no
configure: error: MySQLI doesn't support versions < 4.1.3 anymore.
Please update your libraries.

MySQL 4.1.3 is actually installed, is this a Bug?







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


#29064 [Opn->Asn]: Exact numeric/decimal/money datatypes lose precision

2004-07-10 Thread magnus
 ID:   29064
 Updated by:   [EMAIL PROTECTED]
 Reported By:  daniel dot beet at accuratesoftware dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Sybase-ct (ctlib) related
 Operating System: Windows 2000 Server
 PHP Version:  4.3.7
-Assigned To:  
+Assigned To:  thekid


Previous Comments:


[2004-07-08 17:08:17] daniel dot beet at accuratesoftware dot com

Sorry, forgot the SQL to insert test data:

insert into test 
(test_decimal, test_numeric, test_money, test_bigint, test_int,
test_smallmoney, test_smallint, test_tinyint, test_real, test_double) 
values 
(12345678901234567890123456789012.123456,
12345678901234567890123456.123456789012,
123456789012345.1234,
12345678901234567890123456789012345678,
1234567890,
123456.1234,
12345,
123,
123456789.12345679,
123456789.12345679
)

insert into test 
(test_decimal, test_numeric, test_money, test_bigint, test_int,
test_smallmoney, test_smallint, test_tinyint, test_real, test_double) 
values 
(-12345678901234567890123456789012.123456,
-12345678901234567890123456.123456789012,
-123456789012345.1234,
-12345678901234567890123456789012345678,
-1234567890,
-123456.1234,
-12345,
255,
-123456789.12345679,
-123456789.12345679
)



[2004-07-08 17:06:18] daniel dot beet at accuratesoftware dot com

Description:

PHP's Sybase CT library converts all numeric datatypes to ints of
floats, so numbers outside their ranges lose precision.

The following patchs fix these issues in a similar way to mssql and
oci8 libs:

Compare: (<)php-4.3.7\ext\sybase_ct\php_sybase_ct.1.14.2.3.h (3780
bytes)
   with: (>)php-4.3.7\ext\sybase_ct\php_sybase_ct.h (3929 bytes)

94c94
<   int max_length, numeric;
---
>   int max_length, numeric, precision, scale;

Compare: (<)php-4.3.7\ext\sybase_ct\php_sybase_ct.1.73.2.16.c (65966
bytes)
   with: (>)php-4.3.7\ext\sybase_ct\php_sybase_ct.c (68800 bytes)

1233,1235c1233,1242
<   case CS_MONEY4_TYPE:
<   result->datafmt[i].maxlength = 24;
<   result->numerics[i] = 2;
---
>   result->datafmt[i].maxlength = 24;
>   result->numerics[i] = 5;
>   result->datafmt[i].precision = 19;
>   result->datafmt[i].scale = 4;
>   break;
>   case CS_MONEY4_TYPE:
>   result->datafmt[i].maxlength = 13;
>   result->numerics[i] = 2;
>   result->datafmt[i].precision = 10;
>   result->datafmt[i].scale = 4;
1244,1246c1251,1254
<   result->datafmt[i].maxlength = 
result->datafmt[i].precision + 3;
<   /* numeric(10) vs numeric(10, 1) */
<   result->numerics[i] = (result->datafmt[i].scale == 0) 
? 3 : 2;
---
>   /* numerics can overflow real and long types, return 
> as a string
*/
>   result->datafmt[i].maxlength = 
> result->datafmt[i].precision + 3;
>   /* numeric(10) vs numeric(10, 1) */
>   result->numerics[i] = (result->datafmt[i].scale == 0) 
> ? 4 : 5;
1277c1285,1287
<   result->fields[i].numeric = result->numerics[i];
---
>   result->fields[i].numeric = (result->numerics[i] > 0) ? 1 : 0;
>   result->fields[i].precision = result->datafmt[i].precision;
>   result->fields[i].scale = result->datafmt[i].scale;
1862,1864c1872,1876
<   case CS_NUMERIC_TYPE:
<   case CS_DECIMAL_TYPE:
<   return "real";
---
>   return "real";
>   break;
>   case CS_NUMERIC_TYPE:
>   case CS_DECIMAL_TYPE:
>   return "numeric";
1929a1941,1942
>   add_property_long(return_value, "precision",
result->fields[field_offset].precision);
>   add_property_long(return_value, "scale",
result->fields[field_offset].scale);

Hope that helps! Thanks, Dan.


Reproduce code:
---
Create a table test:

create table test (
test_decimaldecimal(38, 6)  null,
test_numericnumeric(38, 12) null,
test_money  money   null,
test_bigint decimal(38, 0)  null,
test_intint null,
test_smallmoney smallmoney  null,
test_smallint   smallintnull,
test_tinyinttinyint null,
test_real   float   null,
test_double float   null
)

execute the following script via php cli exe:

\n";

sybase_select_db('test', $conn);
echo "DB selected OK\n";

$result = sybase_query('select test_decimal, test_numeric, test_money,
test_smallmoney, test_bigint, test_int, test_smallint, test_tinyint

#29090 [NEW]: Destructor Segfaults PHP5RC3

2004-07-10 Thread derek at battams dot ca
From: derek at battams dot ca
Operating system: Linux 2.4
PHP version:  5.0.0RC3
PHP Bug Type: Reproducible crash
Bug description:  Destructor Segfaults PHP5RC3

Description:

PHP segfaults when trying to use the result of md5 or sha1 (tried md5
initally, then tried sha1 when code kept segfaulting) as a file name in my
destructor.  Unfortunately, I can't reproduce the crash with a small script
(the class in question is part of a much larger system), but I know how to
elimite the segfault within the project's codebase.  If I remove the call
to md5 in the sample code then there's no segfault (no matter how hard I
try).  Once I put the md5 (or sha1) call back into the destructor then the
segfault returns immediately.

Reproduce code:
---
   public function __destruct()
   {
  $cacheFile1 = BP_CACHE . "/" . md5($this->getDN());
  $cacheFile2 = BP_CACHE . "/" . md5($this->findAttribute("mail"));
  if(!file_exists($cacheFile1) || !file_exists($cacheFile2) ||
!(is_link($cacheFile1) xor is_link($cacheFile2)))
 if(file_exists($cacheFile1) && !is_link($cacheFile1))
 {
if(file_exists($cacheFile2))
   @unlink($cacheFile2);
@symlink(basename($cacheFile1), $cacheFile2);
 }
 else if(file_exists($cacheFile2) && !is_link($cacheFile2))
 {
if(file_exists($cacheFile1))
   @unlink($cacheFile1);
@symlink(basename($cacheFile2), $cacheFile1);
 }
 else
 {
if(file_exists($cacheFile1))
   @unlink($cacheFile1);
if(file_exists($cacheFile2))
   @unlink($cacheFile2);
 }
  return;
   }


Expected result:

Destructor returns with no segfault.

Actual result:
--
(gdb) bt
#0  0x081a3c99 in zend_hash_find (ht=0x4042cc5c,
arKey=0x4042c734 "cacheFile1", nKeyLength=11, pData=0x33303934)
at /tmp/php-5.0.0RC3/Zend/zend_hash.c:846
#1  0x081b74b6 in zend_fetch_var_address (opline=0x404323b8,
Ts=0xbfffe030,
type=0) at /tmp/php-5.0.0RC3/Zend/zend_execute.c:762

#2  0x081b9c5f in zend_fetch_r_handler (execute_data=0xbfffe6d0,
opline=0x404323b8, op_array=0x4042c25c)
at /tmp/php-5.0.0RC3/Zend/zend_execute.c:1994
#3  0x081b8a77 in execute (op_array=0x4042c25c)
at /tmp/php-5.0.0RC3/Zend/zend_execute.c:1389
#4  0x08194fa6 in zend_call_function (fci=0xbfffe850,
fci_cache=0xbfffe830)
at /tmp/php-5.0.0RC3/Zend/zend_execute_API.c:835
#5  0x081aa0c2 in zend_call_method (object_pp=0xbfffe8dc,
obj_ce=0x4042b824,
fn_proxy=0x0, function_name=0x81f9c04 "__destruct",
function_name_len=10,
retval_ptr_ptr=0x0, param_count=1078141880, arg1=0x0, arg2=0x0)
at /tmp/php-5.0.0RC3/Zend/zend_interfaces.c:79
#6  0x081ac3e1 in zend_objects_destroy_object (object=0x4043bf54,   
handle=1078141880) at /tmp/php-5.0.0RC3/Zend/zend_objects.c:78
#7  0x081ae106 in zend_objects_store_call_destructors (objects=0x82521d4)
at /tmp/php-5.0.0RC3/Zend/zend_objects_API.c:54
#8  0x0819428c in shutdown_executor ()
at /tmp/php-5.0.0RC3/Zend/zend_execute_API.c:209
#9  0x0819db09 in zend_deactivate () at /tmp/php-5.0.0RC3/Zend/zend.c:819
#10 0x0816cdb5 in php_request_shutdown (dummy=0x0)
at /tmp/php-5.0.0RC3/main/main.c:1212
#11 0x081c3e8e in main (argc=2, argv=0xb6a4)
at /tmp/php-5.0.0RC3/sapi/cli/php_cli.c:1046
#12 0x42015574 in __libc_start_main () from /lib/tls/libc.so.6

Also, this from the debug enabled PHP binary:

[EMAIL PROTECTED] public_html]$ $R/php test.person.php
Warning: String is not zero-terminated
(
Z„̏*̏*D) (source:
/tmp/php-5.0.0RC3/Zend/zend_execute_API.c:391) in Unknown on line 0
[Sat Jul 10 23:41:43 2004]  Script:  'test.person.php'
---
/tmp/php-5.0.0RC3/Zend/zend_execute_API.c(391) : Block 0x4140E9D4
 status:
/tmp/php-5.0.0RC3/Zend/zend_variables.c(45) : Actual location (location
was relayed)
Beginning:  Cached (allocated on
/tmp/php-5.0.0RC3/main/streams/streams.c:1529, 69 bytes)
  End:  OK
---

-- 
Edit bug report at http://bugs.php.net/?id=29090&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29090&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29090&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=29090&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=29090&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29090&r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=29090&r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=29090&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=29090&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=29090&r=notwrong
Not enough info:http://bugs.php.net

#27901 [Com]: highlight_* produces random results

2004-07-10 Thread email at dalegroup dot net
 ID:   27901
 Comment by:   email at dalegroup dot net
 Reported By:  mr dot heat at gmx dot de
 Status:   No Feedback
 Bug Type: *General Issues
 Operating System: i686-suse-linux
 PHP Version:  4.3.5
 New Comment:

I am seeing this problem with my code.
Sometimes highlight_string outputs correctly and other times it doesn't
add the colour.

An example can be seen here:
http://www.dalegroup.net/index.php?newsid=37#comments
You may need to reload the page a few times.

The server is running Windows2003, php 4.3.7 and apache 2.0.50.


Previous Comments:


[2004-05-05 22:29:30] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2004-04-29 23:06:14] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2004-04-27 06:21:45] helgi at trance dot is

Reloaded the site couple of times, got the wrong result in half of the
times



[2004-04-26 09:57:09] mr dot heat at gmx dot de

Change the category if it is wrong, please.

A phpinfo() is here: http://phpcenter.de/~thiemo/phpinfo.php This is
independend from the user agent.



[2004-04-26 00:43:15] [EMAIL PROTECTED]

I just reproduced it on the link and have also seen this in the
usernotes.

Could you perhaps provide a phpinfo() and the browser you are using
(user-agent string)?



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

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


#29089 [Fbk->Bgs]: Configure Warning concerning MySQL Version 4.1.3

2004-07-10 Thread georg
 ID:   29089
 Updated by:   [EMAIL PROTECTED]
 Reported By:  s dot seipel at gmx dot de
-Status:   Feedback
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: Linux Slackware 9.1
 PHP Version:  5CVS-2004-07-10 (dev)
 New Comment:

fixed status -> bogus


Previous Comments:


[2004-07-10 22:21:54] [EMAIL PROTECTED]

You can't compile the mysql4.0 client and mysql4.1 client together, try
changing your --with-mysql to /usr/local/mysql4.1/

Also, check your config.log, it will show you how mysql.4.1.x was
tested.




[2004-07-10 20:51:16] s dot seipel at gmx dot de

Description:

I downloaded and compile the mysql version 4.1.3 (no snapshot or CVS)
which run without problems. then I checkout the latest PHP 5 CVS and
run the following configure:

./configure --with-apxs2=/usr/local/apache2/bin/apxs
--with-config-file-path=/etc --with-mysql=/usr/local/mysql4.0
--with-mysqli=/usr/local/mysql4.1/bin/mysql_config --with-xmlrpc
--enable-soap --enable-wddx --with-jpeg-dir=/usr/local --with-gd
--with-freetype-dir=/usr/local --with-ttf=/usr/local
--with-zlib-dir=/usr/local --enable-sockets

checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
checking for mysql_set_server_option in -lmysqlclient... yes
checking for mysql_stmt_field_count in -lmysqlclient... no
configure: error: MySQLI doesn't support versions < 4.1.3 anymore.
Please update your libraries.

MySQL 4.1.3 is actually installed, is this a Bug?







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