#30312 [Com]: sybase_unbuffered_query calls

2007-01-19 Thread lobster2 at xs4all dot nl
 ID:   30312
 Comment by:   lobster2 at xs4all dot nl
 Reported By:  dfleury2 at libertysurf dot fr
 Status:   Assigned
 Bug Type: Sybase-ct (ctlib) related
 Operating System: *
 PHP Version:  5.1.3, 4.4.2
 Assigned To:  thekid
 New Comment:

The use of sybase_query instead of sybase_unbuffered_query solved the
core dumps in my case (PHP 4.4.0  5.2.0 CLI with Sybase 12.5.3 on AIX
5.2).

I used the sybase_unbuffered_query calls with the third parameter =
false. The second sql query call in the script would crash the process
every time, surviving only the first fetch on the result set.


Previous Comments:


[2006-05-02 16:36:41] dfleury2 at libertysurf dot fr

The bugs are still here in the 5.1.3 release.



[2005-02-07 22:01:53] dfleury2 at libertysurf dot fr

The patch seems to work for the first example but not this one.
?php
$db   = sybase_connect( 'LOCALHOST', 'sa', '' );
 
$query= sybase_unbuffered_query( 'select getdate()' );
$array= sybase_fetch_array( $query );
var_dump( $array );
sybase_free_result( $query );
 
$query  = sybase_unbuffered_query( 'select getdate(), getdate()'
);
$array  = sybase_fetch_array( $query );
var_dump( $array );
 
sybase_free_result( $query );
?
 
OUTPUT

array(2) {
  [0]=
  string(19) Feb  7 2005  2:18PM
  [computed]=
  string(19) Feb  7 2005  2:18PM
}
array(4) {
  [0]=
  string(19) Feb  7 2005  2:18PM
  [8]=
  string(19) Feb  7 2005  2:18PM
  [1]=
  string(19) Feb  7 2005  2:18PM
  [Ø]=
  string(19) Feb  7 2005  2:18PM
}
Bus error
 
with the patch a sample like this didn't work.
(I not sure if it's a legitimate code)
 
?php
$db = sybase_connect( 'LOCAHOST', 'sa', '' );
 
$i = 0;
while( 1 )
{
$query = sybase_unbuffered_query( 'select * from big_table' );
$array = sybase_fetch_array( $query );
echo $i++. \n;
}
?
 

but I got :
Warning: sybase_fetch_array(): supplied argument is not a valid Sybase
result resource in /tmp_mnt/users/fxa/fle
ury/divers/php/test2.php on line 8
 
(work fine in 4.3.8 but with memory leaks).



[2005-02-06 15:35:40] [EMAIL PROTECTED]

Sorry, I cannot reproduce this, neither with apache / mod_php4 nor with
cli-php. Maybe this is because I'm using FreeTDS (and not the ct-libs?)

I added a test case to the PHP test system
(http://cvs.php.net/co.php/php-src/ext/sybase_ct/tests/bug30312.phpt)

which worked fine for me.

I can see a possible double-free in the sourcecode. Maybe could you try
the following patch:

http://sitten-polizei.de/bug30312.patch



[2005-02-03 21:11:37] dfleury2 at libertysurf dot fr

The problem still here. (php_sybase_ct.c didn't move)

A free avoid the core, but the array is corrupted for the second
fetch.

?php
$db = sybase_connect( 'LOCALHOST', 'sa', '' );
 
$query  = sybase_unbuffered_query( 'select getdate()' );
$array  = sybase_fetch_array( $query );
var_dump( $array );
sybase_free_result( $query );
 
$query  = sybase_unbuffered_query( 'select getdate(), getdate()'
);
while( $array  = sybase_fetch_array( $query ) )
var_dump( $array );
//sybase_free_result( $query );
?



[2004-10-03 20:21:32] dfleury2 at libertysurf dot fr

Description:

Two calls to sybase_unbuffered_query core Apache.

To correct the problem before somelse those it
perfectly, I had add a return after
php_sybase_finish_results(result);

/* Forward declaration */
static int php_sybase_finish_results (sybase_result *result);

static void php_free_sybase_result(zend_rsrc_list_entry *rsrc
TSRMLS_DC)
{
sybase_result *result = (sybase_result *)rsrc-ptr;

/* Check to see if we've read all rows */
if (result-sybase_ptr  result-sybase_ptr-active_result_index)
{
if (result-sybase_ptr-cmd) {
ct_cancel(NULL, result-sybase_ptr-cmd, CS_CANCEL_ALL);
}
php_sybase_finish_results(result);
return;// correction
}

_free_sybase_result(result);
}

Reproduce code:
---
?php
$db = sybase_connect( 'LOCALHOST', 'sa', '' );

$query  = sybase_unbuffered_query( 'select getdate()' );
$array  = sybase_fetch_array( $query );

echo $array[ 0 ];
echo 'br';

$query  = sybase_unbuffered_query( 'select getdate()' );
$array  = sybase_fetch_array( $query );
echo $array[ 0 ];
?

Expected result:

2-Oct-2004 18:42:50
2-Oct-2004 18:42:50

Actual result:
--
Core dump

(gdb) bt
#0  0x080e2890 in _free_sybase_result (result=0x81cb89c)
at
/home/david/Documents/php-4.3.9/ext/sybase_ct/php_sybase_ct.c:128
#1

#40176 [NEW]: Bug #40038 gcc configure failure can be fixed with CXX=xlC ./configure

2007-01-19 Thread lobster2 at xs4all dot nl
From: lobster2 at xs4all dot nl
Operating system: AIX 5.2
PHP version:  5.2.0
PHP Bug Type: Compile Failure
Bug description:  Bug #40038 gcc configure failure can be fixed with CXX=xlC 
./configure

Description:

The bug in configure for PHP 5.2.0 where it thinks gcc is the only
compiler present (where it isn't), see bug #40038 can be fixed by issuing
the following configure:

   $ CXX=xlC ./configure



Reproduce code:
---
Sorry not to include code because I do not have it at my disposal right
now.

Expected result:

Why are these things written off as non-PHP bugs? Aren't the build and
configure scripts not as much part of PHP as the code itself. Every time I
build PHP on AIX I need to spend a few hours hunting bugs before it
builds, whereas Linux/gcc compiles flawlessly.

I saw that the bug on the enum values has already been reported (fix:
EXTRA_CFLAGS='-qenum=intlong' make).

Dito for compile syntax error on the // NULL comment that should have been
/* NULL */ or something of the kind.

Another major pain was the location of .o files in the .libs subdirs
instead of in the same dir as the .lo files reside and where nm expects
them, causing the make of sapi/cli/php to fail. Adding symlinks solved
this for me. See the Makefile where the output of the echo of .lo files to
sed is fed to nm.



-- 
Edit bug report at http://bugs.php.net/?id=40176edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40176r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40176r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40176r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40176r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=40176r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=40176r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=40176r=needscript
Try newer version:http://bugs.php.net/fix.php?id=40176r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=40176r=support
Expected behavior:http://bugs.php.net/fix.php?id=40176r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=40176r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=40176r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40176r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40176r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40176r=dst
IIS Stability:http://bugs.php.net/fix.php?id=40176r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=40176r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40176r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=40176r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=40176r=mysqlcfg


#37462 [Com]: install fails for sapi/cgi/php

2007-01-19 Thread lobster2 at xs4all dot nl
 ID:   37462
 Comment by:   lobster2 at xs4all dot nl
 Reported By:  ionut dot aivanesei at amdocs dot com
 Status:   Open
 Bug Type: Compile Failure
 Operating System: AIX 5.3
 PHP Version:  5.2.0
 New Comment:

Problem (3) reported [19 Oct 2006 11:37pm UTC] sharanu_mudgal at yahoo
dot com

Only important if you need the php CLI executable.

Worked around this by symlinking all .libs/*.o one dir higher up the
hierarchy, where the .lo files with the same name reside.


Previous Comments:


[2007-01-07 23:14:02] ionut dot aivanesei at amdocs dot com

Hi there,

The same thing is happenign again for 5.2.0

Ionutz



[2006-10-19 23:37:16] sharanu_mudgal at yahoo dot com

Hi!  I am having almost the same issue on AIX 5.2. Here is the sequence
of things I did.

1) Tried to build php5.1.4 for apache2.2.  Build failed with the
following error

/opt/freeware/bin/bash: -c: line 1: unexpected EOF while looking for
matching `''
make: The error code from the last command is 2.

2) After searching for some time for help found the link to below bug
which pointed towards using gnu make instead of the native AIX.
http://bugs.php.net/bug.php?id=35888

3)used the gnu make for the build.   The build was successfull. 
However I get the following messages in the log files

snippet
echo '#! .'  php.sym  echo php.sym  nm -BCpg `echo
ext/libxml/libxml.lo ext/pcre/pcrelib/pcre_chartables.lo
ext/pcre/pcrelib/pcre_ucp_searchfuncs.lo
ext/pcre/pcrelib/pcre_compile.lo ext/pcre/pcrelib/pcre_config.lo
ext/pcre/pcrelib/pcre_dfa_exec.lo ext/pcre/pcrelib/pcre_exec.lo
ext/pcre/pcrelib/pcre_fullinfo.lo ext/pcre/pcrelib/pcre_get.lo
ext/pcre/pcrelib/pcre_globals.lo ext/pcre/pcrelib/pcre_info.lo
ext/pcre/pcrelib/pcre_maketables.lo ext/pcre/pcrelib/pcre_ord2utf8.lo
ext/pcre/pcrelib/pcre_refcount.lo ext/pcre/pcrelib/pcre_study.lo
ext/pcre/pcrelib/pcre_tables.lo ext/pcre/pcrelib/pcre_try_flipped.lo
ext/pcre/pcrelib/pcre_valid_utf8.lo ext/pcre/pcrelib/pcre_version.lo
ext/pcre/pcrelib/pcre_xclass.lo ext/pcre/php_pcre.lo ext/ctype/ctype.lo
ext/date/php_date.lo ext/date/lib/astro.lo ext/date/lib/dow.lo
ext/date/lib/parse_date.lo ext/date/lib/parse_tz.lo
ext/date/lib/timelib.lo ext/date/lib/tm2unixtime.lo
ext/date/lib/unixtime2tm.lo ext/dom/php_dom.lo ext/dom/attr.lo
ext/dom/document.lo ext/dom/domerrorhandler.lo ext/dom/domstringlist.lo
ext/dom/domexception.lo ext/dom/namelist.lo
ext/dom/processinginstruction.lo ext/dom/cdatasection.lo
ext/dom/documentfragment.lo ext/dom/domimplementation.lo
ext/dom/element.lo ext/dom/node.lo ext/dom/string_extend.lo
ext/dom/characterdata.lo ext/dom/documenttype.lo
ext/dom/domimplementationlist.lo ext/dom/entity.lo ext/dom/nodelist.lo
ext/dom/text.lo ext/dom/comment.lo ext/dom/domconfiguration.lo
ext/dom/domimplementationsource.lo ext/dom/entityreference.lo
ext/dom/notation.lo ext/dom/xpath.lo ext/dom/dom_iterators.lo
ext/dom/typeinfo.lo ext/dom/domerror.lo ext/dom/domlocator.lo
ext/dom/namednodemap.lo ext/dom/userdatahandler.lo ext/ftp/php_ftp.lo
ext/ftp/ftp.lo ext/gettext/gettext.lo ext/hash/hash.lo
ext/hash/hash_md.lo ext/hash/hash_sha.lo ext/hash/hash_ripemd.lo
ext/hash/hash_haval.lo ext/hash/hash_tiger.lo ext/hash/hash_gost.lo
ext/hash/hash_snefru.lo ext/hash/hash_whirlpool.lo
ext/hash/hash_adler32.lo ext/hash/hash_crc32.lo ext/iconv/iconv.lo
ext/mbstring/oniguruma/regcomp.lo ext/mbstring/oniguruma/regerror.lo
ext/mbstring/oniguruma/regexec.lo ext/mbstring/oniguruma/reggnu.lo
ext/mbstring/oniguruma/regparse.lo ext/mbstring/oniguruma/regenc.lo
ext/mbstring/oniguruma/regext.lo ext/mbstring/oniguruma/regsyntax.lo
ext/mbstring/oniguruma/regtrav.lo ext/mbstring/oniguruma/regversion.lo
ext/mbstring/oniguruma/st.lo ext/mbstring/oniguruma/enc/unicode.lo
ext/mbstring/oniguruma/enc/ascii.lo ext/mbstring/oniguruma/enc/utf8.lo
ext/mbstring/oniguruma/enc/euc_jp.lo
ext/mbstring/oniguruma/enc/euc_tw.lo
ext/mbstring/oniguruma/enc/euc_kr.lo ext/mbstring/oniguruma/enc/sjis.lo
ext/mbstring/oniguruma/enc/iso8859_1.lo
ext/mbstring/oniguruma/enc/iso8859_2.lo
ext/mbstring/oniguruma/enc/iso8859_3.lo
ext/mbstring/oniguruma/enc/iso8859_4.lo
ext/mbstring/oniguruma/enc/iso8859_5.lo
ext/mbstring/oniguruma/enc/iso8859_6.lo
ext/mbstring/oniguruma/enc/iso8859_7.lo
ext/mbstring/oniguruma/enc/iso8859_8.lo
ext/mbstring/oniguruma/enc/iso8859_9.lo
ext/mbstring/oniguruma/enc/iso8859_10.lo
ext/mbstring/oniguruma/enc/iso8859_11.lo
ext/mbstring/oniguruma/enc/iso8859_13.lo
ext/mbstring/oniguruma/enc/iso8859_14.lo
ext/mbstring/oniguruma/enc/iso8859_15.lo
ext/mbstring/oniguruma/enc/iso8859_16.lo
ext/mbstring/oniguruma/enc/koi8.lo ext/mbstring/oniguruma/enc/koi8_r.lo
ext/mbstring/oniguruma/enc/big5.lo
ext/mbstring/oniguruma/enc/utf16_be.lo
ext/mbstring/oniguruma/enc/utf16_le.lo
ext/mbstring/oniguruma/enc/utf32_be.lo
ext/mbstring/oniguruma/enc/utf32_le.lo
ext/mbstring/libmbfl

#40176 [Bgs]: Bug #40038 gcc configure failure can be fixed with CXX=xlC ./configure

2007-01-19 Thread lobster2 at xs4all dot nl
 ID:   40176
 User updated by:  lobster2 at xs4all dot nl
 Reported By:  lobster2 at xs4all dot nl
 Status:   Bogus
-Bug Type: Compile Failure
+Bug Type: *General Issues
 Operating System: AIX 5.2
 PHP Version:  5.2.0
 New Comment:

Why was this report set to status Bogus within a few minutes? The
problems and *fixes* I submitted are very real. This is demoralizing
:-(


Previous Comments:


[2007-01-19 20:14:42] [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.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.





[2007-01-19 20:05:57] lobster2 at xs4all dot nl

Description:

The bug in configure for PHP 5.2.0 where it thinks gcc is the only
compiler present (where it isn't), see bug #40038 can be fixed by
issuing the following configure:

   $ CXX=xlC ./configure



Reproduce code:
---
Sorry not to include code because I do not have it at my disposal right
now.

Expected result:

Why are these things written off as non-PHP bugs? Aren't the build and
configure scripts not as much part of PHP as the code itself. Every
time I build PHP on AIX I need to spend a few hours hunting bugs
before it builds, whereas Linux/gcc compiles flawlessly.

I saw that the bug on the enum values has already been reported (fix:
EXTRA_CFLAGS='-qenum=intlong' make).

Dito for compile syntax error on the // NULL comment that should have
been /* NULL */ or something of the kind.

Another major pain was the location of .o files in the .libs subdirs
instead of in the same dir as the .lo files reside and where nm expects
them, causing the make of sapi/cli/php to fail. Adding symlinks solved
this for me. See the Makefile where the output of the echo of .lo files
to sed is fed to nm.







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


#37362 [NEW]: Make halts on semicolon in function declaration

2006-05-08 Thread lobster2 at xs4all dot nl
From: lobster2 at xs4all dot nl
Operating system: AIX 5.2 ML07
PHP version:  5.1.4
PHP Bug Type: Compile Failure
Bug description:  Make halts on semicolon in function declaration

Description:

During make of PHP 5.1.3 and PHP 5.1.4 on AIX 5.2 ML07  
with xlc 6.0 the process halts on syntax errors. 
 

Reproduce code:
---
$ make
[...]
Zend/zend_language_parser.c, line 2585.1: 1506-046 (S)   
Syntax error.   
[... and after fixing the previous error ...]   
Zend/zend_ini_parser.c, line 1081.1: 1506-046 (S) Syntax   
error.

Stop.

Expected result:

Fix: comment out the line previous to the one reported, 
with the single semicolon on its own. 


-- 
Edit bug report at http://bugs.php.net/?id=37362edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37362r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=37362r=trysnapshot51
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37362r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37362r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37362r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=37362r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=37362r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=37362r=needscript
Try newer version:http://bugs.php.net/fix.php?id=37362r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=37362r=support
Expected behavior:http://bugs.php.net/fix.php?id=37362r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=37362r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=37362r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37362r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37362r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37362r=dst
IIS Stability:http://bugs.php.net/fix.php?id=37362r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=37362r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37362r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=37362r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=37362r=mysqlcfg


#37362 [Opn]: Make halts on semicolon in function declaration

2006-05-08 Thread lobster2 at xs4all dot nl
 ID:   37362
 User updated by:  lobster2 at xs4all dot nl
 Reported By:  lobster2 at xs4all dot nl
 Status:   Open
 Bug Type: Compile Failure
 Operating System: AIX 5.2 ML07
 PHP Version:  5.1.4
 New Comment:

$ diff zend_language_parser.c.orig zend_language_parser.c 
2582c2582,2583 
 ; 
--- 
 # Next line commented out on AIX 5.2 ML07 with xlc 6.0 
 #; 
 
 
$ diff zend_ini_parser.c.orig zend_ini_parser.c 
1078c1078,1079 
 ; 
--- 
 # Next line commented out on AIX 5.2 ML07 with xlc 6.0 
 #;


Previous Comments:


[2006-05-08 08:15:16] lobster2 at xs4all dot nl

Description:

During make of PHP 5.1.3 and PHP 5.1.4 on AIX 5.2 ML07  
with xlc 6.0 the process halts on syntax errors. 
 

Reproduce code:
---
$ make
[...]
Zend/zend_language_parser.c, line 2585.1: 1506-046 (S)   
Syntax error.   
[... and after fixing the previous error ...]   
Zend/zend_ini_parser.c, line 1081.1: 1506-046 (S) Syntax   
error.

Stop.

Expected result:

Fix: comment out the line previous to the one reported, 
with the single semicolon on its own. 






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