#25897 [Com]: Compilation fails immediately on Zend (zend.h)
ID: 25897 Comment by: ricardoj at hotlink dot com dot br Reported By: kscott at toadmail dot com Status: No Feedback Bug Type: Compile Failure Operating System: Solaris 8 PHP Version: 4.3.4RC1 New Comment: Take a look at bug #26105 for a useful workaround to this issue. Previous Comments: [2003-10-28 04:47:31] [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. [2003-10-17 11:28:51] [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 [2003-10-17 10:31:22] kscott at toadmail dot com Description: Apparently there is a change from 4.3.3 to 4.3.4RC1 in how the zend.h file is built? Compiling 4.3.3 works fine, but 4.3.4RC1 complains: from main/php.h:34, from ext/zlib/zlib.c:28: /Zend/zend.h:311: argument format specified for non-function 'error-function', and carries on for lines 312 ('printf_function'), 444 ('zend_printf'), and 451 ('zend_error_cb'). with same error statement while trying to compile the first file, ext/zlib/zlib.c. The OS is Solaris 8, installed zlib is 1.1.4, compiling PHP 4.3.4RC1 using gcc 3.0.3. PHP 4.3.0 and 4.3.3 both compiled and installed fine. Issue only with 4.3.4RC1. BTW, 4.3.4RC1 compiled and installed fine on a Linux RH 7.3 box, no issues at all. I've run into a couple problems trying to compile this version on a Solaris box. -- Edit this bug report at http://bugs.php.net/?id=25897&edit=1
#26105 [Com]: argument format specified for non-function
ID: 26105 Comment by: ricardoj at hotlink dot com dot br Reported By: simon dot boulet at divahost dot net Status: Closed Bug Type: Compile Failure Operating System: Linux/gcc 3.0.4 PHP Version: 4.3.4 New Comment: Just the same behaviour for me on Solaris 8/gcc 3.0. Previous Comments: [2003-11-04 15:39:22] [EMAIL PROTECTED] This bug has been fixed in CVS. In case this was a PHP problem, 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/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. [2003-11-03 21:39:45] simon dot boulet at divahost dot net Description: The new version on PHP fails to compile. I was previously using version 4.3.3 and it was compiling fine. Configure flags: --with-mysql --with-apxs --with-gd -with-zlib --with-jpeg-dir=/usr --with-apxs=/usr/local/apache/bin/apxs `make` fails straight at the beginning with: /bin/sh /root/php-4.3.4/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/zlib/ -I/root/php-4.3.4/ext/zlib/ -DPHP_ATOM_INC -I/root/php-4.3.4/include -I/root/php-4.3.4/main -I/root/php-4.3.4 -I/root/php-4.3.4/Zend -I/root/php-4.3.4/ext/xml/expat -I/root/php-4.3.4/TSRM -g -O2 -prefer-pic -c /root/php-4.3.4/ext/zlib/zlib.c -o ext/zlib/zlib.lo In file included from /root/php-4.3.4/main/php.h:34, from /root/php-4.3.4/ext/zlib/zlib.c:28: /root/php-4.3.4/Zend/zend.h:311: argument format specified for non-function `error_function' /root/php-4.3.4/Zend/zend.h:312: argument format specified for non-function `printf_function' /root/php-4.3.4/Zend/zend.h:444: argument format specified for non-function `zend_printf' /root/php-4.3.4/Zend/zend.h:451: argument format specified for non-function `zend_error_cb' make: *** [ext/zlib/zlib.lo] Error 1 I am far from being a C expert, but I think it as something to do with GCC version checking in Zend/zend.h near line 155. I was able to compile just fine with: #define ZEND_ATTRIBUTE_PTR_FORMAT(type, idx, first) instead of: # define ZEND_ATTRIBUTE_PTR_FORMAT(type, idx, first) __attribute__ ((format(type, idx, first))) that would be defined with ZEND_GCC_VERSION >= 3000. -- Edit this bug report at http://bugs.php.net/?id=26105&edit=1
#26147 [NEW]: PHP Fatal error: Call to undefined function: imagepsloadfont() in /XXX/X.php
From: rwh at lim dot com Operating system: RH9 PHP version: 4.3.4 PHP Bug Type: GD related Bug description: PHP Fatal error: Call to undefined function: imagepsloadfont() in /XXX/X.php Description: PHP is compiled as an Apache 1.3 DSO; ./configure --with-apxs=/path/to/apxs --with-gd --with-zlib-dir=/path/to/dir I just upgraded the PHP engine from 3.0.x to 4.3.4 and I'm debugging the php3 code. According to http://php.net/imagepsloadfont, imagepsloadfont() is a built-in function, so I don't understand the Fatal Error. Here is the line from my apache log: [Wed Nov 5 18:33:04 2003] [error] PHP Fatal error: Call to undefined function: imagepsloadfont() in /path/to/chart.inc on line 322 Reproduce code: --- Here is line 322 of chart.inc: -- 313 function render ($log = false, $cache = false) { if(!$this->is_chart) return false; $this->rescale(); if ($log) $this->log = $log; 322 $fgc = imagepsloadfont(_fontpath . "/type1/FGC_.pfb"); $im = imagecreate($this->x, $this->y); $bgcolor= ImageColorAllocate($im, 255, 255, 255); $fgcolor[0] = ImageColorAllocate($im, 0, 0, 0); $fgcolor[1] = ImageColorAllocate($im, 0, 0, 255); $hicolor= ImageColorAllocate($im, 255, 0, 0); $bdcolor= ImageColorAllocate($im, 229, 227, 204); 330 $gridcolor = ImageColorAllocate($im, 192, 192, 192); - Also: - 15define('_fontpath', '/path/to/fonts'); - Expected result: I expect the code to make it through the engine without a Fatal Error. The function is a built-in so I don't see how it would be undefined. Actual result: -- Here is the line from my apache log: [Wed Nov 5 18:33:04 2003] [error] PHP Fatal error: Call to undefined function: imagepsloadfont() in /path/to/chart.inc on line 322 -- Edit bug report at http://bugs.php.net/?id=26147&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26147&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26147&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26147&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26147&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26147&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26147&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26147&r=support Expected behavior: http://bugs.php.net/fix.php?id=26147&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26147&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26147&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26147&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26147&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26147&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26147&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26147&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26147&r=float
#26146 [Opn->Bgs]: setcookie not accepting expire parameter
ID: 26146 Updated by: [EMAIL PROTECTED] Reported By: ateo at skepticshour dot com -Status: Open +Status: Bogus Bug Type: Session related Operating System: Gentoo Linux PHP Version: 4.3.3 New Comment: User error -> bogus. Previous Comments: [2003-11-05 21:59:41] ateo at skepticshour dot com please close bug report. I found the issue. It was a userside issue. [2003-11-05 21:31:00] ateo at skepticshour dot com Description: setcookie not accepting the expire parameter no matter how I configure it. ie: setcookie("user","$info",time()+3); OR $ntime = time(); setcookie("user","$info",$ntime()+3); OR $expire = time() + 30; setcookie("user","$info",$expire); In each one of the above examples, the cookie IS set, but ends with session. Compile time information: './configure' '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--without-readline' '--with-apxs2=/usr/sbin/apxs2' '--with-ndbm' '--with-db4=/usr' '--with-mcrypt=/usr' '--with-mhash' '--with-ming=/usr' '--with-swf=/usr' '--with-gdbm=/usr' '--with-java=/opt/blackdown-jdk-1.4.1' '--without-pgsql' '--with-snmp' '--enable-ucd-snmp-hack' '--with-xpm-dir=/usr/X11R6' '--with-pdflib=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-png-dir=/usr' '--with-jpeg' '--with-jpeg-dir=/usr' '--enable-exif' '--with-tiff-dir=/usr' '--with-mysql=/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-freetype-dir=/usr' '--with-gettext' '--with-qtdom' '--with-pspell' '--with-openssl' '--with-imap' '--without-ldap' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--without-kerberos' '--with-pam' '--disable-memory-limit' '--enable-ipv6' '--with-curlwrappers' '--with-curl' '--enable-dbx' '--with-imap-ssl' '--with-zlib' '--with-zlib-dir=/usr/lib' '--with-sablot=/usr' '--enable-xslt' '--with-xslt-sablot' '--with-xmlrpc' '--enable-wddx' '--with-xml' '--enable-mbstring=all' '--enable-mbregex' '--with-bz2' '--with-crack' '--with-cdb' '--enable-bcmath' '--enable-calendar' '--enable-dbase' '--enable-filepro' '--enable-ftp' '--with-mime-magic' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvipc' '--with-iconv' '--enable-shmop' '--enable-dio' '--enable-inline-optimization' '--enable-track-vars' '--enable-trans-sid' '--enable-versioning' '--with-config-file-path=/etc/php/apache2-php4' Reproduce code: --- setcookie("user","$info",time()+3); Expected result: a cookie named "user" with information "$info" set to the remote computer's hard drive and set to expire in 30,000 seconds after cookie is written to hard drive. Actual result: -- Cookie is written into memory that expires at the end of session. -- Edit this bug report at http://bugs.php.net/?id=26146&edit=1
#26146 [Opn]: setcookie not accepting expire parameter
ID: 26146 User updated by: ateo at skepticshour dot com Reported By: ateo at skepticshour dot com Status: Open Bug Type: Session related Operating System: Gentoo Linux PHP Version: 4.3.3 New Comment: please close bug report. I found the issue. It was a userside issue. Previous Comments: [2003-11-05 21:31:00] ateo at skepticshour dot com Description: setcookie not accepting the expire parameter no matter how I configure it. ie: setcookie("user","$info",time()+3); OR $ntime = time(); setcookie("user","$info",$ntime()+3); OR $expire = time() + 30; setcookie("user","$info",$expire); In each one of the above examples, the cookie IS set, but ends with session. Compile time information: './configure' '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--without-readline' '--with-apxs2=/usr/sbin/apxs2' '--with-ndbm' '--with-db4=/usr' '--with-mcrypt=/usr' '--with-mhash' '--with-ming=/usr' '--with-swf=/usr' '--with-gdbm=/usr' '--with-java=/opt/blackdown-jdk-1.4.1' '--without-pgsql' '--with-snmp' '--enable-ucd-snmp-hack' '--with-xpm-dir=/usr/X11R6' '--with-pdflib=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-png-dir=/usr' '--with-jpeg' '--with-jpeg-dir=/usr' '--enable-exif' '--with-tiff-dir=/usr' '--with-mysql=/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-freetype-dir=/usr' '--with-gettext' '--with-qtdom' '--with-pspell' '--with-openssl' '--with-imap' '--without-ldap' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--without-kerberos' '--with-pam' '--disable-memory-limit' '--enable-ipv6' '--with-curlwrappers' '--with-curl' '--enable-dbx' '--with-imap-ssl' '--with-zlib' '--with-zlib-dir=/usr/lib' '--with-sablot=/usr' '--enable-xslt' '--with-xslt-sablot' '--with-xmlrpc' '--enable-wddx' '--with-xml' '--enable-mbstring=all' '--enable-mbregex' '--with-bz2' '--with-crack' '--with-cdb' '--enable-bcmath' '--enable-calendar' '--enable-dbase' '--enable-filepro' '--enable-ftp' '--with-mime-magic' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvipc' '--with-iconv' '--enable-shmop' '--enable-dio' '--enable-inline-optimization' '--enable-track-vars' '--enable-trans-sid' '--enable-versioning' '--with-config-file-path=/etc/php/apache2-php4' Reproduce code: --- setcookie("user","$info",time()+3); Expected result: a cookie named "user" with information "$info" set to the remote computer's hard drive and set to expire in 30,000 seconds after cookie is written to hard drive. Actual result: -- Cookie is written into memory that expires at the end of session. -- Edit this bug report at http://bugs.php.net/?id=26146&edit=1
#26144 [Fbk->Opn]: ImageRotate() inverts/blacks the alpha channel
ID: 26144 User updated by: sprice at wisc dot edu Reported By: sprice at wisc dot edu -Status: Feedback +Status: Open Bug Type: GD related Operating System: Mac 10.3 PHP Version: 4.3.4 New Comment: ./configure --with-apxs --with-mysql --with-gd --with- png-dir=/usr/local --with-zlib-dir=/usr --with-jpeg- dir=/usr/local --disable-short-tags (and phpinfo() says it is the bundled, 2.0.15 compat. version) Is this not reproducible? Previous Comments: [2003-11-05 21:39:11] [EMAIL PROTECTED] And what might have been the configure line you used? If you didn't use the bundled GD library, bogus this yourself.. [2003-11-05 19:46:04] sprice at wisc dot edu Tried it with latest/greatest CVS (php4-STABLE -200311060030) and it is still broken. [2003-11-05 17:55:24] [EMAIL PROTECTED] This bug has been fixed in CVS. In case this was a PHP problem, 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/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. [2003-11-05 17:52:49] sprice at wisc dot edu Description: ImageRotate() is messing with my alpha channel. Examples to follow. Reproduce code: --- Expected result: When you run this as is, you get a semitransparent blue rectangle. Actual result: -- If you replace the commented out ImagePNG() with the commented one, the alpha channel inverts itself. As you increase the transparency of $almost_clear, it becomes black (in contrast to the non- ImageRotate() line). -- Edit this bug report at http://bugs.php.net/?id=26144&edit=1
#26144 [Opn->Fbk]: ImageRotate() inverts/blacks the alpha channel
ID: 26144 Updated by: [EMAIL PROTECTED] Reported By: sprice at wisc dot edu -Status: Open +Status: Feedback Bug Type: GD related Operating System: Mac 10.3 PHP Version: 4.3.4 New Comment: And what might have been the configure line you used? If you didn't use the bundled GD library, bogus this yourself.. Previous Comments: [2003-11-05 19:46:04] sprice at wisc dot edu Tried it with latest/greatest CVS (php4-STABLE -200311060030) and it is still broken. [2003-11-05 17:55:24] [EMAIL PROTECTED] This bug has been fixed in CVS. In case this was a PHP problem, 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/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. [2003-11-05 17:52:49] sprice at wisc dot edu Description: ImageRotate() is messing with my alpha channel. Examples to follow. Reproduce code: --- Expected result: When you run this as is, you get a semitransparent blue rectangle. Actual result: -- If you replace the commented out ImagePNG() with the commented one, the alpha channel inverts itself. As you increase the transparency of $almost_clear, it becomes black (in contrast to the non- ImageRotate() line). -- Edit this bug report at http://bugs.php.net/?id=26144&edit=1
#26146 [NEW]: setcookie not accepting expire parameter
From: ateo at skepticshour dot com Operating system: Gentoo Linux PHP version: 4.3.3 PHP Bug Type: Session related Bug description: setcookie not accepting expire parameter Description: setcookie not accepting the expire parameter no matter how I configure it. ie: setcookie("user","$info",time()+3); OR $ntime = time(); setcookie("user","$info",$ntime()+3); OR $expire = time() + 30; setcookie("user","$info",$expire); In each one of the above examples, the cookie IS set, but ends with session. Compile time information: './configure' '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--without-readline' '--with-apxs2=/usr/sbin/apxs2' '--with-ndbm' '--with-db4=/usr' '--with-mcrypt=/usr' '--with-mhash' '--with-ming=/usr' '--with-swf=/usr' '--with-gdbm=/usr' '--with-java=/opt/blackdown-jdk-1.4.1' '--without-pgsql' '--with-snmp' '--enable-ucd-snmp-hack' '--with-xpm-dir=/usr/X11R6' '--with-pdflib=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-png-dir=/usr' '--with-jpeg' '--with-jpeg-dir=/usr' '--enable-exif' '--with-tiff-dir=/usr' '--with-mysql=/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-freetype-dir=/usr' '--with-gettext' '--with-qtdom' '--with-pspell' '--with-openssl' '--with-imap' '--without-ldap' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--without-kerberos' '--with-pam' '--disable-memory-limit' '--enable-ipv6' '--with-curlwrappers' '--with-curl' '--enable-dbx' '--with-imap-ssl' '--with-zlib' '--with-zlib-dir=/usr/lib' '--with-sablot=/usr' '--enable-xslt' '--with-xslt-sablot' '--with-xmlrpc' '--enable-wddx' '--with-xml' '--enable-mbstring=all' '--enable-mbregex' '--with-bz2' '--with-crack' '--with-cdb' '--enable-bcmath' '--enable-calendar' '--enable-dbase' '--enable-filepro' '--enable-ftp' '--with-mime-magic' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvipc' '--with-iconv' '--enable-shmop' '--enable-dio' '--enable-inline-optimization' '--enable-track-vars' '--enable-trans-sid' '--enable-versioning' '--with-config-file-path=/etc/php/apache2-php4' Reproduce code: --- setcookie("user","$info",time()+3); Expected result: a cookie named "user" with information "$info" set to the remote computer's hard drive and set to expire in 30,000 seconds after cookie is written to hard drive. Actual result: -- Cookie is written into memory that expires at the end of session. -- Edit bug report at http://bugs.php.net/?id=26146&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26146&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26146&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26146&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26146&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26146&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26146&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26146&r=support Expected behavior: http://bugs.php.net/fix.php?id=26146&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26146&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26146&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26146&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26146&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26146&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26146&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26146&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26146&r=float
#26144 [Csd->Opn]: ImageRotate() inverts/blacks the alpha channel
ID: 26144 User updated by: sprice at wisc dot edu Reported By: sprice at wisc dot edu -Status: Closed +Status: Open Bug Type: GD related Operating System: Mac 10.3 PHP Version: 4.3.4 New Comment: Tried it with latest/greatest CVS (php4-STABLE -200311060030) and it is still broken. Previous Comments: [2003-11-05 17:55:24] [EMAIL PROTECTED] This bug has been fixed in CVS. In case this was a PHP problem, 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/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. [2003-11-05 17:52:49] sprice at wisc dot edu Description: ImageRotate() is messing with my alpha channel. Examples to follow. Reproduce code: --- Expected result: When you run this as is, you get a semitransparent blue rectangle. Actual result: -- If you replace the commented out ImagePNG() with the commented one, the alpha channel inverts itself. As you increase the transparency of $almost_clear, it becomes black (in contrast to the non- ImageRotate() line). -- Edit this bug report at http://bugs.php.net/?id=26144&edit=1
#26132 [Opn->Bgs]: pg_fetch_object returns NULL on serial and INT in record but returns strings NP
ID: 26132 Updated by: [EMAIL PROTECTED] Reported By: steven at pearavenue dot com -Status: Open +Status: Bogus Bug Type: PostgreSQL related Operating System: Redhat 9.0/Apache 2.0 PHP Version: 4.3.4 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Pgsql always lower cases field names, which is why $row->FeedID returns NULL. You should use $row->feedid instead. Previous Comments: [2003-11-05 03:19:08] steven at pearavenue dot com Oh, and of course, you need to comment out either the ARRAY code or the OBJECT code when you test this. :) Try each in turn. [2003-11-05 03:14:07] steven at pearavenue dot com You will want this SQL : $sql = "SELECT FeedID, uri FROMfeeds "; [2003-11-05 03:11:40] steven at pearavenue dot com Description: I checked on PHP 5.0beta too and the same problem there. pg_fetch_object returns serial or integers as NULL while but returns varchars in the same record as string - pg_fetch_array returns the entire data correctly. Similar code worked fine on another server using MySQl Support. You need a table like this: CREATE TABLE public.feeds ( feedid serial NOT NULL, uri varchar(255) NOT NULL DEFAULT '', category int4 NOT NULL DEFAULT 0, CONSTRAINT feeds_pkey PRIMARY KEY (feedid), CONSTRAINT feeds_uri_key UNIQUE (uri) ) WITH OIDS; Reproduce code: --- "; } else { // report connection error echo "connection_status: BAD"; echo( pg_last_error($link) ); } $feedb = pg_query( $link, $sql); echo( "".pg_num_rows( $feedb )." Number of rows returned." ); // for each row in the table stuff the coresponding variables with the data: echo ( "ARRAY" ); while( $fields = pg_fetch_array( $feedb ) ){ echo ( "Feed[0]: $fields[0]" ); echo ( "Feed[1]: {$fields[1]}" ); echo ( "Feed[2]: {$fields[2]}" ); } echo ( "OBJECT" ); while( $row = pg_fetch_object( $feedb ) ){ if( $row->FeedID == NULL) { $id = "NULL"; } else { $id = $row->FeedID; } echo ( "FeedID:".$id."" ); $uri = $row->uri; echo ( "uri: $uri" ); if( $row->category == NULL) { $c = "NULL"; } else { $c = $row->category; } echo ( "category: $c" ); } ?> Expected result: We expect the serial and integer values to appear in the result from pg_fetch_object Actual result: -- You will note that the output produces NULLs instead. -- Edit this bug report at http://bugs.php.net/?id=26132&edit=1
#26144 [Opn->Csd]: ImageRotate() inverts/blacks the alpha channel
ID: 26144 Updated by: [EMAIL PROTECTED] Reported By: sprice at wisc dot edu -Status: Open +Status: Closed Bug Type: GD related Operating System: Mac 10.3 PHP Version: 4.3.4 New Comment: This bug has been fixed in CVS. In case this was a PHP problem, 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/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: [2003-11-05 17:52:49] sprice at wisc dot edu Description: ImageRotate() is messing with my alpha channel. Examples to follow. Reproduce code: --- Expected result: When you run this as is, you get a semitransparent blue rectangle. Actual result: -- If you replace the commented out ImagePNG() with the commented one, the alpha channel inverts itself. As you increase the transparency of $almost_clear, it becomes black (in contrast to the non- ImageRotate() line). -- Edit this bug report at http://bugs.php.net/?id=26144&edit=1
#26144 [NEW]: ImageRotate() inverts/blacks the alpha channel
From: sprice at wisc dot edu Operating system: Mac 10.3 PHP version: 4.3.4 PHP Bug Type: GD related Bug description: ImageRotate() inverts/blacks the alpha channel Description: ImageRotate() is messing with my alpha channel. Examples to follow. Reproduce code: --- Expected result: When you run this as is, you get a semitransparent blue rectangle. Actual result: -- If you replace the commented out ImagePNG() with the commented one, the alpha channel inverts itself. As you increase the transparency of $almost_clear, it becomes black (in contrast to the non- ImageRotate() line). -- Edit bug report at http://bugs.php.net/?id=26144&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26144&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26144&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26144&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26144&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26144&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26144&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26144&r=support Expected behavior: http://bugs.php.net/fix.php?id=26144&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26144&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26144&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26144&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26144&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26144&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26144&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26144&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26144&r=float
#26143 [Opn->Bgs]: Call-by-Reference ends in Recursion
ID: 26143 Updated by: [EMAIL PROTECTED] Reported By: claus-poerschke at gmx dot de -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: Suse Linux 8.2 PHP Version: 4.3.4 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php A copy of a reference is still a reference. result: array(1) { [0]=> &string(4) "huh? } string(3) "???" Previous Comments: [2003-11-05 16:33:28] claus-poerschke at gmx dot de Description: Implementing a Composite Pattern I get an unexpected recursion. If I remove the &-Operator in the aPart::addChild() it works. Further comments are made in the code: Reproduce code: --- #!/usr/local/bin/php mName = $name; $this->mChildren = array(); } function addChild(&$child) { $this->mChildren[] =& $child; } function showParts($indent='') { echo $indent . $this->mName . "\n"; for ($i = 0;$i < sizeof($this->mChildren);$i++) { $this->mChildren[$i]->showParts($indent . ' '); } } } $arrParts = array('bar','baz'); $objP =& new aPart('foo'); // normally i read a template File $objP1 = $objP; // make Copy - to avoid filesystem Operation! $objP2 = $objP; // too $objP1->mName = $arrParts[0]; // assign bar $objP2->mName = $arrParts[1]; // assing baz $objP->addChild($objP1); // Add Component 1 $objP->addChild($objP2); // Add Component 2 $objP->showParts(); // show the tree /* Prints as expected: foo bar baz */ // cleanup unset($objP); unset($objP1); unset($objP2); // try doing the above it another way $objP =& new aPart('foo'); for ($i=0;$imName = $arrParts[$i]; $objP->addChild($objP1); } $objP->showParts();// Recursion !!! ?> Expected result: Read the comments in the script: foo bar baz Actual result: -- In the second example i'am getting an recursion foo baz baz baz baz . -- Edit this bug report at http://bugs.php.net/?id=26143&edit=1
#26143 [NEW]: Call-by-Reference ends in Recursion
From: claus-poerschke at gmx dot de Operating system: Suse Linux 8.2 PHP version: 4.3.4 PHP Bug Type: *General Issues Bug description: Call-by-Reference ends in Recursion Description: Implementing a Composite Pattern I get an unexpected recursion. If I remove the &-Operator in the aPart::addChild() it works. Further comments are made in the code: Reproduce code: --- #!/usr/local/bin/php mName = $name; $this->mChildren = array(); } function addChild(&$child) { $this->mChildren[] =& $child; } function showParts($indent='') { echo $indent . $this->mName . "\n"; for ($i = 0;$i < sizeof($this->mChildren);$i++) { $this->mChildren[$i]->showParts($indent . ' '); } } } $arrParts = array('bar','baz'); $objP =& new aPart('foo'); // normally i read a template File $objP1 = $objP; // make Copy - to avoid filesystem Operation! $objP2 = $objP; // too $objP1->mName = $arrParts[0]; // assign bar $objP2->mName = $arrParts[1]; // assing baz $objP->addChild($objP1); // Add Component 1 $objP->addChild($objP2); // Add Component 2 $objP->showParts(); // show the tree /* Prints as expected: foo bar baz */ // cleanup unset($objP); unset($objP1); unset($objP2); // try doing the above it another way $objP =& new aPart('foo'); for ($i=0;$imName = $arrParts[$i]; $objP->addChild($objP1); } $objP->showParts();// Recursion !!! ?> Expected result: Read the comments in the script: foo bar baz Actual result: -- In the second example i'am getting an recursion foo baz baz baz baz . -- Edit bug report at http://bugs.php.net/?id=26143&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26143&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26143&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26143&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26143&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26143&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26143&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26143&r=support Expected behavior: http://bugs.php.net/fix.php?id=26143&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26143&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26143&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26143&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26143&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26143&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26143&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26143&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26143&r=float
#26117 [Fbk->Opn]: Persistent connection not reused
ID: 26117 User updated by: spam at vrana dot cz Reported By: spam at vrana dot cz -Status: Feedback +Status: Open Bug Type: MySQL related Operating System: Linux PHP Version: 4.3.3 New Comment: Yes. There were 466 processes with the same user, host and db. All processes were in state Sleep. Previous Comments: [2003-11-05 11:21:33] [EMAIL PROTECTED] When the "too many connections" problem occurs, have you tried running "show full processlist;" query to see if infact all connections use the same database? [2003-11-05 03:24:59] spam at vrana dot cz This is not the case. Believe me that I have read all similar bugs and this is different. I also have read carefuly the manual and I understand everything written there about persistent connections. There is written in the Persistent Database Connections chapter of manual: An 'identical' connection is a connection that was opened to the same host, with the same username and the same password (where applicable). So it's not true that by mysql_select_db() with different database name the connection can't be reused. Anyway I use the same database in all scripts. I know that connection is persistent only over the child. Thus I wrote that Apache configuration directive MaxClients is set to 150. [2003-11-04 13:53:56] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php If you go mysql_select_db() then the persistent connection you've created becomes specific to that particular database. Which may explain why those connections are not re-used. Also, persistent connections are per-child, meaning that if 1 Apache child opens connections only that child has a pre-existing connection avaliable. If a subsequent request is handled by another child, which does not yet have a MySQL connection, it'll create a new connection. [2003-11-04 11:00:20] spam at vrana dot cz Description: Configuration: Apache 1.3.28 MySQL 4.0.15a With Apache configuration directive MaxClients set to 150, the number of database connection raised up to 466 (until MySQL denied connections with Too many connections error). In all scripts I use the same mysql_pconnect("localhost", "user", "pwd"). MySQL command SHOW PROCESSLIST showed that all 466 connections were made with the same connection parameters. All connections were in state Sleep. I am connecting to MySQL only from PHP module in Apache so I think this behavior is caused by some bug in handling with connection pool in PHP. -- Edit this bug report at http://bugs.php.net/?id=26117&edit=1
#26139 [Opn->Fbk]: GET/POST variables are not registered
ID: 26139 Updated by: [EMAIL PROTECTED] Reported By: the0ne at gmx dot net -Status: Open +Status: Feedback Bug Type: CGI related Operating System: Linux PHP Version: 4.3.4 New Comment: What webserver? And are you really using PHP as CGI binary with it? It looks like you have misconfigured something.. Previous Comments: [2003-11-05 12:01:14] the0ne at gmx dot net EGPCS [2003-11-05 11:13:59] [EMAIL PROTECTED] Check your variables_order ini setting. [2003-11-05 08:13:44] the0ne at gmx dot net Description: GET/POST variables are not registered at all although everything worked perfectly using version 4.3.1 Reproduce code: --- create an index.php containing and call it with parameters, e.g. http://www.domain.tld/scripts/?p=language&a=home or http://www.domain.tld/scripts/index.php?p=language&a=home Expected result: _GET["p"] language _GET["a"] home in the list of PHP-Variables Actual result: -- the expected entries are missing in the list of PHP-Variables -- Edit this bug report at http://bugs.php.net/?id=26139&edit=1
#26139 [Fbk->Opn]: GET/POST variables are not registered
ID: 26139 User updated by: the0ne at gmx dot net Reported By: the0ne at gmx dot net -Status: Feedback +Status: Open Bug Type: CGI related Operating System: Linux PHP Version: 4.3.4 New Comment: EGPCS Previous Comments: [2003-11-05 11:13:59] [EMAIL PROTECTED] Check your variables_order ini setting. [2003-11-05 08:13:44] the0ne at gmx dot net Description: GET/POST variables are not registered at all although everything worked perfectly using version 4.3.1 Reproduce code: --- create an index.php containing and call it with parameters, e.g. http://www.domain.tld/scripts/?p=language&a=home or http://www.domain.tld/scripts/index.php?p=language&a=home Expected result: _GET["p"] language _GET["a"] home in the list of PHP-Variables Actual result: -- the expected entries are missing in the list of PHP-Variables -- Edit this bug report at http://bugs.php.net/?id=26139&edit=1
#26083 [Opn]: save function isn't working
ID: 26083 Updated by: [EMAIL PROTECTED] Reported By: daju at passagen dot se Status: Open Bug Type: DOM XML related Operating System: Windows XP Home PHP Version: 5CVS-2003-11-02 (dev) New Comment: The problem with saving only occures when the destination file already exists. Previous Comments: [2003-11-02 13:57:25] daju at passagen dot se Description: Hi folks, I just downloaded development version av PHP 5 (CVS 2003-11-02) and tried the new DOM functions that uses libxml2 library. It's working great but there is one thing that I don't understand. I tried to update a xml file I have and I can add nodes and attributes but when i try to save file then nothing happens. There is no error messages at all. How ever if I choose another file name for the save function then it is working. New file is created and I see both the old and the new nodes in the xml file. Am I missing something here? Reproduce code: --- Just a simple DOM test"; $dom = new domDocument(); $load = $dom->load('test.xml'); $root = $dom->documentElement; $element = $dom->createElement("temp", "Just a test text"); $attr = $element->setAttribute("id", "0007"); $attr = $element->setAttribute("author", "darren"); $tmp = $root->appendChild($element); $tmp = $dom->save('test.xml'); echo $tmp." bytes was saved to the xml file."; ?> Expected result: The file should be updated. Output i my browser should be: 363 bytes was saved to the xml file. Actual result: -- 0 bytes was saved to the xml file. -- Edit this bug report at http://bugs.php.net/?id=26083&edit=1
#26134 [Opn->Bgs]: ereg not working with hex regex
ID: 26134 Updated by: [EMAIL PROTECTED] Reported By: bretschneider at element5 dot com -Status: Open +Status: Bogus Bug Type: Regexps related Operating System: freebsd PHP Version: 4.3.2 New Comment: Just change the quotes (') to double quotes (") for the $pattern var and this will work fine. Previous Comments: [2003-11-05 04:48:18] bretschneider at element5 dot com Description: ereg does not seam to work with \x values. it can only matches uppercase !! but \x21-\x7a includes all upper and lower case characters. for some reasons i must use ereg and NOT eregi. preg_match does work! but it does not work with utf-8 Reproduce code: --- $URLS = array(1 => 'FOUND', 2 => 'notfound'); $pattern = '[\x21-\x7a]+'; foreach ($URLS as $key => $url) { print $url; if (ereg($pattern, $url)) print " OK\n"; else print " .. FAILED\n"; } Expected result: FOUND OK notfound .. OK Actual result: -- FOUND OK notfound .. FAILED -- Edit this bug report at http://bugs.php.net/?id=26134&edit=1
#25934 [Opn->Fbk]: SessionID in URL sometimes ignored
ID: 25934 Updated by: [EMAIL PROTECTED] Reported By: php at webfreezer dot com -Status: Open +Status: Feedback Bug Type: Session related Operating System: SuSe Linux 8.1 PHP Version: 4.3.4 New Comment: Provide a complete example script. And FYI: for security reasons you really should use only cookies for passing the session ID around.. Previous Comments: [2003-11-05 03:00:31] php at webfreezer dot com This still happens in Version 4.3.4 which is now installed on the live system. What I do: - ini_set(session settings...) - session_start() - accessing the session values via $_SESSION - I don´t use sesson_register() and session_unregister() - Post a form via GET -> error occurs? -> redirect via header() with attached SID -> display page -> PHP ignores given sessionID - URL e.g. error.php?e=noresults_city&qid=1&sessionID=92f9dcf7a0d89eaa2b0bc8f2e4dfd460&token=d03d28781b196bd362b9aeb7844e8e85 - session_id() however is different from "$_GET[session_name()]" then - The error occurs everytime a new session is used (e.g. accessing the website and submitting the form for the first time int the session) I found at least a workaround for that: // Auto-Reset to correct session data $sn=session_name(); if($_GET[$sn] != session_id()) { $sessionSavePath=ini_get("session.save_path"); $oldSessionContent=file_get_contents($sessionSavePath."/sess_".$_GET[$sn]); session_decode($oldSessionContent); } If the error occurs it is now fixed on-the-fly. This works _everytime_ when the error occurs. As I said before the session file exists, it is readable and can be accessed without any problems, so it´s no wonder this workaround works. [2003-10-21 08:37:47] php at webfreezer dot com Description: PHP sometimes does not want to use the sessionID given via GET! This happens only on some occasions however it is reproducible on such a certain page. I regret that I cannot post a short code snippet because it simply does not happen when testing with a short code snippet. What happens is the following: - the SID is used as a GET parameter (this works on every other page!) - $sidname=session_name(); echo $_GET[$sidname] outputs the correct SID visible in the URL (e.g. "/search.php?page=2&qid=1&sessionID=1291bfd78301f151803ca632cd41f626") - however echo session_id() outputs a totally different SID! - both (old and new) SID files exist and are readable session.auto_start=0 session.use_cookies=0 session.use_only_cookies=0 session.referer_check=0 I even implemented my own session handler and it appears that PHP does not even call the OPEN function for the "old" SID that it no longer wants to use. I also tried to use the generic PHPSESSID name instead of the custom "sessionID" by not setting the custom name, but the problem still exists. This is my configure line: './configure' '--with-apache=../apache_1.3.28' '--with-mhash=/usr/local/lib' '--with-zlib-dir=/usr/local/lib' '--with-zip=/usr/local/lib' '--enable-memory-limit' '--enable-versioning' '--with-gd' '--enable-exif' '--with-config-file-path=/etc' '--enable-magic-quotes' '--enable-thread-safety' '--with-gettext' '--with-xml' '--with-mcrypt' '--enable-calendar' '--enable-bcmath' '--with-curl' '--with-curlwrappers' '--enable-ftp' '--enable-wddx' '--with-jpeg-dir=/usr/lib' -- Edit this bug report at http://bugs.php.net/?id=25934&edit=1
#26117 [Opn->Fbk]: Persistent connection not reused
ID: 26117 Updated by: [EMAIL PROTECTED] Reported By: spam at vrana dot cz -Status: Open +Status: Feedback Bug Type: MySQL related Operating System: Linux PHP Version: 4.3.3 New Comment: When the "too many connections" problem occurs, have you tried running "show full processlist;" query to see if infact all connections use the same database? Previous Comments: [2003-11-05 03:24:59] spam at vrana dot cz This is not the case. Believe me that I have read all similar bugs and this is different. I also have read carefuly the manual and I understand everything written there about persistent connections. There is written in the Persistent Database Connections chapter of manual: An 'identical' connection is a connection that was opened to the same host, with the same username and the same password (where applicable). So it's not true that by mysql_select_db() with different database name the connection can't be reused. Anyway I use the same database in all scripts. I know that connection is persistent only over the child. Thus I wrote that Apache configuration directive MaxClients is set to 150. [2003-11-04 13:53:56] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php If you go mysql_select_db() then the persistent connection you've created becomes specific to that particular database. Which may explain why those connections are not re-used. Also, persistent connections are per-child, meaning that if 1 Apache child opens connections only that child has a pre-existing connection avaliable. If a subsequent request is handled by another child, which does not yet have a MySQL connection, it'll create a new connection. [2003-11-04 11:00:20] spam at vrana dot cz Description: Configuration: Apache 1.3.28 MySQL 4.0.15a With Apache configuration directive MaxClients set to 150, the number of database connection raised up to 466 (until MySQL denied connections with Too many connections error). In all scripts I use the same mysql_pconnect("localhost", "user", "pwd"). MySQL command SHOW PROCESSLIST showed that all 466 connections were made with the same connection parameters. All connections were in state Sleep. I am connecting to MySQL only from PHP module in Apache so I think this behavior is caused by some bug in handling with connection pool in PHP. -- Edit this bug report at http://bugs.php.net/?id=26117&edit=1
#26119 [Bgs]: Random SESSION-ID given in URL is accepted for the session
ID: 26119 Updated by: [EMAIL PROTECTED] Reported By: glattfahrservice at web dot de Status: Bogus Bug Type: Session related Operating System: Windows XP Professional PHP Version: 4.3.4 New Comment: This is a feature actually. And the safe way is: Use only cookies and change the ID after login, for example. (see http://www.php.net/session_regenerade_id ) Previous Comments: [2003-11-05 05:22:28] glattfahrservice at web dot de Of course I know about the possibilities to hijack a session. I just wanted to point out that it SHOULD be checked if the session-ID passed to the script has been generated by the system before. If I understand it correctly, a possible attacker can just call a script 1 Million times with random session-IDs and these sessions are then automatically created in the system. There must be a way around this! Cheers, Dan. [2003-11-04 15:41:41] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The checks only validate the session id for special characters etc... You've come across the inherit vulnerability of URL session. Anyone can modify their value and should they stumble across a valid session id of another user become that user. [2003-11-04 14:04:24] glattfahrservice at web dot de Description: Normally PHP is using some clever algorithms to provide for safe and unique SESSION-IDs. However, when a simple session-id is passed to the script in which session_start() is called, a session with the given ID is generated. e.g.: www.test.com/index.php&PHPSESSID=blabla should not be accepted and a new SESSION-ID should be generated for the session. BUT: this session-ID (blabla) is obviously valid and not rejected. Functionality is not impaired, but right now a visitor is able to "choose" his own session-id. Not very safe, right? I have disabled cookies and turned off trans-sid. Ciao, Dan. -- Edit this bug report at http://bugs.php.net/?id=26119&edit=1
#26136 [Opn->Bgs]: mysql_fetch_row mysql_result interaction
ID: 26136 Updated by: [EMAIL PROTECTED] Reported By: dario_primorac at net dot hr -Status: Open +Status: Bogus Bug Type: Output Control Operating System: Linux PHP Version: 4.3.2 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Your code is wrong. You should not mix mysql_fetch_row & mysql_result. Previous Comments: [2003-11-05 06:37:08] dario_primorac at net dot hr Description: Table employees has 3 colons (name,surname,position). The table is filled with 3 values. When the code is executed it forces a endless while loot, and the browser must be terminated, and my opinion is that this code sholuld not do that. My opinion is: the mysql_result and mysql_fetch_row functions are using the same pointer as the handle (return value). It is my opinion that the while loop will go around (n,n+1) value where n is number of row fetched by mysql_result function. Reproduce code: --- \n"; echo "NamePosition\n"; while ($myrow = mysql_fetch_row($result)) { printf("%s %s%s\n", mysql_result($result,1,"name") , $myrow[1], $myrow[2]); } echo "\n"; ?> Expected result: Lets say that the table employee was filled with this data: namesurname position --- Dario Primorac1 Mario Butijer 2 VidoVlahinic3 The result should be: NamePosition Mario Primorac 1 Mario Butijer 2 Mario Vlahinic 3 Actual result: -- When the code is executed it forces a endless while loot, and the browser must be terminated. -- Edit this bug report at http://bugs.php.net/?id=26136&edit=1
#26139 [Opn->Fbk]: GET/POST variables are not registered
ID: 26139 Updated by: [EMAIL PROTECTED] Reported By: the0ne at gmx dot net -Status: Open +Status: Feedback Bug Type: CGI related Operating System: Linux PHP Version: 4.3.4 New Comment: Check your variables_order ini setting. Previous Comments: [2003-11-05 08:13:44] the0ne at gmx dot net Description: GET/POST variables are not registered at all although everything worked perfectly using version 4.3.1 Reproduce code: --- create an index.php containing and call it with parameters, e.g. http://www.domain.tld/scripts/?p=language&a=home or http://www.domain.tld/scripts/index.php?p=language&a=home Expected result: _GET["p"] language _GET["a"] home in the list of PHP-Variables Actual result: -- the expected entries are missing in the list of PHP-Variables -- Edit this bug report at http://bugs.php.net/?id=26139&edit=1
#26141 [Opn->Bgs]: Libtool + threads = library error
ID: 26141 Updated by: [EMAIL PROTECTED] Reported By: alan at pair dot com -Status: Open +Status: Bogus Bug Type: Compile Failure Operating System: FreeBSD 4.8-STABLE -PHP Version: 4.3.4 +PHP Version: 4.3.3 New Comment: With that configure line you won't be enabling any thread stuff. Previous Comments: [2003-11-05 09:22:47] alan at pair dot com Description: By default, libtool uses -pthread, but this causes a compile-time error with FreeBSD 4.8-STABLE: libtool: Cannot find library `' Reproduce code: --- We configured as follows: ./configure --with-apache=/usr/pair/sw/apache_1.3.29 --with-config-file-path=/usr/local/etc --enable-magic-quotes --enable-bcmath --without-cdb --with-zlib-dir= /usr/local --with-gd --with-ttf --without-msql --with-mysql=/usr/local --with-iodbc --with-pdflib --enable-inline-optimization --disable-memory-limit --with-db --without-gdbm --with-ndbm --without-db2 --without-dbm --with-gettext --without-readline --with-recode --without-openssl --with-mcrypt --without-db3 --enable-dba --with-curl --with-png-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib --enable-calendar --with-mhash --enable-xslt --with-xslt-sablot --with-expat-dir=/usr/local --enable-gd-lzw-gif make However, I think it can be reproduced with just: ./configure make Expected result: I expect it to compile. Actual result: -- It doesn't compile: it spits out a library error, instead. A Patch: diff -C 3 ltmain.sh ../php-4.3.3 *** ltmain.sh Mon Feb 10 12:12:17 2003 --- ../php-4.3.3/ltmain.sh Wed Oct 29 07:56:14 2003 *** *** 1511,1516 --- 1511,1519 fi continue ;; + -pthread) # KJM 10/29/03 + continue + ;; %DEPLIBS%) alldeplibs=yes continue -- Edit this bug report at http://bugs.php.net/?id=26141&edit=1
#25933 [Fbk->Opn]: stream_select
ID: 25933 User updated by: flape at pobox dot sk Reported By: flape at pobox dot sk -Status: Feedback +Status: Open Bug Type: Filesystem function related Operating System: Win2K PHP Version: 4.3.3 New Comment: I've done it in blocking and even in non-blocking mode with the same result Previous Comments: [2003-11-04 03:45:31] [EMAIL PROTECTED] It should work with file handles. Try removing the stream_set_blocking() call: stream_select() will give you an indication if an operation would block - if it is set to non-blocking, it is possible that your OS is telling you it has nothing to do. [2003-10-21 08:30:43] flape at pobox dot sk Description: stream_select aplied on a file handle - that is told to be a stream too - emiadelly returns. Reproduce code: --- Expected result: It should prit the context of debug.txt and everithing what was added to that file after starting the script. Actual result: -- Warning: stream_select(): unable to select [0]: No error in c:\temp\htdocs\debug.php on line 7 -- Edit this bug report at http://bugs.php.net/?id=25933&edit=1
#26095 [Bgs]: ob_gzhandler
ID: 26095 User updated by: giuseppe dot costagliola at sanpaolowm dot com Reported By: giuseppe dot costagliola at sanpaolowm dot com Status: Bogus Bug Type: Output Control Operating System: os/400 PHP Version: 4.3.3 New Comment: I've also tried on Windows platform and there is the same behaviour. Probably it's just due to php.ini default configuration and things work as expected, but this is NOT the browser that doesn't work correctly. Previous Comments: [2003-11-04 07:08:08] giuseppe dot costagliola at sanpaolowm dot com I've tried with Explorer 6 sp1 and Nescape 7. On both browsers there is the same problem. [2003-11-03 13:45:19] [EMAIL PROTECTED] Most likely the browser used doesn't work correctly. Not PHP bug. [2003-11-03 08:54:39] giuseppe dot costagliola at sanpaolowm dot com Description: If I leave parameter "output_handler" undefined, when php loads a new page it first clear the entire screen and then put the new page. If building a page with a big table or with a slow system takes some time, the user stays with a full blank page, and this is very nasty. However if I put "output_handler = ob_gzhandler", php leaves the old page on screen and just overwrites the new one smootly when ready. Is this a bug or is it working as expected ? Thanks. -- Edit this bug report at http://bugs.php.net/?id=26095&edit=1
#26141 [NEW]: Libtool + threads = library error
From: alan at pair dot com Operating system: FreeBSD 4.8-STABLE PHP version: 4.3.4 PHP Bug Type: Compile Failure Bug description: Libtool + threads = library error Description: By default, libtool uses -pthread, but this causes a compile-time error with FreeBSD 4.8-STABLE: libtool: Cannot find library `' Reproduce code: --- We configured as follows: ./configure --with-apache=/usr/pair/sw/apache_1.3.29 --with-config-file-path=/usr/local/etc --enable-magic-quotes --enable-bcmath --without-cdb --with-zlib-dir= /usr/local --with-gd --with-ttf --without-msql --with-mysql=/usr/local --with-iodbc --with-pdflib --enable-inline-optimization --disable-memory-limit --with-db --without-gdbm --with-ndbm --without-db2 --without-dbm --with-gettext --without-readline --with-recode --without-openssl --with-mcrypt --without-db3 --enable-dba --with-curl --with-png-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib --enable-calendar --with-mhash --enable-xslt --with-xslt-sablot --with-expat-dir=/usr/local --enable-gd-lzw-gif make However, I think it can be reproduced with just: ./configure make Expected result: I expect it to compile. Actual result: -- It doesn't compile: it spits out a library error, instead. A Patch: diff -C 3 ltmain.sh ../php-4.3.3 *** ltmain.sh Mon Feb 10 12:12:17 2003 --- ../php-4.3.3/ltmain.sh Wed Oct 29 07:56:14 2003 *** *** 1511,1516 --- 1511,1519 fi continue ;; + -pthread) # KJM 10/29/03 + continue + ;; %DEPLIBS%) alldeplibs=yes continue -- Edit bug report at http://bugs.php.net/?id=26141&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26141&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26141&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26141&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26141&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26141&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26141&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26141&r=support Expected behavior: http://bugs.php.net/fix.php?id=26141&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26141&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26141&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26141&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26141&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26141&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26141&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26141&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26141&r=float
#26114 [Bgs]: mysql_errno() & mysql_error() not behaving right on a second connection
ID: 26114 User updated by: scouture at novo dot ca Reported By: scouture at novo dot ca Status: Bogus Bug Type: MySQL related Operating System: windows 2000 PHP Version: 4.3.3 New Comment: Ok, I have redone my home work and recheck the docs for those two functions. But, there is still something I don't understand in there behavior. If I try to open a link for the first time with $test = mysql_connect ($ip, $user, $password, TRUE) if($test == false) { echo mysql_errno(); } if I enter a wrong user, I'll get the 1045 error, right ? from docs Note: If the optional argument is specified the given link is used to retrieve the error code. If not, the last opened link is used. In this case, I do not specify any link to mysql_errno so it should use the last opened link, wich in this case, because it's the first time a link is trying to be opened, do not exist. But, I can retrieve the right errno anyway. If I open a valid link, then try to reopened a second one using $test2 = mysql_connect ($ip, $user, $password, TRUE) if($test2 == false) { echo mysql_errno(); } Has I understand, because there is already a valid link, mysql_errno() use that link (because none is specified). But, I have pass the parametre new_link set to TRUE, so those 2 functions should behave like there is no valid connection opened before, like in the first time when I try to open a link and there is none already opened and return me 1045. If the new_link == FALSE, then they should use the last link opened but in the case that new_link == TRUE, they should behave like there is no other link opened. I understand that this may not be a bug to you, but I'm sure you can say that the behavior of the functions mysql_error() and mysql_errno() (PHP 3, PHP 4) have not followed the modification regarding mysql_connect() and the new_link parameter (PHP 4.2.0). Previous Comments: [2003-11-05 00:37:40] [EMAIL PROTECTED] Please read the manual pages for mysql_errno() and mysql_error() about what parameters they accept and you'll find out what I meant.. [2003-11-04 11:20:44] scouture at novo dot ca Have you been able to reproduce the behavior with the new_link parameter set to TRUE like I did ? [2003-11-04 10:27:52] scouture at novo dot ca I've got the same result EVEN with the new_link parameter set to TRUE. echo "first connection"; $conn1 = mysql_connect($validIp&Port,$validUser,$validPassword, true); if($conn1 == false) { echo "mysql_error : ".mysql_error().""; echo "mysql_errno : ".mysql_errno().""; } else echo "ok connected 1"; echo "second connection"; $conn2 = mysql_connect ($validIp&Port,$validUser,$NOTvalidPassword, true); if($conn2 == false) { echo "mysql_error : ".mysql_error().""; echo "mysql_errno : ".mysql_errno().""; } else echo "ok connected 2"; [2003-11-04 09:58:34] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Always use the link parameter when doing multiple connects in same scripts. This is no bug. [2003-11-04 09:45:51] scouture at novo dot ca NOTE that mysql_error() & mysql_errno() are returning result has expected if the first connection failed. So, if the first connection and the second failed, both mysql_error() & mysql_errno() are ok for the first and the second connection. But, if there is already a valid connection to the dbserver, they are not behaving right for the second in case of failling. Hope that is clear enought... Regards 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/26114 -- Edit this bug report at http://bugs.php.net/?id=26114&edit=1
#21213 [Com]: invalid entities handling into set_attribute() and set_content()
ID: 21213 Comment by: markus dot pfefferle at web dot de Reported By: flying at dom dot natm dot ru Status: No Feedback Bug Type: DOM XML related Operating System: All PHP Version: 4.3.0RC4 New Comment: I stumbled across this bug report because I've just discovered the same bug and thus would like to reopen this ticket. The bug however lies with the method set_content(), not with set_attribute, which behaves as it should behave. The problematic method here is set_content(). As seen in the code example, this will resolve entities in the string passed to it. The question is: why? Take this for example: $node->append_child($document->create_text_node('R&D')); $node->set_content('R&D'); You would expect both lines to do the same thing (provided $node had previously no child nodes) and result into a serialized XML Document containing: R&D With the method set_content() however it results in this: R because it sees the '&' in the parameter as opening of an entity, which is not valid (and not even closed by ';') and simply omits it. It only achieves the required result if you do this: $node->set_content('R&D'); The string passed to create_text_node() does not need to be entity-resolved simply because there aren't expected to be any XML syntax elements in there - you can't add more XML sub elements this way. And so you shouldn't with set_content(). In fact, it gets really peculiar when you do this: $node->set_content('" < > &'); Because what you get is only: " $lt; $gt; and no & - because even though set_content didn't bother that the first three XML-syntax-characters weren't escaped as entities (as create_text_node() wouldn't either), it requires that from '&' - and that doesn't make sense in my eyes. Either you require entity-escaping for all characters or none. No mix-mix. It would be nice if that were fixed. My PHP version where this bug exists is 4.3.2 windows binary. Previous Comments: [2003-04-09 06:36:22] [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. [2003-04-03 09:49:32] [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 set_attribute_node is now in CVS, can you check it, if it's now possible, what you intend to do? [2003-01-03 09:35:07] [EMAIL PROTECTED] As said before, we need set_attribute_node($attrNode) and append_child() et al. working in attribute Nodes, then it should work. Don't know, when I have the time to do it, if someone else wants to take over this part, feel free ;) chregu [2003-01-03 04:06:32] flying at dom dot natm dot ru Sorry for summary changing - its Mozilla bug :) [2003-01-03 04:01:49] flying at dom dot natm dot ru Yes, i agree with you in this point, but it also means, that you should provide a way to parse given text value and build NodeList of Text and EntityReference nodes. libxml2 already have such function. 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/21213 -- Edit this bug report at http://bugs.php.net/?id=21213&edit=1
#26140 [NEW]: Cant use exec() or passthru()
From: chris at cjconsulting dot co dot uk Operating system: Windows Server 2003 PHP version: 4.3.4 PHP Bug Type: IIS related Bug description: Cant use exec() or passthru() Description: I recently had to upgrade a host to Windows 2003 Server, IIS 6 and PHP 4.3.4. Everything seems to work OK except when I try to use exec() or passthru(). I get errors similar to the following Warning: passthru(): Unable to fork [c:/Inet/MIS/sql/echo.bat] in c:\inet\MIS\MIS\Conv.php on line 91 Both exec() and passthru() give the same error. I stall have another host running Windows 2000 Server, IIS 5 PHP 4.3.2 and the same code works fine. I've checked all the config options for scripting and turned them all on! By default 2003 Server and IIS installs in a heavily protected mode Reproduce code: --- if ($Action == "PerlBat") { $Ans = passthru("echo.bat", $Ret); } echo.bat echo "hello bat !!!" 1>echo.outbat 2>>echo.err NOTE: the above is just a simple example script, my applications run much more complicated scripts Expected result: I expect the script to execute. Actual result: -- Script fails to run. -- Edit bug report at http://bugs.php.net/?id=26140&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26140&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26140&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26140&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26140&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26140&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26140&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26140&r=support Expected behavior: http://bugs.php.net/fix.php?id=26140&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26140&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26140&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26140&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26140&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26140&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26140&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26140&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26140&r=float
#26139 [NEW]: GET/POST variables are not registered
From: the0ne at gmx dot net Operating system: Linux PHP version: 4.3.4 PHP Bug Type: CGI related Bug description: GET/POST variables are not registered Description: GET/POST variables are not registered at all although everything worked perfectly using version 4.3.1 Reproduce code: --- create an index.php containing and call it with parameters, e.g. http://www.domain.tld/scripts/?p=language&a=home or http://www.domain.tld/scripts/index.php?p=language&a=home Expected result: _GET["p"] language _GET["a"] home in the list of PHP-Variables Actual result: -- the expected entries are missing in the list of PHP-Variables -- Edit bug report at http://bugs.php.net/?id=26139&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26139&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26139&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26139&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26139&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26139&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26139&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26139&r=support Expected behavior: http://bugs.php.net/fix.php?id=26139&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26139&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26139&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26139&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26139&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26139&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26139&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26139&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26139&r=float
#26116 [Opn->Bgs]: Unable to connect to ODBC database
ID: 26116 Updated by: [EMAIL PROTECTED] Reported By: andrew at howells-solicitors dot com -Status: Open +Status: Bogus Bug Type: ODBC related Operating System: Windows NT 4 sp6a PHP Version: 4.3.4 New Comment: Marking as bogus. Feel free to add a comment on the user contributed notes about this :) Hopefully it will make it into the full version. Thanks for your time. Previous Comments: [2003-11-05 04:07:49] andrew at howells-solicitors dot com I thought about this but made the assumption that since the Apache installer had installed the service to run as system that it *should* work. Moreover, when I found this didn't work I allowed the account to interact with the desktop - theoretically allowing it to do everythign a normal domain account would. How wrong was I?! Following this response I altered the startup parameters for the apache service so the service used the Domain Admin account to start itself up. This appears to have resolved the issue - it loads the ODBC driver fine. Perhaps a footnote in the Apache / PHP installation guide would be in order for those who have Windows inflicted upon them ? [2003-11-05 00:41:19] [EMAIL PROTECTED] My uneducated guess would be that the permissions for the apache user differ to the permission for the user as which you run the script on command line. Check those. [2003-11-04 10:39:43] andrew at howells-solicitors dot com Description: I am using PHP 4.3.4 & Apache 1.3.28 all on Windows NTT 4. I have a remote Progress database server that serves as backednd to a practice management and accounts suite we use in-house. I want to use PHP to provide a web based interface to this database but am having some entertaining problems. I've tried the progress supplied Merant ODBC drivers as well as the OpenLink ODBC drivers. Both connect fine, however, if I try connecting using PHP loaded as a module ito apache I cannot connect to the DB, the ODBC driver refuses to load. However, If I execute the script from the comand line "php E:\webpages\intranet\sostest2.php" The connection is established ok. Reproduce code: --- http://bugs.php.net/?id=26116&edit=1
#26118 [Bgs]: fdf-functions do not work
ID: 26118 User updated by: admin at evodot dot de -Summary: fdf-functions so not work Reported By: admin at evodot dot de Status: Bogus Bug Type: FDF related Operating System: debian linux 3.0 PHP Version: 4.3.3 New Comment: Thank you, Iliaa, tried: $fdf_doc = fdf_create () or die ( fdf_error ( fdf_errno () ) ); and got: "An internal FDF Library error occurred" Btw., I did read all the manuals, and IMHO it is a bug, if there isn't any comment/log-output given when those functions fail ... Previous Comments: [2003-11-05 00:33:14] [EMAIL PROTECTED] Please read the manual before submitting any bug reports. There is no bug here. [2003-11-04 16:04:52] [EMAIL PROTECTED] Try this fdf_create() or die(fdf_error(fdf_errno())); That hopefully will return a human readable error from the fdf library telling you when the fdf_create() function failed. [2003-11-04 11:45:05] admin at evodot dot de Description: On a debian linux 3.0 with all-standard packages the phplib is to be substituted by a self-compiled one incl. fdf-support. Got the sources of php 4.3.3 and FdfTk v5.0 and compiled without severe problems (only some develop-packages, which had to be added). But of the fdf-functions is actually available, i.e. any of 'fdf_open( $file )', 'fdf_open_string( "$HTTP_FDF_DATA" )' or even 'fdf_create()' fails without any further comment. In the log you can only find the complaints of 'fdf_close()', 'fdf_save()' and so on ... Btw. I tried both, fdf as shared object and statical linked into php: ./configure --prefix=/usr/local --with-exec-dir=/usr/local/lib/php --with-pgsql=no --with-mysql=shared,/usr --with-gd=shared,/usr --with-tiff-dir=shared,/usr --with-jpeg-dir=shared,/usr --with-png-dir=shared,/usr --with-xpm-dir=shared,/usr/X11R6 --with-pdflib=no --with-imap=no --with-ldap=no --with-zlib=yes --with-xml --with-ttf --with-sablot --with-readline --with-ftp --with-gettext=no --with-mm --with-freetype-dir=shared,/usr --enable-versioning --enable-yp=no --enable-bcmath --enable-trans-sid --enable-inline-optimization --enable-track-vars --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable-shmop --enable-exif --enable-ftp --enable-memory-limit --enable-wddx --enable-filepro --enable-dbase --with-config-file-path=/etc/php4/apache --with-apxs=/usr/bin/apxs --with-fdftk=/usr/local resp. --with-fdftk=shared,/usr/local Reproduce code: --- $fdf_doc = fdf_create () or error_log ( "test.php: \ fdf_create() failed", 0 ); fdf_save ( $fdf_doc, "/tmp/test.fdf" ) or error_log ( \ "test.php: fdf_save() failed", 0 ); fdf_close ( $fdf_doc ); Expected result: to have a fdf-file named /tmp/test.fdf ... sort of :-} Actual result: -- [04-Nov-2003 17:10:24] test.php: fdf_create() failed [04-Nov-2003 17:10:24] PHP Warning: fdf_save() expects \ parameter 1 to be resource, boolean given in \ /var/apache/htdocs/test.php on line 15 [04-Nov-2003 17:10:24] test.php: fdf_save() failed [04-Nov-2003 17:10:24] PHP Warning: fdf_close(): supplied \ argument is not a valid fdf resource in \ /var/apache/htdocs/test.php on line 17 -- Edit this bug report at http://bugs.php.net/?id=26118&edit=1
#26137 [NEW]: new search feature on site does not work on Mozilla
From: clever at swb dot com dot br Operating system: Windows PHP version: Irrelevant PHP Bug Type: Unknown/Other Function Bug description: new search feature on site does not work on Mozilla Description: Hi, I use Mozzila as browser. The new feature on search on main page does not work on it -- Edit bug report at http://bugs.php.net/?id=26137&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26137&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26137&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26137&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26137&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26137&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26137&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26137&r=support Expected behavior: http://bugs.php.net/fix.php?id=26137&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26137&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26137&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26137&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26137&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26137&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26137&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26137&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26137&r=float
#26136 [NEW]: mysql_fetch_row mysql_result interaction
From: dario_primorac at net dot hr Operating system: Linux PHP version: 4.3.2 PHP Bug Type: Output Control Bug description: mysql_fetch_row mysql_result interaction Description: Table employees has 3 colons (name,surname,position). The table is filled with 3 values. When the code is executed it forces a endless while loot, and the browser must be terminated, and my opinion is that this code sholuld not do that. My opinion is: the mysql_result and mysql_fetch_row functions are using the same pointer as the handle (return value). It is my opinion that the while loop will go around (n,n+1) value where n is number of row fetched by mysql_result function. Reproduce code: --- \n"; echo "NamePosition\n"; while ($myrow = mysql_fetch_row($result)) { printf("%s %s%s\n", mysql_result($result,1,"name") , $myrow[1], $myrow[2]); } echo "\n"; ?> Expected result: Lets say that the table employee was filled with this data: namesurname position --- Dario Primorac1 Mario Butijer 2 VidoVlahinic3 The result should be: NamePosition Mario Primorac 1 Mario Butijer 2 Mario Vlahinic 3 Actual result: -- When the code is executed it forces a endless while loot, and the browser must be terminated. -- Edit bug report at http://bugs.php.net/?id=26136&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26136&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26136&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26136&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26136&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26136&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26136&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26136&r=support Expected behavior: http://bugs.php.net/fix.php?id=26136&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26136&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26136&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26136&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26136&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26136&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26136&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26136&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26136&r=float
#26119 [Bgs]: Random SESSION-ID given in URL is accepted for the session
ID: 26119 User updated by: glattfahrservice at web dot de Reported By: glattfahrservice at web dot de Status: Bogus Bug Type: Session related Operating System: Windows XP Professional PHP Version: 4.3.4 New Comment: Of course I know about the possibilities to hijack a session. I just wanted to point out that it SHOULD be checked if the session-ID passed to the script has been generated by the system before. If I understand it correctly, a possible attacker can just call a script 1 Million times with random session-IDs and these sessions are then automatically created in the system. There must be a way around this! Cheers, Dan. Previous Comments: [2003-11-04 15:41:41] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The checks only validate the session id for special characters etc... You've come across the inherit vulnerability of URL session. Anyone can modify their value and should they stumble across a valid session id of another user become that user. [2003-11-04 14:04:24] glattfahrservice at web dot de Description: Normally PHP is using some clever algorithms to provide for safe and unique SESSION-IDs. However, when a simple session-id is passed to the script in which session_start() is called, a session with the given ID is generated. e.g.: www.test.com/index.php&PHPSESSID=blabla should not be accepted and a new SESSION-ID should be generated for the session. BUT: this session-ID (blabla) is obviously valid and not rejected. Functionality is not impaired, but right now a visitor is able to "choose" his own session-id. Not very safe, right? I have disabled cookies and turned off trans-sid. Ciao, Dan. -- Edit this bug report at http://bugs.php.net/?id=26119&edit=1
#26131 [Opn->Bgs]: the crypt function have no MD5 support
ID: 26131 Updated by: [EMAIL PROTECTED] Reported By: yoda at cef dot org dot tw -Status: Open +Status: Bogus Bug Type: *Compile Issues Operating System: RedHat Linux 9.0 PHP Version: 4.3.4 New Comment: So it's bogus :) Previous Comments: [2003-11-05 04:58:25] yoda at cef dot org dot tw Sorry It's my fault. I forgot set some path in /etc/ld.so.conf. [2003-11-05 02:04:15] yoda at cef dot org dot tw Description: When I download PHP 4.3.4 and running configure, I found that the crypt function has no crypt method support . Below is my configure options ./configure --with-apxs2 --with-layout=PHP --with-config-file-path=/etc/httpd --enable-sigchild --enable-magic-quotes --with-openssl --enable-ftp --enable-mbstring --enable-mbregex --enable-mime-magic --with-pgsql=/usr/local/pgsql -enable-sysvsem --enable-sysvshm --with-iconv --enable-zend-multibyte --without-mysql --with-gd --with-ttf --with-freetype-dir --with-zlib --with-jpeg-dir --with-png-dir --with-iconv --with-mbstring=tw --with-pdflib --with-tiff-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --without-xpm --enable-zend-multibyte --enable-experimental-zts --without-kerberos under this configure optoins, I get such test result: checking for crypt in -lcrypt... yes checking for standard DES crypt... no checking for extended DES crypt... no checking for MD5 crypt... no checking for Blowfish crypt... no It's strange ! I have crypt function but no crypt method avalible ! Even the standard DES crypt ! BTW, these options in PHP 4.3.3 is work ! In PHP 4.3.3 I got this: checking for crypt in -lcrypt... (cached) yes checking for standard DES crypt... (cached) yes checking for extended DES crypt... (cached) no checking for MD5 crypt... (cached) yes checking for Blowfish crypt... (cached) no So what's the problem ? -- Edit this bug report at http://bugs.php.net/?id=26131&edit=1
#26131 [Opn]: the crypt function have no MD5 support
ID: 26131 User updated by: yoda at cef dot org dot tw Reported By: yoda at cef dot org dot tw Status: Open Bug Type: *Compile Issues Operating System: RedHat Linux 9.0 PHP Version: 4.3.4 New Comment: Sorry It's my fault. I forgot set some path in /etc/ld.so.conf. Previous Comments: [2003-11-05 02:04:15] yoda at cef dot org dot tw Description: When I download PHP 4.3.4 and running configure, I found that the crypt function has no crypt method support . Below is my configure options ./configure --with-apxs2 --with-layout=PHP --with-config-file-path=/etc/httpd --enable-sigchild --enable-magic-quotes --with-openssl --enable-ftp --enable-mbstring --enable-mbregex --enable-mime-magic --with-pgsql=/usr/local/pgsql -enable-sysvsem --enable-sysvshm --with-iconv --enable-zend-multibyte --without-mysql --with-gd --with-ttf --with-freetype-dir --with-zlib --with-jpeg-dir --with-png-dir --with-iconv --with-mbstring=tw --with-pdflib --with-tiff-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --without-xpm --enable-zend-multibyte --enable-experimental-zts --without-kerberos under this configure optoins, I get such test result: checking for crypt in -lcrypt... yes checking for standard DES crypt... no checking for extended DES crypt... no checking for MD5 crypt... no checking for Blowfish crypt... no It's strange ! I have crypt function but no crypt method avalible ! Even the standard DES crypt ! BTW, these options in PHP 4.3.3 is work ! In PHP 4.3.3 I got this: checking for crypt in -lcrypt... (cached) yes checking for standard DES crypt... (cached) yes checking for extended DES crypt... (cached) no checking for MD5 crypt... (cached) yes checking for Blowfish crypt... (cached) no So what's the problem ? -- Edit this bug report at http://bugs.php.net/?id=26131&edit=1
#26134 [NEW]: ereg not working with hex regex
From: bretschneider at element5 dot com Operating system: freebsd PHP version: 4.3.2 PHP Bug Type: Regexps related Bug description: ereg not working with hex regex Description: ereg does not seam to work with \x values. it can only matches uppercase !! but \x21-\x7a includes all upper and lower case characters. for some reasons i must use ereg and NOT eregi. preg_match does work! but it does not work with utf-8 Reproduce code: --- $URLS = array(1 => 'FOUND', 2 => 'notfound'); $pattern = '[\x21-\x7a]+'; foreach ($URLS as $key => $url) { print $url; if (ereg($pattern, $url)) print " OK\n"; else print " .. FAILED\n"; } Expected result: FOUND OK notfound .. OK Actual result: -- FOUND OK notfound .. FAILED -- Edit bug report at http://bugs.php.net/?id=26134&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26134&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26134&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26134&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26134&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26134&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26134&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26134&r=support Expected behavior: http://bugs.php.net/fix.php?id=26134&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26134&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26134&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26134&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26134&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26134&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26134&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26134&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26134&r=float
#26133 [NEW]: OCIDescriptorFree segfault PHP
From: msanmartin at seamus dot es Operating system: Linux PHP version: 4.3.4 PHP Bug Type: OCI8 related Bug description: OCIDescriptorFree segfault PHP Description: If I call OCINewDescriptor for create a OCI_D_ROWID when I free this descriptor or php free at the end it crash. It happens in Oracle 9.2.0.1.0 In Oracle 9.0.1.0.0 the code works. I make a program in C that makes similar calls to OCI8 but it works well. The crash is in the call to OCIDescriptorFree. I reproduce this in php4-200311050830 php-4.3.2 php-4.3.4 In php-4.2.2 the code works. Reproduce code: --- free(); ?> Actual result: -- $ gdb /usr/local/src/php-4.3.4/sapi/cli/php GNU gdb 5.3 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-slackware-linux"... (gdb) set args x2.php (gdb) run Starting program: /usr/local/src/php-4.3.4/sapi/cli/php x2.php [New Thread 16384 (LWP 11411)] end ** Internal heap ERROR 17112 addr=0x81d4278 * * Dump of memory around addr 0x81d4278: 81D4070 [] 81D4080 [] Repeat 30 times 81D4270 8022 081D405C ["[EMAIL PROTECTED] 81D4280 40921CBD 000A15CD D701 000D009F [EMAIL PROTECTED] 81D4290 00DA2501 0059 8032 081D4278 [.%..Y...2...xB..] 81D42A0 408FAAA0 000A15CD [EMAIL PROTECTED] 81D42B0 [] 81D42C0 8052 081D4298 [RB..] 81D42D0 408FAAA0 000A15CD 081D42A8 0005 [EMAIL PROTECTED] 81D42E0 4000 4040 [EMAIL PROTECTED]@@] 81D42F0 [] 81D4300 0010 402B29E0 402B2A30 081C29D8 [.)[EMAIL PROTECTED]@.)..] 81D4310 8032 081D42C8 [2B..] 81D4320 408FAAA0 000A15CD [EMAIL PROTECTED] 81D4330 [] 81D4340 8052 081D4318 [RC..] 81D4350 408FAAA0 000A15CD 081D4328 0005 [EMAIL PROTECTED](C..] 81D4360 4000 4040 402B2AE0 [EMAIL PROTECTED]@@[EMAIL PROTECTED] 81D4370 402B2B20 [ [EMAIL PROTECTED] 81D4380 0014 402B29E0 402B2A30 081C29D8 [.)[EMAIL PROTECTED]@.)..] 81D4390 8032 081D4348 [2...HC..] 81D43A0 408FAAA0 000A15CD [EMAIL PROTECTED] 81D43B0 [] 81D43C0 8052 081D4398 [RC..] 81D43D0 408FAAA0 000A15CD 081D43A8 0005 [EMAIL PROTECTED] 81D43E0 4000 4040 402B2A70 [EMAIL PROTECTED]@@[EMAIL PROTECTED] 81D43F0 402B2AA0 [EMAIL PROTECTED] 81D4400 005C 402B29E0 402B2A30 081C29D8 [\)[EMAIL PROTECTED]@.)..] 81D4410 8832 081D43C8 [2C..] 81D4420 408FAAA0 000A15CD 081D43D8 [EMAIL PROTECTED] 81D4430 081D42D8 081D4358 [.B..XC..] 81D4440 1041 [A...] 81D4450 081C63D8 081D3410 10001031 [.c...4..1...] 81D4460 081C63D8 081C6370 081CC7A0 8AF9 [.c..pc..] 81D4470 [] ***HEAP DUMP heap name="Alloc environm" desc=0x820bc78 extent sz=0x1024 alt=32767 het=32767 rec=0 flg=3 opc=3 parent=0x820bce0 owner=(nil) nex=(nil) xsz=0x1024 EXTENT 0 addr=0x8251914 Chunk 825191c sz= 4124free " " EXTENT 1 addr=0x82508d4 Chunk 82508dc sz= 2808free " " Chunk 82513d4 sz= 1316freeable assoc with mark prv=(nil) nxt=(nil) EXTENT 2 addr=0x82018e4 Chunk 82018ec sz= 76perm "perm " alo=76 Chunk 8201938 sz= 48free " " Chunk 8201968 sz= 24freeable assoc with mark prv=(nil) nxt=(nil) Chunk 8201980 sz= 32freeable assoc with mark prv=(nil) nxt=(nil) Chunk 82019a0 sz= 920free " " Chunk 8201d38 sz= 544freeable assoc with mark prv=(nil) nxt=(nil) Chunk 8201f58 sz= 1292freeable assoc with mark prv=(nil) nxt=(nil) Chunk 8202464 sz= 544freeable assoc with mark prv=(nil) nxt=(nil) Chunk 8202684 sz= 24freeable assoc with mark prv=(nil) nxt=(nil) Chunk 820269c sz= 20freeable assoc with mark prv=(nil) nxt=(nil) Chunk 82026b0 sz= 468freeable assoc with mark prv=(nil) nxt=(nil) Chunk 8202884 sz= 116freeable
#26116 [Fbk->Opn]: Unable to connect to ODBC database
ID: 26116 User updated by: andrew at howells-solicitors dot com Reported By: andrew at howells-solicitors dot com -Status: Feedback +Status: Open Bug Type: ODBC related Operating System: Windows NT 4 sp6a PHP Version: 4.3.4 New Comment: I thought about this but made the assumption that since the Apache installer had installed the service to run as system that it *should* work. Moreover, when I found this didn't work I allowed the account to interact with the desktop - theoretically allowing it to do everythign a normal domain account would. How wrong was I?! Following this response I altered the startup parameters for the apache service so the service used the Domain Admin account to start itself up. This appears to have resolved the issue - it loads the ODBC driver fine. Perhaps a footnote in the Apache / PHP installation guide would be in order for those who have Windows inflicted upon them ? Previous Comments: [2003-11-05 00:41:19] [EMAIL PROTECTED] My uneducated guess would be that the permissions for the apache user differ to the permission for the user as which you run the script on command line. Check those. [2003-11-04 10:39:43] andrew at howells-solicitors dot com Description: I am using PHP 4.3.4 & Apache 1.3.28 all on Windows NTT 4. I have a remote Progress database server that serves as backednd to a practice management and accounts suite we use in-house. I want to use PHP to provide a web based interface to this database but am having some entertaining problems. I've tried the progress supplied Merant ODBC drivers as well as the OpenLink ODBC drivers. Both connect fine, however, if I try connecting using PHP loaded as a module ito apache I cannot connect to the DB, the ODBC driver refuses to load. However, If I execute the script from the comand line "php E:\webpages\intranet\sostest2.php" The connection is established ok. Reproduce code: --- http://bugs.php.net/?id=26116&edit=1
#26117 [Bgs->Opn]: Persistent connection not reused
ID: 26117 User updated by: spam at vrana dot cz Reported By: spam at vrana dot cz -Status: Bogus +Status: Open Bug Type: MySQL related Operating System: Linux PHP Version: 4.3.3 New Comment: This is not the case. Believe me that I have read all similar bugs and this is different. I also have read carefuly the manual and I understand everything written there about persistent connections. There is written in the Persistent Database Connections chapter of manual: An 'identical' connection is a connection that was opened to the same host, with the same username and the same password (where applicable). So it's not true that by mysql_select_db() with different database name the connection can't be reused. Anyway I use the same database in all scripts. I know that connection is persistent only over the child. Thus I wrote that Apache configuration directive MaxClients is set to 150. Previous Comments: [2003-11-04 13:53:56] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php If you go mysql_select_db() then the persistent connection you've created becomes specific to that particular database. Which may explain why those connections are not re-used. Also, persistent connections are per-child, meaning that if 1 Apache child opens connections only that child has a pre-existing connection avaliable. If a subsequent request is handled by another child, which does not yet have a MySQL connection, it'll create a new connection. [2003-11-04 11:00:20] spam at vrana dot cz Description: Configuration: Apache 1.3.28 MySQL 4.0.15a With Apache configuration directive MaxClients set to 150, the number of database connection raised up to 466 (until MySQL denied connections with Too many connections error). In all scripts I use the same mysql_pconnect("localhost", "user", "pwd"). MySQL command SHOW PROCESSLIST showed that all 466 connections were made with the same connection parameters. All connections were in state Sleep. I am connecting to MySQL only from PHP module in Apache so I think this behavior is caused by some bug in handling with connection pool in PHP. -- Edit this bug report at http://bugs.php.net/?id=26117&edit=1
#26132 [Opn]: pg_fetch_object returns NULL on serial and INT in record but returns strings NP
ID: 26132 User updated by: steven at pearavenue dot com Reported By: steven at pearavenue dot com Status: Open Bug Type: PostgreSQL related Operating System: Redhat 9.0/Apache 2.0 PHP Version: 4.3.4 New Comment: Oh, and of course, you need to comment out either the ARRAY code or the OBJECT code when you test this. :) Try each in turn. Previous Comments: [2003-11-05 03:14:07] steven at pearavenue dot com You will want this SQL : $sql = "SELECT FeedID, uri FROMfeeds "; [2003-11-05 03:11:40] steven at pearavenue dot com Description: I checked on PHP 5.0beta too and the same problem there. pg_fetch_object returns serial or integers as NULL while but returns varchars in the same record as string - pg_fetch_array returns the entire data correctly. Similar code worked fine on another server using MySQl Support. You need a table like this: CREATE TABLE public.feeds ( feedid serial NOT NULL, uri varchar(255) NOT NULL DEFAULT '', category int4 NOT NULL DEFAULT 0, CONSTRAINT feeds_pkey PRIMARY KEY (feedid), CONSTRAINT feeds_uri_key UNIQUE (uri) ) WITH OIDS; Reproduce code: --- "; } else { // report connection error echo "connection_status: BAD"; echo( pg_last_error($link) ); } $feedb = pg_query( $link, $sql); echo( "".pg_num_rows( $feedb )." Number of rows returned." ); // for each row in the table stuff the coresponding variables with the data: echo ( "ARRAY" ); while( $fields = pg_fetch_array( $feedb ) ){ echo ( "Feed[0]: $fields[0]" ); echo ( "Feed[1]: {$fields[1]}" ); echo ( "Feed[2]: {$fields[2]}" ); } echo ( "OBJECT" ); while( $row = pg_fetch_object( $feedb ) ){ if( $row->FeedID == NULL) { $id = "NULL"; } else { $id = $row->FeedID; } echo ( "FeedID:".$id."" ); $uri = $row->uri; echo ( "uri: $uri" ); if( $row->category == NULL) { $c = "NULL"; } else { $c = $row->category; } echo ( "category: $c" ); } ?> Expected result: We expect the serial and integer values to appear in the result from pg_fetch_object Actual result: -- You will note that the output produces NULLs instead. -- Edit this bug report at http://bugs.php.net/?id=26132&edit=1
#26132 [Opn]: pg_fetch_object returns NULL on serial and INT in record but returns strings NP
ID: 26132 User updated by: steven at pearavenue dot com Reported By: steven at pearavenue dot com Status: Open Bug Type: PostgreSQL related Operating System: Redhat 9.0/Apache 2.0 PHP Version: 4.3.4 New Comment: You will want this SQL : $sql = "SELECT FeedID, uri FROMfeeds "; Previous Comments: [2003-11-05 03:11:40] steven at pearavenue dot com Description: I checked on PHP 5.0beta too and the same problem there. pg_fetch_object returns serial or integers as NULL while but returns varchars in the same record as string - pg_fetch_array returns the entire data correctly. Similar code worked fine on another server using MySQl Support. You need a table like this: CREATE TABLE public.feeds ( feedid serial NOT NULL, uri varchar(255) NOT NULL DEFAULT '', category int4 NOT NULL DEFAULT 0, CONSTRAINT feeds_pkey PRIMARY KEY (feedid), CONSTRAINT feeds_uri_key UNIQUE (uri) ) WITH OIDS; Reproduce code: --- "; } else { // report connection error echo "connection_status: BAD"; echo( pg_last_error($link) ); } $feedb = pg_query( $link, $sql); echo( "".pg_num_rows( $feedb )." Number of rows returned." ); // for each row in the table stuff the coresponding variables with the data: echo ( "ARRAY" ); while( $fields = pg_fetch_array( $feedb ) ){ echo ( "Feed[0]: $fields[0]" ); echo ( "Feed[1]: {$fields[1]}" ); echo ( "Feed[2]: {$fields[2]}" ); } echo ( "OBJECT" ); while( $row = pg_fetch_object( $feedb ) ){ if( $row->FeedID == NULL) { $id = "NULL"; } else { $id = $row->FeedID; } echo ( "FeedID:".$id."" ); $uri = $row->uri; echo ( "uri: $uri" ); if( $row->category == NULL) { $c = "NULL"; } else { $c = $row->category; } echo ( "category: $c" ); } ?> Expected result: We expect the serial and integer values to appear in the result from pg_fetch_object Actual result: -- You will note that the output produces NULLs instead. -- Edit this bug report at http://bugs.php.net/?id=26132&edit=1
#26132 [NEW]: pg_fetch_object returns NULL on serial and INT in record but returns strings NP
From: steven at pearavenue dot com Operating system: Redhat 9.0/Apache 2.0 PHP version: 4.3.4 PHP Bug Type: PostgreSQL related Bug description: pg_fetch_object returns NULL on serial and INT in record but returns strings NP Description: I checked on PHP 5.0beta too and the same problem there. pg_fetch_object returns serial or integers as NULL while but returns varchars in the same record as string - pg_fetch_array returns the entire data correctly. Similar code worked fine on another server using MySQl Support. You need a table like this: CREATE TABLE public.feeds ( feedid serial NOT NULL, uri varchar(255) NOT NULL DEFAULT '', category int4 NOT NULL DEFAULT 0, CONSTRAINT feeds_pkey PRIMARY KEY (feedid), CONSTRAINT feeds_uri_key UNIQUE (uri) ) WITH OIDS; Reproduce code: --- "; } else { // report connection error echo "connection_status: BAD"; echo( pg_last_error($link) ); } $feedb = pg_query( $link, $sql); echo( "".pg_num_rows( $feedb )." Number of rows returned." ); // for each row in the table stuff the coresponding variables with the data: echo ( "ARRAY" ); while( $fields = pg_fetch_array( $feedb ) ){ echo ( "Feed[0]: $fields[0]" ); echo ( "Feed[1]: {$fields[1]}" ); echo ( "Feed[2]: {$fields[2]}" ); } echo ( "OBJECT" ); while( $row = pg_fetch_object( $feedb ) ){ if( $row->FeedID == NULL) { $id = "NULL"; } else { $id = $row->FeedID; } echo ( "FeedID:".$id."" ); $uri = $row->uri; echo ( "uri: $uri" ); if( $row->category == NULL) { $c = "NULL"; } else { $c = $row->category; } echo ( "category: $c" ); } ?> Expected result: We expect the serial and integer values to appear in the result from pg_fetch_object Actual result: -- You will note that the output produces NULLs instead. -- Edit bug report at http://bugs.php.net/?id=26132&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26132&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26132&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26132&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26132&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26132&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26132&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26132&r=support Expected behavior: http://bugs.php.net/fix.php?id=26132&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26132&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26132&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26132&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26132&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26132&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26132&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26132&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26132&r=float
#25934 [Bgs->Opn]: SessionID in URL sometimes ignored
ID: 25934 User updated by: php at webfreezer dot com Reported By: php at webfreezer dot com -Status: Bogus +Status: Open Bug Type: Session related Operating System: SuSe Linux 8.1 PHP Version: 4.3.4 New Comment: Reopened. Previous Comments: [2003-11-05 03:00:31] php at webfreezer dot com This still happens in Version 4.3.4 which is now installed on the live system. What I do: - ini_set(session settings...) - session_start() - accessing the session values via $_SESSION - I don´t use sesson_register() and session_unregister() - Post a form via GET -> error occurs? -> redirect via header() with attached SID -> display page -> PHP ignores given sessionID - URL e.g. error.php?e=noresults_city&qid=1&sessionID=92f9dcf7a0d89eaa2b0bc8f2e4dfd460&token=d03d28781b196bd362b9aeb7844e8e85 - session_id() however is different from "$_GET[session_name()]" then - The error occurs everytime a new session is used (e.g. accessing the website and submitting the form for the first time int the session) I found at least a workaround for that: // Auto-Reset to correct session data $sn=session_name(); if($_GET[$sn] != session_id()) { $sessionSavePath=ini_get("session.save_path"); $oldSessionContent=file_get_contents($sessionSavePath."/sess_".$_GET[$sn]); session_decode($oldSessionContent); } If the error occurs it is now fixed on-the-fly. This works _everytime_ when the error occurs. As I said before the session file exists, it is readable and can be accessed without any problems, so it´s no wonder this workaround works. [2003-11-03 13:49:08] [EMAIL PROTECTED] As you don't give an example script we have to assume that you're just doing something wrong. This works just fine for me. [2003-11-03 06:41:08] php at webfreezer dot com Additional note: "DOMAINNAME" in session.save_path is just the concealed domain name. [2003-11-03 06:39:24] php at webfreezer dot com This is an excerpt of ini_get_all vardump´ed: [session.auto_start] array(3) => { [global_value] string(1) => "0" [local_value] string(1) => "0" [access] int(7) => } [session.bug_compat_42] array(3) => { [global_value] string(1) => "1" [local_value] string(1) => "1" [access] int(7) => } [session.bug_compat_warn] array(3) => { [global_value] string(1) => "1" [local_value] string(1) => "1" [access] int(7) => } [session.cache_expire] array(3) => { [global_value] string(2) => "60" [local_value] string(3) => "180" [access] int(7) => } [session.cache_limiter] array(3) => { [global_value] string(7) => "nocache" [local_value] string(7) => "nocache" [access] int(7) => } [session.cookie_domain] array(3) => { [global_value] string(0) => "" [local_value] string(0) => "" [access] int(7) => } [session.cookie_lifetime] array(3) => { [global_value] string(1) => "0" [local_value] string(1) => "0" [access] int(7) => } [session.cookie_path] array(3) => { [global_value] string(1) => "/" [local_value] string(1) => "/" [access] int(7) => } [session.cookie_secure] array(3) => { [global_value] string(0) => "" [local_value] string(0) => "" [access] int(7) => } [session.entropy_file] array(3) => { [global_value] string(0) => "" [local_value] string(0) => "" [access] int(7) => } [session.entropy_length] array(3) => { [global_value] string(1) => "0" [local_value] string(1) => "0" [access] int(7) => } [session.gc_divisor] array(3) => { [global_value] string(3) => "100" [local_value] string(3) => "100" [access] int(7) => } [session.gc_maxlifetime] array(3) => { [global_value] string(4) => "1440" [local_value] string(4) => "1440" [access] int(7) => } [session.gc_probability] array(3) => { [global_value] string(1) => "1" [local_value] string(1) => "1" [access] int(7) => } [session.name] array(3) => { [global_value] string(9) => "PHPSESSID" [local_value] string(9) => "sessionID" [access] int(7) => } [session.referer_check] array(3) => { [global_value] string(0) => "" [local_value] string(1) => "0" [access] int(7) => } [session.save_handler] array(3) => { [global_value] string(5) => "files" [local_value] string(5) => "files" [access] int(7) => } [session.save_path] array(3) => { [global_value] string(4) => "/tmp" [local_value] string(44) => "/var/www/DOMAINNAME/temp/sessions" [access] int(7) => } [session.serialize_handler] array(3) => { [global_value] string(3) => "php" [local_value] string(3) => "php" [access
#25934 [Bgs]: SessionID in URL sometimes ignored
ID: 25934 User updated by: php at webfreezer dot com Reported By: php at webfreezer dot com Status: Bogus Bug Type: Session related Operating System: SuSe Linux 8.1 -PHP Version: 4.3.3 +PHP Version: 4.3.4 New Comment: This still happens in Version 4.3.4 which is now installed on the live system. What I do: - ini_set(session settings...) - session_start() - accessing the session values via $_SESSION - I don´t use sesson_register() and session_unregister() - Post a form via GET -> error occurs? -> redirect via header() with attached SID -> display page -> PHP ignores given sessionID - URL e.g. error.php?e=noresults_city&qid=1&sessionID=92f9dcf7a0d89eaa2b0bc8f2e4dfd460&token=d03d28781b196bd362b9aeb7844e8e85 - session_id() however is different from "$_GET[session_name()]" then - The error occurs everytime a new session is used (e.g. accessing the website and submitting the form for the first time int the session) I found at least a workaround for that: // Auto-Reset to correct session data $sn=session_name(); if($_GET[$sn] != session_id()) { $sessionSavePath=ini_get("session.save_path"); $oldSessionContent=file_get_contents($sessionSavePath."/sess_".$_GET[$sn]); session_decode($oldSessionContent); } If the error occurs it is now fixed on-the-fly. This works _everytime_ when the error occurs. As I said before the session file exists, it is readable and can be accessed without any problems, so it´s no wonder this workaround works. Previous Comments: [2003-11-03 13:49:08] [EMAIL PROTECTED] As you don't give an example script we have to assume that you're just doing something wrong. This works just fine for me. [2003-11-03 06:41:08] php at webfreezer dot com Additional note: "DOMAINNAME" in session.save_path is just the concealed domain name. [2003-11-03 06:39:24] php at webfreezer dot com This is an excerpt of ini_get_all vardump´ed: [session.auto_start] array(3) => { [global_value] string(1) => "0" [local_value] string(1) => "0" [access] int(7) => } [session.bug_compat_42] array(3) => { [global_value] string(1) => "1" [local_value] string(1) => "1" [access] int(7) => } [session.bug_compat_warn] array(3) => { [global_value] string(1) => "1" [local_value] string(1) => "1" [access] int(7) => } [session.cache_expire] array(3) => { [global_value] string(2) => "60" [local_value] string(3) => "180" [access] int(7) => } [session.cache_limiter] array(3) => { [global_value] string(7) => "nocache" [local_value] string(7) => "nocache" [access] int(7) => } [session.cookie_domain] array(3) => { [global_value] string(0) => "" [local_value] string(0) => "" [access] int(7) => } [session.cookie_lifetime] array(3) => { [global_value] string(1) => "0" [local_value] string(1) => "0" [access] int(7) => } [session.cookie_path] array(3) => { [global_value] string(1) => "/" [local_value] string(1) => "/" [access] int(7) => } [session.cookie_secure] array(3) => { [global_value] string(0) => "" [local_value] string(0) => "" [access] int(7) => } [session.entropy_file] array(3) => { [global_value] string(0) => "" [local_value] string(0) => "" [access] int(7) => } [session.entropy_length] array(3) => { [global_value] string(1) => "0" [local_value] string(1) => "0" [access] int(7) => } [session.gc_divisor] array(3) => { [global_value] string(3) => "100" [local_value] string(3) => "100" [access] int(7) => } [session.gc_maxlifetime] array(3) => { [global_value] string(4) => "1440" [local_value] string(4) => "1440" [access] int(7) => } [session.gc_probability] array(3) => { [global_value] string(1) => "1" [local_value] string(1) => "1" [access] int(7) => } [session.name] array(3) => { [global_value] string(9) => "PHPSESSID" [local_value] string(9) => "sessionID" [access] int(7) => } [session.referer_check] array(3) => { [global_value] string(0) => "" [local_value] string(1) => "0" [access] int(7) => } [session.save_handler] array(3) => { [global_value] string(5) => "files" [local_value] string(5) => "files" [access] int(7) => } [session.save_path] array(3) => { [global_value] string(4) => "/tmp" [local_value] string(44) => "/var/www/DOMAINNAME/temp/sessions" [access] int(7) => } [session.serialize_handler] array(3) => { [global_value] string(3) => "php" [local_value] string(3) => "php" [access] int(7) => } [session.use_cookies] array(3) => { [global_value] string(1) => "1" [local_value] string(1) => "0" [ac
#25972 [Ana]: ODBC truncates multi-byte text (w/ MSSQL)
ID: 25972 User updated by: phpbug at chipple dot net Reported By: phpbug at chipple dot net Status: Analyzed Bug Type: Feature/Change Request Operating System: Win2K 5.00.2195 SP4 PHP Version: 4.3, 5 New Comment: In case this helps... One thing I just noticed from my test above (in the results before the change) is that strlen() on the tTitle field value gives 86 [bytes], the string's correct length. I verified that the 6 last bytes are all null (ASCII 0), only the first 80 bytes are correctly being returned. Previous Comments: [2003-11-05 01:18:08] phpbug at chipple dot net Thank you very much for the attention to my bug report. I gave the fix a try in my environment but then all field values received are empty (details below). Perhaps the SQL_COLUMN_LENGTH attribute always contains the value 0? // Test code $oOdbcConn = odbc_connect(C_Gen_sDbDSN,C_Gen_sDbUser,C_Gen_sDbPassword); $oOdbcRs = odbc_exec($oOdbcConn,$sSql); $aOdbcRow = odbc_fetch_array($oOdbcRs); for ($i = 1; $i <= odbc_num_fields($oOdbcRs); $i++) echo odbc_field_name($oOdbcRs,$i).": ". odbc_field_len($oOdbcRs,$i).": ". strlen($aOdbcRow[odbc_field_name($oOdbcRs,$i)]).": ". gettype($aOdbcRow[odbc_field_name($oOdbcRs,$i)]).""; // Result with php4-STABLE-200311050430 before change // (SQL_COLUMN_DISPLAY_SIZE) aCourseID: 10: 1: string tTitle: 80: 86: string // Result with php4-STABLE-200311050430 after change // (SQL_COLUMN_LENGTH) aCourseID: 10: 0: NULL tTitle: 80: 0: NULL [2003-11-04 18:33:10] [EMAIL PROTECTED] I do not like the idea of introducing ODBCv3 based code/ options to a system predominately defined by ODBCv2 specifications. So I am against the inclusion of Moriyoshi's initial suggested fix for this. That being said, I did a bit more research on this today and think the following change should allow the double wide characters to work much better. I haven't tested it out yet myself, but if someone else has the time, it would be beneficial to all. Sorry about the bug system mangling. Essentially the SQL_COLUMNS_DISPLAY_SIZE lists the number of characters needed to display everything. This works fine but in the case of a double wide character array it doesn't (as explained my Moriyoshi). The SQL_COLUMN_LENGTH should return the number of bytes necessary for retrival of the column. WARNING: this change may fundamentally alter the functionality of the longreadlen variable comparisons as well. Use at your own risk right now. Index: php_odbc.c === RCS file: /repository/php-src/ext/odbc/php_odbc.c,v retrieving revision 1.176 diff -r1.176 php_odbc.c 671,672c671,672 < rc = SQLColAttributes(result->stmt, (UWORD)(i+1), SQL_COLUMN_DISPLAY_SIZE, < NULL, 0, NULL, &displaysize); --- > rc = SQLColAttributes(result->stmt, (UWORD)(i+1), > SQL_COLUMN_LENGTH, NULL, 0, NULL, &displaysize); [2003-11-04 09:31:56] [EMAIL PROTECTED] Well, then how did you conclude NVARCHAR support will break some kinds of compatibilities? I think I have already pointed out that we'd still be able to handle it on ODBCv2. (Sorry if this sounds offending. I don't mean so :) Basically we don't have to check whether the column type is NVARCHAR or not, but just allocate enough space for that type of characters. That way we also got to take a slight loss of memory into account though. [2003-11-04 07:56:51] [EMAIL PROTECTED] moriyoshi, It's not as simple as you show it to be. First you must realize that PHP's ODBC layer is written as an ODBC v2 compliant system, to just randomly add in support for NVARCHAR (and friends) will break support for other database systems. The point of my post wasn't to say this isn't a bug (hence why I marked it as verified), but rather to say it's a known bug and the issue is the extension is in need of updating. [2003-11-03 17:13:35] [EMAIL PROTECTED] I might be wrong, but I think this is a valid bug. According to the documentation on msdn [1] [2], the fifth parameter of SQLBindCol() expects the size of the buffer in byte, while the code mentioned below appears to give it the number of characters allocated for the column (display size) instead. This kind of confusion will most likely cause unexpected behaviour like described in this report. php_odbc.c 669: -- default: rc = SQLColAttri
#26131 [NEW]: the crypt function have no MD5 support
From: yoda at cef dot org dot tw Operating system: RedHat Linux 9.0 PHP version: 4.3.4 PHP Bug Type: *Compile Issues Bug description: the crypt function have no MD5 support Description: When I download PHP 4.3.4 and running configure, I found that the crypt function has no crypt method support . Below is my configure options ./configure --with-apxs2 --with-layout=PHP --with-config-file-path=/etc/httpd --enable-sigchild --enable-magic-quotes --with-openssl --enable-ftp --enable-mbstring --enable-mbregex --enable-mime-magic --with-pgsql=/usr/local/pgsql -enable-sysvsem --enable-sysvshm --with-iconv --enable-zend-multibyte --without-mysql --with-gd --with-ttf --with-freetype-dir --with-zlib --with-jpeg-dir --with-png-dir --with-iconv --with-mbstring=tw --with-pdflib --with-tiff-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --without-xpm --enable-zend-multibyte --enable-experimental-zts --without-kerberos under this configure optoins, I get such test result: checking for crypt in -lcrypt... yes checking for standard DES crypt... no checking for extended DES crypt... no checking for MD5 crypt... no checking for Blowfish crypt... no It's strange ! I have crypt function but no crypt method avalible ! Even the standard DES crypt ! BTW, these options in PHP 4.3.3 is work ! In PHP 4.3.3 I got this: checking for crypt in -lcrypt... (cached) yes checking for standard DES crypt... (cached) yes checking for extended DES crypt... (cached) no checking for MD5 crypt... (cached) yes checking for Blowfish crypt... (cached) no So what's the problem ? -- Edit bug report at http://bugs.php.net/?id=26131&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26131&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26131&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26131&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26131&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26131&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26131&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26131&r=support Expected behavior: http://bugs.php.net/fix.php?id=26131&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26131&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26131&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26131&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26131&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26131&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26131&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26131&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26131&r=float