#42016 [NEW]: Call to a parent's parent method is allowed

2007-07-17 Thread reto at buxaprojects dot com
From: reto at buxaprojects dot com
Operating system: FreeBSD
PHP version:  5.2.3
PHP Bug Type: Class/Object related
Bug description:  Call to a parent's parent method is allowed

Description:

I expected, that i cannot call a non-static method in a parent's parent
class with ParentClassName::method() from a child class. But it works even
on E_STRICT. I think this should be a bug!

Reproduce code:
---
class A {
private $myVar;   
public function test() { 
$this-myVar = 'test';
echo 'A::test()' . \n;
}
}
class B extends A { 
public function test() { 
echo 'B::test()' . \n; 
}
}
class C extends B { 
public function test() 
{ 
echo 'C::test()' . \n;
A::test();
}
} 
$c = new C; 
$c-test();

Expected result:

Non-static method A::test() should not be called statically

Actual result:
--
C::test
A::test

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


#41713 [Asn]: Persistent memory consumption since 5.2

2007-07-17 Thread mplomer at gmx dot de
 ID:   41713
 User updated by:  mplomer at gmx dot de
 Reported By:  mplomer at gmx dot de
 Status:   Assigned
 Bug Type: Performance problem
 Operating System: win32 only
 PHP Version:  5.2CVS-2007-07-12
 Assigned To:  dmitry
 New Comment:

Yes, seems this is the same problem. You could try to reproduce this
with the 4-line test script from the comment from [30 Jun 10:19am UTC]
and the Reproduce procedure from the initial bug report on your
machine.
But Jani could already reproduce the bug and it is now assigned to
Dmitry, so we will wait for his comments ;-)


Previous Comments:


[2007-07-16 23:23:32] stephen dot johnston at guildlaunch dot com

We are seeing a similar problem in 5.2.3 with Apache 2.0.59 and 4g of
RAM. After a few hours of running with more than 70 threads per child in
Apache PHP will start throwing errors saying out of memory with
seemingly random memory sizes. It seems to happen in our environment
once Apache's memory usage reaches around 1gig, but that is not always
the case. Our site is growing fast and we need to be able to up Apache
threads without recycling Apache every 2 hours.

Unfortunately, the PHP community in general seems to respond to error
reports relating to this with increase your memory limit. This is
*not* a memory limit issue.

I would be more than willing to work with you all to provide debug
info, but we cannot reproduce this in our test environement with load
testing and I don't want to mess around with our production
environment without some specific direction on how to correctly profile
this issue.



[2007-07-14 21:15:15] [EMAIL PROTECTED]

And I can reproduce this too on Windows, using latest snapshot
available.



[2007-07-14 09:15:28] [EMAIL PROTECTED]

Dmitry, please check this out.



[2007-07-11 08:43:55] mplomer at gmx dot de

I tested with PHP 5.2.0 now, and I can reproduce the described
behaviour from [30 Jun 10:19am UTC] too. Only when I am testing with PHP
5.1.6, I can't reproduce it.
But I agree with you, that this points at the new memory management on
win32.



[2007-07-10 23:39:09] spamtrap at psychoticwolf dot net

I see this with PHP 5.2.1 - 5.2.3 (mod_php5 with Apache 2.0.59 and
2.2.4 on WinXP and Win2003). I did some regression testing and it seems
to have started between 5.2.0 and 5.2.1 which points at the new memory
management on win32. Memload was normal under 5.2.0.  After awhile,
Apache consumes as previously reported, 300-600mb (usually around 330mb
+ 6-700mb virtual), and, curiously, PHP thows a Fatal Error that its
exceeded its memory limit for that script, even though it hasn't, as the
script doesn't use more than about 300k. (Only seen this last part once,
so far, so that might be a fluke.)



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

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


#42016 [Opn-Fbk]: Call to a parent's parent method is allowed

2007-07-17 Thread derick
 ID:   42016
 Updated by:   [EMAIL PROTECTED]
 Reported By:  reto at buxaprojects dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Class/Object related
 Operating System: FreeBSD
 PHP Version:  5.2.3
 New Comment:

And why do you think this is a bug?


Previous Comments:


[2007-07-17 06:24:58] reto at buxaprojects dot com

Description:

I expected, that i cannot call a non-static method in a parent's parent
class with ParentClassName::method() from a child class. But it works
even on E_STRICT. I think this should be a bug!

Reproduce code:
---
class A {
private $myVar;   
public function test() { 
$this-myVar = 'test';
echo 'A::test()' . \n;
}
}
class B extends A { 
public function test() { 
echo 'B::test()' . \n; 
}
}
class C extends B { 
public function test() 
{ 
echo 'C::test()' . \n;
A::test();
}
} 
$c = new C; 
$c-test();

Expected result:

Non-static method A::test() should not be called statically

Actual result:
--
C::test
A::test





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


#42016 [Fbk-Opn]: Call to a parent's parent method is allowed

2007-07-17 Thread reto at buxaprojects dot com
 ID:   42016
 User updated by:  reto at buxaprojects dot com
 Reported By:  reto at buxaprojects dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Class/Object related
 Operating System: FreeBSD
 PHP Version:  5.2.3
 New Comment:

Because a non-static method should not be called statically! This
should also apply for a parents parent class! Class C and B should only
be able to call parent:: . If class C must access the method test() of
class A, class B shouldn't override the method test().


Previous Comments:


[2007-07-17 07:51:34] [EMAIL PROTECTED]

And why do you think this is a bug?



[2007-07-17 06:24:58] reto at buxaprojects dot com

Description:

I expected, that i cannot call a non-static method in a parent's parent
class with ParentClassName::method() from a child class. But it works
even on E_STRICT. I think this should be a bug!

Reproduce code:
---
class A {
private $myVar;   
public function test() { 
$this-myVar = 'test';
echo 'A::test()' . \n;
}
}
class B extends A { 
public function test() { 
echo 'B::test()' . \n; 
}
}
class C extends B { 
public function test() 
{ 
echo 'C::test()' . \n;
A::test();
}
} 
$c = new C; 
$c-test();

Expected result:

Non-static method A::test() should not be called statically

Actual result:
--
C::test
A::test





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


#42015 [Opn-Csd]: ldap_rename gets server error DSA is unwilling to perform

2007-07-17 Thread jani
 ID:   42015
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bob at mroczka dot com
-Status:   Open
+Status:   Closed
 Bug Type: LDAP related
 Operating System: solaris 8
 PHP Version:  5.2.3
 New Comment:

This bug has been fixed in CVS.

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

Thanks for the excellent analysis (and patch, which I modified a bit
though.. :)


Previous Comments:


[2007-07-17 02:50:57] bob at mroczka dot com

Description:

i encountered this error while attempting to use ldap_rename against an
IBM tivoli directory server.  if i used the command line ldapmodrn tool
the same rename was successful.  i ran a network trace for each rename
and found that php was not properly sending a null in the 4th argument
(newparent) to ldap_rename_s when a null or empty string is passed in
the php web page for this argument.  this was causing the ldap client
library to send 2 additional hex bytes x'0800' at the end of the modrdn
packet causing the server to return the unwilling error.  the following
2 line patch fixes this problem and sends a proper null when requested.

--- ext/ldap/ldap.c.orig2006-06-15 13:33:07.0 -0500
+++ ext/ldap/ldap.c 2007-07-16 21:33:32.748612000 -0500
@@ -2114,7 +2114,8 @@
convert_to_boolean_ex(deleteoldrdn);

 #if (LDAP_API_VERSION  2000) || HAVE_NSLDAP || HAVE_ORALDAP_10
-   rc = ldap_rename_s(ld-link, Z_STRVAL_PP(dn),
Z_STRVAL_PP(newrdn), Z_STRVAL_PP(newparent), Z_BVAL_PP(deleteoldrdn),
NULL, NULL);
+   char *newp = Z_STRLEN_PP(newparent)  1 ? NULL :
Z_STRVAL_PP(newparent);
+   rc = ldap_rename_s(ld-link, Z_STRVAL_PP(dn),
Z_STRVAL_PP(newrdn), newp, Z_BVAL_PP(deleteoldrdn), NULL, NULL);
 #else
if (Z_STRLEN_PP(newparent) != 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, You are
using old LDAP API, newparent must be the empty string, can only modify
RDN);






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


#38235 [Opn-WFx]: mime_content_type does not return content type

2007-07-17 Thread jani
 ID:   38235
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tony at marston-home dot demon dot co dot uk
-Status:   Open
+Status:   Wont fix
 Bug Type: Filesystem function related
 Operating System: Windows XP
 PHP Version:  5CVS-2006-07-27 (CVS)
 New Comment:

This extension was deprecated a while ago. Use the fileinfo extension
instead: http://pecl.php.net/package/Fileinfo

(It will replace mime_magic in core in future anyway)


Previous Comments:


[2006-12-21 17:48:05] sonne at gaskanalen dot dk

When using a WinXp with 5.2 i get errors when loading the magic.mime
file 

-- just a snippet
[21-Dec-2006 18:42:50] PHP Warning:  PHP Startup: :
(C:\wamp\php\extras\magic.mime:360) 'HP48 text' is not a valid mimetype,
entry skipped in Unknown on line 0
[21-Dec-2006 18:42:50] PHP Warning:  PHP Startup: :
(C:\wamp\php\extras\magic.mime:361) 'hp200 (68010) BSD' is not a valid
mimetype, entry skipped in Unknown on line 0
[21-Dec-2006 18:42:50] PHP Warning:  PHP Startup: :
(C:\wamp\php\extras\magic.mime:362) 'hp300 (68020+68881) BSD' is not a
valid mimetype, entry skipped in Unknown on line 0
[21-Dec-2006 18:42:50] PHP Warning:  PHP Startup: :
(C:\wamp\php\extras\magic.mime:363) '370 XA sysV executable ' is not a
valid mimetype, entry skipped in Unknown on line 0
[21-Dec-2006 18:42:50] PHP Warning:  PHP Startup: :
(C:\wamp\php\extras\magic.mime:364) '370 XA sysV pure executable ' is
not a valid mimetype, entry skipped in Unknown on line 0


I tryed downloading the zip file with windows binaries both from lates
5 and 4 series and use thoose magic.mime, they don't work

i also tryed jusing the magic file from apache, i don't get any errors
in the log with this one, but the functions both mime_content_type and
finfo_open dosnøt work with this either.



[2006-07-27 16:04:37] tony at marston-home dot demon dot co dot uk

I've also tried replacing it with the one I use on my other PC which
runs PHP 4, but I get the same error.



[2006-07-27 16:03:01] tony at marston-home dot demon dot co dot uk

It is the one included in the zip file which I downloaded from the PHP
website.



[2006-07-27 12:40:09] [EMAIL PROTECTED]

it sounds to me like you mime magic file is invalid and 
subsequently results in an empty mime database in PHP. This 
would explain why the function always returns false. Where did 
you get the mime magic file that you are using?



[2006-07-27 10:52:37] tony at marston-home dot demon dot co dot uk

Description:

When I use mime_content_type(picture.jpg) it always returns FALSE
instead of image/jpeg. At runtime I see the error
mime_content_type(): mime_magic not initialized.

I have the following in my php.ini file:

[mime_magic]
mime_magic.magicfile = F:/PHP5/extras/magic.mime
mime_magic.debug = On

This information shows up correctly with phpinfo().

I also notice in the phperror.log a lot of messages along the lines
of:

[27-Jul-2006 11:37:13] PHP Warning:  PHP Startup: :
(F:/PHP5/extras/magic.mime:274) 'L  application/x-bootable' is not a
valid mimetype, entry skipped in Unknown on line 0

Reproduce code:
---
$content_type = mime_content_type(picture.jpg);
if (empty($content_type)) {
   echo content_type is empty;
}

Expected result:

I expect it to return image/jpeg for this file.

Actual result:
--
It always returns FALSE.





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


#41976 [Bgs-Opn]: Seems to work on nested XML, but not with CDATA

2007-07-17 Thread stefan dot priebsch at e-novative dot de
 ID:   41976
 User updated by:  stefan dot priebsch at e-novative dot de
-Summary:  json_encode ignores CDATA sections
 Reported By:  stefan dot priebsch at e-novative dot de
-Status:   Bogus
+Status:   Open
 Bug Type: JSON related
 Operating System: WinXP
 PHP Version:  5.2.3
 New Comment:

I re-opened the bug due to the discussion of bug #42001. json_encode()
does not work on nested XML with a string cast, but it does work without
a string cast. (Of course except for the CDATA problem that made me file
this bug in the first place.)

$xml = new SimpleXMLElement('?xml version=1.0
encoding=UTF-8?testsubtest/subanothervalue/anotherpathto
tagsomething/tag/to/path/test');
  var_dump(json_encode($xml));
  var_dump(json_encode((string) $xml));

  $xml = new SimpleXMLElement('?xml version=1.0
encoding=UTF-8?testsub![CDATA[test]]/subanothervalue/anoth
erpathtotagsomething/tag/to/path/test');
  var_dump(json_encode($xml));
  var_dump(json_encode((string) $xml));


Previous Comments:


[2007-07-13 08:08:02] [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

Yes, and it will try to serialize the SimpleXML object, what won't
work, that's part of SimpleXML's behaviour 



[2007-07-13 06:33:16] stefan dot priebsch at e-novative dot de

Sorry, I disagree. This is a bug, not bogus.

The manual says that json_encode works on any type except resources. 

  $xml = new SimpleXMLElement('?xml version=1.0
encoding=UTF-8?test![CDATA[test]]/test');
  var_dump(is_resource($xml));

outputs false, (which is obvious as SimpleXML is not listed in the list
of resource types). Thus SimpleXML is not a resource and must be
processed by json_encode() without a string cast. How would I supposed
to cast an XML tree to string anyway?

Please have a look at bug#38680, where a similar issue was discussed.



[2007-07-12 09:08:39] [EMAIL PROTECTED]

  var_dump((string) $xml);
  var_dump(json_encode($xml)); -- you have to cast it to string
explicitly, otherwise json_encode() will encode the object itself, not
it's string representation.



[2007-07-12 07:39:30] stefan dot priebsch at e-novative dot de

Description:

When json_encoding (Simple)XML data, CDATA sections are ignored.

Reproduce code:
---
  $xml = new SimpleXMLElement('?xml version=1.0
encoding=UTF-8?testtest/test');
  var_dump((string) $xml);
  var_dump(json_encode($xml));

  $xml = new SimpleXMLElement('?xml version=1.0
encoding=UTF-8?test![CDATA[test]]/test');
  var_dump((string) $xml);
  var_dump(json_encode($xml));


Expected result:

string 'test' (length=4)

string '{0:test}' (length=12)

string 'test' (length=4)

string '{0:test}' (length=12)


Actual result:
--
string 'test' (length=4)

string '{0:test}' (length=12)

string 'test' (length=4)

string '{}' (length=2)






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


#42019 [NEW]: configure option --with-adabas=DIR does not work

2007-07-17 Thread php-ingo at edict dot de
From: php-ingo at edict dot de
Operating system: linux (opensuse 10.2)
PHP version:  5.2.3
PHP Bug Type: Adabas-D related
Bug description:  configure option --with-adabas=DIR does not work

Description:

using this configure statement:
./configure 
  --prefix=/home/xxx/appl \
  --with-apache=/home/xxx/appl/src/software/apache_1.3.34 \
  --with-adabas=/opt/adabas

throws this error message when running it:
...
checking PHP version... 5.2.3, ok
checking for Adabas support... configure: error: ODBC header file
'/sqlext.h' not found!

PHP4 finds the header files located in /opt/adabas/incl.
PHP5 doesn't do so. It seems to look for sqlext.h in the root directory.
Is that a feature?



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


#42018 [NEW]: Zero Sized Reply

2007-07-17 Thread shabeel at poornam dot com
From: shabeel at poornam dot com
Operating system: Apache/1.3.37
PHP version:  4.4.7
PHP Bug Type: Scripting Engine problem
Bug description:  Zero Sized Reply

Description:

Hi
Im getting this apache in logs as 
Ouch!  malloc(5723244) failed in malloc_block()
and in front end as Zero Sized Reply

Our developer said it worked in previous server , the problem started when
our application moved to new server

This is the configuration command.
'./configure' '--prefix=/usr/local'
'--with-apxs=/usr/local/apache/bin/apxs' '--enable-zend-multibyte'
'--enable-bcmath' '--with-bz2' '--enable-calendar' '--with-curl'
'--enable-dbase' '--with-dom' '--enable-exif' '--enable-filepro'
'--enable-ftp' '--with-gettext' '--with-gmp' '--with-iconv'
'--enable-mbstring' '--with-mcrypt' '--enable-memory-limit' '--with-mhash'
'--with-ming' '--with-ncurses' '--with-openssl' '--with-openssl-dir=/usr'
'--enable-pcntl' '--with-pgsql' '--with-pspell' '--enable-shmop'
'--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm'
'--enable-wddx' '--with-xmlrpc' '--with-zlib' '--disable-debug'
'--enable-dba' '--with-cdb' '--with-db4' '--with-flatfile' '--with-gdbm'
'--with-inifile' '--enable-dbx' '--with-freetype-dir=/usr'
'--with-t1lib=/usr' '--enable-gd-jis-conv' '--enable-gd-native-ttf'
'--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--with-imap='
'--with-imap-ssl' '--with-mysql=/usr' '--with-unixODBC=/usr'
'--with-iodbc=/usr' '--with-readline' '--enable-xslt' '--with-xslt-sablot'
'--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--with-mm'
'--enable-mbstr-enc-trans' '--enable-mbregex' '--enable-magic-quotes'
'--with-mysqli' '--enable-discard-path' '--with-pdflib' '--with-pear'
'--enable-safe-mode' '--enable-track-vars' '--with-ttf' '--with-zip'


Could you please figure out ?

This is the link of the application.
http://foreverasoldier.com/MyPet/index.php?option=com_staticxtstaticfile=index.php
login : bug/testing

Create a card with charachaters + background and publish , here occurs the
problem.

and here are the phpinfo of new and old server
http://foreverasoldier.com/info.php (New Server)
http://substormmedia.com/~segull/info.php (Old Server)



 

Regards
Shabeel


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


#42019 [Opn-Csd]: configure option --with-adabas=DIR does not work

2007-07-17 Thread jani
 ID:   42019
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php-ingo at edict dot de
-Status:   Open
+Status:   Closed
 Bug Type: Adabas-D related
 Operating System: linux (opensuse 10.2)
 PHP Version:  5.2.3
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2007-07-17 11:44:17] php-ingo at edict dot de

Description:

using this configure statement:
./configure 
  --prefix=/home/xxx/appl \
  --with-apache=/home/xxx/appl/src/software/apache_1.3.34 \
  --with-adabas=/opt/adabas

throws this error message when running it:
...
checking PHP version... 5.2.3, ok
checking for Adabas support... configure: error: ODBC header file
'/sqlext.h' not found!

PHP4 finds the header files located in /opt/adabas/incl.
PHP5 doesn't do so. It seems to look for sqlext.h in the root
directory.
Is that a feature?







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


#22092 [Com]: Strange warning and no functionality in imagettfbbox and imagettftext

2007-07-17 Thread xeon at adamant dot net
 ID:   22092
 Comment by:   xeon at adamant dot net
 Reported By:  davidl at tocquigny dot com
 Status:   No Feedback
 Bug Type: GD related
 Operating System: Redhat 7.1
 PHP Version:  4.3.2
 New Comment:

I also have this bug with PHP-4.4.7 and 5.2.3 :(


Previous Comments:


[2003-06-15 23:46:30] [EMAIL PROTECTED]

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





[2003-06-10 19:22:03] [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-05-29 10:47:42] davidl at tocquigny dot com

The problem with spaces in the font name continues in 4.3.2.  A font
arial.ttf works but futura bold.ttf generates the error:

Warning: imagettfbbox(): Could not find/open font in
/xxx/xxx/xxx/custom_class.php on line 535



[2003-05-27 17:30:59] paul at thewall dot de

I can confirm this bug, it still persist. A Full path did not help, as
well as renaming the font file and cutting off the extension (which is
reported to work).

I have tried GD extension versions 1 and 2, same result. PHP Version is
4.2.3.



[2003-04-10 08:51:29] kadlcakd at yahoo dot com

I have the same problem with 4.3.1

I have GD 2.0.4 compiled with TTF support, php 4.3.1 compiled --with-gd
--with-ttf --with-freetype-dir


ImageTTFBBox( 18, 0, fonts/times.ttf, Hello );

Gives an error:
Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open
font in /usr2/accnts/theuser/www/tests/button.php

Dave.



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

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


#41976 [Opn-Bgs]: Seems to work on nested XML, but not with CDATA

2007-07-17 Thread johannes
 ID:   41976
 Updated by:   [EMAIL PROTECTED]
 Reported By:  stefan dot priebsch at e-novative dot de
-Status:   Open
+Status:   Bogus
 Bug Type: JSON related
 Operating System: WinXP
 PHP Version:  5.2.3
 New Comment:

$xml and (string)$xml are different things. Using different things as
arguments for a function gives different results.


Previous Comments:


[2007-07-17 10:46:38] stefan dot priebsch at e-novative dot de

I re-opened the bug due to the discussion of bug #42001. json_encode()
does not work on nested XML with a string cast, but it does work without
a string cast. (Of course except for the CDATA problem that made me file
this bug in the first place.)

$xml = new SimpleXMLElement('?xml version=1.0
encoding=UTF-8?testsubtest/subanothervalue/anotherpathto
tagsomething/tag/to/path/test');
  var_dump(json_encode($xml));
  var_dump(json_encode((string) $xml));

  $xml = new SimpleXMLElement('?xml version=1.0
encoding=UTF-8?testsub![CDATA[test]]/subanothervalue/anoth
erpathtotagsomething/tag/to/path/test');
  var_dump(json_encode($xml));
  var_dump(json_encode((string) $xml));



[2007-07-13 08:08:02] [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

Yes, and it will try to serialize the SimpleXML object, what won't
work, that's part of SimpleXML's behaviour 



[2007-07-13 06:33:16] stefan dot priebsch at e-novative dot de

Sorry, I disagree. This is a bug, not bogus.

The manual says that json_encode works on any type except resources. 

  $xml = new SimpleXMLElement('?xml version=1.0
encoding=UTF-8?test![CDATA[test]]/test');
  var_dump(is_resource($xml));

outputs false, (which is obvious as SimpleXML is not listed in the list
of resource types). Thus SimpleXML is not a resource and must be
processed by json_encode() without a string cast. How would I supposed
to cast an XML tree to string anyway?

Please have a look at bug#38680, where a similar issue was discussed.



[2007-07-12 09:08:39] [EMAIL PROTECTED]

  var_dump((string) $xml);
  var_dump(json_encode($xml)); -- you have to cast it to string
explicitly, otherwise json_encode() will encode the object itself, not
it's string representation.



[2007-07-12 07:39:30] stefan dot priebsch at e-novative dot de

Description:

When json_encoding (Simple)XML data, CDATA sections are ignored.

Reproduce code:
---
  $xml = new SimpleXMLElement('?xml version=1.0
encoding=UTF-8?testtest/test');
  var_dump((string) $xml);
  var_dump(json_encode($xml));

  $xml = new SimpleXMLElement('?xml version=1.0
encoding=UTF-8?test![CDATA[test]]/test');
  var_dump((string) $xml);
  var_dump(json_encode($xml));


Expected result:

string 'test' (length=4)

string '{0:test}' (length=12)

string 'test' (length=4)

string '{0:test}' (length=12)


Actual result:
--
string 'test' (length=4)

string '{0:test}' (length=12)

string 'test' (length=4)

string '{}' (length=2)






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


#42018 [Opn-Fbk]: Zero Sized Reply

2007-07-17 Thread johannes
 ID:   42018
 Updated by:   [EMAIL PROTECTED]
 Reported By:  shabeel at poornam dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: Apache/1.3.37
 PHP Version:  4.4.7
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


Previous Comments:


[2007-07-17 11:21:59] shabeel at poornam dot com

Description:

Hi
Im getting this apache in logs as 
Ouch!  malloc(5723244) failed in malloc_block()
and in front end as Zero Sized Reply

Our developer said it worked in previous server , the problem started
when our application moved to new server

This is the configuration command.
'./configure' '--prefix=/usr/local'
'--with-apxs=/usr/local/apache/bin/apxs' '--enable-zend-multibyte'
'--enable-bcmath' '--with-bz2' '--enable-calendar' '--with-curl'
'--enable-dbase' '--with-dom' '--enable-exif' '--enable-filepro'
'--enable-ftp' '--with-gettext' '--with-gmp' '--with-iconv'
'--enable-mbstring' '--with-mcrypt' '--enable-memory-limit'
'--with-mhash' '--with-ming' '--with-ncurses' '--with-openssl'
'--with-openssl-dir=/usr' '--enable-pcntl' '--with-pgsql'
'--with-pspell' '--enable-shmop' '--enable-sockets' '--enable-sysvmsg'
'--enable-sysvsem' '--enable-sysvshm' '--enable-wddx' '--with-xmlrpc'
'--with-zlib' '--disable-debug' '--enable-dba' '--with-cdb' '--with-db4'
'--with-flatfile' '--with-gdbm' '--with-inifile' '--enable-dbx'
'--with-freetype-dir=/usr' '--with-t1lib=/usr' '--enable-gd-jis-conv'
'--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr'
'--with-gd' '--with-imap=' '--with-imap-ssl' '--with-mysql=/usr'
'--with-unixODBC=/usr' '--with-iodbc=/usr' '--with-readline'
'--enable-xslt' '--with-xslt-sablot' '--with-dom-xslt=/usr'
'--with-dom-exslt=/usr' '--with-mm' '--enable-mbstr-enc-trans'
'--enable-mbregex' '--enable-magic-quotes' '--with-mysqli'
'--enable-discard-path' '--with-pdflib' '--with-pear'
'--enable-safe-mode' '--enable-track-vars' '--with-ttf' '--with-zip'


Could you please figure out ?

This is the link of the application.
http://foreverasoldier.com/MyPet/index.php?option=com_staticxtstaticfile=index.php
login : bug/testing

Create a card with charachaters + background and publish , here occurs
the problem.

and here are the phpinfo of new and old server
http://foreverasoldier.com/info.php (New Server)
http://substormmedia.com/~segull/info.php (Old Server)



 

Regards
Shabeel






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


#36918 [Asn]: stream_set_blocking doesn't work

2007-07-17 Thread jani
 ID:   36918
 Updated by:   [EMAIL PROTECTED]
 Reported By:  brud5_99 at yahoo dot com
 Status:   Assigned
 Bug Type: Streams related
 Operating System: linux (gentoo)
 PHP Version:  5.1.2
 Assigned To:  wez
 New Comment:

Your code is a bit buggy, I can't get it working even after fixing the
bug. See bug #36796 for a bit better (simpler :) example.




Previous Comments:


[2006-04-10 12:26:56] [EMAIL PROTECTED]

Wez, I remember you bogusing similar bugs like this before..perhaps you
have some insight on this.



[2006-03-30 15:10:32] brud5_99 at yahoo dot com

Thank you for the quick reply. Unfortunately the latest 
version didn't fix the problem for me. 
It still only loops until a connection is made.
Once the connection is established, it gets stuck on loop1. 
Then it runs a whole loop once if you send input, and stops on 
loop1 again. 
If you disconnect it resumes looping.



[2006-03-30 11:36:38] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

That's exactly what I get: lots of keep looping and notices.



[2006-03-30 00:30:21] brud5_99 at yahoo dot com

Description:

stream_set_blocking seems to get ignored. There are no 
errors or warnings, but the socket behaves as if it was set 
to blocking.
The same code works as expected with php 5.0.1 on a FreeBsd 
box, but not with 5.1.2 under gentoo linux. The piece of 
code sample included is all that's needed to see the 
problem.
Php is configured as stand-alone, not as an apache module.

Thanks a lot for any help you can provide!
bernie

./configure --without-pear --without-apache --with-sockets 
--enable-sockets --with-mysql-sock=/tmp/mysql.sock --with-
mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/
mysql_config --enable-pcntl  --enable-pcntl --enable-sysvshm 
--enable-sysvsem --enable-sigchild --with-config-file-path=/
usr/local/phpForCgi/conf --prefix=/usr/local/phpForCgi --
sysconfdir=/usr/local/phpForCgi/conf


Reproduce code:
---
?php
set_time_limit (0); error_reporting (2047);
$sock = stream_socket_server(tcp://0.0.0.0:7000, $errno, $errstr);
stream_set_blocking($sock, 0);
$counter = 0;
if (!isset($sockCount)) {$sockCount = 0; }
while(true) {
$msgsock[$sockCount] = @stream_socket_accept($sock, 0);
if (is_resource($msgsock[$sockCount])) { $sockCount++; }
$counter = 0;
while($counter  $sockCount + 1) {
if (is_resource($msgsock[$counter])) {
echo loop1:\n;
$buf = fread($msgsock[$counter],2048);
echo loop2: $buf\n;
}   
echo keep looping: $buf\n;
if ($buf) { echo buf: $buf\n; }
$counter++;
}
}
fclose ($sock);
?


Expected result:

It should echo keep looping if there is no input

Actual result:
--
It keeps echoing keep looping until a connection is made. 
After input was received (made a telnet connection to port 
7000 and sent some text thru), the trace stops at loop1. 
Only about every 30sec(or so) it does a complete loop. I think 
that is after fread() times out intenally.
Also, if the connction is closed, it keeps looping thru keep 
looping again.





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


#41371 [Ver-Csd]: stream_set_blocking bug with sockets

2007-07-17 Thread jani
 ID:   41371
 Updated by:   [EMAIL PROTECTED]
 Reported By:  six at aegis-corp dot org
-Status:   Verified
+Status:   Closed
 Bug Type: Streams related
 Operating System: Linux 2.6
 PHP Version:  5.2.2
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2007-05-13 23:43:50] [EMAIL PROTECTED]

And that's exactly the reason for this bug. :D



[2007-05-13 22:05:29] [EMAIL PROTECTED]

And note: fctnl() is called only when needed in the streams code.
(if stream is already blocked - fcntl won't be called at all)





[2007-05-13 21:42:23] [EMAIL PROTECTED]

This works just fine for me without having 2 stream_set_blocking()
calls. Are you sure you're using PHP 5.2.2? And is that strace from
exactly that script you pasted here? And what was the configure line
used to configure PHP?



[2007-05-12 00:49:08] six at aegis-corp dot org

Description:

When a stream has been obtained using stream_socket_accept from a
non-blocking server, php believes that it is itself non-blocking and
refuses to set it non blocking after a call to stream_set_blocking.

Reproduce code:
---
?

$s = stream_socket_server(tcp://0.0.0.0:12345);
stream_set_blocking($s, false);

$c = stream_socket_accept($s);

// code will work if uncommented
//stream_set_blocking($c, true);

stream_set_blocking($c, false);

?

Expected result:

Expected result is that $c is non-blocking, which it is *not* unless
the previous stream_set_blocking($c, true) is uncommented (this may
reset some internal cache ?)

Actual result:
--
reproduce code strace:

listen(3, 5)= 0
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN}], 1, 6)
= 1
accept(3, {sa_family=AF_INET, sin_port=htons(58901),
sin_addr=inet_addr(127.0.0.1)}, [16]) = 4
[stream_set_blocking($c, false) does nothing here]
close(4)= 0
close(3)= 0
[script ends]

reproduce code strace with second call uncommented :

listen(3, 5)= 0
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN}], 1, 6)
= 1
accept(3, {sa_family=AF_INET, sin_port=htons(58901),
sin_addr=inet_addr(127.0.0.1)}, [16]) = 4
fcntl64(4, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(4, F_SETFL, O_RDWR) = 0
fcntl64(4, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
[the two stream_set_blocking calls work here]
close(4)= 0
close(3)= 0
[script ends]





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


#36796 [Asn-Csd]: Streams blocking after set non-blocking

2007-07-17 Thread jani
 ID:   36796
 Updated by:   [EMAIL PROTECTED]
 Reported By:  seufert at gmail dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: Streams related
 Operating System: AMD64 Linux 2.6 (Debian)
 PHP Version:  5.1.2
-Assigned To:  wez
+Assigned To:  jani
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2006-04-10 12:38:03] [EMAIL PROTECTED]

Wez, here's another one.



[2006-03-20 06:37:39] seufert at gmail dot com

Description:

Opening a TCP stream, and attempting to access in a non-blocking matter
results in fread continuing to block.

Reproduce code:
---
?php
$socket = stream_socket_server('tcp://0.0.0.0:3838');
stream_set_blocking($socket, 0);
$conns = array(); $text = ;
 while(true){
  $new_connection = @stream_socket_accept($socket, 0);
  print T;
  if(!$new_connection)
   sleep(1);
  else {
   stream_set_blocking($new_connection,0);
   $conns[] = $new_connection;
   unset($new_connection);
  }
  foreach($conns as $k=$c) $text .= fread($conns[$k], 8192);
  foreach($conns as $c) fwrite($c,$text);
  $text = ;
 }
?

Expected result:

After connecting once or more (with telnet or similar), the program
should still tick (will print 'T' to console).

Actual result:
--
Once 1 or more connections are established, the fread blocks, and
prevents the program from iterating (or printing 'T' to the console). It
will iterate after data is received from all connections.





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


#36918 [Asn-Csd]: stream_set_blocking doesn't work

2007-07-17 Thread jani
 ID:   36918
 Updated by:   [EMAIL PROTECTED]
 Reported By:  brud5_99 at yahoo dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: Streams related
 Operating System: linux (gentoo)
 PHP Version:  5.1.2
-Assigned To:  wez
+Assigned To:  jani
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2007-07-17 13:25:51] [EMAIL PROTECTED]

Your code is a bit buggy, I can't get it working even after fixing the
bug. See bug #36796 for a bit better (simpler :) example.





[2006-04-10 12:26:56] [EMAIL PROTECTED]

Wez, I remember you bogusing similar bugs like this before..perhaps you
have some insight on this.



[2006-03-30 15:10:32] brud5_99 at yahoo dot com

Thank you for the quick reply. Unfortunately the latest 
version didn't fix the problem for me. 
It still only loops until a connection is made.
Once the connection is established, it gets stuck on loop1. 
Then it runs a whole loop once if you send input, and stops on 
loop1 again. 
If you disconnect it resumes looping.



[2006-03-30 11:36:38] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

That's exactly what I get: lots of keep looping and notices.



[2006-03-30 00:30:21] brud5_99 at yahoo dot com

Description:

stream_set_blocking seems to get ignored. There are no 
errors or warnings, but the socket behaves as if it was set 
to blocking.
The same code works as expected with php 5.0.1 on a FreeBsd 
box, but not with 5.1.2 under gentoo linux. The piece of 
code sample included is all that's needed to see the 
problem.
Php is configured as stand-alone, not as an apache module.

Thanks a lot for any help you can provide!
bernie

./configure --without-pear --without-apache --with-sockets 
--enable-sockets --with-mysql-sock=/tmp/mysql.sock --with-
mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/
mysql_config --enable-pcntl  --enable-pcntl --enable-sysvshm 
--enable-sysvsem --enable-sigchild --with-config-file-path=/
usr/local/phpForCgi/conf --prefix=/usr/local/phpForCgi --
sysconfdir=/usr/local/phpForCgi/conf


Reproduce code:
---
?php
set_time_limit (0); error_reporting (2047);
$sock = stream_socket_server(tcp://0.0.0.0:7000, $errno, $errstr);
stream_set_blocking($sock, 0);
$counter = 0;
if (!isset($sockCount)) {$sockCount = 0; }
while(true) {
$msgsock[$sockCount] = @stream_socket_accept($sock, 0);
if (is_resource($msgsock[$sockCount])) { $sockCount++; }
$counter = 0;
while($counter  $sockCount + 1) {
if (is_resource($msgsock[$counter])) {
echo loop1:\n;
$buf = fread($msgsock[$counter],2048);
echo loop2: $buf\n;
}   
echo keep looping: $buf\n;
if ($buf) { echo buf: $buf\n; }
$counter++;
}
}
fclose ($sock);
?


Expected result:

It should echo keep looping if there is no input

Actual result:
--
It keeps echoing keep looping until a connection is made. 
After input was received (made a telnet connection to port 
7000 and sent some text thru), the trace stops at loop1. 
Only about every 30sec(or so) it does a complete loop. I think 
that is after fread() times out intenally.
Also, if the connction is closed, it keeps looping thru keep 
looping again.





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


#42018 [Fbk-Opn]: Zero Sized Reply

2007-07-17 Thread shabeel at poornam dot com
 ID:   42018
 User updated by:  shabeel at poornam dot com
 Reported By:  shabeel at poornam dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Apache/1.3.37
 PHP Version:  4.4.7
 New Comment:

As I said it works in old server but not in old .
So is there any relevance in checking the codes ?


Previous Comments:


[2007-07-17 12:39:26] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



[2007-07-17 11:21:59] shabeel at poornam dot com

Description:

Hi
Im getting this apache in logs as 
Ouch!  malloc(5723244) failed in malloc_block()
and in front end as Zero Sized Reply

Our developer said it worked in previous server , the problem started
when our application moved to new server

This is the configuration command.
'./configure' '--prefix=/usr/local'
'--with-apxs=/usr/local/apache/bin/apxs' '--enable-zend-multibyte'
'--enable-bcmath' '--with-bz2' '--enable-calendar' '--with-curl'
'--enable-dbase' '--with-dom' '--enable-exif' '--enable-filepro'
'--enable-ftp' '--with-gettext' '--with-gmp' '--with-iconv'
'--enable-mbstring' '--with-mcrypt' '--enable-memory-limit'
'--with-mhash' '--with-ming' '--with-ncurses' '--with-openssl'
'--with-openssl-dir=/usr' '--enable-pcntl' '--with-pgsql'
'--with-pspell' '--enable-shmop' '--enable-sockets' '--enable-sysvmsg'
'--enable-sysvsem' '--enable-sysvshm' '--enable-wddx' '--with-xmlrpc'
'--with-zlib' '--disable-debug' '--enable-dba' '--with-cdb' '--with-db4'
'--with-flatfile' '--with-gdbm' '--with-inifile' '--enable-dbx'
'--with-freetype-dir=/usr' '--with-t1lib=/usr' '--enable-gd-jis-conv'
'--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr'
'--with-gd' '--with-imap=' '--with-imap-ssl' '--with-mysql=/usr'
'--with-unixODBC=/usr' '--with-iodbc=/usr' '--with-readline'
'--enable-xslt' '--with-xslt-sablot' '--with-dom-xslt=/usr'
'--with-dom-exslt=/usr' '--with-mm' '--enable-mbstr-enc-trans'
'--enable-mbregex' '--enable-magic-quotes' '--with-mysqli'
'--enable-discard-path' '--with-pdflib' '--with-pear'
'--enable-safe-mode' '--enable-track-vars' '--with-ttf' '--with-zip'


Could you please figure out ?

This is the link of the application.
http://foreverasoldier.com/MyPet/index.php?option=com_staticxtstaticfile=index.php
login : bug/testing

Create a card with charachaters + background and publish , here occurs
the problem.

and here are the phpinfo of new and old server
http://foreverasoldier.com/info.php (New Server)
http://substormmedia.com/~segull/info.php (Old Server)



 

Regards
Shabeel






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


#42016 [Opn]: Call to a parent's parent non-static method statically is allowed

2007-07-17 Thread reto at buxaprojects dot com
 ID:   42016
 User updated by:  reto at buxaprojects dot com
-Summary:  Call to a parent's non-static method statically is
   allowed
 Reported By:  reto at buxaprojects dot com
 Status:   Open
 Bug Type: Class/Object related
 Operating System: FreeBSD
 PHP Version:  5.2.3
 New Comment:

Edit: Summary / Title was incorrect...


Previous Comments:


[2007-07-17 08:17:25] reto at buxaprojects dot com

Because a non-static method should not be called statically! This
should also apply for a parents parent class! Class C and B should only
be able to call parent:: . If class C must access the method test() of
class A, class B shouldn't override the method test().



[2007-07-17 07:51:34] [EMAIL PROTECTED]

And why do you think this is a bug?



[2007-07-17 06:24:58] reto at buxaprojects dot com

Description:

I expected, that i cannot call a non-static method in a parent's parent
class with ParentClassName::method() from a child class. But it works
even on E_STRICT. I think this should be a bug!

Reproduce code:
---
class A {
private $myVar;   
public function test() { 
$this-myVar = 'test';
echo 'A::test()' . \n;
}
}
class B extends A { 
public function test() { 
echo 'B::test()' . \n; 
}
}
class C extends B { 
public function test() 
{ 
echo 'C::test()' . \n;
A::test();
}
} 
$c = new C; 
$c-test();

Expected result:

Non-static method A::test() should not be called statically

Actual result:
--
C::test
A::test





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


#34972 [Asn-Fbk]: STDIN won't allow nonblocking.

2007-07-17 Thread jani
 ID:   34972
 Updated by:   [EMAIL PROTECTED]
 Reported By:  VJTD3 at VJTD3 dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: Streams related
 Operating System: *
 PHP Version:  php5.1-200603270630
 Assigned To:  wez
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

I can't reproduce this (or very likely didn't understand the problem :)


Previous Comments:


[2006-03-27 14:12:28] VJTD3 at VJTD3 dot com

error in last message, stream_select() was ment.

code using stream_select() that still blocks:

?php

 set_time_limit('0');

 # note for php4 or lower STDIN isn't a defined constant.
 if (version_compare(phpversion(), '5.0.0', '')) {
  define('STDIN', fopen('php://stdin', 'r'));
 }

 for ($i=1;$i11;$i++) {
  unset($read);
  $read[] = STDIN;
  stream_select($read, $write = null, $except = null, $tv = 0);
  if (count($read)) {
   $data4 = @fread(STDIN, 1500);
   $data4 = str_replace(\r\n, \n, $data4);
   $data4 = str_replace(\n\r, \n, $data4);
   $data4 = str_replace(\r, \n, $data4);
   $data4 = str_replace(\n, '', $data4);
  }
  echo 'pass: '.$i.' - data: '.(strlen(@$data4) ? $data4 :
'empty').\n;
  unset($data4);
  sleep('1');
 }

?

the second you type/click a arrow key/anything it goes into blocking
mode again.



[2006-03-27 13:32:01] VJTD3 at VJTD3 dot com

bug #36030 is very similar to my bug, they might be related.

It looks like anything to STDIN (reguardless of access method like
php://stdin and constant('STDIN') and STDIN are all effected.)

When doing anything, be it select, timeout, or anything to monitor
the resource where a window is set (ie to timeout the blocking, set
nonblocking, or similar.) the input stalls (it's not really a stall,
it's just waiting for the input.) or fails (such as timeout setting that
fails and returns false.)

Tested on:
php4-STABLE-200603270430
php5.1-200603270630
php6.0-200602191730

Also tested as well on their *nix snaps version and all with the same
result. (blocking when they should not be blocking.)

Better code to make debugging easier and includes examples from
suggestions that don't work:

?php

 set_time_limit('0');

 # note for php4 or lower STDIN isn't a defined constant.
 if (version_compare(phpversion(), '5.0.0', '')) {
  define('STDIN', fopen('php://stdin', 'r'));
 }

 echo 'notice how the data loads unblocked reguardless if there is
data.'.\n;
 $demo1 = @fsockopen('yahoo.com', 80, $errno, $errstr, 60);
 stream_set_blocking($demo1, FALSE);
 fwrite($demo1, 'GET /'.\n\n);
 for ($i=1;$i11;$i++) {
  $data1 = @fread($demo1, 1500);
  $data1 = str_replace(\r\n, \n, $data1);
  $data1 = str_replace(\n\r, \n, $data1);
  $data1 = str_replace(\r, \n, $data1);
  $data1 = str_replace(\n, '', $data1);
  echo 'pass: '.$i.' - data: '.(strlen($data1) ? $data1 :
'empty').\n;
  sleep('1');
 }

 echo 'notice how the data loads unblocked and clearly there is no data
because this IP is invalid to connect to.'.\n;
 $demo2 = @fsockopen('0.0.0.0', 80, $errno, $errstr, 1);
 stream_set_blocking($demo2, FALSE);
 for ($i=1;$i11;$i++) {
  # this is expected to be a invalid resource.
  $data2 = @fread($demo2, 1500);
  $data2 = str_replace(\r\n, \n, $data2);
  $data2 = str_replace(\n\r, \n, $data2);
  $data2 = str_replace(\r, \n, $data2);
  $data2 = str_replace(\n, '', $data2);
  echo 'pass: '.$i.' - data: '.(strlen($data2) ? $data2 :
'empty').\n;
  sleep('1');
 }

 echo 'a person said to use select, this shows select won\'t work. (and
shouldn\'t it\'s not a socket.) It won\'t even allow input during select
calls.'.\n;
 for ($i=1;$i11;$i++) {
  unset($read);
  $read[] = STDIN;
  socket_select($read, $write = null, $except = null, $tv = 0);
  print_r($read);
  sleep('1');
 }

 echo 'same code as yahoo and 0.0.0.0 with fread and blocked
reguardless of setting this to nonblocking.'.\n;
 stream_set_blocking(STDIN, FALSE);
 for ($i=1;$i11;$i++) {
  echo 'Watch me stall till you type enter I\'m blocking you!'.\n;
  $data3 = fread(STDIN, 10);
  $data3 = str_replace(\r\n, \n, $data3);
  $data3 = str_replace(\n\r, \n, $data3);
  $data3 = str_replace(\r, \n, $data3);
  $data3 = str_replace(\n, '', $data3);
  echo 'pass: '.$i.' - data: '.(strlen($data3) ? $data3 :
'empty').\n;
  sleep('1');
 }

?

anything I can do to help with details/make the bug easier to fix?



[2005-11-09 20:58:26] [EMAIL PROTECTED]

Assigned to the streams maintainer.



[2005-10-25 04:23:31] VJTD3 at VJTD3 dot com

?php

 # Make life easier to test bothe versions
 # 

#41433 [Asn]: configure fails to include correct db.h

2007-07-17 Thread jani
 ID:   41433
 Updated by:   [EMAIL PROTECTED]
 Reported By:  uberlord at gentoo dot org
 Status:   Assigned
 Bug Type: Compile Failure
 Operating System: Gentoo/FreeBSD
 PHP Version:  5.2.2
 Assigned To:  helly
 New Comment:

Just makes me wonder why Gentoo reinvents the wheel (poorly) and puts
headers in non-standard places..


Previous Comments:


[2007-05-18 13:28:24] uberlord at gentoo dot org

This patch allows CPPFLAGS do to it's magic with db.h

diff -ur a/ext/dba/config.m4 b/ext/dba/config.m4
--- a/ext/dba/config.m4 2007-05-18 13:56:52 +0100
+++ b/ext/dba/config.m4 2007-05-18 14:05:28 +0100
@@ -262,6 +262,10 @@
 break
   fi
 done
+   dnl Allow CPPFLAGS to override us if needed.
+   if test $THIS_PREFIX = /usr  test $THIS_INCLUDE =
/usr/include/db.h ; then
+   THIS_INCLUDE=db.h
+   fi
 PHP_DBA_DB_CHECK(4, db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4
db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
   fi
 ])



[2007-05-18 13:26:58] uberlord at gentoo dot org

Description:

ext/dba/config.m4 forces this include if it finds db.h in /usr/include

include /usr/include/db.h

This, of course, ignores any CPP flags for where Gentoo actually stores
it's db.h file.
Changing it to

include db.h

works.

Reproduce code:
---
CPPFLAGS=-I/usr/include/db4.5 ./configure --with-db4

Expected result:

successful configure

Actual result:
--
checking for db4 major version... configure: error: Header contains
different version





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


#42020 [NEW]: curl_multi_select causes php to fail, silently

2007-07-17 Thread adz999 at yahoo dot co dot uk
From: adz999 at yahoo dot co dot uk
Operating system: Free BSD (i386)
PHP version:  5.2.3
PHP Bug Type: cURL related
Bug description:  curl_multi_select causes php to fail, silently

Description:

I am using (a slight variation of) the user-contributed example on this
page:http://uk2.php.net/manual/en/function.curl-multi-exec.php.

Sometimes it works and sometimes it causes php to fail, without displaying
any error notice (error reporting set to E_WARNING).  I cannot work out
what it is that causes it to fail or not fail, but if I run the same
requests on the script multiple times it behaves the same every time.

By getting php to print a message between each line of code I have
narrowed the problem down to this line:
if (curl_multi_select($mh) != -1)

This is the php info for the server:
http://phpinfo.hostultra.com/

The problem does NOT occur when the script is executed on my local testing
server (Mac OS X 10.4.8, PHP 5.2.1).



Reproduce code:
---
?php
$mh = curl_multi_init();
foreach(array_keys($arr_requests) as $i)
curl_multi_add_handle ($mh,$arr_requests[$i]); //each element of
$arr_requests is a curl handle

print got as far as executing the curl stuffbr; while
(@ob_end_flush()); while (@flush());

do  {
$mrc = curl_multi_exec($mh, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM  $active0 
microtime(1)$time);


print 1br; while (@ob_end_flush()); while (@flush());

while ($active0 and $mrc == CURLM_OK  microtime(1)$time){
print 2br; while (@ob_end_flush()); while (@flush()); 
//this gets
printed out fine
// wait for network
if (curl_multi_select($mh) != -1){
// pull in any new data, or at least handle 
timeouts
do  {
print 3br; while 
(@ob_end_flush()); while (@flush()); //php
never gets this far
$mrc = curl_multi_exec($mh, 
$active);
} while ($mrc == 
CURLM_CALL_MULTI_PERFORM  $active0 
microtime(1)$time);
}
}//end while

Expected result:

If curl_multi_select($mh) was equal to -1 then I would expect the while
loop
while ($active0 and $mrc == CURLM_OK  microtime(1)$time)

Actual result:
--
PHP outputs:
got as far as executing the curl stuff
1
2

...and then it stops.  The connection to the browser is no longer active. 
That's it, it just stops there and does no more.  No error message.


Even if I change the line
if (curl_multi_select($mh) != -1)
to just
if (curl_multi_select($mh))

the result is exactly the same

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


#42020 [Opn]: curl_multi_select causes php to fail, silently

2007-07-17 Thread adz999 at yahoo dot co dot uk
 ID:   42020
 User updated by:  adz999 at yahoo dot co dot uk
 Reported By:  adz999 at yahoo dot co dot uk
 Status:   Open
 Bug Type: cURL related
 Operating System: Free BSD (i386)
 PHP Version:  5.2.3
 New Comment:

Some of my submission did not post properly:

The Reproduce code section should have this at the end:
print 4br;

The Expected result section should continue:
...to loop around again, and therefore print out 2br again.
Or if curl_multi_select($mh) was NOT equal to -1 then I would expect
php to print out 3br regardless of whether it then went on to
execute curl_multi_exec.


Previous Comments:


[2007-07-17 18:47:26] adz999 at yahoo dot co dot uk

Description:

I am using (a slight variation of) the user-contributed example on this
page:http://uk2.php.net/manual/en/function.curl-multi-exec.php.

Sometimes it works and sometimes it causes php to fail, without
displaying any error notice (error reporting set to E_WARNING).  I
cannot work out what it is that causes it to fail or not fail, but if I
run the same requests on the script multiple times it behaves the same
every time.

By getting php to print a message between each line of code I have
narrowed the problem down to this line:
if (curl_multi_select($mh) != -1)

This is the php info for the server:
http://phpinfo.hostultra.com/

The problem does NOT occur when the script is executed on my local
testing server (Mac OS X 10.4.8, PHP 5.2.1).



Reproduce code:
---
?php
$mh = curl_multi_init();
foreach(array_keys($arr_requests) as $i)
curl_multi_add_handle ($mh,$arr_requests[$i]); //each element of
$arr_requests is a curl handle

print got as far as executing the curl stuffbr; while
(@ob_end_flush()); while (@flush());

do  {
$mrc = curl_multi_exec($mh, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM  $active0 
microtime(1)$time);


print 1br; while (@ob_end_flush()); while (@flush());

while ($active0 and $mrc == CURLM_OK  microtime(1)$time){
print 2br; while (@ob_end_flush()); while (@flush()); 
//this gets
printed out fine
// wait for network
if (curl_multi_select($mh) != -1){
// pull in any new data, or at least handle 
timeouts
do  {
print 3br; while 
(@ob_end_flush()); while (@flush()); //php
never gets this far
$mrc = curl_multi_exec($mh, 
$active);
} while ($mrc == 
CURLM_CALL_MULTI_PERFORM  $active0 
microtime(1)$time);
}
}//end while

Expected result:

If curl_multi_select($mh) was equal to -1 then I would expect the while
loop
while ($active0 and $mrc == CURLM_OK  microtime(1)$time)

Actual result:
--
PHP outputs:
got as far as executing the curl stuff
1
2

...and then it stops.  The connection to the browser is no longer
active.  That's it, it just stops there and does no more.  No error
message.


Even if I change the line
if (curl_multi_select($mh) != -1)
to just
if (curl_multi_select($mh))

the result is exactly the same





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


#42020 [Opn-Fbk]: curl_multi_select causes php to fail, silently

2007-07-17 Thread jani
 ID:   42020
 Updated by:   [EMAIL PROTECTED]
 Reported By:  adz999 at yahoo dot co dot uk
-Status:   Open
+Status:   Feedback
 Bug Type: cURL related
 Operating System: Free BSD (i386)
 PHP Version:  5.2.3
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi




Previous Comments:


[2007-07-17 18:58:24] adz999 at yahoo dot co dot uk

Some of my submission did not post properly:

The Reproduce code section should have this at the end:
print 4br;

The Expected result section should continue:
...to loop around again, and therefore print out 2br again.
Or if curl_multi_select($mh) was NOT equal to -1 then I would expect
php to print out 3br regardless of whether it then went on to
execute curl_multi_exec.



[2007-07-17 18:47:26] adz999 at yahoo dot co dot uk

Description:

I am using (a slight variation of) the user-contributed example on this
page:http://uk2.php.net/manual/en/function.curl-multi-exec.php.

Sometimes it works and sometimes it causes php to fail, without
displaying any error notice (error reporting set to E_WARNING).  I
cannot work out what it is that causes it to fail or not fail, but if I
run the same requests on the script multiple times it behaves the same
every time.

By getting php to print a message between each line of code I have
narrowed the problem down to this line:
if (curl_multi_select($mh) != -1)

This is the php info for the server:
http://phpinfo.hostultra.com/

The problem does NOT occur when the script is executed on my local
testing server (Mac OS X 10.4.8, PHP 5.2.1).



Reproduce code:
---
?php
$mh = curl_multi_init();
foreach(array_keys($arr_requests) as $i)
curl_multi_add_handle ($mh,$arr_requests[$i]); //each element of
$arr_requests is a curl handle

print got as far as executing the curl stuffbr; while
(@ob_end_flush()); while (@flush());

do  {
$mrc = curl_multi_exec($mh, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM  $active0 
microtime(1)$time);


print 1br; while (@ob_end_flush()); while (@flush());

while ($active0 and $mrc == CURLM_OK  microtime(1)$time){
print 2br; while (@ob_end_flush()); while (@flush()); 
//this gets
printed out fine
// wait for network
if (curl_multi_select($mh) != -1){
// pull in any new data, or at least handle 
timeouts
do  {
print 3br; while 
(@ob_end_flush()); while (@flush()); //php
never gets this far
$mrc = curl_multi_exec($mh, 
$active);
} while ($mrc == 
CURLM_CALL_MULTI_PERFORM  $active0 
microtime(1)$time);
}
}//end while

Expected result:

If curl_multi_select($mh) was equal to -1 then I would expect the while
loop
while ($active0 and $mrc == CURLM_OK  microtime(1)$time)

Actual result:
--
PHP outputs:
got as far as executing the curl stuff
1
2

...and then it stops.  The connection to the browser is no longer
active.  That's it, it just stops there and does no more.  No error
message.


Even if I change the line
if (curl_multi_select($mh) != -1)
to just
if (curl_multi_select($mh))

the result is exactly the same





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


#41976 [Bgs-Opn]: Please read before you mark bogus

2007-07-17 Thread stefan dot priebsch at e-novative dot de
 ID:   41976
 User updated by:  stefan dot priebsch at e-novative dot de
-Summary:  Seems to work on nested XML, but not with CDATA
 Reported By:  stefan dot priebsch at e-novative dot de
-Status:   Bogus
+Status:   Open
 Bug Type: JSON related
 Operating System: WinXP
 PHP Version:  5.2.3
 New Comment:

Johannes, would you please care to actually *read* and try to
*understand* my bug report before marking it as bogus?

My point is that json_encode() works properly with nested XML, but does
NOT work correctly when the nested XML contains CDATA.


Previous Comments:


[2007-07-17 12:36:14] [EMAIL PROTECTED]

$xml and (string)$xml are different things. Using different things as
arguments for a function gives different results.



[2007-07-17 10:46:38] stefan dot priebsch at e-novative dot de

I re-opened the bug due to the discussion of bug #42001. json_encode()
does not work on nested XML with a string cast, but it does work without
a string cast. (Of course except for the CDATA problem that made me file
this bug in the first place.)

$xml = new SimpleXMLElement('?xml version=1.0
encoding=UTF-8?testsubtest/subanothervalue/anotherpathto
tagsomething/tag/to/path/test');
  var_dump(json_encode($xml));
  var_dump(json_encode((string) $xml));

  $xml = new SimpleXMLElement('?xml version=1.0
encoding=UTF-8?testsub![CDATA[test]]/subanothervalue/anoth
erpathtotagsomething/tag/to/path/test');
  var_dump(json_encode($xml));
  var_dump(json_encode((string) $xml));



[2007-07-13 08:08:02] [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

Yes, and it will try to serialize the SimpleXML object, what won't
work, that's part of SimpleXML's behaviour 



[2007-07-13 06:33:16] stefan dot priebsch at e-novative dot de

Sorry, I disagree. This is a bug, not bogus.

The manual says that json_encode works on any type except resources. 

  $xml = new SimpleXMLElement('?xml version=1.0
encoding=UTF-8?test![CDATA[test]]/test');
  var_dump(is_resource($xml));

outputs false, (which is obvious as SimpleXML is not listed in the list
of resource types). Thus SimpleXML is not a resource and must be
processed by json_encode() without a string cast. How would I supposed
to cast an XML tree to string anyway?

Please have a look at bug#38680, where a similar issue was discussed.



[2007-07-12 09:08:39] [EMAIL PROTECTED]

  var_dump((string) $xml);
  var_dump(json_encode($xml)); -- you have to cast it to string
explicitly, otherwise json_encode() will encode the object itself, not
it's string representation.



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

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


#31799 [Com]: Bug

2007-07-17 Thread larizzsj at ector-county dot k12 dot tx dot us
 ID:   31799
 Comment by:   larizzsj at ector-county dot k12 dot tx dot us
 Reported By:  ilya-- at mail dot ru
 Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: Mandrake 10.0 i686
 PHP Version:  5.0.3
 New Comment:

I was able to reproduce this bug. My versions are:

PHP: 5.2.3
libxml2: 2.2.29

I was following this guide:
http://hostlibrary.com/installing_apache_mysql_php_on_linux

I extracted the libxml2 file into / and did:

./configure
make
make install

libxml2 installs fine. 

I downloaded php and extracted it to /
I did:

./configure --prefix=usr/local/php
--with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql

After that script finishes, I am let with the same error message as the
original bug. However, it is repeated longer than my terminal will show.


Previous Comments:


[2005-02-21 19:58:04] [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.





[2005-02-02 13:05:12] [EMAIL PROTECTED]

Can't reproduce.
Please provide more info and make sure that your PHP installation is
not broken.



[2005-02-02 01:08:23] ilya-- at mail dot ru

Description:

Bug

Reproduce code:
---
  first:
./configure --with-apxs2=/usr/local/apache2/bin/apxs
  second(bug):
make
 

Expected result:

/home/inst/php-5.0.3/Zend/zend_list.h:68: warning: parameter names
(without types) in function declaration
/home/inst/php-5.0.3/Zend/zend_list.h:69: error: parse error before
TSRMLS_DC
/home/inst/php-5.0.3/Zend/zend_list.h:74: error: parse error before
TSRMLS_DC

/home/inst/php-5.0.3/Zend/zend_list.h:83: error: parse error before
TSRMLS_DC
/home/inst/php-5.0.3/Zend/zend_list.h:85: error: parse error before
TSRMLS_DC
In file included from /home/inst/php-5.0.3/Zend/zend_API.h:29,
 from /home/inst/php-5.0.3/main/php.h:38,
 from /home/inst/php-5.0.3/ext/libxml/libxml.c:28:
/home/inst/php-5.0.3/Zend/zend_operators.h:42: error: parse error
before TSRMLS_DC 
 AND
/home/inst/php-5.0.3/ext/libxml/libxml.c:81: error: parse error before
TSRMLS_DC
/home/inst/php-5.0.3/ext/libxml/libxml.c:82: error: parse error before
TSRMLS_DC
/home/inst/php-5.0.3/ext/libxml/libxml.c:126: error: parse error before
TSRMLS_DC
/home/inst/php-5.0.3/ext/libxml/libxml.c: In function
`php_libxml_clear_object':
/home/inst/php-5.0.3/ext/libxml/libxml.c:128: error: `object'
undeclared (first use in this function)
/home/inst/php-5.0.3/ext/libxml/libxml.c:131: error: parse error before
TSRMLS_CC
/home/inst/php-5.0.3/ext/libxml/libxml.c:132: error: parse error before
TSRMLS_CC
/home/inst/php-5.0.3/ext/libxml/libxml.c: At top level:
/home/inst/php-5.0.3/ext/libxml/libxml.c:135: error: parse error before
TSRMLS_DC


Actual result:
--
problems





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


#21197 [Asn]: [PATCH] socket_read() outputs error with PHP_NORMAL_READ

2007-07-17 Thread jani
 ID:   21197
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bool at boolsite dot net
 Status:   Assigned
 Bug Type: Sockets related
 Operating System: *
 PHP Version:  5.*, 4.* (2005-11-17) (cvs)
-Assigned To:  pollita
+Assigned To:  jani
 New Comment:

I have a patch prepared for this. Just waiting for dinesh at dinsoft
dot net to test it for me. :)


Previous Comments:


[2007-06-23 22:23:06] dinesh at dinsoft dot net

Indeed, it works with :

//m = fcntl(bsd_socket, F_GETFL);
//if (m  0) {
//  return m;
//}

nonblock = 0;

So the fcntl() call makes it fail.

But this has the side effect of making the socket_read() call blocking
even if the socket has been set to non blocking mode.

I will try to make a fully working patch with no side effect when I'll
have some time, if no one else is wanting to solve this problem.

For the lambda users, here is a usuable dll built against PHP 5.2.3 :
 http://www.dinsoft.net/dev/php/php_sockets.dll

Regards,
 Dinesh Bolkensteyn



[2007-06-23 13:33:06] dinesh at dinsoft dot net

Hi all,

The bug is still there in: PHP 5.2.3 (cli) (built: May 31 2007
09:37:22) (binary zip release)

The initial bug report was posted on 26 Dec 2002 9:32am UTC, almost 5
years ago.

PHP_NORMAL_READ works well under *NIX, but the same scripts does not
work on windows.

If the above patch is working, then it should be added in the binary
release.

Thanks.



[2006-11-15 06:33:38] thessoro at gmail dot com

I think the existence of this bug should be mentioned in the
documentation to prevent developers rely on PHP_NORMAL_READ. Although OS
category is set to * i can only reproduce it in windows. I checked my
script there too late.
So, as a script relying this feature is capable of making the entire
socket extension useless on Windows, i think is important enough to
mention it en the socket_read section of the manual. 

Thx,



[2005-11-05 22:10:22] [EMAIL PROTECTED]

I've made a patch that implements the idea of my last comment. The test
case now works properly.
I haven't tested bug #35062 but it seems to be a different bug.
http://mega.ist.utl.pt/~ncpl/php_sockets_win.txt



[2005-11-05 01:36:39] [EMAIL PROTECTED]

I was walking through the MSDN docs and I didn't also find anything.
But the best way (IMHO) is to store in the php_socket struct if the
socket is blocking or not (and update that field in the
socket_set_(non)block() functions). It also saves the fcntl syscall on
nix systems.



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

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


#36479 [Asn-Fbk]: fread using 99% CPU in Windows with SSL Connection

2007-07-17 Thread jani
 ID:   36479
 Updated by:   [EMAIL PROTECTED]
 Reported By:  joel dot washburn at gmail dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: Streams related
 Operating System: Windows (Any)
 PHP Version:  5.1.3-dev
 Assigned To:  pollita
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

There were some fixes in the related files, please try it out.


Previous Comments:


[2006-03-24 00:40:31] joel dot washburn at gmail dot com

Any progress on this issue?



[2006-02-23 20:59:01] [EMAIL PROTECTED]

Sara, could you take a look at it?



[2006-02-23 20:51:37] joel dot washburn at gmail dot com

The issue was not resolved with 5.1.3-dev.



[2006-02-22 08:31:57] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-02-21 18:03:09] joel dot washburn at gmail dot com

Description:

php.exe uses 99% CPU while polling SSL sockets for data.  I can
reproduce this issue in IIS and Apache using php5isapi.dll and
php5apache2.dll.

This is a nightmare for php scripts using third party API calls via SSL
sockets.  If the API call takes a few seconds to run, the CPU is maxed
out waiting on a response.

This is not an issue on linux systems.

This is not an issue on Windows using clean sockets (only SSL).



Reproduce code:
---
Below is a simple way to reproduce the problem with fgets():

Create two files, one (timer.php) has to be accessable from the web
(HTTP and HTTPS) and the other can be ran from the command prompt
(pingtimer.php).  When you run pingtimer.php using SSL, php.exe will
stick at 99% CPU in Task Manager.  When you run it using clean
sockets,
its idle while waiting for a response.

timer.php :
?php
sleep(10);
print htmlbody10 sec. are up!/body/html;
?

pingtimer.php:
?php
//$sock = fsockopen(localhost, 80);
$sock = fsockopen(ssl://localhost, 443);

$query = GET /timer.php HTTP/1.1\r\n;
$query .= Host: localhost\r\n;
$query .= Connection: Close\r\n\r\n;

fwrite($sock, $query);
while (!feof($sock)) {
echo fgets($sock, 128);
}
fclose($sock);
? 

Expected result:

CPU usage should be very little or zero while waiting for a response.

Actual result:
--
99% CPU usage in Windows Task Manager from php.exe while waiting on a
response.





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


#42021 [NEW]: Intance of same class, access directly private vars, dont using __get() method

2007-07-17 Thread o_gangrel at hotmail dot com
From: o_gangrel at hotmail dot com
Operating system: Linux
PHP version:  5.2.3
PHP Bug Type: Scripting Engine problem
Bug description:  Intance of same class, access directly private vars, dont 
using __get() method

Description:

In a class, if instance this same class inside, the method __get() does
not is called.

Reproduce code:
---
class class_test {

private $sub_classes = array();
private $foo = bar; // Default value

public function __construct($n = 0)
{
for($i = 0; $i  $n; $i++) {
$this-sub_classes[] = new class_test(); // New sub 
instaces
}
if($n  0) {
$this-foo = $n; // Change the default value on main 
instace
}
}

public function __get($name)
{
switch($name) {
case 'foo':
return '__get(foo) = '.$this-foo; // Getting 
the variable, changing
the value
break;

case 'subs':
$subs = '$this-foo = '.$this-foo.\n; // 
Value of var on main
instace
foreach($this-sub_classes as $key = 
$sub_class) {
$subs.= \$this-sub_classes[$key]-foo 
=
.$this-sub_classes[$key]-foo.\n; // The value of variable on each
sub instace
}
return $subs;
break;
}

return false;
}
}

$test = new class_test(2); // Create the main instace, with 2 sub
instaces

echo $test-subs; // Show the variables

Expected result:

$this-foo = 2
$this-sub_classes[0]-foo = __get(foo) = bar
$this-sub_classes[1]-foo = __get(foo) = bar


Actual result:
--
$this-foo = 2
$this-sub_classes[0]-foo = bar
$this-sub_classes[1]-foo = bar


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


#42021 [Opn-Bgs]: Intance of same class, access directly private vars, dont using __get() method

2007-07-17 Thread johannes
 ID:   42021
 Updated by:   [EMAIL PROTECTED]
 Reported By:  o_gangrel at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.2.3
 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

The visibility modifiers work on a per class basis and is not rejected
to the same object.


Previous Comments:


[2007-07-17 21:17:22] o_gangrel at hotmail dot com

Description:

In a class, if instance this same class inside, the method __get() does
not is called.

Reproduce code:
---
class class_test {

private $sub_classes = array();
private $foo = bar; // Default value

public function __construct($n = 0)
{
for($i = 0; $i  $n; $i++) {
$this-sub_classes[] = new class_test(); // New sub 
instaces
}
if($n  0) {
$this-foo = $n; // Change the default value on main 
instace
}
}

public function __get($name)
{
switch($name) {
case 'foo':
return '__get(foo) = '.$this-foo; // Getting 
the variable,
changing the value
break;

case 'subs':
$subs = '$this-foo = '.$this-foo.\n; // 
Value of var on main
instace
foreach($this-sub_classes as $key = 
$sub_class) {
$subs.= \$this-sub_classes[$key]-foo 
=
.$this-sub_classes[$key]-foo.\n; // The value of variable on each
sub instace
}
return $subs;
break;
}

return false;
}
}

$test = new class_test(2); // Create the main instace, with 2 sub
instaces

echo $test-subs; // Show the variables

Expected result:

$this-foo = 2
$this-sub_classes[0]-foo = __get(foo) = bar
$this-sub_classes[1]-foo = __get(foo) = bar


Actual result:
--
$this-foo = 2
$this-sub_classes[0]-foo = bar
$this-sub_classes[1]-foo = bar






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


#42021 [Bgs]: Intance of same class, access directly private vars, dont using __get() method

2007-07-17 Thread johannes
 ID:   42021
 Updated by:   [EMAIL PROTECTED]
 Reported By:  o_gangrel at hotmail dot com
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.2.3
 New Comment:

Should have been restricted instead of rejected...


Previous Comments:


[2007-07-17 22:12:43] [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 visibility modifiers work on a per class basis and is not rejected
to the same object.



[2007-07-17 21:17:22] o_gangrel at hotmail dot com

Description:

In a class, if instance this same class inside, the method __get() does
not is called.

Reproduce code:
---
class class_test {

private $sub_classes = array();
private $foo = bar; // Default value

public function __construct($n = 0)
{
for($i = 0; $i  $n; $i++) {
$this-sub_classes[] = new class_test(); // New sub 
instaces
}
if($n  0) {
$this-foo = $n; // Change the default value on main 
instace
}
}

public function __get($name)
{
switch($name) {
case 'foo':
return '__get(foo) = '.$this-foo; // Getting 
the variable,
changing the value
break;

case 'subs':
$subs = '$this-foo = '.$this-foo.\n; // 
Value of var on main
instace
foreach($this-sub_classes as $key = 
$sub_class) {
$subs.= \$this-sub_classes[$key]-foo 
=
.$this-sub_classes[$key]-foo.\n; // The value of variable on each
sub instace
}
return $subs;
break;
}

return false;
}
}

$test = new class_test(2); // Create the main instace, with 2 sub
instaces

echo $test-subs; // Show the variables

Expected result:

$this-foo = 2
$this-sub_classes[0]-foo = __get(foo) = bar
$this-sub_classes[1]-foo = __get(foo) = bar


Actual result:
--
$this-foo = 2
$this-sub_classes[0]-foo = bar
$this-sub_classes[1]-foo = bar






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


#35131 [Asn-Fbk]: stream_select() in conjuntion with popen() does not appear to work

2007-07-17 Thread jani
 ID:   35131
 Updated by:   [EMAIL PROTECTED]
 Reported By:  larryjadams at comcast dot net
-Status:   Assigned
+Status:   Feedback
 Bug Type: Streams related
 Operating System: WindowsXP Pro SP2
 PHP Version:  5CVS-2005-11-07 (snap)
 Assigned To:  wez
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi




Previous Comments:


[2005-11-07 15:31:28] [EMAIL PROTECTED]

Assigned to the author of this part.



[2005-11-07 02:09:19] larryjadams at comcast dot net

I have attempted to resolve the issue with the latest CVS.  However, it
does not solve the issue.  The stream_select fires right away even
though the popen does not have anything waiting on the pipe.

The version I tested was:
PHP 5.1.0RC5-dev (cli) (built: Nov  7 2005 00:47:12)
Copyright (c) 1997-2005 The PHP Group
Zend Engine v2.1.0-dev, Copyright (c) 1998-2005 Zend Technologies

I have noted some other issues that I will be opening separate tickets
one.



[2005-11-06 22:07:19] larryjadams at comcast dot net

Description:

If I call $my_fd = popen(mycommand, rb); to a function that
hangs/suspends and then subsquently call:

stream_select(...) using $read=array($my_fd) with a timeout, the
steam_select returns immediately, event if I have set $my_fd as blocking
using stream_set_blocking();

I would like stream_select to wait on output from the pipe prior to
firing, or to drive a timeout.

Thanks,

Larry Adams
The Cacti Group

Reproduce code:
---
if (function_exists(stream_select)) {
  if ($config[cacti_server_os] == unix)  {
$fp = popen($command, r);
  }else{
$fp = popen($command, rb);
  }

  /* set script server timeout */
  $script_timeout = read_config_option(script_timeout);

  /* establish timeout variables */
  $to_sec = floor($script_timeout/1000);
  $to_usec = ($script_timeout%1000)*1000;

  /* Prepare the read array */
  $read = array($fp);

  stream_set_blocking ($fp, 1);
  if (false === ($num_changed_streams = stream_select($read, $write =
NULL, $except = NULL, $to_sec, $to_usec))) {
cacti_log(WARNING: SERVER POPEN Timed out.);
$output = U;
  }elseif ($num_changed_streams  0) {
$output = fgets($fp, 4096);
  }

  pclose($fp);
}else{
  $output = `$command`;
}

$command = a file with the following:

?php sleep(20); echo Hello:20.00\n; ?

The stream_select timeout is 5 seconds.


Expected result:

popen will be called, stream_select will block until timeout has
expired, the number of fd's changed will be 0 and my result will be as
expected.

Actual result:
--
stream_select returns immediately.





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