#34830 [Fbk->Csd]: hirokawa

2005-11-04 Thread hirokawa
 ID:   34830
 Updated by:   [EMAIL PROTECTED]
-Summary:  mail() does not fetch mail.force_extra_parameters
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Closed
 Bug Type: PHP options/info functions
 Operating System: Linux
 PHP Version:  4.4.1RC1
 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:


[2005-10-31 01:25:49] [EMAIL PROTECTED]

And same in understandable english please?



[2005-10-11 16:56:18] [EMAIL PROTECTED]

Description:

mail.force_extra_parameters became effective by mb_send_mail() by PHP
4.4.1RC1.
I also want mail() to confirm this.

mb_send_mail() is the upper compatible function of mail().
Therefore, this is not "The addition of a feature", it is "fixed bug".









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


#35104 [Asn]: __set() and read-only property prevents proper Class inheritence

2005-11-04 Thread php at tjworld dot net
 ID:   35104
 User updated by:  php at tjworld dot net
 Reported By:  php at tjworld dot net
 Status:   Assigned
 Bug Type: Class/Object related
 Operating System: Windows 2003
 PHP Version:  5.1.0RC5
 Assigned To:  dmitry
 New Comment:

... and I should have added that returning a DOMDocumentFragment is not
practical because adding attributes and nodes to the new element would
then require new indirect code in the application - you can't add them
to the returned DOMDocumentFragment.

So returning the new sub-class object requires it be removed from the
DOMDocumentFragment *and* more importantly have a variable-reference to
it so that its reference counter isn't zero when the method exits -
otherwise it is destroyed and the caller can't do anything with it, and
will get a:

Warning: DOMElement::setAttribute(): Couldn't fetch extDOMElement
in...

trying to set an attribute on the new sub-classed object.


Previous Comments:


[2005-11-05 02:56:43] php at tjworld dot net

Based on real-world experience the previous example is not sufficent -
the new Element is destroyed along with the DOMDocumentFragment when
the method exits.

The fix is to remove the new element from the DOMDocumentFragment
before returning it to the caller.

Here's an updated, tested example.

createDocumentFragment(); // lightweight
container maintains "ownerDocument"
  $docFragment->appendChild($orphan); // attach
  $ret = $docFragment->removeChild($orphan); // remove
  return $ret; // ownerDocument set; won't be destroyed on  method
exit
 }
 // .. more class definition
}

class extDOMElement extends DOMElement {
 function __construct($name, $value='', $namespaceURI=null) {
  parent::__construct($name, $value, $namespaceURI);
 }
  //  ... more class definition here
}

$doc = new extDOMDocument('test');
$el = $doc->createElement('tagname');

// append discards the DOMDocumentFragment and just adds its child
nodes, but ownerDocument is maintained.
$doc->appendChild($el); 
echo $doc->saveXML();
?>



[2005-11-05 01:00:04] php at tjworld dot net

And finally... for completeness here's a worked example that solves the
DOM case of setting the ownerDocument property.

createDocumentFragment(); // lightweight
container maintains "ownerDocument"
  $docFragment->appendChild($orphan); // attach
  
  return $docFragment;
 }
 // .. more class definition
}

class extDOMElement extends DOMElement {
 function __construct($name, $value='', $namespaceURI=null) {
  parent::__construct($name, $value, $namespaceURI);
 }
  //  ... more class definition here
}

$doc = new extDOMDocument('test');
$el = $doc->createElement('tagname');

// append discards the DOMDocumentFragment and just adds its child
nodes, but ownerDocument is maintained.
$doc->appendChild($el); 
echo $doc->saveXML();
?>

TJ.



[2005-11-05 00:02:41] php at tjworld dot net

Following on from my suggestion to provide a strong design template for
read-only properties and inheritence, I've put together the following
example.

It provides for inheritence of a read-only property so the property can
be modified from sub-classes.

realProperty = 12;
  $this->test = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(get_class($this)==__CLASS__ &&
isset($this->dynamicProperty[$name]))
throw new Exception(self::CLASS_READ_ONLY_PROPERTY_ERR);
   else
$this->dynamicProperty[$name] = $value;
  }
 }
 public function __get($name) { return $this->dynamicProperty[$name];
}

 public function getReal() {return $this->realProperty; }
 public function getDynamic() {return $this->test; }
}

class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this->realProperty = 25; // ok
  $this->test = $value; // causes Fatal Error
 }
}

echo "Testing Writeable...\r\n";
$test = new Writeable('write to me');
echo 'real: '.$test->getReal()."\r\n";
echo 'dynamic: '.$test->getDynamic()."\r\n";

echo "Testing ReadOnly...\r\n";
$test = new ReadOnly();
echo 'real: '.$test->getReal()."\r\n";
echo 'dynamic: '.$test->getDynamic()."\r\n";
try {
  $test->test = "can't change me";
}
catch(Exception $e) {
  if ($e->getMessage() == ReadOnly::CLASS_READ_ONLY_PROPERTY_ERR) echo
"Read-only Property Exception";
}
?>

Thanks for your prompt and considered attention to this issue.
Hopefully this provides a solution that elegantly solves the issue for
all concerned.

TJ.
Nottingham, UK



[2005-11-04 23:32:22] php at tjworld dot net

Thanks for the DOM-specific recommendations, I'll have a play about
with it.

The case for dynamic properties is a big issue in itself, since when
extending a class the developer doesn't always have control of the
in

#35104 [Asn]: __set() and read-only property prevents proper Class inheritence

2005-11-04 Thread php at tjworld dot net
 ID:   35104
 User updated by:  php at tjworld dot net
 Reported By:  php at tjworld dot net
 Status:   Assigned
 Bug Type: Class/Object related
 Operating System: Windows 2003
 PHP Version:  5.1.0RC5
 Assigned To:  dmitry
 New Comment:

Based on real-world experience the previous example is not sufficent -
the new Element is destroyed along with the DOMDocumentFragment when
the method exits.

The fix is to remove the new element from the DOMDocumentFragment
before returning it to the caller.

Here's an updated, tested example.

createDocumentFragment(); // lightweight
container maintains "ownerDocument"
  $docFragment->appendChild($orphan); // attach
  $ret = $docFragment->removeChild($orphan); // remove
  return $ret; // ownerDocument set; won't be destroyed on  method
exit
 }
 // .. more class definition
}

class extDOMElement extends DOMElement {
 function __construct($name, $value='', $namespaceURI=null) {
  parent::__construct($name, $value, $namespaceURI);
 }
  //  ... more class definition here
}

$doc = new extDOMDocument('test');
$el = $doc->createElement('tagname');

// append discards the DOMDocumentFragment and just adds its child
nodes, but ownerDocument is maintained.
$doc->appendChild($el); 
echo $doc->saveXML();
?>


Previous Comments:


[2005-11-05 01:00:04] php at tjworld dot net

And finally... for completeness here's a worked example that solves the
DOM case of setting the ownerDocument property.

createDocumentFragment(); // lightweight
container maintains "ownerDocument"
  $docFragment->appendChild($orphan); // attach
  
  return $docFragment;
 }
 // .. more class definition
}

class extDOMElement extends DOMElement {
 function __construct($name, $value='', $namespaceURI=null) {
  parent::__construct($name, $value, $namespaceURI);
 }
  //  ... more class definition here
}

$doc = new extDOMDocument('test');
$el = $doc->createElement('tagname');

// append discards the DOMDocumentFragment and just adds its child
nodes, but ownerDocument is maintained.
$doc->appendChild($el); 
echo $doc->saveXML();
?>

TJ.



[2005-11-05 00:02:41] php at tjworld dot net

Following on from my suggestion to provide a strong design template for
read-only properties and inheritence, I've put together the following
example.

It provides for inheritence of a read-only property so the property can
be modified from sub-classes.

realProperty = 12;
  $this->test = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(get_class($this)==__CLASS__ &&
isset($this->dynamicProperty[$name]))
throw new Exception(self::CLASS_READ_ONLY_PROPERTY_ERR);
   else
$this->dynamicProperty[$name] = $value;
  }
 }
 public function __get($name) { return $this->dynamicProperty[$name];
}

 public function getReal() {return $this->realProperty; }
 public function getDynamic() {return $this->test; }
}

class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this->realProperty = 25; // ok
  $this->test = $value; // causes Fatal Error
 }
}

echo "Testing Writeable...\r\n";
$test = new Writeable('write to me');
echo 'real: '.$test->getReal()."\r\n";
echo 'dynamic: '.$test->getDynamic()."\r\n";

echo "Testing ReadOnly...\r\n";
$test = new ReadOnly();
echo 'real: '.$test->getReal()."\r\n";
echo 'dynamic: '.$test->getDynamic()."\r\n";
try {
  $test->test = "can't change me";
}
catch(Exception $e) {
  if ($e->getMessage() == ReadOnly::CLASS_READ_ONLY_PROPERTY_ERR) echo
"Read-only Property Exception";
}
?>

Thanks for your prompt and considered attention to this issue.
Hopefully this provides a solution that elegantly solves the issue for
all concerned.

TJ.
Nottingham, UK



[2005-11-04 23:32:22] php at tjworld dot net

Thanks for the DOM-specific recommendations, I'll have a play about
with it.

The case for dynamic properties is a big issue in itself, since when
extending a class the developer doesn't always have control of the
internal design on the super-class.

This could lead to some frustrating situations where the developer has
every reasonable expectation they can extend the super-class, but in
use trying to modify a protected or public property causes this Fatal
Error.

It could also lead to intermitent results if the statement  attempting
the modification is in a little-used method of the sub-class, and only
occurs on rare occasions.

Without compile-time access-checking (unlike a strongly typed
pre-compiled environment) these kind of issues could occur easily,
especially for the more general developers who aren't so au-fait with
the technicalities of PHP OO dynamic properties.

I was wondering if the properties affected by __set() should be marked
final, which would prevent inconsistencies but reduce fun

#35107 [Fbk->Opn]: compile failure with PHP 5.1 + MySQL 5

2005-11-04 Thread alex at whitewhale dot net
 ID:   35107
 User updated by:  alex at whitewhale dot net
 Reported By:  alex at whitewhale dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: MacOS X 10.4.3
 PHP Version:  5.1.0RC4
 New Comment:

Actually, I ran "make clean" several times in trying to 
diagnose this. Also, as I said, I tried compiling a fresh 
snapshot this morning to no avail.

I was finally able to compile it with your suggested, 
stripped-down config line after both "rm config.cache" and 
"make clean" but the moment I tried it with my normal config 
line, it failed again with the original error.

Just to be clear, the following sequence does *not* work for 
me (on my Mac, it works on my Linux box):

rm config.cache
make clean
./configure --with-apxs=/usr/sbin/apxs --prefix=/usr --
enable-inline-optimization --with-libxml-dir=/sw --with-
mysqli=/usr/local/mysql/bin/mysql_config --with-gd --with-
jpeg-dir=/sw --with-png-dir=/sw --with-zlib-dir=/usr --with-
pdo-mysql --with-xmlrpc --with-mm=/usr/local --disable-debug 
--with-ldap --enable-soap
make


Previous Comments:


[2005-11-04 23:04:04] [EMAIL PROTECTED]

So you didn't try with fresh sources or did not do 'make clean'.. Just
do "make clean && make" and it'll work.




[2005-11-04 18:34:21] alex at whitewhale dot net

Tried that configure line. No, now it fails with:

/usr/bin/ld: warning multiple definitions of symbol _regcomp
/usr/sbin/httpd definition of _regcomp
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regcomp.So) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec
/usr/sbin/httpd definition of _regexec
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regexec.So) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree
/usr/sbin/httpd definition of _regfree
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regfree.So) definition of _regfree
/usr/bin/ld: Undefined symbols:
_spl_ce_RuntimeException
_spl_ce_Countable
_php_pcre_replace
_php_ob_gzhandler_check
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1

BTW, I may have been wrong to say RC3 compiled. I'm 
currently running RC3 w/ MySQL 5 but I think that I may have 
installed MySQL 5 after RC 3 was already compiled and 
installed with 4.1.x.

Also, I recently upgraded to MacOS X 10.4.3, if that has 
anything to do with it.



[2005-11-04 18:20:06] [EMAIL PROTECTED]

Does this configure line work any better:

# rm config.cache
# ./configure --disable-all --with-apxs=/usr/sbin/apxs \
--with-mysqli=/usr/local/mysql/bin/mysql_config




[2005-11-04 17:40:02] alex at whitewhale dot net

Description:

Not very knowledgeable about compiler issues, but: getting a 
compile failure on MacOS X related to MySQL. PHP 5.1 RC3 
compiled with MySQL 5 successfully, but RC4 and a snapshot 
from this morning both fail using the following configure 
line:

./configure --with-apxs=/usr/sbin/apxs --prefix=/usr --enable-
inline-optimization --with-libxml-dir=/sw --with-mysqli=/usr/
local/mysql/bin/mysql_config --with-gd --with-jpeg-dir=/sw --
with-png-dir=/sw --with-zlib-dir=/usr --with-pdo-mysql --with-
xmlrpc --with-mm=/usr/local --disable-debug --with-ldap --
enable-soap

Reproduce code:
---
make

Expected result:

a successful compile

Actual result:
--
/usr/bin/ld: warning multiple definitions of symbol _regcomp
/usr/sbin/httpd definition of _regcomp
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regcomp.So) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec
/usr/sbin/httpd definition of _regexec
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regexec.So) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree
/usr/sbin/httpd definition of _regfree
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regfree.So) definition of _regfree
/usr/bin/ld: Undefined symbols:
_mysql_get_character_set_info
_mysql_set_character_set
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1





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


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

2005-11-04 Thread nlopess
 ID:   21197
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bool at boolsite dot net
 Status:   Open
 Bug Type: Sockets related
 Operating System: *
 PHP Version:  5.*, 4.* (2005-10-29) (snap)
 New Comment:

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.


Previous Comments:


[2005-11-04 19:30:44] [EMAIL PROTECTED]

Here's a possible patch, but Wez probably knows better if there's a way
to tell if a windows socket is in blocking mode...

Index: sockets.c
===
RCS file: /repository/php-src/ext/sockets/sockets.c,v
retrieving revision 1.171.2.2
diff -u -p -d -r1.171.2.2 sockets.c
--- sockets.c   3 Nov 2005 15:00:51 -   1.171.2.2
+++ sockets.c   4 Nov 2005 18:28:45 -
@@ -257,6 +257,12 @@ static int php_read(int bsd_socket, void
int nonblock = 0;
char *t = (char *) buf;

+/*
+ * fcntl(s, F_GETFL) will always fail for windows, and there's no way
to
+ * determine if a socket is in blocking mode to my current knowledge,
so we
+ * just omit this check; though that means we're always blocking on
win32...
+ */
+#ifndef PHP_WIN32
m = fcntl(bsd_socket, F_GETFL);
if (m < 0) {
return m;
@@ -264,6 +270,7 @@ static int php_read(int bsd_socket, void

nonblock = (m & O_NONBLOCK);
m = 0;
+#endif

set_errno(0);





[2005-11-04 16:24:47] [EMAIL PROTECTED]

See also bug #35062



[2005-09-29 16:07:34] tommyo at gmail dot com

I installed the latest windows build PHP Version 5.1.0RC2-dev and the
socket problem still exists.  I get:

Warning: socket_read() [function.socket-read]: unable to read from
socket [0]: The operation completed successfully.

When I put PHP_NORMAL_READ for the read type parameter. Using the
default or PHP_BINARY_READ works just fine for the same line of code.



[2004-03-11 11:06:02] [EMAIL PROTECTED]

I've compilled PHP with cygwin/gcc and no error is produced. However,
the build version from snaps.php.net gives that error.



[2003-08-26 02:00:58] bool at boolsite dot net

Ok, this is a short example : (a little echo server)

 Debut de la connexion...',"\r\n";
$EndTime=time()+15;
do{
$buffer=socket_read($MsgSock,1024,PHP_NORMAL_READ);
if($buffer===false) {
echo 'socket_read() a échoué :
',socket_strerror(socket_last_error($MsgSock)),"\r\n";
break;
}
elseif(!$buffer){
continue;
}
$buffer=trim($buffer);
echo '< ',$buffer,"\r\n";
if($buffer=='quit') {
break;
}

$back='You sent : ['.$buffer.']';

echo '> ',$back,"\r\n";
socket_write($MsgSock,$back."\r\n");
} while(time()<$EndTime);

@socket_close($MsgSock);
echo '=> End...',"\r\n";
}
}
socket_close($Sock);
?>



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=21197&edit=1


#35076 [Asn]: Sometimes the log file shows: The session id contains illegal characters, ..etc

2005-11-04 Thread vincent_f40 at hotmail dot com
 ID:   35076
 User updated by:  vincent_f40 at hotmail dot com
 Reported By:  vincent_f40 at hotmail dot com
 Status:   Assigned
 Bug Type: Session related
 Operating System: Linux RHEL4, 2.6.9-11.ELsmp
 PHP Version:  5.0.5
 Assigned To:  cellog
 New Comment:

Hi Sniper,

Oki...and what about my initial error. The error down here:
Is this then a know issue and will be solved in the latest php release
?

Thu Nov  3 00:49:10 2005] [error] PHP Warning:  session_start() [function.session-start]: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in /home/httpd/html/includes/session_init.inc on line 70
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: The session
id
contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,'
in Unknown on line 0
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: Failed to
write session data (files). Please verify that the current setting of
session.save_path is correct () in Unknown on line 0

Thanks,
Vince.


Previous Comments:


[2005-11-05 00:57:49] [EMAIL PROTECTED]

this has nothing to do with sessions, please open separate bugs for
separate issues.  I'll look into the problem.



[2005-11-05 00:54:23] [EMAIL PROTECTED]

Assigning temporarily to Greg who needs to get the PEAR act together
soon. Please fix the above mentioned errors. 




[2005-11-05 00:04:54] vincent_f40 at hotmail dot com

Sorry for the late reply. I got a part of the info here...if you need
the rest as it was quit long...I can send it by email.(hope posting
such a long info is not bad)
Also this might be something easy to solve...but did not look into this
issue myself yet...normally php always installs without problems for me.
This down I got from:
php5-200511031930

Installing PHP SAPI module:   apache
Installing PHP CLI binary:/usr/local/bin/
Installing PHP CLI man page:  /usr/local/man/man1/
Installing build environment: /usr/local/lib/php/build/
Installing header files:  /usr/local/include/php/
Installing helper programs:   /usr/local/bin/
  program: phpize
  program: php-config
Installing man pages: /usr/local/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:  /usr/local/lib/php/

Warning: call_user_func(PEAR_Installer_Role_Data::getInfo): First
argument is expected to be a valid callback in phar://insta
ll-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Doc::getInfo): First
argument is expected to be a valid callback in phar://instal
l-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Php::getInfo): First
argument is expected to be a valid callback in phar://instal
l-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Script::getInfo): First
argument is expected to be a valid callback in phar://ins
tall-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Test::getInfo): First
argument is expected to be a valid callback in phar://insta
ll-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Notice: Undefined variable: ret in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 165

Notice: Undefined variable: ret in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 136

Notice: Undefined variable: ret in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 191

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning:
call_user_func(PEAR_Installer_Role_Data::getSupportingConfigVars):
First argument is expected to be a valid callback
 in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022

Warning:
call_user_func(PEAR_Installer_Role_Doc::getSupportingConfigVars): First
argument is expected to be a valid callback
in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022

#35104 [Asn]: __set() and read-only property prevents proper Class inheritence

2005-11-04 Thread php at tjworld dot net
 ID:   35104
 User updated by:  php at tjworld dot net
 Reported By:  php at tjworld dot net
 Status:   Assigned
 Bug Type: Class/Object related
 Operating System: Windows 2003
 PHP Version:  5.1.0RC5
 Assigned To:  dmitry
 New Comment:

And finally... for completeness here's a worked example that solves the
DOM case of setting the ownerDocument property.

createDocumentFragment(); // lightweight
container maintains "ownerDocument"
  $docFragment->appendChild($orphan); // attach
  
  return $docFragment;
 }
 // .. more class definition
}

class extDOMElement extends DOMElement {
 function __construct($name, $value='', $namespaceURI=null) {
  parent::__construct($name, $value, $namespaceURI);
 }
  //  ... more class definition here
}

$doc = new extDOMDocument('test');
$el = $doc->createElement('tagname');

// append discards the DOMDocumentFragment and just adds its child
nodes, but ownerDocument is maintained.
$doc->appendChild($el); 
echo $doc->saveXML();
?>

TJ.


Previous Comments:


[2005-11-05 00:02:41] php at tjworld dot net

Following on from my suggestion to provide a strong design template for
read-only properties and inheritence, I've put together the following
example.

It provides for inheritence of a read-only property so the property can
be modified from sub-classes.

realProperty = 12;
  $this->test = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(get_class($this)==__CLASS__ &&
isset($this->dynamicProperty[$name]))
throw new Exception(self::CLASS_READ_ONLY_PROPERTY_ERR);
   else
$this->dynamicProperty[$name] = $value;
  }
 }
 public function __get($name) { return $this->dynamicProperty[$name];
}

 public function getReal() {return $this->realProperty; }
 public function getDynamic() {return $this->test; }
}

class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this->realProperty = 25; // ok
  $this->test = $value; // causes Fatal Error
 }
}

echo "Testing Writeable...\r\n";
$test = new Writeable('write to me');
echo 'real: '.$test->getReal()."\r\n";
echo 'dynamic: '.$test->getDynamic()."\r\n";

echo "Testing ReadOnly...\r\n";
$test = new ReadOnly();
echo 'real: '.$test->getReal()."\r\n";
echo 'dynamic: '.$test->getDynamic()."\r\n";
try {
  $test->test = "can't change me";
}
catch(Exception $e) {
  if ($e->getMessage() == ReadOnly::CLASS_READ_ONLY_PROPERTY_ERR) echo
"Read-only Property Exception";
}
?>

Thanks for your prompt and considered attention to this issue.
Hopefully this provides a solution that elegantly solves the issue for
all concerned.

TJ.
Nottingham, UK



[2005-11-04 23:32:22] php at tjworld dot net

Thanks for the DOM-specific recommendations, I'll have a play about
with it.

The case for dynamic properties is a big issue in itself, since when
extending a class the developer doesn't always have control of the
internal design on the super-class.

This could lead to some frustrating situations where the developer has
every reasonable expectation they can extend the super-class, but in
use trying to modify a protected or public property causes this Fatal
Error.

It could also lead to intermitent results if the statement  attempting
the modification is in a little-used method of the sub-class, and only
occurs on rare occasions.

Without compile-time access-checking (unlike a strongly typed
pre-compiled environment) these kind of issues could occur easily,
especially for the more general developers who aren't so au-fait with
the technicalities of PHP OO dynamic properties.

I was wondering if the properties affected by __set() should be marked
final, which would prevent inconsistencies but reduce functionality to
a great extent.

Maybe its a case of stressing in the documentation *not* to rely on
__set() to produce read-only properties *unless* the __set() method
first checks that the calling class-instance is an instanceof the
super-class - in other words the read-only functionality is conditional
on the method being called on an instance of the super-class itself, not
a sub-class.

This puts the ball back in the developer's court, but you'd need some
good strong documentation across the platform to ensure developers use
this design template.



[2005-11-04 22:54:02] [EMAIL PROTECTED]

Cant say about other internal classes, but DOM is written specifically
not to allow overriding properties (properties provide direct access to
libxml2 functionality which cant be done in userland). As far as casting
goes... already working on a way to allow returning extended classes
from all functions in dom (for PHP 6).

Current workaround for your issue create your extended class using new
keyword, and append it to a DOMDocumentFragment (if you dont want it

#35076 [Asn]: Sometimes the log file shows: The session id contains illegal characters, ..etc

2005-11-04 Thread cellog
 ID:   35076
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vincent_f40 at hotmail dot com
 Status:   Assigned
 Bug Type: Session related
 Operating System: Linux RHEL4, 2.6.9-11.ELsmp
 PHP Version:  5.0.5
 Assigned To:  cellog
 New Comment:

this has nothing to do with sessions, please open separate bugs for
separate issues.  I'll look into the problem.


Previous Comments:


[2005-11-05 00:54:23] [EMAIL PROTECTED]

Assigning temporarily to Greg who needs to get the PEAR act together
soon. Please fix the above mentioned errors. 




[2005-11-05 00:04:54] vincent_f40 at hotmail dot com

Sorry for the late reply. I got a part of the info here...if you need
the rest as it was quit long...I can send it by email.(hope posting
such a long info is not bad)
Also this might be something easy to solve...but did not look into this
issue myself yet...normally php always installs without problems for me.
This down I got from:
php5-200511031930

Installing PHP SAPI module:   apache
Installing PHP CLI binary:/usr/local/bin/
Installing PHP CLI man page:  /usr/local/man/man1/
Installing build environment: /usr/local/lib/php/build/
Installing header files:  /usr/local/include/php/
Installing helper programs:   /usr/local/bin/
  program: phpize
  program: php-config
Installing man pages: /usr/local/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:  /usr/local/lib/php/

Warning: call_user_func(PEAR_Installer_Role_Data::getInfo): First
argument is expected to be a valid callback in phar://insta
ll-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Doc::getInfo): First
argument is expected to be a valid callback in phar://instal
l-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Php::getInfo): First
argument is expected to be a valid callback in phar://instal
l-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Script::getInfo): First
argument is expected to be a valid callback in phar://ins
tall-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Test::getInfo): First
argument is expected to be a valid callback in phar://insta
ll-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Notice: Undefined variable: ret in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 165

Notice: Undefined variable: ret in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 136

Notice: Undefined variable: ret in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 191

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning:
call_user_func(PEAR_Installer_Role_Data::getSupportingConfigVars):
First argument is expected to be a valid callback
 in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022

Warning:
call_user_func(PEAR_Installer_Role_Doc::getSupportingConfigVars): First
argument is expected to be a valid callback
in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022

Warning:
call_user_func(PEAR_Installer_Role_Php::getSupportingConfigVars): First
argument is expected to be a valid callback
in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022

Warning:
call_user_func(PEAR_Installer_Role_Script::getSupportingConfigVars):
First argument is expected to be a valid callba
ck in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022

Warning:
call_user_func(PEAR_Installer_Role_Test::getSupportingConfigVars):
First argument is expected to be a valid callback
 in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib

#35076 [Opn->Asn]: Sometimes the log file shows: The session id contains illegal characters, ..etc

2005-11-04 Thread sniper
 ID:   35076
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vincent_f40 at hotmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Session related
 Operating System: Linux RHEL4, 2.6.9-11.ELsmp
 PHP Version:  5.0.5
-Assigned To:  
+Assigned To:  cellog
 New Comment:

Assigning temporarily to Greg who needs to get the PEAR act together
soon. Please fix the above mentioned errors. 



Previous Comments:


[2005-11-05 00:04:54] vincent_f40 at hotmail dot com

Sorry for the late reply. I got a part of the info here...if you need
the rest as it was quit long...I can send it by email.(hope posting
such a long info is not bad)
Also this might be something easy to solve...but did not look into this
issue myself yet...normally php always installs without problems for me.
This down I got from:
php5-200511031930

Installing PHP SAPI module:   apache
Installing PHP CLI binary:/usr/local/bin/
Installing PHP CLI man page:  /usr/local/man/man1/
Installing build environment: /usr/local/lib/php/build/
Installing header files:  /usr/local/include/php/
Installing helper programs:   /usr/local/bin/
  program: phpize
  program: php-config
Installing man pages: /usr/local/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:  /usr/local/lib/php/

Warning: call_user_func(PEAR_Installer_Role_Data::getInfo): First
argument is expected to be a valid callback in phar://insta
ll-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Doc::getInfo): First
argument is expected to be a valid callback in phar://instal
l-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Php::getInfo): First
argument is expected to be a valid callback in phar://instal
l-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Script::getInfo): First
argument is expected to be a valid callback in phar://ins
tall-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Test::getInfo): First
argument is expected to be a valid callback in phar://insta
ll-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Notice: Undefined variable: ret in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 165

Notice: Undefined variable: ret in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 136

Notice: Undefined variable: ret in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 191

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning:
call_user_func(PEAR_Installer_Role_Data::getSupportingConfigVars):
First argument is expected to be a valid callback
 in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022

Warning:
call_user_func(PEAR_Installer_Role_Doc::getSupportingConfigVars): First
argument is expected to be a valid callback
in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022

Warning:
call_user_func(PEAR_Installer_Role_Php::getSupportingConfigVars): First
argument is expected to be a valid callback
in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022

Warning:
call_user_func(PEAR_Installer_Role_Script::getSupportingConfigVars):
First argument is expected to be a valid callba
ck in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022

Warning:
call_user_func(PEAR_Installer_Role_Test::getSupportingConfigVars):
First argument is expected to be a valid callback
 in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022
[PEAR] Archive_Tar- already installed: 1.3.1
[PEAR] Console_Getopt - already installed: 1.2

Warning: in_array(): Wrong datatype for second argumen

#35076 [Fbk->Opn]: Sometimes the log file shows: The session id contains illegal characters, ..etc

2005-11-04 Thread vincent_f40 at hotmail dot com
 ID:   35076
 User updated by:  vincent_f40 at hotmail dot com
 Reported By:  vincent_f40 at hotmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: Linux RHEL4, 2.6.9-11.ELsmp
 PHP Version:  5.0.5
 New Comment:

Sorry for the late reply. I got a part of the info here...if you need
the rest as it was quit long...I can send it by email.(hope posting
such a long info is not bad)
Also this might be something easy to solve...but did not look into this
issue myself yet...normally php always installs without problems for me.
This down I got from:
php5-200511031930

Installing PHP SAPI module:   apache
Installing PHP CLI binary:/usr/local/bin/
Installing PHP CLI man page:  /usr/local/man/man1/
Installing build environment: /usr/local/lib/php/build/
Installing header files:  /usr/local/include/php/
Installing helper programs:   /usr/local/bin/
  program: phpize
  program: php-config
Installing man pages: /usr/local/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:  /usr/local/lib/php/

Warning: call_user_func(PEAR_Installer_Role_Data::getInfo): First
argument is expected to be a valid callback in phar://insta
ll-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Doc::getInfo): First
argument is expected to be a valid callback in phar://instal
l-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Php::getInfo): First
argument is expected to be a valid callback in phar://instal
l-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Script::getInfo): First
argument is expected to be a valid callback in phar://ins
tall-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Warning: call_user_func(PEAR_Installer_Role_Test::getInfo): First
argument is expected to be a valid callback in phar://insta
ll-pear-nozlib.phar/PEAR/Installer/Role.php on line 225

Notice: Undefined variable: ret in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 165

Notice: Undefined variable: ret in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 136

Notice: Undefined variable: ret in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 191

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning:
call_user_func(PEAR_Installer_Role_Data::getSupportingConfigVars):
First argument is expected to be a valid callback
 in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022

Warning:
call_user_func(PEAR_Installer_Role_Doc::getSupportingConfigVars): First
argument is expected to be a valid callback
in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022

Warning:
call_user_func(PEAR_Installer_Role_Php::getSupportingConfigVars): First
argument is expected to be a valid callback
in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022

Warning:
call_user_func(PEAR_Installer_Role_Script::getSupportingConfigVars):
First argument is expected to be a valid callba
ck in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022

Warning:
call_user_func(PEAR_Installer_Role_Test::getSupportingConfigVars):
First argument is expected to be a valid callback
 in phar://install-pear-nozlib.phar/PEAR/Config.php on line 1018

Warning: Invalid argument supplied for foreach() in
phar://install-pear-nozlib.phar/PEAR/Config.php on line 1022
[PEAR] Archive_Tar- already installed: 1.3.1
[PEAR] Console_Getopt - already installed: 1.2

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEA

#35104 [Asn]: __set() and read-only property prevents proper Class inheritence

2005-11-04 Thread php at tjworld dot net
 ID:   35104
 User updated by:  php at tjworld dot net
 Reported By:  php at tjworld dot net
 Status:   Assigned
 Bug Type: Class/Object related
 Operating System: Windows 2003
 PHP Version:  5.1.0RC5
 Assigned To:  dmitry
 New Comment:

Following on from my suggestion to provide a strong design template for
read-only properties and inheritence, I've put together the following
example.

It provides for inheritence of a read-only property so the property can
be modified from sub-classes.

realProperty = 12;
  $this->test = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(get_class($this)==__CLASS__ &&
isset($this->dynamicProperty[$name]))
throw new Exception(self::CLASS_READ_ONLY_PROPERTY_ERR);
   else
$this->dynamicProperty[$name] = $value;
  }
 }
 public function __get($name) { return $this->dynamicProperty[$name];
}

 public function getReal() {return $this->realProperty; }
 public function getDynamic() {return $this->test; }
}

class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this->realProperty = 25; // ok
  $this->test = $value; // causes Fatal Error
 }
}

echo "Testing Writeable...\r\n";
$test = new Writeable('write to me');
echo 'real: '.$test->getReal()."\r\n";
echo 'dynamic: '.$test->getDynamic()."\r\n";

echo "Testing ReadOnly...\r\n";
$test = new ReadOnly();
echo 'real: '.$test->getReal()."\r\n";
echo 'dynamic: '.$test->getDynamic()."\r\n";
try {
  $test->test = "can't change me";
}
catch(Exception $e) {
  if ($e->getMessage() == ReadOnly::CLASS_READ_ONLY_PROPERTY_ERR) echo
"Read-only Property Exception";
}
?>

Thanks for your prompt and considered attention to this issue.
Hopefully this provides a solution that elegantly solves the issue for
all concerned.

TJ.
Nottingham, UK


Previous Comments:


[2005-11-04 23:32:22] php at tjworld dot net

Thanks for the DOM-specific recommendations, I'll have a play about
with it.

The case for dynamic properties is a big issue in itself, since when
extending a class the developer doesn't always have control of the
internal design on the super-class.

This could lead to some frustrating situations where the developer has
every reasonable expectation they can extend the super-class, but in
use trying to modify a protected or public property causes this Fatal
Error.

It could also lead to intermitent results if the statement  attempting
the modification is in a little-used method of the sub-class, and only
occurs on rare occasions.

Without compile-time access-checking (unlike a strongly typed
pre-compiled environment) these kind of issues could occur easily,
especially for the more general developers who aren't so au-fait with
the technicalities of PHP OO dynamic properties.

I was wondering if the properties affected by __set() should be marked
final, which would prevent inconsistencies but reduce functionality to
a great extent.

Maybe its a case of stressing in the documentation *not* to rely on
__set() to produce read-only properties *unless* the __set() method
first checks that the calling class-instance is an instanceof the
super-class - in other words the read-only functionality is conditional
on the method being called on an instance of the super-class itself, not
a sub-class.

This puts the ball back in the developer's court, but you'd need some
good strong documentation across the platform to ensure developers use
this design template.



[2005-11-04 22:54:02] [EMAIL PROTECTED]

Cant say about other internal classes, but DOM is written specifically
not to allow overriding properties (properties provide direct access to
libxml2 functionality which cant be done in userland). As far as casting
goes... already working on a way to allow returning extended classes
from all functions in dom (for PHP 6).

Current workaround for your issue create your extended class using new
keyword, and append it to a DOMDocumentFragment (if you dont want it
linked into the document tree) that was created using
createDocumentFragment. The appending updates the libxml2 pointers and
the extended object is now linked to the DOMDocument correctly.

Was this report specific to dom or is it to remain open for the
extneded uses object example?



[2005-11-04 21:39:48] php at tjworld dot net

"but DOM properties CANNOT be overriden."

Does this occur anywhere else in the PHP classes or is it unique to
DOM? It's the first time I've met this situation in OO since the 80's.

It pretty much makes having the DOM object-oriented pointless, when the
base class (DOMNode) of the other significant DOM classes prevents
useful extension.

A simple solution would be to provide a courtesy:

DOMNode->__construct($ownerDocument = null);

But that'd be avail

#35104 [Asn]: __set() and read-only property prevents proper Class inheritence

2005-11-04 Thread php at tjworld dot net
 ID:   35104
 User updated by:  php at tjworld dot net
 Reported By:  php at tjworld dot net
 Status:   Assigned
 Bug Type: Class/Object related
 Operating System: Windows 2003
 PHP Version:  5.1.0RC5
 Assigned To:  dmitry
 New Comment:

Thanks for the DOM-specific recommendations, I'll have a play about
with it.

The case for dynamic properties is a big issue in itself, since when
extending a class the developer doesn't always have control of the
internal design on the super-class.

This could lead to some frustrating situations where the developer has
every reasonable expectation they can extend the super-class, but in
use trying to modify a protected or public property causes this Fatal
Error.

It could also lead to intermitent results if the statement  attempting
the modification is in a little-used method of the sub-class, and only
occurs on rare occasions.

Without compile-time access-checking (unlike a strongly typed
pre-compiled environment) these kind of issues could occur easily,
especially for the more general developers who aren't so au-fait with
the technicalities of PHP OO dynamic properties.

I was wondering if the properties affected by __set() should be marked
final, which would prevent inconsistencies but reduce functionality to
a great extent.

Maybe its a case of stressing in the documentation *not* to rely on
__set() to produce read-only properties *unless* the __set() method
first checks that the calling class-instance is an instanceof the
super-class - in other words the read-only functionality is conditional
on the method being called on an instance of the super-class itself, not
a sub-class.

This puts the ball back in the developer's court, but you'd need some
good strong documentation across the platform to ensure developers use
this design template.


Previous Comments:


[2005-11-04 22:54:02] [EMAIL PROTECTED]

Cant say about other internal classes, but DOM is written specifically
not to allow overriding properties (properties provide direct access to
libxml2 functionality which cant be done in userland). As far as casting
goes... already working on a way to allow returning extended classes
from all functions in dom (for PHP 6).

Current workaround for your issue create your extended class using new
keyword, and append it to a DOMDocumentFragment (if you dont want it
linked into the document tree) that was created using
createDocumentFragment. The appending updates the libxml2 pointers and
the extended object is now linked to the DOMDocument correctly.

Was this report specific to dom or is it to remain open for the
extneded uses object example?



[2005-11-04 21:39:48] php at tjworld dot net

"but DOM properties CANNOT be overriden."

Does this occur anywhere else in the PHP classes or is it unique to
DOM? It's the first time I've met this situation in OO since the 80's.

It pretty much makes having the DOM object-oriented pointless, when the
base class (DOMNode) of the other significant DOM classes prevents
useful extension.

A simple solution would be to provide a courtesy:

DOMNode->__construct($ownerDocument = null);

But that'd be available to the public of course. Alternatively, 

protected DOMNode function _setOwnerDocument(DOMDocument
ownerDocument);

But thats a bit arbitary. Alternatively, solve the practical loss of
functionality by fixing the bug in importNode() so it returns an object
of the class passed in:

DOMNode DOMDocument->importNode(DOMNode $node, bool deep);

Currently it *casts* the passed $node to one of the DOM base classes it
inherited from *and* discards all their extended properties and methods,
which is surely not OO behaviour because in the following scenario, the
cases listed at the end are inconsistent:

class inChild extends DOMNode {}
class inGrandChild extends DOMElement()
class inGreatGrandChild extends inGrandChild()

$node = new DOMNode();
$element = new DOMElement();
$child = new inChild();
$grandChild = new inGrandChild();
$greatGrandChild = new inGreatGrandChild();

1. DOMDocument->importNode($node, true) instanceof DOMNode
2. DOMDocument->importNode($element, true) instanceof DOMElement
3. DOMDocument->importNode($child, true) instance of DOMNode
4. DOMDocument->importNode($grandChild, true) instanceof DOMElement
(not inGrandChild)
5. DOMDocument->importNode($greatGrandChild, true) instanceof
DOMElement (not inGreatGrandChild)

So importNode() doesn't even cast to a consistent DOMNode, but to the
'highest* level in the built-in classes.

Usually in OO although the cast is to a super-class (to guarantee
portability) the extended methods and properties aren't discarded.

If importNode() were fixed to return the same class as passed in the
following code would solve the ownerDocument issue:

importNode($ret, true); // adopt it
  // now $adopt satisfies $this

#35107 [Opn->Fbk]: compile failure with PHP 5.1 + MySQL 5

2005-11-04 Thread sniper
 ID:   35107
 Updated by:   [EMAIL PROTECTED]
 Reported By:  alex at whitewhale dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: MacOS X 10.4.3
 PHP Version:  5.1.0RC4
 New Comment:

So you didn't try with fresh sources or did not do 'make clean'.. Just
do "make clean && make" and it'll work.



Previous Comments:


[2005-11-04 18:34:21] alex at whitewhale dot net

Tried that configure line. No, now it fails with:

/usr/bin/ld: warning multiple definitions of symbol _regcomp
/usr/sbin/httpd definition of _regcomp
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regcomp.So) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec
/usr/sbin/httpd definition of _regexec
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regexec.So) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree
/usr/sbin/httpd definition of _regfree
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regfree.So) definition of _regfree
/usr/bin/ld: Undefined symbols:
_spl_ce_RuntimeException
_spl_ce_Countable
_php_pcre_replace
_php_ob_gzhandler_check
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1

BTW, I may have been wrong to say RC3 compiled. I'm 
currently running RC3 w/ MySQL 5 but I think that I may have 
installed MySQL 5 after RC 3 was already compiled and 
installed with 4.1.x.

Also, I recently upgraded to MacOS X 10.4.3, if that has 
anything to do with it.



[2005-11-04 18:20:06] [EMAIL PROTECTED]

Does this configure line work any better:

# rm config.cache
# ./configure --disable-all --with-apxs=/usr/sbin/apxs \
--with-mysqli=/usr/local/mysql/bin/mysql_config




[2005-11-04 17:40:02] alex at whitewhale dot net

Description:

Not very knowledgeable about compiler issues, but: getting a 
compile failure on MacOS X related to MySQL. PHP 5.1 RC3 
compiled with MySQL 5 successfully, but RC4 and a snapshot 
from this morning both fail using the following configure 
line:

./configure --with-apxs=/usr/sbin/apxs --prefix=/usr --enable-
inline-optimization --with-libxml-dir=/sw --with-mysqli=/usr/
local/mysql/bin/mysql_config --with-gd --with-jpeg-dir=/sw --
with-png-dir=/sw --with-zlib-dir=/usr --with-pdo-mysql --with-
xmlrpc --with-mm=/usr/local --disable-debug --with-ldap --
enable-soap

Reproduce code:
---
make

Expected result:

a successful compile

Actual result:
--
/usr/bin/ld: warning multiple definitions of symbol _regcomp
/usr/sbin/httpd definition of _regcomp
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regcomp.So) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec
/usr/sbin/httpd definition of _regexec
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regexec.So) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree
/usr/sbin/httpd definition of _regfree
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regfree.So) definition of _regfree
/usr/bin/ld: Undefined symbols:
_mysql_get_character_set_info
_mysql_set_character_set
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1





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


#35108 [Opn->Bgs]: PHP Warning: mail() [function.mail]: SMTP server response: 501 Syntax error in

2005-11-04 Thread sniper
 ID:   35108
 Updated by:   [EMAIL PROTECTED]
 Reported By:  theintunoo at brightwing dot jp
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: sever 2003
 PHP Version:  5.1.0RC4
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:


[2005-11-04 18:49:49] theintunoo at brightwing dot jp

PHP Warning: mail() [function.mail]: SMTP server response: 501 Syntax
error in parameters or arguments in C:\Program



[2005-11-04 18:47:21] theintunoo at brightwing dot jp

Description:

php.ini 


Expected result:

open php.ini file 
search this line ;sendmail_from = [EMAIL PROTECTED]
after replace as like 
sendmail_from = [EMAIL PROTECTED]
release this ; mark only your php.ini file 
where php.ini 







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



#35109 [Opn->Bgs]: Expected if-clause result not performed

2005-11-04 Thread sniper
 ID:   35109
 Updated by:   [EMAIL PROTECTED]
 Reported By:  per at katrineholm dot org
-Status:   Open
+Status:   Bogus
 Bug Type: Output Control
 Operating System: Linux
 PHP Version:  4.4.1
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

RTFM.


Previous Comments:


[2005-11-04 22:56:44] per at katrineholm dot org

Description:

Two if-clauses are not outputting the same result as they should.

Reproduce code:
---


Expected result:

Both example 1 and 2 outputs the written strings.

Actual result:
--
Only example 1 outputs the expected result.





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


#35096 [Opn->Fbk]: php 4.4.2-dev has still trouble with mod_rewrite/apache2

2005-11-04 Thread sniper
 ID:   35096
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rob at burningsoda dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: FreeBSD 6.0RC1
 PHP Version:  4CVS-2005-11-04 (snap)
 New Comment:

I want you to try the PHP 5 snapshot because I want to be sure this is
only happening with PHP 4. In which case we have better chance of
figuring out what fix to backport from PHP 5.

On the other hand, if this also happens with PHP 5, we really need to
know since we're about to release PHP 5.1 and it would be nice to fix
this kind of things before the release..



Previous Comments:


[2005-11-04 20:04:37] rob at burningsoda dot com

sniper,

This problem occurs only when using PHP 4.4.1 and the PHP 4-snapshots
_and_ apache 2.x. Why should I try a 5.x-snapshot? Do I misunderstand
you?



[2005-11-04 09:25:24] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-11-04 02:49:53] rob at burningsoda dot com

Description:

I just downloaded

Stable (4.4.x-dev)
Built On: Nov 03, 2005 23:51 GMT

and built it:

PHP 4.4.2-dev (cli) (built: Nov  4 2005 02:17:10)

But it seems like, the following bug is _not_ fixed
in that snapshot:

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

This happens with _any_ RewriteRule I use.

Reproduce code:
---
Try to use mod_rewrite on Apache 2.x to modify any URL.
Small test case:

index.php:


RewriteRule:
RewriteRule ^(.+)/$ index.php?myarg=$1 [L]

URLs to try:
1. http://localhost/index.php?myarg=bla
2. http://localhost/blub/
3. http://localhost/index.php/


Expected result:

In all three cases a document should be delivered:

1. "bla"
2. "blub"
3. "index.php"

Actual result:
--
1. Correctly delivers document.
2. No document is delivered.
3. Correctly delivers document.





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


#35109 [NEW]: Expected if-clause result not performed

2005-11-04 Thread per at katrineholm dot org
From: per at katrineholm dot org
Operating system: Linux
PHP version:  4.4.1
PHP Bug Type: Output Control
Bug description:  Expected if-clause result not performed

Description:

Two if-clauses are not outputting the same result as they should.

Reproduce code:
---


Expected result:

Both example 1 and 2 outputs the written strings.

Actual result:
--
Only example 1 outputs the expected result.

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


#35104 [Asn]: __set() and read-only property prevents proper Class inheritence

2005-11-04 Thread rrichards
 ID:   35104
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at tjworld dot net
 Status:   Assigned
 Bug Type: Class/Object related
 Operating System: Windows 2003
 PHP Version:  5.1.0RC5
 Assigned To:  dmitry
 New Comment:

Cant say about other internal classes, but DOM is written specifically
not to allow overriding properties (properties provide direct access to
libxml2 functionality which cant be done in userland). As far as casting
goes... already working on a way to allow returning extended classes
from all functions in dom (for PHP 6).

Current workaround for your issue create your extended class using new
keyword, and append it to a DOMDocumentFragment (if you dont want it
linked into the document tree) that was created using
createDocumentFragment. The appending updates the libxml2 pointers and
the extended object is now linked to the DOMDocument correctly.

Was this report specific to dom or is it to remain open for the
extneded uses object example?


Previous Comments:


[2005-11-04 21:39:48] php at tjworld dot net

"but DOM properties CANNOT be overriden."

Does this occur anywhere else in the PHP classes or is it unique to
DOM? It's the first time I've met this situation in OO since the 80's.

It pretty much makes having the DOM object-oriented pointless, when the
base class (DOMNode) of the other significant DOM classes prevents
useful extension.

A simple solution would be to provide a courtesy:

DOMNode->__construct($ownerDocument = null);

But that'd be available to the public of course. Alternatively, 

protected DOMNode function _setOwnerDocument(DOMDocument
ownerDocument);

But thats a bit arbitary. Alternatively, solve the practical loss of
functionality by fixing the bug in importNode() so it returns an object
of the class passed in:

DOMNode DOMDocument->importNode(DOMNode $node, bool deep);

Currently it *casts* the passed $node to one of the DOM base classes it
inherited from *and* discards all their extended properties and methods,
which is surely not OO behaviour because in the following scenario, the
cases listed at the end are inconsistent:

class inChild extends DOMNode {}
class inGrandChild extends DOMElement()
class inGreatGrandChild extends inGrandChild()

$node = new DOMNode();
$element = new DOMElement();
$child = new inChild();
$grandChild = new inGrandChild();
$greatGrandChild = new inGreatGrandChild();

1. DOMDocument->importNode($node, true) instanceof DOMNode
2. DOMDocument->importNode($element, true) instanceof DOMElement
3. DOMDocument->importNode($child, true) instance of DOMNode
4. DOMDocument->importNode($grandChild, true) instanceof DOMElement
(not inGrandChild)
5. DOMDocument->importNode($greatGrandChild, true) instanceof
DOMElement (not inGreatGrandChild)

So importNode() doesn't even cast to a consistent DOMNode, but to the
'highest* level in the built-in classes.

Usually in OO although the cast is to a super-class (to guarantee
portability) the extended methods and properties aren't discarded.

If importNode() were fixed to return the same class as passed in the
following code would solve the ownerDocument issue:

importNode($ret, true); // adopt it
  // now $adopt satisfies $this->isSameNode($adopt->ownerDocument) &&
$adopt instanceof extDOMelement 
  return $adopt;
 }
}

class extDOMElement extends DOMElement {
 function __construct($name, $value=null, $namespace=null) {
  parent::__construct($name, $value, $namespaceURI);
 }
  //  ... more class definition here
}

(excuse any typo's - working weird hours!)



[2005-11-04 17:02:40] [EMAIL PROTECTED]

I can't speak for the user class example, but DOM properties CANNOT be
overriden.



[2005-11-04 16:26:34] [EMAIL PROTECTED]

Dmitry, any insight on this?




[2005-11-04 13:27:28] php at tjworld dot net

Further test using DOMDocument/DOMElement...

C:\PHP\5.1.0RC5-dev>php.exe dom.php

Fatal error: extDOMElement::__construct(): Cannot write property in
C:\dom.php on line 14

--dom.php-
ownerDocument = $owner; //** this line causes a Fatal Error
 }
  //  ... more class definition here
}

$doc = new extDOMDocument('test');
$el = $doc->createElement('tagname');
?>



[2005-11-04 13:02:41] php at tjworld dot net

C:\PHP\5.1.0RC5-dev>php.exe test.php
testing...
Fatal error: Uncaught exception 'Exception' with message 'Can't
overwrite test' in C:\test.php:12
Stack trace:
#0 C:\test.php(23): ReadOnly::__set('test', 'write to me')
#1 C:\test.php(30): Writeable->__construct('write to me')
#2 {main}
  thrown in C:\test.php on line 12


---test.php--
dynamicProperty['test'] 

#35104 [Asn]: __set() and read-only property prevents proper Class inheritence

2005-11-04 Thread php at tjworld dot net
 ID:   35104
 User updated by:  php at tjworld dot net
 Reported By:  php at tjworld dot net
 Status:   Assigned
 Bug Type: Class/Object related
 Operating System: Windows 2003
 PHP Version:  5.1.0RC5
 Assigned To:  dmitry
 New Comment:

"but DOM properties CANNOT be overriden."

Does this occur anywhere else in the PHP classes or is it unique to
DOM? It's the first time I've met this situation in OO since the 80's.

It pretty much makes having the DOM object-oriented pointless, when the
base class (DOMNode) of the other significant DOM classes prevents
useful extension.

A simple solution would be to provide a courtesy:

DOMNode->__construct($ownerDocument = null);

But that'd be available to the public of course. Alternatively, 

protected DOMNode function _setOwnerDocument(DOMDocument
ownerDocument);

But thats a bit arbitary. Alternatively, solve the practical loss of
functionality by fixing the bug in importNode() so it returns an object
of the class passed in:

DOMNode DOMDocument->importNode(DOMNode $node, bool deep);

Currently it *casts* the passed $node to one of the DOM base classes it
inherited from *and* discards all their extended properties and methods,
which is surely not OO behaviour because in the following scenario, the
cases listed at the end are inconsistent:

class inChild extends DOMNode {}
class inGrandChild extends DOMElement()
class inGreatGrandChild extends inGrandChild()

$node = new DOMNode();
$element = new DOMElement();
$child = new inChild();
$grandChild = new inGrandChild();
$greatGrandChild = new inGreatGrandChild();

1. DOMDocument->importNode($node, true) instanceof DOMNode
2. DOMDocument->importNode($element, true) instanceof DOMElement
3. DOMDocument->importNode($child, true) instance of DOMNode
4. DOMDocument->importNode($grandChild, true) instanceof DOMElement
(not inGrandChild)
5. DOMDocument->importNode($greatGrandChild, true) instanceof
DOMElement (not inGreatGrandChild)

So importNode() doesn't even cast to a consistent DOMNode, but to the
'highest* level in the built-in classes.

Usually in OO although the cast is to a super-class (to guarantee
portability) the extended methods and properties aren't discarded.

If importNode() were fixed to return the same class as passed in the
following code would solve the ownerDocument issue:

importNode($ret, true); // adopt it
  // now $adopt satisfies $this->isSameNode($adopt->ownerDocument) &&
$adopt instanceof extDOMelement 
  return $adopt;
 }
}

class extDOMElement extends DOMElement {
 function __construct($name, $value=null, $namespace=null) {
  parent::__construct($name, $value, $namespaceURI);
 }
  //  ... more class definition here
}

(excuse any typo's - working weird hours!)


Previous Comments:


[2005-11-04 17:02:40] [EMAIL PROTECTED]

I can't speak for the user class example, but DOM properties CANNOT be
overriden.



[2005-11-04 16:26:34] [EMAIL PROTECTED]

Dmitry, any insight on this?




[2005-11-04 13:27:28] php at tjworld dot net

Further test using DOMDocument/DOMElement...

C:\PHP\5.1.0RC5-dev>php.exe dom.php

Fatal error: extDOMElement::__construct(): Cannot write property in
C:\dom.php on line 14

--dom.php-
ownerDocument = $owner; //** this line causes a Fatal Error
 }
  //  ... more class definition here
}

$doc = new extDOMDocument('test');
$el = $doc->createElement('tagname');
?>



[2005-11-04 13:02:41] php at tjworld dot net

C:\PHP\5.1.0RC5-dev>php.exe test.php
testing...
Fatal error: Uncaught exception 'Exception' with message 'Can't
overwrite test' in C:\test.php:12
Stack trace:
#0 C:\test.php(23): ReadOnly::__set('test', 'write to me')
#1 C:\test.php(30): Writeable->__construct('write to me')
#2 {main}
  thrown in C:\test.php on line 12


---test.php--
dynamicProperty['test'] = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(isset($this->dynamicProperty[$name]))
throw new Exception("Can't overwrite $name");

   $dynamicProperty[$name] = $value;
  }
 }
 public function __get($name) { return $this->dynamicProperty[$name];
}
}
class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this->realProperty = 25; // ok
  $this->test = $value; // causes Fatal Error
 }
 public function getReal() {return $this->realProperty; }
 public function getDynamic() {return $this->test; }
}

echo "testing...\r\n";
$test = new Writeable('write to me');
echo 'real: '.$test->getReal()."\r\n";
echo 'dynamic: '.$test->getDynamic()."\r\n";
?>



[2005-11-04 12:38:17] [EMAIL PROTECTED]

Please try using th

#35096 [Fbk->Opn]: php 4.4.2-dev has still trouble with mod_rewrite/apache2

2005-11-04 Thread rob at burningsoda dot com
 ID:   35096
 User updated by:  rob at burningsoda dot com
 Reported By:  rob at burningsoda dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: FreeBSD 6.0RC1
 PHP Version:  4CVS-2005-11-04 (snap)
 New Comment:

sniper,

This problem occurs only when using PHP 4.4.1 and the PHP 4-snapshots
_and_ apache 2.x. Why should I try a 5.x-snapshot? Do I misunderstand
you?


Previous Comments:


[2005-11-04 09:25:24] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-11-04 02:49:53] rob at burningsoda dot com

Description:

I just downloaded

Stable (4.4.x-dev)
Built On: Nov 03, 2005 23:51 GMT

and built it:

PHP 4.4.2-dev (cli) (built: Nov  4 2005 02:17:10)

But it seems like, the following bug is _not_ fixed
in that snapshot:

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

This happens with _any_ RewriteRule I use.

Reproduce code:
---
Try to use mod_rewrite on Apache 2.x to modify any URL.
Small test case:

index.php:


RewriteRule:
RewriteRule ^(.+)/$ index.php?myarg=$1 [L]

URLs to try:
1. http://localhost/index.php?myarg=bla
2. http://localhost/blub/
3. http://localhost/index.php/


Expected result:

In all three cases a document should be delivered:

1. "bla"
2. "blub"
3. "index.php"

Actual result:
--
1. Correctly delivers document.
2. No document is delivered.
3. Correctly delivers document.





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


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

2005-11-04 Thread mike
 ID:   21197
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bool at boolsite dot net
 Status:   Open
 Bug Type: Sockets related
 Operating System: *
 PHP Version:  5.*, 4.* (2005-10-29) (snap)
 New Comment:

Here's a possible patch, but Wez probably knows better if there's a way
to tell if a windows socket is in blocking mode...

Index: sockets.c
===
RCS file: /repository/php-src/ext/sockets/sockets.c,v
retrieving revision 1.171.2.2
diff -u -p -d -r1.171.2.2 sockets.c
--- sockets.c   3 Nov 2005 15:00:51 -   1.171.2.2
+++ sockets.c   4 Nov 2005 18:28:45 -
@@ -257,6 +257,12 @@ static int php_read(int bsd_socket, void
int nonblock = 0;
char *t = (char *) buf;

+/*
+ * fcntl(s, F_GETFL) will always fail for windows, and there's no way
to
+ * determine if a socket is in blocking mode to my current knowledge,
so we
+ * just omit this check; though that means we're always blocking on
win32...
+ */
+#ifndef PHP_WIN32
m = fcntl(bsd_socket, F_GETFL);
if (m < 0) {
return m;
@@ -264,6 +270,7 @@ static int php_read(int bsd_socket, void

nonblock = (m & O_NONBLOCK);
m = 0;
+#endif

set_errno(0);




Previous Comments:


[2005-11-04 16:24:47] [EMAIL PROTECTED]

See also bug #35062



[2005-09-29 16:07:34] tommyo at gmail dot com

I installed the latest windows build PHP Version 5.1.0RC2-dev and the
socket problem still exists.  I get:

Warning: socket_read() [function.socket-read]: unable to read from
socket [0]: The operation completed successfully.

When I put PHP_NORMAL_READ for the read type parameter. Using the
default or PHP_BINARY_READ works just fine for the same line of code.



[2004-03-11 11:06:02] [EMAIL PROTECTED]

I've compilled PHP with cygwin/gcc and no error is produced. However,
the build version from snaps.php.net gives that error.



[2003-08-26 02:00:58] bool at boolsite dot net

Ok, this is a short example : (a little echo server)

 Debut de la connexion...',"\r\n";
$EndTime=time()+15;
do{
$buffer=socket_read($MsgSock,1024,PHP_NORMAL_READ);
if($buffer===false) {
echo 'socket_read() a échoué :
',socket_strerror(socket_last_error($MsgSock)),"\r\n";
break;
}
elseif(!$buffer){
continue;
}
$buffer=trim($buffer);
echo '< ',$buffer,"\r\n";
if($buffer=='quit') {
break;
}

$back='You sent : ['.$buffer.']';

echo '> ',$back,"\r\n";
socket_write($MsgSock,$back."\r\n");
} while(time()<$EndTime);

@socket_close($MsgSock);
echo '=> End...',"\r\n";
}
}
socket_close($Sock);
?>



[2002-12-26 20:39:22] [EMAIL PROTECTED]

If you omit the third parameter to socket_read() it seems to work fine.
However, adding PHP_NORMAL_READ causes error as described in the bug
report.



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=21197&edit=1


#35108 [Opn]: PHP Warning: mail() [function.mail]: SMTP server response: 501 Syntax error in

2005-11-04 Thread theintunoo at brightwing dot jp
 ID:   35108
 User updated by:  theintunoo at brightwing dot jp
 Reported By:  theintunoo at brightwing dot jp
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: sever 2003
 PHP Version:  5.1.0RC4
 New Comment:

PHP Warning: mail() [function.mail]: SMTP server response: 501 Syntax
error in parameters or arguments in C:\Program


Previous Comments:


[2005-11-04 18:47:21] theintunoo at brightwing dot jp

Description:

php.ini 


Expected result:

open php.ini file 
search this line ;sendmail_from = [EMAIL PROTECTED]
after replace as like 
sendmail_from = [EMAIL PROTECTED]
release this ; mark only your php.ini file 
where php.ini 







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


#35108 [NEW]: PHP Warning: mail() [function.mail]: SMTP server response: 501 Syntax error in

2005-11-04 Thread theintunoo at brightwing dot jp
From: theintunoo at brightwing dot jp
Operating system: sever 2003
PHP version:  5.1.0RC4
PHP Bug Type: Scripting Engine problem
Bug description:  PHP Warning: mail() [function.mail]: SMTP server response: 
501 Syntax error in 

Description:

php.ini 


Expected result:

open php.ini file 
search this line ;sendmail_from = [EMAIL PROTECTED]
after replace as like 
sendmail_from = [EMAIL PROTECTED]
release this ; mark only your php.ini file 
where php.ini 



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


#26286 [Com]: Parent: child process exited with status 3221225477 -- Restarting

2005-11-04 Thread adrian dot price at gmail dot com
 ID:   26286
 Comment by:   adrian dot price at gmail dot com
 Reported By:  igg10 at alu dot ua dot es
 Status:   No Feedback
 Bug Type: Apache2 related
 Operating System: Windows 2000
 PHP Version:  4.3.4
 New Comment:

I'm experiencing the same issue with WinXP SP2, Apache 2.0.54, MySQL
4.1.14 and PHP 5.0.5. I get the same errors in my logfile. It fairly
intermittent so very difficult to track down, but it seems to happen
the first time I try to read a SHMOP block after it's been written,
*sometimes*. Sometimes the first read is just fine. As far as I can
tell, when it does happen, it seems to always be on the first read.
It's definitely somehow related to SHMOP, because if I disable the part
of my app using SHMOP the error stops occurring. This is endlessly
frustrating not because of the times it doesn't work, but because of
all the times it does - I nearly have a working feature that nets a
significant performance boost, but it's too unpredictable for
production use :(


Previous Comments:


[2005-10-24 04:34:41] maranax at mail dot ru

Hello, I'v just had this bug and found something interesting. I'm
using:
windows 2000
apache 2.0.55
php 5.0.5
interbase 7.1 SP2
And what I found: if I use keyword BOOLEAN in difinitions of my DB
tables or in the parameters in stored procedures than this bug happens
!
I changed BOOLEN to INTEGER and it disappeared !
Son I'll try to use BOOLEAN again (in another table) and check out
whether it will cause the bug to happen.



[2005-10-10 07:02:03] Austin519 at aol dot com

Ok...turns out for me at least the problem was Zend.  I uninstalled it
(removed it from php.ini to test first) and it worked fine.  Guess I'll
just have to do without Zend.

Austin519



[2005-10-10 06:44:59] Austin519 at aol dot com

I'm having this exact same problem running Win XP Pro SP2, Apache
2.0.54, and PHP 5.0.4.  This happens specifically when I'm trying to
use the search function within Gallery2 (menalto.gallery.com).



[2005-10-03 11:38:52] mark dot pearson at capita dot co dot uk

I forgot to add that the script submitted in my last message:

$excel = new COM('Excel.Application')

works perfectly when run from the command line.



[2005-10-03 11:20:36] mark dot pearson at capita dot co dot uk

Description: Apache 2 crashes

PHP 4.3.11 as module on Apache 2.0.54 on Windows XP Pro
SP2.

Script which causes crash:

- START -
$excel = new COM("Excel.Application");
-  END  -

Apache error log output:

[Mon Oct 03 10:03:10 2005] [notice] Parent: child process exited with
status 3221225477 -- Restarting.

Reproducable? Yes, 100%

Details:
What happens is that Dr Watson (DW20.exe) reports that 'Microsoft Excel
has encountered a problem and needs to close'.

Then approximately 30 seconds later Apache crashes with the
error log output given above. This occurs momentarily after the CPU
usage for svchost.exe jumps to 100%.

Hope this helps somebody to close this bug one way or the other.



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

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


#35107 [Fbk->Opn]: compile failure with PHP 5.1 + MySQL 5

2005-11-04 Thread alex at whitewhale dot net
 ID:   35107
 User updated by:  alex at whitewhale dot net
 Reported By:  alex at whitewhale dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: MacOS X 10.4.3
 PHP Version:  5.1.0RC4
 New Comment:

Tried that configure line. No, now it fails with:

/usr/bin/ld: warning multiple definitions of symbol _regcomp
/usr/sbin/httpd definition of _regcomp
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regcomp.So) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec
/usr/sbin/httpd definition of _regexec
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regexec.So) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree
/usr/sbin/httpd definition of _regfree
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regfree.So) definition of _regfree
/usr/bin/ld: Undefined symbols:
_spl_ce_RuntimeException
_spl_ce_Countable
_php_pcre_replace
_php_ob_gzhandler_check
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1

BTW, I may have been wrong to say RC3 compiled. I'm 
currently running RC3 w/ MySQL 5 but I think that I may have 
installed MySQL 5 after RC 3 was already compiled and 
installed with 4.1.x.

Also, I recently upgraded to MacOS X 10.4.3, if that has 
anything to do with it.


Previous Comments:


[2005-11-04 18:20:06] [EMAIL PROTECTED]

Does this configure line work any better:

# rm config.cache
# ./configure --disable-all --with-apxs=/usr/sbin/apxs \
--with-mysqli=/usr/local/mysql/bin/mysql_config




[2005-11-04 17:40:02] alex at whitewhale dot net

Description:

Not very knowledgeable about compiler issues, but: getting a 
compile failure on MacOS X related to MySQL. PHP 5.1 RC3 
compiled with MySQL 5 successfully, but RC4 and a snapshot 
from this morning both fail using the following configure 
line:

./configure --with-apxs=/usr/sbin/apxs --prefix=/usr --enable-
inline-optimization --with-libxml-dir=/sw --with-mysqli=/usr/
local/mysql/bin/mysql_config --with-gd --with-jpeg-dir=/sw --
with-png-dir=/sw --with-zlib-dir=/usr --with-pdo-mysql --with-
xmlrpc --with-mm=/usr/local --disable-debug --with-ldap --
enable-soap

Reproduce code:
---
make

Expected result:

a successful compile

Actual result:
--
/usr/bin/ld: warning multiple definitions of symbol _regcomp
/usr/sbin/httpd definition of _regcomp
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regcomp.So) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec
/usr/sbin/httpd definition of _regexec
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regexec.So) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree
/usr/sbin/httpd definition of _regfree
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regfree.So) definition of _regfree
/usr/bin/ld: Undefined symbols:
_mysql_get_character_set_info
_mysql_set_character_set
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1





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


#35099 [Bgs]: After Upgrade Applications Timeout after session_start() Called.

2005-11-04 Thread webmaster at rdc dot ab dot ca
 ID:   35099
 User updated by:  webmaster at rdc dot ab dot ca
 Reported By:  webmaster at rdc dot ab dot ca
 Status:   Bogus
 Bug Type: Session related
 Operating System: FreeBSD 4.9-STABLE
 PHP Version:  4.4.1
 New Comment:

> I did try removing the Zend Optimizer, 

Bogus? Maybe I will reword this.

I REMOVED the Zend Optimizer and the problem STILL OCCURRED.

A key point her folks:

./php-4.4.0/
gmake install
cd ../apache-1.3.34
sh config.ourSpecificConfig
gmake
/usr/local/apache/bin/apachectrl stop
gmake install
/usr/local/apache/bin/apachectrl start
**RELOAD THE PAGE WORKS**

-- VERSUS -- 

./php-4.4.1/
gmake install
cd ../apache-1.3.34
sh config.ourSpecificConfig
gmake
/usr/local/apache/bin/apachectrl stop
gmake install
/usr/local/apache/bin/apachectrl start
**RELOAD THE PAGE FAILS**

What would you do Derick?


Previous Comments:


[2005-11-04 09:04:06] [EMAIL PROTECTED]

Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader.  These extensions often modify engine
behavior which is not related to PHP itself.

.



[2005-11-04 06:15:08] webmaster at rdc dot ab dot ca

Description:

Previously to upgrading php-4.4.1 we had no apparent problems with the
php session_start() function. After the upgrade we noticed that this
one specific script was starting to fail at random occurrences on a
production web page.

I did try removing the Zend Optimizer, changing the max_execution
setting and remming out the session_start() function. In all cases the
only difference was the remming out of the session_start().

Currently we have downgraded to php 4.4.0, everything works fine again,
but are nervous about the security issues attached to that.

NOTE: It does look similar to #17451, I'm confused about why the
difference between 4.4.0 and 4.4.1 and hence submitting this.

## Configure Line 

./configure  
--with-mysql=/usr/local/mysql/ 
--with-apache=../apache_1.3.34 --with-jpeg-dir=/usr/local/include
--with-png-dir=/usr/local/include
--with-freetype-dir=/usr/local/include/freetype2
--with-ttf=/usr/local/ttf 
--enable-shmop 
--with-zlib-dir=/usr/local/zlib/ 
--with-mcrypt 
--with-openssl=/usr/local/ssl/

## Unique information...

## Unique PHP.INI information...

zend_optimizer.version=2.5.10a
session.cache_expire = 15
output_buffering = 4096
allow_call_time_pass_reference = Off
memory_limit = 16M (1024MB Base Ram)
display_errors = Off
log_errors = On
error_log = "OUR_LOCAL_PATH"
variables_order = "GPCS"
register_globals = On <<-- php_value register_globals 0 in apache.
register_argc_argv = Off
default_socket_timeout = 60
session.save_path = /tmp <<-- chmod'd 1777
max_execution_time = 30


Reproduce code:
---
## Sample Script

\n"); // Doesn't get here.
  exit();
?>

Expected result:

Got here!

Actual result:
--
Times out.





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


#35107 [Opn->Fbk]: compile failure with PHP 5.1 + MySQL 5

2005-11-04 Thread sniper
 ID:   35107
 Updated by:   [EMAIL PROTECTED]
 Reported By:  alex at whitewhale dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: MacOS X 10.4.3
 PHP Version:  5.1.0RC4
 New Comment:

Does this configure line work any better:

# rm config.cache
# ./configure --disable-all --with-apxs=/usr/sbin/apxs \
--with-mysqli=/usr/local/mysql/bin/mysql_config



Previous Comments:


[2005-11-04 17:40:02] alex at whitewhale dot net

Description:

Not very knowledgeable about compiler issues, but: getting a 
compile failure on MacOS X related to MySQL. PHP 5.1 RC3 
compiled with MySQL 5 successfully, but RC4 and a snapshot 
from this morning both fail using the following configure 
line:

./configure --with-apxs=/usr/sbin/apxs --prefix=/usr --enable-
inline-optimization --with-libxml-dir=/sw --with-mysqli=/usr/
local/mysql/bin/mysql_config --with-gd --with-jpeg-dir=/sw --
with-png-dir=/sw --with-zlib-dir=/usr --with-pdo-mysql --with-
xmlrpc --with-mm=/usr/local --disable-debug --with-ldap --
enable-soap

Reproduce code:
---
make

Expected result:

a successful compile

Actual result:
--
/usr/bin/ld: warning multiple definitions of symbol _regcomp
/usr/sbin/httpd definition of _regcomp
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regcomp.So) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec
/usr/sbin/httpd definition of _regexec
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regexec.So) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree
/usr/sbin/httpd definition of _regfree
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regfree.So) definition of _regfree
/usr/bin/ld: Undefined symbols:
_mysql_get_character_set_info
_mysql_set_character_set
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1





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


#35107 [NEW]: compile failure with PHP 5.1 + MySQL 5

2005-11-04 Thread alex at whitewhale dot net
From: alex at whitewhale dot net
Operating system: MacOS X 10.4.3
PHP version:  5.1.0RC4
PHP Bug Type: Compile Failure
Bug description:  compile failure with PHP 5.1 + MySQL 5

Description:

Not very knowledgeable about compiler issues, but: getting a 
compile failure on MacOS X related to MySQL. PHP 5.1 RC3 
compiled with MySQL 5 successfully, but RC4 and a snapshot 
from this morning both fail using the following configure 
line:

./configure --with-apxs=/usr/sbin/apxs --prefix=/usr --enable-
inline-optimization --with-libxml-dir=/sw --with-mysqli=/usr/
local/mysql/bin/mysql_config --with-gd --with-jpeg-dir=/sw --
with-png-dir=/sw --with-zlib-dir=/usr --with-pdo-mysql --with-
xmlrpc --with-mm=/usr/local --disable-debug --with-ldap --
enable-soap

Reproduce code:
---
make

Expected result:

a successful compile

Actual result:
--
/usr/bin/ld: warning multiple definitions of symbol _regcomp
/usr/sbin/httpd definition of _regcomp
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regcomp.So) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec
/usr/sbin/httpd definition of _regexec
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regexec.So) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree
/usr/sbin/httpd definition of _regfree
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regfree.So) definition of _regfree
/usr/bin/ld: Undefined symbols:
_mysql_get_character_set_info
_mysql_set_character_set
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1

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


#34656 [Com]: open_basedir restriction in effect although paths are set correctly

2005-11-04 Thread jf at probe-networks dot de
 ID:   34656
 Comment by:   jf at probe-networks dot de
 Reported By:  wolfram at schlich dot org
 Status:   Feedback
 Bug Type: Safe Mode/open_basedir
 Operating System: Linux 2.2.16 i586
 PHP Version:  4.4.1
 New Comment:

Btw, i've also tried the snapshots (4.4.2-dev) from snaps.php.net, but
these also do not fix the bug.


Previous Comments:


[2005-11-04 16:32:38] info at wiredtek dot info

same problem here with php 5.0.5 on a Gentoo box and apache 2.0.54

for each virtual hosts i set the open_basedir via Apache conf:


ServerName xx
DocumentRoot "/home/administrator/"
php_admin_value open_basedir .:/home/administrator/:/usr/share/php


(php.ini: no open_basedir specified, include_path =
".:/usr/share/php/", no safe mode)

all work with php 4.3.11, but upgrading to php 5.0.5 i give a lot of
warnings about open_basedir restrictions in /usr/share/php.

in /usr/share/php there is the PEAR classes repository.
php 4.x is able to include PEAR classes from /usr/share/php, but php5
is able to pick up only first level files, not the one present in the
subfolders; for example php5 is able to include /usr/share/php/PEAR.php
but not /usr/share/XML/Serializer.php showing me the open_basedir
restrictions.

I can fix the problem with 

php_admin_value open_basedir none

in the Apache configuration, but it is not safe, and it is not what i
need.

There is a patch for this?



[2005-11-04 16:04:24] jf at probe-networks dot de

I can confirm this, PHP 4.4.1 seems to have major problems with
(atleast) open_basedir. It seems to ignore path's set via httpd.conf.
The following is from 4.4.1 using Confixx 3.1 (very famous server
administration frontend):

[04-Nov-2005 15:39:10] PHP Warning:  main(): Failed opening
'../settings.inc.php' for inclusion
(include_path='.:/srv/www/htdocs/confixx/html/include:/srv/www/htdocs/confixx/html')
in /srv/www/htdocs/confixx/html/reseller/auth.php on line 75
[04-Nov-2005 15:39:10] PHP Warning:  main(): open_basedir restriction
in effect. File(../functions.inc.php) is not within the allowed
path(s): (/srv/www/htdocs/confixx) in
/srv/www/htdocs/confixx/html/reseller/auth.php on line 76
[04-Nov-2005 15:39:10] PHP Warning:  main(../functions.inc.php): failed
to open stream: Operation not permitted in
/srv/www/htdocs/confixx/html/reseller/auth.php on line 76
[04-Nov-2005 15:39:10] PHP Warning:  main(): Failed opening
'../functions.inc.php' for inclusion
(include_path='.:/srv/www/htdocs/confixx/html/include:/srv/www/htdocs/confixx/html')
in /srv/www/htdocs/confixx/html/reseller/auth.php on line 76
[04-Nov-2005 15:39:10] PHP Warning:  main(): open_basedir restriction
in effect. File(../sessions.inc.php) is not within the allowed path(s):
(/srv/www/htdocs/confixx) in
/srv/www/htdocs/confixx/html/reseller/auth.php on line 77
[04-Nov-2005 15:39:10] PHP Warning:  main(../sessions.inc.php): failed
to open stream: Operation not permitted in
/srv/www/htdocs/confixx/html/reseller/auth.php on line 77
[04-Nov-2005 15:39:10] PHP Warning:  main(): Failed opening
'../sessions.inc.php' for inclusion
(include_path='.:/srv/www/htdocs/confixx/html/include:/srv/www/htdocs/confixx/html')
in /srv/www/htdocs/confixx/html/reseller/auth.php on line 77
[04-Nov-2005 15:39:10] PHP Fatal error:  Call to undefined function: 
db_connect() in /srv/www/htdocs/confixx/html/reseller/auth.php on line
79

reseller/auth.php:
Starting Line 73:$PHP_AUTH_USER = $PHP_AUTH_PW = '';
 
include("../settings.inc.php");
include("../functions.inc.php");
include('../sessions.inc.php');

db_connect($db_host, $db_user, $db_pass);

sessao_start();



[2005-11-02 14:43:40] troy at riq dot qc dot ca

Hi,

I always have open_basedir set to "/webdir/htdocs/" in the php.ini and
for each website, a more precise open_basedir like
"/webdir/htdocs/site1" set in httpd.conf.
With 4.3.11 that work like I expect.



[2005-11-01 22:34:00] [EMAIL PROTECTED]

Does it work if you set the open_basedir in php.ini ?




[2005-11-01 22:19:12] troy at riq dot qc dot ca

I just backtrack to a old version because 4.4.1 seem buggy with
open_basedir.
"../scripts/Connect.php" is in the open_basedir but 4.4.1 refuse it.
BTW, the open_basedir is set via apache httpd.conf and have always
work.

PHP Warning:  main(): open_basedir restriction in effect.
File(../scripts/Connect.php) is not within the allowed path(s):
(/webdir/htdocs/site3/) in /webdir/htdocs/site3/something/page.php on
line 2

PHP Warning:  main(../scripts/Connect.php): failed to open stream:
Operation not permitted in /webdir/htdocs/site3/something/page.php on
line 2

PHP Warning:  main(): Failed o

#35106 [Opn->Fbk]: nested foreach fails when the array was sometime before referenced

2005-11-04 Thread derick
 ID:   35106
 Updated by:   [EMAIL PROTECTED]
 Reported By:  olympnn at nm dot ru
-Status:   Open
+Status:   Feedback
 Bug Type: Arrays related
 Operating System: Windows XP Sp2
 PHP Version:  5.0.5
 New Comment:

Please try using this CVS snapshot:

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


Previous Comments:


[2005-11-04 16:57:11] olympnn at nm dot ru

Description:

When I execute the code, it seems that the outer foreach is executed
only once. When I comment any of lines marked *, the (outer) foreach
executes twice.

This bug seems to be very like to bug # 21702, but here the situation
is much more strange: I do not use $b in foreaches at all! So it's very
strange that the foreach behavior differs when the array was referenced
sometime or not.

Thanks.

Reproduce code:
---


Expected result:

12

Actual result:
--
1





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


#35104 [Asn]: __set() and read-only property prevents proper Class inheritence

2005-11-04 Thread rrichards
 ID:   35104
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at tjworld dot net
 Status:   Assigned
 Bug Type: Class/Object related
 Operating System: Windows 2003
 PHP Version:  5.1.0RC5
 Assigned To:  dmitry
 New Comment:

I can't speak for the user class example, but DOM properties CANNOT be
overriden.


Previous Comments:


[2005-11-04 16:26:34] [EMAIL PROTECTED]

Dmitry, any insight on this?




[2005-11-04 13:27:28] php at tjworld dot net

Further test using DOMDocument/DOMElement...

C:\PHP\5.1.0RC5-dev>php.exe dom.php

Fatal error: extDOMElement::__construct(): Cannot write property in
C:\dom.php on line 14

--dom.php-
ownerDocument = $owner; //** this line causes a Fatal Error
 }
  //  ... more class definition here
}

$doc = new extDOMDocument('test');
$el = $doc->createElement('tagname');
?>



[2005-11-04 13:02:41] php at tjworld dot net

C:\PHP\5.1.0RC5-dev>php.exe test.php
testing...
Fatal error: Uncaught exception 'Exception' with message 'Can't
overwrite test' in C:\test.php:12
Stack trace:
#0 C:\test.php(23): ReadOnly::__set('test', 'write to me')
#1 C:\test.php(30): Writeable->__construct('write to me')
#2 {main}
  thrown in C:\test.php on line 12


---test.php--
dynamicProperty['test'] = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(isset($this->dynamicProperty[$name]))
throw new Exception("Can't overwrite $name");

   $dynamicProperty[$name] = $value;
  }
 }
 public function __get($name) { return $this->dynamicProperty[$name];
}
}
class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this->realProperty = 25; // ok
  $this->test = $value; // causes Fatal Error
 }
 public function getReal() {return $this->realProperty; }
 public function getDynamic() {return $this->test; }
}

echo "testing...\r\n";
$test = new Writeable('write to me');
echo 'real: '.$test->getReal()."\r\n";
echo 'dynamic: '.$test->getDynamic()."\r\n";
?>



[2005-11-04 12:38:17] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-11-04 11:49:33] php at tjworld dot net

Description:

When extending a class that has a visible (public or protected)
read-only dynamic property by virtue of __set(), the sub-class is
prevented from modifying (or "overloading") the property as if it were
merely a public consumer of an instance-object of super, rather than an
extension of the class definition itself.

This shows up in particular in the DOM classes DOMNode and DOMDocument,
where it causes:

Fatal error: extDOMElement::__construct() [function.--construct]:
Cannot write property in...

If you extend both classes, and try to create a new derived extDOMNode
object using a custom  extDOMDocument->createElement(), it is
impossible to set any of the new extDOMNode's dynamic properties from
within extDOMNode's constructor (especially ownerDocument) because
DOMNodes without an owner are forced to be read-only.

The extDOMNode class definition should be able to modify the publically
visible ownerDocument property.

Since real properties accessible from a sub-class can't be private (if
they're to be accessible from other objects), it follows that the same
rule should apply to dynamic properties. If this were so the dynamic
properties made visible by __set() would be inherited as protected or
public  and this issue wouldn't arise.

Reproduce code:
---
class ReadOnly {
 protected $realProperty;
 private $dynamicProperty = array();
 function __construct() {
  $realProperty = 12;
  $this->members['test'] = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(isset($this->dynamicProperty[$name]))
throw new Exception("Can't overwrite $name");  

   $props[$name] = $value;
  }
 }
}
class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this->realProperty = 25; // ok
  $this->test = $value; // causes Fatal Error
 }
}

$test = new Writeable('write to me');

Expected result:

The extended class should be able to inherit and modify protected or
public properties of the super class.

Actual result:
--
For built-in classes causes a Fatal Error. For user defined classes
causes a user-defined read-only result. In the example causes an
Exception.





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

#35106 [NEW]: nested foreach fails when the array was sometime before referenced

2005-11-04 Thread olympnn at nm dot ru
From: olympnn at nm dot ru
Operating system: Windows XP Sp2
PHP version:  5.0.5
PHP Bug Type: Arrays related
Bug description:  nested foreach fails when the array was sometime before 
referenced

Description:

When I execute the code, it seems that the outer foreach is executed only
once. When I comment any of lines marked *, the (outer) foreach executes
twice.

This bug seems to be very like to bug # 21702, but here the situation is
much more strange: I do not use $b in foreaches at all! So it's very
strange that the foreach behavior differs when the array was referenced
sometime or not.

Thanks.

Reproduce code:
---


Expected result:

12

Actual result:
--
1

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


#34656 [Com]: open_basedir restriction in effect although paths are set correctly

2005-11-04 Thread info at wiredtek dot info
 ID:   34656
 Comment by:   info at wiredtek dot info
 Reported By:  wolfram at schlich dot org
 Status:   Feedback
 Bug Type: Safe Mode/open_basedir
 Operating System: Linux 2.2.16 i586
 PHP Version:  4.4.1
 New Comment:

same problem here with php 5.0.5 on a Gentoo box and apache 2.0.54

for each virtual hosts i set the open_basedir via Apache conf:


ServerName xx
DocumentRoot "/home/administrator/"
php_admin_value open_basedir .:/home/administrator/:/usr/share/php


(php.ini: no open_basedir specified, include_path =
".:/usr/share/php/", no safe mode)

all work with php 4.3.11, but upgrading to php 5.0.5 i give a lot of
warnings about open_basedir restrictions in /usr/share/php.

in /usr/share/php there is the PEAR classes repository.
php 4.x is able to include PEAR classes from /usr/share/php, but php5
is able to pick up only first level files, not the one present in the
subfolders; for example php5 is able to include /usr/share/php/PEAR.php
but not /usr/share/XML/Serializer.php showing me the open_basedir
restrictions.

I can fix the problem with 

php_admin_value open_basedir none

in the Apache configuration, but it is not safe, and it is not what i
need.

There is a patch for this?


Previous Comments:


[2005-11-04 16:04:24] jf at probe-networks dot de

I can confirm this, PHP 4.4.1 seems to have major problems with
(atleast) open_basedir. It seems to ignore path's set via httpd.conf.
The following is from 4.4.1 using Confixx 3.1 (very famous server
administration frontend):

[04-Nov-2005 15:39:10] PHP Warning:  main(): Failed opening
'../settings.inc.php' for inclusion
(include_path='.:/srv/www/htdocs/confixx/html/include:/srv/www/htdocs/confixx/html')
in /srv/www/htdocs/confixx/html/reseller/auth.php on line 75
[04-Nov-2005 15:39:10] PHP Warning:  main(): open_basedir restriction
in effect. File(../functions.inc.php) is not within the allowed
path(s): (/srv/www/htdocs/confixx) in
/srv/www/htdocs/confixx/html/reseller/auth.php on line 76
[04-Nov-2005 15:39:10] PHP Warning:  main(../functions.inc.php): failed
to open stream: Operation not permitted in
/srv/www/htdocs/confixx/html/reseller/auth.php on line 76
[04-Nov-2005 15:39:10] PHP Warning:  main(): Failed opening
'../functions.inc.php' for inclusion
(include_path='.:/srv/www/htdocs/confixx/html/include:/srv/www/htdocs/confixx/html')
in /srv/www/htdocs/confixx/html/reseller/auth.php on line 76
[04-Nov-2005 15:39:10] PHP Warning:  main(): open_basedir restriction
in effect. File(../sessions.inc.php) is not within the allowed path(s):
(/srv/www/htdocs/confixx) in
/srv/www/htdocs/confixx/html/reseller/auth.php on line 77
[04-Nov-2005 15:39:10] PHP Warning:  main(../sessions.inc.php): failed
to open stream: Operation not permitted in
/srv/www/htdocs/confixx/html/reseller/auth.php on line 77
[04-Nov-2005 15:39:10] PHP Warning:  main(): Failed opening
'../sessions.inc.php' for inclusion
(include_path='.:/srv/www/htdocs/confixx/html/include:/srv/www/htdocs/confixx/html')
in /srv/www/htdocs/confixx/html/reseller/auth.php on line 77
[04-Nov-2005 15:39:10] PHP Fatal error:  Call to undefined function: 
db_connect() in /srv/www/htdocs/confixx/html/reseller/auth.php on line
79

reseller/auth.php:
Starting Line 73:$PHP_AUTH_USER = $PHP_AUTH_PW = '';
 
include("../settings.inc.php");
include("../functions.inc.php");
include('../sessions.inc.php');

db_connect($db_host, $db_user, $db_pass);

sessao_start();



[2005-11-02 14:43:40] troy at riq dot qc dot ca

Hi,

I always have open_basedir set to "/webdir/htdocs/" in the php.ini and
for each website, a more precise open_basedir like
"/webdir/htdocs/site1" set in httpd.conf.
With 4.3.11 that work like I expect.



[2005-11-01 22:34:00] [EMAIL PROTECTED]

Does it work if you set the open_basedir in php.ini ?




[2005-11-01 22:19:12] troy at riq dot qc dot ca

I just backtrack to a old version because 4.4.1 seem buggy with
open_basedir.
"../scripts/Connect.php" is in the open_basedir but 4.4.1 refuse it.
BTW, the open_basedir is set via apache httpd.conf and have always
work.

PHP Warning:  main(): open_basedir restriction in effect.
File(../scripts/Connect.php) is not within the allowed path(s):
(/webdir/htdocs/site3/) in /webdir/htdocs/site3/something/page.php on
line 2

PHP Warning:  main(../scripts/Connect.php): failed to open stream:
Operation not permitted in /webdir/htdocs/site3/something/page.php on
line 2

PHP Warning:  main(): Failed opening '../scripts/Connect.php' for
inclusion (include_path='.:/webapp/lib/php') in
/webdir/htdocs/site3/something/page.php on line 2

Hope it will be fix soon!
Have a nice day.

-

#35103 [Opn->Asn]: mysqli bind_result incorrectly handles unsigned int

2005-11-04 Thread sniper
 ID:   35103
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at pjberkel dot com
-Status:   Open
+Status:   Assigned
 Bug Type: MySQLi related
 Operating System: *
 PHP Version:  5CVS-2005-11-04 (cvs)
 Assigned To:  andrey


Previous Comments:


[2005-11-04 15:53:27] [EMAIL PROTECTED]

if your code is aware that the variable is unsigned you can get the
unsigned value by using sprintf() with %u as format specificator
[EMAIL PROTECTED]:~/test> php -r '$a=-2; printf("%d %u\n", $a, $a);'
-2 4294967294

However I think it is good idea to make that implicit so mysqli to
return a string (on 32bit) and normal int (on 64bit).




[2005-11-04 12:46:29] php at pjberkel dot com

Compiling the current php5 STABLE CVS snapshot version under RHEL 4
yields the same incorrect results as before: using "var_dump" instead
of "print" in the original example gives the results:

int(2147483647)
int(-2147483648)
int(-2147483647)
int(-494965764)
int(-394965015)
int(-1)



[2005-11-04 11:17:12] php at pjberkel dot com

Description:

When using "mysqli_stmt_bind_result" to retrieve a 32bit unsigned
integer value from a mysql database (version 4.1.13-standard) that is
greater than the maximum *signed* value but less than the maximum
*unsigned* value (i.e. 2147483647 < int <= 4294967295), the integer is
returned incorrectly as a signed value.

I did read in the manual that php does not support unsigned integers
(http://www.php.net/manual/en/language.types.integer.php), however in
this case, mysqli_stmt_bind_result should probably cast the result to a
float.


Reproduce code:
---
query("CREATE TABLE temp (id INT UNSIGNED NOT NULL)");
$mysqli->query("INSERT INTO temp (id) VALUES
(2147483647),(2147483648),(2147483649),(381532),(392281),(4294967295)");

/* BEGIN EXAMPLE OF BUG */
$stmt = $mysqli->prepare("SELECT id FROM temp");
$stmt->execute();
$stmt->bind_result($id);
while ($stmt->fetch()) {
print $id . "\n";
}
$stmt->close();
/* END EXAMPLE OF BUG */

$mysqli->query("DROP TABLE temp");
$mysqli->close();

?>


Expected result:

2147483647
2147483648
2147483649
381532
392281
4294967295


Actual result:
--
2147483647
-2147483648
-2147483647
-494965764
-394965015
-1






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


#35104 [Opn->Asn]: __set() and read-only property prevents proper Class inheritence

2005-11-04 Thread sniper
 ID:   35104
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at tjworld dot net
-Status:   Open
+Status:   Assigned
 Bug Type: Class/Object related
 Operating System: Windows 2003
 PHP Version:  5.1.0RC5
-Assigned To:  
+Assigned To:  dmitry
 New Comment:

Dmitry, any insight on this?



Previous Comments:


[2005-11-04 13:27:28] php at tjworld dot net

Further test using DOMDocument/DOMElement...

C:\PHP\5.1.0RC5-dev>php.exe dom.php

Fatal error: extDOMElement::__construct(): Cannot write property in
C:\dom.php on line 14

--dom.php-
ownerDocument = $owner; //** this line causes a Fatal Error
 }
  //  ... more class definition here
}

$doc = new extDOMDocument('test');
$el = $doc->createElement('tagname');
?>



[2005-11-04 13:02:41] php at tjworld dot net

C:\PHP\5.1.0RC5-dev>php.exe test.php
testing...
Fatal error: Uncaught exception 'Exception' with message 'Can't
overwrite test' in C:\test.php:12
Stack trace:
#0 C:\test.php(23): ReadOnly::__set('test', 'write to me')
#1 C:\test.php(30): Writeable->__construct('write to me')
#2 {main}
  thrown in C:\test.php on line 12


---test.php--
dynamicProperty['test'] = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(isset($this->dynamicProperty[$name]))
throw new Exception("Can't overwrite $name");

   $dynamicProperty[$name] = $value;
  }
 }
 public function __get($name) { return $this->dynamicProperty[$name];
}
}
class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this->realProperty = 25; // ok
  $this->test = $value; // causes Fatal Error
 }
 public function getReal() {return $this->realProperty; }
 public function getDynamic() {return $this->test; }
}

echo "testing...\r\n";
$test = new Writeable('write to me');
echo 'real: '.$test->getReal()."\r\n";
echo 'dynamic: '.$test->getDynamic()."\r\n";
?>



[2005-11-04 12:38:17] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-11-04 11:49:33] php at tjworld dot net

Description:

When extending a class that has a visible (public or protected)
read-only dynamic property by virtue of __set(), the sub-class is
prevented from modifying (or "overloading") the property as if it were
merely a public consumer of an instance-object of super, rather than an
extension of the class definition itself.

This shows up in particular in the DOM classes DOMNode and DOMDocument,
where it causes:

Fatal error: extDOMElement::__construct() [function.--construct]:
Cannot write property in...

If you extend both classes, and try to create a new derived extDOMNode
object using a custom  extDOMDocument->createElement(), it is
impossible to set any of the new extDOMNode's dynamic properties from
within extDOMNode's constructor (especially ownerDocument) because
DOMNodes without an owner are forced to be read-only.

The extDOMNode class definition should be able to modify the publically
visible ownerDocument property.

Since real properties accessible from a sub-class can't be private (if
they're to be accessible from other objects), it follows that the same
rule should apply to dynamic properties. If this were so the dynamic
properties made visible by __set() would be inherited as protected or
public  and this issue wouldn't arise.

Reproduce code:
---
class ReadOnly {
 protected $realProperty;
 private $dynamicProperty = array();
 function __construct() {
  $realProperty = 12;
  $this->members['test'] = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(isset($this->dynamicProperty[$name]))
throw new Exception("Can't overwrite $name");  

   $props[$name] = $value;
  }
 }
}
class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this->realProperty = 25; // ok
  $this->test = $value; // causes Fatal Error
 }
}

$test = new Writeable('write to me');

Expected result:

The extended class should be able to inherit and modify protected or
public properties of the super class.

Actual result:
--
For built-in classes causes a Fatal Error. For user defined classes
causes a user-defined read-only result. In the example causes an
Exception.





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


#35105 [Opn->Asn]: stream_set_timeout has no effect on SSL stream

2005-11-04 Thread sniper
 ID:   35105
 Updated by:   [EMAIL PROTECTED]
 Reported By:  wckits at rit dot edu
-Status:   Open
+Status:   Assigned
 Bug Type: Sockets related
 Operating System: SunOS 5.9
 PHP Version:  5.0.5
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the streams author and maintainer.



Previous Comments:


[2005-11-04 15:07:58] wckits at rit dot edu

Description:

A stream opened with stream_socket_client("ssl://. will not timeout
when reading.

This may have a similar underlying cause to bug #23618 but it is
exposed differently, and is still a problem in 5.0.5.

Reproduce code:
---
#!/bin/php-5.0.5/sapi/cli/php
array(
'verify_peer' => false,
'allow_self_signed' => true,
)
));
print "Creating socket\n";
$socket = stream_socket_client( "ssl://www.rit.edu:443", &$errno,
&$errstr, 10, STREAM_CLIENT_CONNECT, $ctx );
print "Setting timeout\n";
var_dump(stream_set_timeout( $socket, 5 ));
print "Sending bogus request\n";
fwrite($socket, "GET nourl Cupcakes/2.5\n\n\n\n" );
print "Reading Result\n";
var_dump(fgets( $socket));

//Now conenct and read when we know the server isnt going to send
anything

print "Creating NEW socket\n";
$socket = stream_socket_client( "ssl://www.rit.edu:443", &$errno,
&$errstr, 10, STREAM_CLIENT_CONNECT, $ctx );
print "Setting timeout\n";
var_dump(stream_set_timeout( $socket, 5 ));
print "Sending NO request\n";
print "Read should time out in 5\n";
var_dump(fgets( $socket));
?>


Expected result:

The first section will run and print an HTTP error. The second section
will run and timeout after printing "Read should timeout in 5..."

Actual result:
--
Read does not time out.

I suspect that the read timeout on SSL connections is just not
implemented, because it is hard, but if that is the case the
stream_set_timeout should return false to indicate the error.

If its just not implemented I'd be willing to patch it up if there is
one place to fix it. If there are ssl reads all over the php source I
don't think I'd have the time to track them all down.

I have seen people say "just use select" in response to stream timeout
problems. That does not work with ssl, or at least it may not always
work with ssl. Select can be used if you have access to the native SSL
interface (ie: it could be done right in C) but you need to be able to
check for the WANT_READ condition





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


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

2005-11-04 Thread sniper
 ID:   21197
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bool at boolsite dot net
 Status:   Open
 Bug Type: Sockets related
 Operating System: *
 PHP Version:  5.*, 4.* (2005-10-29) (snap)
 New Comment:

See also bug #35062


Previous Comments:


[2005-09-29 16:07:34] tommyo at gmail dot com

I installed the latest windows build PHP Version 5.1.0RC2-dev and the
socket problem still exists.  I get:

Warning: socket_read() [function.socket-read]: unable to read from
socket [0]: The operation completed successfully.

When I put PHP_NORMAL_READ for the read type parameter. Using the
default or PHP_BINARY_READ works just fine for the same line of code.



[2004-03-11 11:06:02] [EMAIL PROTECTED]

I've compilled PHP with cygwin/gcc and no error is produced. However,
the build version from snaps.php.net gives that error.



[2003-08-26 02:00:58] bool at boolsite dot net

Ok, this is a short example : (a little echo server)

 Debut de la connexion...',"\r\n";
$EndTime=time()+15;
do{
$buffer=socket_read($MsgSock,1024,PHP_NORMAL_READ);
if($buffer===false) {
echo 'socket_read() a échoué :
',socket_strerror(socket_last_error($MsgSock)),"\r\n";
break;
}
elseif(!$buffer){
continue;
}
$buffer=trim($buffer);
echo '< ',$buffer,"\r\n";
if($buffer=='quit') {
break;
}

$back='You sent : ['.$buffer.']';

echo '> ',$back,"\r\n";
socket_write($MsgSock,$back."\r\n");
} while(time()<$EndTime);

@socket_close($MsgSock);
echo '=> End...',"\r\n";
}
}
socket_close($Sock);
?>



[2002-12-26 20:39:22] [EMAIL PROTECTED]

If you omit the third parameter to socket_read() it seems to work fine.
However, adding PHP_NORMAL_READ causes error as described in the bug
report.



[2002-12-26 09:32:25] bool at boolsite dot net

Hello

I have a source which works with PHP 4.1.x to PHP 4.2.x,
it's work perfectly. But with PHP 4.3RC4 (windows version,
client mode) I have this warning :
Warning: socket_read() unable to read from socket [0]: OpÚration
rÚussie. in E:\PHP\KioobFTP\v0.7.1\KioobFTP_SocketMode.php on line 262

Then, the result of the function is FALSE. 
The socket is in blocking mode.
The code is :
$tmp=socket_read($this->stream,4096,PHP_NORMAL_READ);

Do you need others info ?

Thanks.

Bool




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


#35062 [Opn->Bgs]: socket_read() produces warnings on non blocking sockets

2005-11-04 Thread sniper
 ID:   35062
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dima at dimych dot sumy dot ua
-Status:   Open
+Status:   Bogus
 Bug Type: Sockets related
 Operating System: FreeBSD 4.9-STABLE #0
 PHP Version:  4.4.1RC1
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #21197


Previous Comments:


[2005-11-04 14:53:52] dima at dimych dot sumy dot ua

I`m look everyware in the Internet and don`t find any workaround for
this problem. And error logs still growing...

This code decreases count of warnings:
-- code --
$startTime = microtime_float(true);
socket_send($socket, $package, strLen($package), 0);
socket_set_block($socket);
$to = array('sec' => 0, 'usec' => 50);
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, $to);
if (socket_read($socket, 4096)) {
  socket_close($socket);
  return microtime_float() - $startTime;
}
socket_close($socket);
-- end of code --
my "ping" function launches once per 5 minutes for around 50 hosts, but
not all of them alive. Dead hosts causes warnings.



[2005-11-02 14:37:46] dima at dimych dot sumy dot ua

I`m not agree what it is bogus

part of code from ext/sockets/sockets.c:
-- code --
if (type == PHP_NORMAL_READ) {
retval = php_read(php_sock->bsd_socket, tmpbuf, length,
0);
} else {
retval = recv(php_sock->bsd_socket, tmpbuf, length,
0);
}

if (retval == -1) {
PHP_SOCKET_ERROR(php_sock, "unable to read from
socket", errno);
efree(tmpbuf);
RETURN_FALSE;
}
-- end of code --
As you can see any processing for EAGAIN not exists. Warning will be
generated in any case. 

1. I`m developing icmp ping function and "no reply" is not an error in
my program.
2. Function, what can say is any data to receive, not exists.
3. I do not want to turn warnings off. Because I need them in other
places.



[2005-11-02 08:52:06] dima at dimych dot sumy dot ua

Description:

Use of socket_read() on non blocking sockets produces warinigs like:
socket_read() unable to read from socket [35]: Resource temporarily
unavailable

I`m storing all php errors in log file /var/log/php.log.
This warning causes overflow of /var partition because socket_read()
called to wait icmp message. 


Reproduce code:
---
$socket = socket_create(AF_INET, SOCK_RAW, 1);
socket_connect($socket, $host, null);
$startTime = microtime_float(true);
socket_send($socket, $data, strLen($data), 0);
socket_set_nonblock($socket);
while((microtime_float() - $startTime) < 0.5) {
  $mt = microtime_float();
  if (socket_read($socket, 255)) {
 break;
  }
}
socket_close($socket);


Expected result:

no warnings in php.log

Actual result:
--
I`m receive huge count of warinigs in my php.log file like this:
socket_read() unable to read from socket [35]: Resource temporarily
unavailable






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


#34656 [Com]: open_basedir restriction in effect although paths are set correctly

2005-11-04 Thread jf at probe-networks dot de
 ID:   34656
 Comment by:   jf at probe-networks dot de
 Reported By:  wolfram at schlich dot org
 Status:   Feedback
 Bug Type: Safe Mode/open_basedir
 Operating System: Linux 2.2.16 i586
 PHP Version:  4.4.1
 New Comment:

I can confirm this, PHP 4.4.1 seems to have major problems with
(atleast) open_basedir. It seems to ignore path's set via httpd.conf.
The following is from 4.4.1 using Confixx 3.1 (very famous server
administration frontend):

[04-Nov-2005 15:39:10] PHP Warning:  main(): Failed opening
'../settings.inc.php' for inclusion
(include_path='.:/srv/www/htdocs/confixx/html/include:/srv/www/htdocs/confixx/html')
in /srv/www/htdocs/confixx/html/reseller/auth.php on line 75
[04-Nov-2005 15:39:10] PHP Warning:  main(): open_basedir restriction
in effect. File(../functions.inc.php) is not within the allowed
path(s): (/srv/www/htdocs/confixx) in
/srv/www/htdocs/confixx/html/reseller/auth.php on line 76
[04-Nov-2005 15:39:10] PHP Warning:  main(../functions.inc.php): failed
to open stream: Operation not permitted in
/srv/www/htdocs/confixx/html/reseller/auth.php on line 76
[04-Nov-2005 15:39:10] PHP Warning:  main(): Failed opening
'../functions.inc.php' for inclusion
(include_path='.:/srv/www/htdocs/confixx/html/include:/srv/www/htdocs/confixx/html')
in /srv/www/htdocs/confixx/html/reseller/auth.php on line 76
[04-Nov-2005 15:39:10] PHP Warning:  main(): open_basedir restriction
in effect. File(../sessions.inc.php) is not within the allowed path(s):
(/srv/www/htdocs/confixx) in
/srv/www/htdocs/confixx/html/reseller/auth.php on line 77
[04-Nov-2005 15:39:10] PHP Warning:  main(../sessions.inc.php): failed
to open stream: Operation not permitted in
/srv/www/htdocs/confixx/html/reseller/auth.php on line 77
[04-Nov-2005 15:39:10] PHP Warning:  main(): Failed opening
'../sessions.inc.php' for inclusion
(include_path='.:/srv/www/htdocs/confixx/html/include:/srv/www/htdocs/confixx/html')
in /srv/www/htdocs/confixx/html/reseller/auth.php on line 77
[04-Nov-2005 15:39:10] PHP Fatal error:  Call to undefined function: 
db_connect() in /srv/www/htdocs/confixx/html/reseller/auth.php on line
79

reseller/auth.php:
Starting Line 73:$PHP_AUTH_USER = $PHP_AUTH_PW = '';
 
include("../settings.inc.php");
include("../functions.inc.php");
include('../sessions.inc.php');

db_connect($db_host, $db_user, $db_pass);

sessao_start();


Previous Comments:


[2005-11-02 14:43:40] troy at riq dot qc dot ca

Hi,

I always have open_basedir set to "/webdir/htdocs/" in the php.ini and
for each website, a more precise open_basedir like
"/webdir/htdocs/site1" set in httpd.conf.
With 4.3.11 that work like I expect.



[2005-11-01 22:34:00] [EMAIL PROTECTED]

Does it work if you set the open_basedir in php.ini ?




[2005-11-01 22:19:12] troy at riq dot qc dot ca

I just backtrack to a old version because 4.4.1 seem buggy with
open_basedir.
"../scripts/Connect.php" is in the open_basedir but 4.4.1 refuse it.
BTW, the open_basedir is set via apache httpd.conf and have always
work.

PHP Warning:  main(): open_basedir restriction in effect.
File(../scripts/Connect.php) is not within the allowed path(s):
(/webdir/htdocs/site3/) in /webdir/htdocs/site3/something/page.php on
line 2

PHP Warning:  main(../scripts/Connect.php): failed to open stream:
Operation not permitted in /webdir/htdocs/site3/something/page.php on
line 2

PHP Warning:  main(): Failed opening '../scripts/Connect.php' for
inclusion (include_path='.:/webapp/lib/php') in
/webdir/htdocs/site3/something/page.php on line 2

Hope it will be fix soon!
Have a nice day.



[2005-11-01 15:01:35] wolfram at schlich dot org

Just tried with the freshly released 4.4.1, without luck:
--8<--
Warning: fopen(): open_basedir restriction in effect.
File(/tmp/foo.bar) is not within the allowed path(s):
(/home/sites/site81/:/tmp/:/usr/share/pear/) in
/home/sites/site81/web/fopen.php on line 3

Warning: fopen(/tmp/foo.bar): failed to open stream: Operation not
permitted in /home/sites/site81/web/fopen.php on line 3
--8<--

--8<--[ access.conf ]--8<--

php_admin_value open_basedir
/home/sites/site81/:/tmp/:/usr/share/pear/

--8<--



[2005-09-27 19:27:01] [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

Something related to open_basedir and the paths was just fixed. Give it
an hour or two.




The remainder of the comments for this report are too long. To view
the rest of the comments,

#35103 [Opn]: mysqli bind_result incorrectly handles unsigned int

2005-11-04 Thread andrey
 ID:   35103
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at pjberkel dot com
 Status:   Open
 Bug Type: MySQLi related
 Operating System: RHEL 4
 PHP Version:  5.0.5
 Assigned To:  andrey
 New Comment:

if your code is aware that the variable is unsigned you can get the
unsigned value by using sprintf() with %u as format specificator
[EMAIL PROTECTED]:~/test> php -r '$a=-2; printf("%d %u\n", $a, $a);'
-2 4294967294

However I think it is good idea to make that implicit so mysqli to
return a string (on 32bit) and normal int (on 64bit).



Previous Comments:


[2005-11-04 12:46:29] php at pjberkel dot com

Compiling the current php5 STABLE CVS snapshot version under RHEL 4
yields the same incorrect results as before: using "var_dump" instead
of "print" in the original example gives the results:

int(2147483647)
int(-2147483648)
int(-2147483647)
int(-494965764)
int(-394965015)
int(-1)



[2005-11-04 11:25:03] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2005-11-04 11:17:12] php at pjberkel dot com

Description:

When using "mysqli_stmt_bind_result" to retrieve a 32bit unsigned
integer value from a mysql database (version 4.1.13-standard) that is
greater than the maximum *signed* value but less than the maximum
*unsigned* value (i.e. 2147483647 < int <= 4294967295), the integer is
returned incorrectly as a signed value.

I did read in the manual that php does not support unsigned integers
(http://www.php.net/manual/en/language.types.integer.php), however in
this case, mysqli_stmt_bind_result should probably cast the result to a
float.


Reproduce code:
---
query("CREATE TABLE temp (id INT UNSIGNED NOT NULL)");
$mysqli->query("INSERT INTO temp (id) VALUES
(2147483647),(2147483648),(2147483649),(381532),(392281),(4294967295)");

/* BEGIN EXAMPLE OF BUG */
$stmt = $mysqli->prepare("SELECT id FROM temp");
$stmt->execute();
$stmt->bind_result($id);
while ($stmt->fetch()) {
print $id . "\n";
}
$stmt->close();
/* END EXAMPLE OF BUG */

$mysqli->query("DROP TABLE temp");
$mysqli->close();

?>


Expected result:

2147483647
2147483648
2147483649
381532
392281
4294967295


Actual result:
--
2147483647
-2147483648
-2147483647
-494965764
-394965015
-1






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


#35105 [NEW]: stream_set_timeout has no effect on SSL stream

2005-11-04 Thread wckits at rit dot edu
From: wckits at rit dot edu
Operating system: SunOS 5.9
PHP version:  5.0.5
PHP Bug Type: Sockets related
Bug description:  stream_set_timeout has no effect on SSL stream

Description:

A stream opened with stream_socket_client("ssl://. will not timeout
when reading.

This may have a similar underlying cause to bug #23618 but it is exposed
differently, and is still a problem in 5.0.5.

Reproduce code:
---
#!/bin/php-5.0.5/sapi/cli/php
array(
'verify_peer' => false,
'allow_self_signed' => true,
)
));
print "Creating socket\n";
$socket = stream_socket_client( "ssl://www.rit.edu:443", &$errno,
&$errstr, 10, STREAM_CLIENT_CONNECT, $ctx );
print "Setting timeout\n";
var_dump(stream_set_timeout( $socket, 5 ));
print "Sending bogus request\n";
fwrite($socket, "GET nourl Cupcakes/2.5\n\n\n\n" );
print "Reading Result\n";
var_dump(fgets( $socket));

//Now conenct and read when we know the server isnt going to send
anything

print "Creating NEW socket\n";
$socket = stream_socket_client( "ssl://www.rit.edu:443", &$errno,
&$errstr, 10, STREAM_CLIENT_CONNECT, $ctx );
print "Setting timeout\n";
var_dump(stream_set_timeout( $socket, 5 ));
print "Sending NO request\n";
print "Read should time out in 5\n";
var_dump(fgets( $socket));
?>


Expected result:

The first section will run and print an HTTP error. The second section
will run and timeout after printing "Read should timeout in 5..."

Actual result:
--
Read does not time out.

I suspect that the read timeout on SSL connections is just not
implemented, because it is hard, but if that is the case the
stream_set_timeout should return false to indicate the error.

If its just not implemented I'd be willing to patch it up if there is one
place to fix it. If there are ssl reads all over the php source I don't
think I'd have the time to track them all down.

I have seen people say "just use select" in response to stream timeout
problems. That does not work with ssl, or at least it may not always work
with ssl. Select can be used if you have access to the native SSL
interface (ie: it could be done right in C) but you need to be able to
check for the WANT_READ condition

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


#35062 [Bgs->Opn]: socket_read() produces warnings on non blocking sockets

2005-11-04 Thread dima at dimych dot sumy dot ua
 ID:   35062
 User updated by:  dima at dimych dot sumy dot ua
 Reported By:  dima at dimych dot sumy dot ua
-Status:   Bogus
+Status:   Open
 Bug Type: Sockets related
 Operating System: FreeBSD 4.9-STABLE #0
 PHP Version:  4.4.1RC1
 New Comment:

I`m look everyware in the Internet and don`t find any workaround for
this problem. And error logs still growing...

This code decreases count of warnings:
-- code --
$startTime = microtime_float(true);
socket_send($socket, $package, strLen($package), 0);
socket_set_block($socket);
$to = array('sec' => 0, 'usec' => 50);
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, $to);
if (socket_read($socket, 4096)) {
  socket_close($socket);
  return microtime_float() - $startTime;
}
socket_close($socket);
-- end of code --
my "ping" function launches once per 5 minutes for around 50 hosts, but
not all of them alive. Dead hosts causes warnings.


Previous Comments:


[2005-11-02 14:37:46] dima at dimych dot sumy dot ua

I`m not agree what it is bogus

part of code from ext/sockets/sockets.c:
-- code --
if (type == PHP_NORMAL_READ) {
retval = php_read(php_sock->bsd_socket, tmpbuf, length,
0);
} else {
retval = recv(php_sock->bsd_socket, tmpbuf, length,
0);
}

if (retval == -1) {
PHP_SOCKET_ERROR(php_sock, "unable to read from
socket", errno);
efree(tmpbuf);
RETURN_FALSE;
}
-- end of code --
As you can see any processing for EAGAIN not exists. Warning will be
generated in any case. 

1. I`m developing icmp ping function and "no reply" is not an error in
my program.
2. Function, what can say is any data to receive, not exists.
3. I do not want to turn warnings off. Because I need them in other
places.



[2005-11-02 14:18:22] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.





[2005-11-02 08:52:06] dima at dimych dot sumy dot ua

Description:

Use of socket_read() on non blocking sockets produces warinigs like:
socket_read() unable to read from socket [35]: Resource temporarily
unavailable

I`m storing all php errors in log file /var/log/php.log.
This warning causes overflow of /var partition because socket_read()
called to wait icmp message. 


Reproduce code:
---
$socket = socket_create(AF_INET, SOCK_RAW, 1);
socket_connect($socket, $host, null);
$startTime = microtime_float(true);
socket_send($socket, $data, strLen($data), 0);
socket_set_nonblock($socket);
while((microtime_float() - $startTime) < 0.5) {
  $mt = microtime_float();
  if (socket_read($socket, 255)) {
 break;
  }
}
socket_close($socket);


Expected result:

no warnings in php.log

Actual result:
--
I`m receive huge count of warinigs in my php.log file like this:
socket_read() unable to read from socket [35]: Resource temporarily
unavailable






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


#35104 [Opn]: __set() and read-only property prevents proper Class inheritence

2005-11-04 Thread php at tjworld dot net
 ID:   35104
 User updated by:  php at tjworld dot net
 Reported By:  php at tjworld dot net
 Status:   Open
 Bug Type: Class/Object related
 Operating System: Windows 2003
 PHP Version:  5.1.0RC5
 New Comment:

Further test using DOMDocument/DOMElement...

C:\PHP\5.1.0RC5-dev>php.exe dom.php

Fatal error: extDOMElement::__construct(): Cannot write property in
C:\dom.php on line 14

--dom.php-
ownerDocument = $owner; //** this line causes a Fatal Error
 }
  //  ... more class definition here
}

$doc = new extDOMDocument('test');
$el = $doc->createElement('tagname');
?>


Previous Comments:


[2005-11-04 13:02:41] php at tjworld dot net

C:\PHP\5.1.0RC5-dev>php.exe test.php
testing...
Fatal error: Uncaught exception 'Exception' with message 'Can't
overwrite test' in C:\test.php:12
Stack trace:
#0 C:\test.php(23): ReadOnly::__set('test', 'write to me')
#1 C:\test.php(30): Writeable->__construct('write to me')
#2 {main}
  thrown in C:\test.php on line 12


---test.php--
dynamicProperty['test'] = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(isset($this->dynamicProperty[$name]))
throw new Exception("Can't overwrite $name");

   $dynamicProperty[$name] = $value;
  }
 }
 public function __get($name) { return $this->dynamicProperty[$name];
}
}
class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this->realProperty = 25; // ok
  $this->test = $value; // causes Fatal Error
 }
 public function getReal() {return $this->realProperty; }
 public function getDynamic() {return $this->test; }
}

echo "testing...\r\n";
$test = new Writeable('write to me');
echo 'real: '.$test->getReal()."\r\n";
echo 'dynamic: '.$test->getDynamic()."\r\n";
?>



[2005-11-04 12:38:17] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-11-04 11:49:33] php at tjworld dot net

Description:

When extending a class that has a visible (public or protected)
read-only dynamic property by virtue of __set(), the sub-class is
prevented from modifying (or "overloading") the property as if it were
merely a public consumer of an instance-object of super, rather than an
extension of the class definition itself.

This shows up in particular in the DOM classes DOMNode and DOMDocument,
where it causes:

Fatal error: extDOMElement::__construct() [function.--construct]:
Cannot write property in...

If you extend both classes, and try to create a new derived extDOMNode
object using a custom  extDOMDocument->createElement(), it is
impossible to set any of the new extDOMNode's dynamic properties from
within extDOMNode's constructor (especially ownerDocument) because
DOMNodes without an owner are forced to be read-only.

The extDOMNode class definition should be able to modify the publically
visible ownerDocument property.

Since real properties accessible from a sub-class can't be private (if
they're to be accessible from other objects), it follows that the same
rule should apply to dynamic properties. If this were so the dynamic
properties made visible by __set() would be inherited as protected or
public  and this issue wouldn't arise.

Reproduce code:
---
class ReadOnly {
 protected $realProperty;
 private $dynamicProperty = array();
 function __construct() {
  $realProperty = 12;
  $this->members['test'] = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(isset($this->dynamicProperty[$name]))
throw new Exception("Can't overwrite $name");  

   $props[$name] = $value;
  }
 }
}
class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this->realProperty = 25; // ok
  $this->test = $value; // causes Fatal Error
 }
}

$test = new Writeable('write to me');

Expected result:

The extended class should be able to inherit and modify protected or
public properties of the super class.

Actual result:
--
For built-in classes causes a Fatal Error. For user defined classes
causes a user-defined read-only result. In the example causes an
Exception.





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


#35104 [Fbk->Opn]: __set() and read-only property prevents proper Class inheritence

2005-11-04 Thread php at tjworld dot net
 ID:   35104
 User updated by:  php at tjworld dot net
 Reported By:  php at tjworld dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Class/Object related
 Operating System: Windows 2003
-PHP Version:  5.0.5
+PHP Version:  5.1.0RC5
 New Comment:

C:\PHP\5.1.0RC5-dev>php.exe test.php
testing...
Fatal error: Uncaught exception 'Exception' with message 'Can't
overwrite test' in C:\test.php:12
Stack trace:
#0 C:\test.php(23): ReadOnly::__set('test', 'write to me')
#1 C:\test.php(30): Writeable->__construct('write to me')
#2 {main}
  thrown in C:\test.php on line 12


---test.php--
dynamicProperty['test'] = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(isset($this->dynamicProperty[$name]))
throw new Exception("Can't overwrite $name");

   $dynamicProperty[$name] = $value;
  }
 }
 public function __get($name) { return $this->dynamicProperty[$name];
}
}
class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this->realProperty = 25; // ok
  $this->test = $value; // causes Fatal Error
 }
 public function getReal() {return $this->realProperty; }
 public function getDynamic() {return $this->test; }
}

echo "testing...\r\n";
$test = new Writeable('write to me');
echo 'real: '.$test->getReal()."\r\n";
echo 'dynamic: '.$test->getDynamic()."\r\n";
?>


Previous Comments:


[2005-11-04 12:38:17] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-11-04 11:49:33] php at tjworld dot net

Description:

When extending a class that has a visible (public or protected)
read-only dynamic property by virtue of __set(), the sub-class is
prevented from modifying (or "overloading") the property as if it were
merely a public consumer of an instance-object of super, rather than an
extension of the class definition itself.

This shows up in particular in the DOM classes DOMNode and DOMDocument,
where it causes:

Fatal error: extDOMElement::__construct() [function.--construct]:
Cannot write property in...

If you extend both classes, and try to create a new derived extDOMNode
object using a custom  extDOMDocument->createElement(), it is
impossible to set any of the new extDOMNode's dynamic properties from
within extDOMNode's constructor (especially ownerDocument) because
DOMNodes without an owner are forced to be read-only.

The extDOMNode class definition should be able to modify the publically
visible ownerDocument property.

Since real properties accessible from a sub-class can't be private (if
they're to be accessible from other objects), it follows that the same
rule should apply to dynamic properties. If this were so the dynamic
properties made visible by __set() would be inherited as protected or
public  and this issue wouldn't arise.

Reproduce code:
---
class ReadOnly {
 protected $realProperty;
 private $dynamicProperty = array();
 function __construct() {
  $realProperty = 12;
  $this->members['test'] = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(isset($this->dynamicProperty[$name]))
throw new Exception("Can't overwrite $name");  

   $props[$name] = $value;
  }
 }
}
class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this->realProperty = 25; // ok
  $this->test = $value; // causes Fatal Error
 }
}

$test = new Writeable('write to me');

Expected result:

The extended class should be able to inherit and modify protected or
public properties of the super class.

Actual result:
--
For built-in classes causes a Fatal Error. For user defined classes
causes a user-defined read-only result. In the example causes an
Exception.





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


#35103 [Fbk->Opn]: mysqli bind_result incorrectly handles unsigned int

2005-11-04 Thread php at pjberkel dot com
 ID:   35103
 User updated by:  php at pjberkel dot com
 Reported By:  php at pjberkel dot com
-Status:   Feedback
+Status:   Open
 Bug Type: MySQLi related
 Operating System: RHEL 4
 PHP Version:  5.0.5
 New Comment:

Compiling the current php5 STABLE CVS snapshot version under RHEL 4
yields the same incorrect results as before: using "var_dump" instead
of "print" in the original example gives the results:

int(2147483647)
int(-2147483648)
int(-2147483647)
int(-494965764)
int(-394965015)
int(-1)


Previous Comments:


[2005-11-04 11:25:03] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2005-11-04 11:17:12] php at pjberkel dot com

Description:

When using "mysqli_stmt_bind_result" to retrieve a 32bit unsigned
integer value from a mysql database (version 4.1.13-standard) that is
greater than the maximum *signed* value but less than the maximum
*unsigned* value (i.e. 2147483647 < int <= 4294967295), the integer is
returned incorrectly as a signed value.

I did read in the manual that php does not support unsigned integers
(http://www.php.net/manual/en/language.types.integer.php), however in
this case, mysqli_stmt_bind_result should probably cast the result to a
float.


Reproduce code:
---
query("CREATE TABLE temp (id INT UNSIGNED NOT NULL)");
$mysqli->query("INSERT INTO temp (id) VALUES
(2147483647),(2147483648),(2147483649),(381532),(392281),(4294967295)");

/* BEGIN EXAMPLE OF BUG */
$stmt = $mysqli->prepare("SELECT id FROM temp");
$stmt->execute();
$stmt->bind_result($id);
while ($stmt->fetch()) {
print $id . "\n";
}
$stmt->close();
/* END EXAMPLE OF BUG */

$mysqli->query("DROP TABLE temp");
$mysqli->close();

?>


Expected result:

2147483647
2147483648
2147483649
381532
392281
4294967295


Actual result:
--
2147483647
-2147483648
-2147483647
-494965764
-394965015
-1






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


#35104 [Opn->Fbk]: __set() and read-only property prevents proper Class inheritence

2005-11-04 Thread sniper
 ID:   35104
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at tjworld dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Class/Object related
 Operating System: Windows 2003
 PHP Version:  5.0.5
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2005-11-04 11:49:33] php at tjworld dot net

Description:

When extending a class that has a visible (public or protected)
read-only dynamic property by virtue of __set(), the sub-class is
prevented from modifying (or "overloading") the property as if it were
merely a public consumer of an instance-object of super, rather than an
extension of the class definition itself.

This shows up in particular in the DOM classes DOMNode and DOMDocument,
where it causes:

Fatal error: extDOMElement::__construct() [function.--construct]:
Cannot write property in...

If you extend both classes, and try to create a new derived extDOMNode
object using a custom  extDOMDocument->createElement(), it is
impossible to set any of the new extDOMNode's dynamic properties from
within extDOMNode's constructor (especially ownerDocument) because
DOMNodes without an owner are forced to be read-only.

The extDOMNode class definition should be able to modify the publically
visible ownerDocument property.

Since real properties accessible from a sub-class can't be private (if
they're to be accessible from other objects), it follows that the same
rule should apply to dynamic properties. If this were so the dynamic
properties made visible by __set() would be inherited as protected or
public  and this issue wouldn't arise.

Reproduce code:
---
class ReadOnly {
 protected $realProperty;
 private $dynamicProperty = array();
 function __construct() {
  $realProperty = 12;
  $this->members['test'] = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(isset($this->dynamicProperty[$name]))
throw new Exception("Can't overwrite $name");  

   $props[$name] = $value;
  }
 }
}
class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this->realProperty = 25; // ok
  $this->test = $value; // causes Fatal Error
 }
}

$test = new Writeable('write to me');

Expected result:

The extended class should be able to inherit and modify protected or
public properties of the super class.

Actual result:
--
For built-in classes causes a Fatal Error. For user defined classes
causes a user-defined read-only result. In the example causes an
Exception.





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


#35091 [Opn->Asn]: SoapClient leaks memory

2005-11-04 Thread sniper
 ID:   35091
 Updated by:   [EMAIL PROTECTED]
 Reported By:  paul at paulbutcher dot com
-Status:   Open
+Status:   Assigned
 Bug Type: SOAP related
 Operating System: *
-PHP Version:  5.0.5
+PHP Version:  5CVS-2005-11-04 (snap)
-Assigned To:  
+Assigned To:  dmitry
 New Comment:

Dmitry, can you check this out please.



Previous Comments:


[2005-11-04 09:59:11] paul at paulbutcher dot com

Sorry - I don't understand. Your example repeatedly appends to a
string, which of course will legitimately increase the size of the
string until it eventually fills memory.

I don't understand how this is the same as repeatedly allocating an
object. My example doesn't maintain a reference to the object, so
surely it should be garbage collected immediately?

In fact, if I replace SoapClient with an object of my own making then
memory usage remains constant:



What am I missing?

Thanks!



[2005-11-04 09:28:48] [EMAIL PROTECTED]

Ah, I should get glasses. You can also get all memory used with
something like this:

while (1) { $foo.= "bar"; }

Not bug but expected behaviour. Just don't do that!




[2005-11-04 00:36:03] paul at paulbutcher dot com

Same result (on Windows - haven't tried it on Linux yet)



[2005-11-03 21:42:36] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-11-03 19:52:18] paul at paulbutcher dot com

Description:

SoapClient doesn't seem to clean up after itself when garbage
collected. It leaks something around 4K each time. Tested on both
Windows and Linux.

Reproduce code:
---



Expected result:

Assuming that I understand the PHP Garbage Collector (and it's possible
that I don't - I'm struggling to find any good documentation on exactly
how I should expect it to behave - any pointers very welcome!), I would
expect the memory usage of this script to be constant.

Actual result:
--
The memory usage increases very quickly (growing to several hundred
megabytes in less than a minute).





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


#35104 [NEW]: __set() and read-only property prevents proper Class inheritence

2005-11-04 Thread php at tjworld dot net
From: php at tjworld dot net
Operating system: Windows 2003
PHP version:  5.0.5
PHP Bug Type: Class/Object related
Bug description:  __set() and read-only property prevents proper Class 
inheritence

Description:

When extending a class that has a visible (public or protected) read-only
dynamic property by virtue of __set(), the sub-class is prevented from
modifying (or "overloading") the property as if it were merely a public
consumer of an instance-object of super, rather than an extension of the
class definition itself.

This shows up in particular in the DOM classes DOMNode and DOMDocument,
where it causes:

Fatal error: extDOMElement::__construct() [function.--construct]: Cannot
write property in...

If you extend both classes, and try to create a new derived extDOMNode
object using a custom  extDOMDocument->createElement(), it is impossible
to set any of the new extDOMNode's dynamic properties from within
extDOMNode's constructor (especially ownerDocument) because DOMNodes
without an owner are forced to be read-only.

The extDOMNode class definition should be able to modify the publically
visible ownerDocument property.

Since real properties accessible from a sub-class can't be private (if
they're to be accessible from other objects), it follows that the same
rule should apply to dynamic properties. If this were so the dynamic
properties made visible by __set() would be inherited as protected or
public  and this issue wouldn't arise.

Reproduce code:
---
class ReadOnly {
 protected $realProperty;
 private $dynamicProperty = array();
 function __construct() {
  $realProperty = 12;
  $this->members['test'] = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(isset($this->dynamicProperty[$name]))
throw new Exception("Can't overwrite $name");  

   $props[$name] = $value;
  }
 }
}
class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this->realProperty = 25; // ok
  $this->test = $value; // causes Fatal Error
 }
}

$test = new Writeable('write to me');

Expected result:

The extended class should be able to inherit and modify protected or
public properties of the super class.

Actual result:
--
For built-in classes causes a Fatal Error. For user defined classes causes
a user-defined read-only result. In the example causes an Exception.

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


#35103 [Opn->Fbk]: mysqli bind_result incorrectly handles unsigned int

2005-11-04 Thread derick
 ID:   35103
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at pjberkel dot com
-Status:   Open
+Status:   Feedback
 Bug Type: MySQLi related
 Operating System: RHEL 4
 PHP Version:  5.0.5
 New Comment:

Please try using this CVS snapshot:

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


Previous Comments:


[2005-11-04 11:17:12] php at pjberkel dot com

Description:

When using "mysqli_stmt_bind_result" to retrieve a 32bit unsigned
integer value from a mysql database (version 4.1.13-standard) that is
greater than the maximum *signed* value but less than the maximum
*unsigned* value (i.e. 2147483647 < int <= 4294967295), the integer is
returned incorrectly as a signed value.

I did read in the manual that php does not support unsigned integers
(http://www.php.net/manual/en/language.types.integer.php), however in
this case, mysqli_stmt_bind_result should probably cast the result to a
float.


Reproduce code:
---
query("CREATE TABLE temp (id INT UNSIGNED NOT NULL)");
$mysqli->query("INSERT INTO temp (id) VALUES
(2147483647),(2147483648),(2147483649),(381532),(392281),(4294967295)");

/* BEGIN EXAMPLE OF BUG */
$stmt = $mysqli->prepare("SELECT id FROM temp");
$stmt->execute();
$stmt->bind_result($id);
while ($stmt->fetch()) {
print $id . "\n";
}
$stmt->close();
/* END EXAMPLE OF BUG */

$mysqli->query("DROP TABLE temp");
$mysqli->close();

?>


Expected result:

2147483647
2147483648
2147483649
381532
392281
4294967295


Actual result:
--
2147483647
-2147483648
-2147483647
-494965764
-394965015
-1






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


#35103 [NEW]: mysqli bind_result incorrectly handles unsigned int

2005-11-04 Thread php at pjberkel dot com
From: php at pjberkel dot com
Operating system: RHEL 4
PHP version:  5.0.5
PHP Bug Type: MySQLi related
Bug description:  mysqli bind_result incorrectly handles unsigned int

Description:

When using "mysqli_stmt_bind_result" to retrieve a 32bit unsigned integer
value from a mysql database (version 4.1.13-standard) that is greater than
the maximum *signed* value but less than the maximum *unsigned* value (i.e.
2147483647 < int <= 4294967295), the integer is returned incorrectly as a
signed value.

I did read in the manual that php does not support unsigned integers
(http://www.php.net/manual/en/language.types.integer.php), however in this
case, mysqli_stmt_bind_result should probably cast the result to a float.


Reproduce code:
---
query("CREATE TABLE temp (id INT UNSIGNED NOT NULL)");
$mysqli->query("INSERT INTO temp (id) VALUES
(2147483647),(2147483648),(2147483649),(381532),(392281),(4294967295)");

/* BEGIN EXAMPLE OF BUG */
$stmt = $mysqli->prepare("SELECT id FROM temp");
$stmt->execute();
$stmt->bind_result($id);
while ($stmt->fetch()) {
print $id . "\n";
}
$stmt->close();
/* END EXAMPLE OF BUG */

$mysqli->query("DROP TABLE temp");
$mysqli->close();

?>


Expected result:

2147483647
2147483648
2147483649
381532
392281
4294967295


Actual result:
--
2147483647
-2147483648
-2147483647
-494965764
-394965015
-1


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


#35096 [Com]: php 4.4.2-dev has still trouble with mod_rewrite/apache2

2005-11-04 Thread free4cd at yahoo dot de
 ID:   35096
 Comment by:   free4cd at yahoo dot de
 Reported By:  rob at burningsoda dot com
 Status:   Feedback
 Bug Type: Apache2 related
 Operating System: FreeBSD 6.0RC1
 PHP Version:  4CVS-2005-11-04 (snap)
 New Comment:

Yes, PHP 4.4.x don't work with mod_rewrite... I've the same problem
with the php 4.4.x snapshots (tried with
http://snaps.php.net/php4-STABLE-200511040151.tar.gz) and apache
2.0.55.

I get only a blank page, rewrite don't work. Same problem as posted
before here: http://bugs.php.net/bug.php?id=35059

Btw: the free Zend optimizer don't work with the latest php 5.1.x
version only with 5.0.x.
I need the Zend optimizer for one application so I could not use it.

I've tried 4-5 PHP 4.4.x snapshots and none of these works. Only 4.4.0
ist ok.


Previous Comments:


[2005-11-04 09:25:24] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-11-04 02:49:53] rob at burningsoda dot com

Description:

I just downloaded

Stable (4.4.x-dev)
Built On: Nov 03, 2005 23:51 GMT

and built it:

PHP 4.4.2-dev (cli) (built: Nov  4 2005 02:17:10)

But it seems like, the following bug is _not_ fixed
in that snapshot:

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

This happens with _any_ RewriteRule I use.

Reproduce code:
---
Try to use mod_rewrite on Apache 2.x to modify any URL.
Small test case:

index.php:


RewriteRule:
RewriteRule ^(.+)/$ index.php?myarg=$1 [L]

URLs to try:
1. http://localhost/index.php?myarg=bla
2. http://localhost/blub/
3. http://localhost/index.php/


Expected result:

In all three cases a document should be delivered:

1. "bla"
2. "blub"
3. "index.php"

Actual result:
--
1. Correctly delivers document.
2. No document is delivered.
3. Correctly delivers document.





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


#35102 [Opn->Bgs]: phpinfo() shows a wrong version

2005-11-04 Thread derick
 ID:   35102
 Updated by:   [EMAIL PROTECTED]
 Reported By:  alfice at r4 dot dion dot ne dot jp
-Status:   Open
+Status:   Bogus
 Bug Type: Apache related
 Operating System: debian 2.4.27-2
 PHP Version:  4.4.1
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

You didn't install it properly then, as the version numbers in the
4.4.1 release are definitely correct.


Previous Comments:


[2005-11-04 10:51:53] alfice at r4 dot dion dot ne dot jp

Description:

To prevent the terrible security bug, I tried to upgrade
to PHP 4.4.1 under debian.
refered http://www.hardened-php.net/advisory_202005.79.html

# wget http://www.php.net/get/php-4.4.1.tar.gz/from/jp.php.net/mirror
(It was downloaded around 4th Nov, 2005 17:30 JST)

Installation was succesfully, but I checked the PHP version,
it showed not 4.4.1 but 4.4.0 in the top of php file.
Moreover X-Powered-By showed 'PHP/4.4.0' in HTTP Response Headers
section.

Reproduce code:
---
1.
make a html file including phpinfo().
# echo '' > /home/php/info.php
 (output file was set in www root of apache 1.3.33.)

2.
browse the info.php with a latest IE and firefox.
 http:///info.php

Expected result:

PHP Version should shows 4.4.1.






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


#35102 [NEW]: phpinfo() shows a wrong version

2005-11-04 Thread alfice at r4 dot dion dot ne dot jp
From: alfice at r4 dot dion dot ne dot jp
Operating system: debian 2.4.27-2
PHP version:  4.4.1
PHP Bug Type: Apache related
Bug description:  phpinfo() shows a wrong version

Description:

To prevent the terrible security bug, I tried to upgrade
to PHP 4.4.1 under debian.
refered http://www.hardened-php.net/advisory_202005.79.html

# wget http://www.php.net/get/php-4.4.1.tar.gz/from/jp.php.net/mirror
(It was downloaded around 4th Nov, 2005 17:30 JST)

Installation was succesfully, but I checked the PHP version,
it showed not 4.4.1 but 4.4.0 in the top of php file.
Moreover X-Powered-By showed 'PHP/4.4.0' in HTTP Response Headers section.

Reproduce code:
---
1.
make a html file including phpinfo().
# echo '' > /home/php/info.php
 (output file was set in www root of apache 1.3.33.)

2.
browse the info.php with a latest IE and firefox.
 http:///info.php

Expected result:

PHP Version should shows 4.4.1.


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


#35093 [Bgs]: foreach nullifies index of an indexed array

2005-11-04 Thread tony at marston-home dot demon dot co dot uk
 ID:   35093
 User updated by:  tony at marston-home dot demon dot co dot uk
 Reported By:  tony at marston-home dot demon dot co dot uk
 Status:   Bogus
 Bug Type: Arrays related
 Operating System: Windows XP
 PHP Version:  4.4.1
 New Comment:

Bug 35084 reports a problem with current() and next() whereas my
problem happens with key(). How am I supposed to know they are the
same?

The term BOGUS means 'this is not a bug, you idiot' whereas DUPLICATE
means 'this has already been reported before'. Two different meanings
require two different headings otherwise it could lead people to
believe that all those bugs marked BOGUS are not bugs at all but down
to incompetent programming. There is a difference, you know.

If your bug reporting software can't handle it then I suggest you
update it immediately.


Previous Comments:


[2005-11-03 21:31:11] [EMAIL PROTECTED]

1. policy is to mark duplicates bogus (you should search better)
2. foreach is not the problem (key() is)
3. see bug #35084 (yes, this is the same)



[2005-11-03 21:25:45] tony at marston-home dot demon dot co dot uk

Duplicate of what bug?

I searched the bug database before submitting this, and none of the
descriptions were anywhere near what I was experiencing. How am I
supposed to know that the source of the bug is the same if the
descriptions are different?

Your response is uninformative, and you really should introduce the
status of DUPLICATE instead of BOGUS.



[2005-11-03 21:11:23] [EMAIL PROTECTED]

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.





[2005-11-03 21:10:23] tony at marston-home dot demon dot co dot uk

Description:

When I use foreach($array as $key => $value) on an indexed array,
afterwards the index value, when viewed with key($array) is null
instead of an integer. This means that when my code tests the array to
see if it is either indexed or associative it is given the wrong
answer.

Reproduce code:
---
 $value) {
if ($key === key($array)) {
echo "they are the same\n";
} else {
echo "they are NOT the same\n";
} // if
} // foreach

if (is_int(key($array))) {
echo "array is indexed\n";
} else {
echo "array is associative\n";
} // if
?>

Expected result:

The output 'array is indexed' should be produced both before and after
the foreach() statement.

Actual result:
--
The key of an indexed array, when viewed with key($array), is not being
reported as an integer.





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


#35091 [Bgs->Opn]: SoapClient leaks memory

2005-11-04 Thread paul at paulbutcher dot com
 ID:   35091
 User updated by:  paul at paulbutcher dot com
 Reported By:  paul at paulbutcher dot com
-Status:   Bogus
+Status:   Open
 Bug Type: SOAP related
 Operating System: *
 PHP Version:  5.0.5
 New Comment:

Sorry - I don't understand. Your example repeatedly appends to a
string, which of course will legitimately increase the size of the
string until it eventually fills memory.

I don't understand how this is the same as repeatedly allocating an
object. My example doesn't maintain a reference to the object, so
surely it should be garbage collected immediately?

In fact, if I replace SoapClient with an object of my own making then
memory usage remains constant:



What am I missing?

Thanks!


Previous Comments:


[2005-11-04 09:28:48] [EMAIL PROTECTED]

Ah, I should get glasses. You can also get all memory used with
something like this:

while (1) { $foo.= "bar"; }

Not bug but expected behaviour. Just don't do that!




[2005-11-04 00:36:03] paul at paulbutcher dot com

Same result (on Windows - haven't tried it on Linux yet)



[2005-11-03 21:42:36] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-11-03 19:52:18] paul at paulbutcher dot com

Description:

SoapClient doesn't seem to clean up after itself when garbage
collected. It leaks something around 4K each time. Tested on both
Windows and Linux.

Reproduce code:
---



Expected result:

Assuming that I understand the PHP Garbage Collector (and it's possible
that I don't - I'm struggling to find any good documentation on exactly
how I should expect it to behave - any pointers very welcome!), I would
expect the memory usage of this script to be constant.

Actual result:
--
The memory usage increases very quickly (growing to several hundred
megabytes in less than a minute).





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


#35076 [Opn->Fbk]: Sometimes the log file shows: The session id contains illegal characters, ..etc

2005-11-04 Thread sniper
 ID:   35076
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vincent_f40 at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Linux RHEL4, 2.6.9-11.ELsmp
 PHP Version:  5.0.5
 New Comment:

I'd like to see the exact errors you got with 'make install'
when using the 'latest' snapshot.


Previous Comments:


[2005-11-03 23:50:51] vincent_f40 at hotmail dot com

./configure  --enable-sysvmem --enable-sysvshm --enable-sockets
--with-mhash=/usr --with-mysql=/usr
--with-apxs=/usr/local/apache/bin/apxs

The error just re-appeared with: php5-STABLE-200511031742

I am not sure what more you would like to know...just let me know and I
can provide it.

Thanks
Vince.



[2005-11-03 23:25:54] [EMAIL PROTECTED]

Could you help us out a bit and actually let us know what the errors
where you got? And with what configure line did you get them? We're
about to release PHP 5.1 and we'd like to fix this kind of issues
before the release..



[2005-11-03 23:12:36] vincent_f40 at hotmail dot com

Hi Sniper,

I have tried to install the link you provided:
http://snaps.php.net/php5-latest.tar.gz

But this at the "make install" command outputted a lot of errors, about
phar lib and call back functions...

I downloaded therefor the: php5-STABLE-200511031742
This installed ok.

Only I cant reproduce the error, so I will have to wait if the error
will re-appear.

I will keep you posted if it helped or not.

Thanks,
Vince



[2005-11-03 15:49:58] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-11-03 02:27:52] vincent_f40 at hotmail dot com

Description:

[Thu Nov  3 00:49:10 2005] [error] PHP Warning:  session_start() [function.session-start]: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in /home/httpd/html/includes/session_init.inc on line 70
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in Unknown on line 0
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: Failed to
write session data (files). Please verify that the current setting of
session.save_path is correct () in Unknown on line 0

1) Cant reproduce the errors. As the site works fine, only sometimes
the above error appears in the log files.
2) session_write_close() is being used.
3) session_name() uses only the characters [a-z].
4) As the site works /tmp is oke as well.(perms, etc.)
5) There is enough free disk space in /tmp as well.

a) using apache 1.3.34, php compiled as module(apxs)
b) Kernel: 2.6.9-11.ELsmp (double processor)

Is this a bug or a php programming error ?
As it happens not always, just random/sometimes.

Search the net for hours...no luck in finding the explanation. Hope to
find some clue here.

Thanks.






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


#35088 [Opn->Asn]: apache module core dumps when DOM method loadXML is called

2005-11-04 Thread sniper
 ID:   35088
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cole at ccdc dot cam dot ac dot uk
-Status:   Open
+Status:   Assigned
 Bug Type: DOM XML related
 Operating System: IRIX 6.5.18m
 PHP Version:  5CVS-2005-11-03
 Assigned To:  helly
 New Comment:

Marcus, now there's another compile failure. :)
(And this is first time I'd like to assign same bug to multiple persons
too, so when you get that fixed, assign to cellog, about the PEAR
issue)



Previous Comments:


[2005-11-04 00:25:35] cole at ccdc dot cam dot ac dot uk

the latest snapshot still fails to compile at the same point - 

/bin/sh /local/cole/php5-200511032130/libtool --silent
--preserve-dup-deps --mode=compile cc  -Iext/spl/
-I/local/cole/php5-200511032130/ext/spl/ -DPHP_ATOM_INC
-I/local/cole/php5-200511032130/include
-I/local/cole/php5-200511032130/main -I/local/cole/php5-200511032130
-I/usr/local/include/libxml2
-I/local/cole/php5-200511032130/ext/date/lib
-I/local/cole/php5-200511032130/TSRM
-I/local/cole/php5-200511032130/Zend  -D_XPG_IV  -g   -c
/local/cole/php5-200511032130/ext/spl/php_spl.c -o ext/spl/php_spl.lo 
cc-1551 cc: WARNING File =
/local/cole/php5-200511032130/ext/spl/php_spl.c, Line = 398
  The variable "func_name" is used before its value is set.

   
zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function
spl_autoload_call() cannot be registered", func_name);
   

^

cc-1028 cc: ERROR File =
/local/cole/php5-200511032130/ext/spl/php_spl.c, Line = 452
  The expression used must have a constant value.

autoload_func_info spl_alfi = {spl_func_ptr,
NULL, NULL};



[2005-11-03 23:39:07] cole at ccdc dot cam dot ac dot uk

Warning: call_user_func(PEAR_Task_Replace::validateXml): First argument
is expected to be a valid callback in
phar://install-pear-nozlib.phar/PEAR/PackageFile/v2/Validator.php on
line 1064

Fatal error: Call to undefined method PEAR_Error::getVersion() in 
I compiled the first "latest" snapshot with gcc 3.3 but now doing "make
install" fails - see PEAR errors below.

I'll try out the 'new' latest snap shot with mips-pro

phar://install-pear-nozlib.phar/index.php on line 112

Warning: call_user_func_array(): First argument is expected to be a
valid callback, 'System::_removeTmpFiles' was given in
phar://install-pear-nozlib.phar/PEAR.php on line 787
*** Error code 255 (bu21)
*** Error code 1 (bu21)



[2005-11-03 23:01:46] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

At least the compile problem in ext/spl should be fixed.



[2005-11-03 22:42:21] [EMAIL PROTECTED]

Marcus, can you check that compile failure (found in ext/spl) mentioned
above?



[2005-11-03 22:38:10] cole at ccdc dot cam dot ac dot uk

I tried compiling the php-latest build with mips-pro but got a compiler
error:

  ^

cc-1028 cc: ERROR File =
/local/cole/php5-200511031930/ext/spl/php_spl.c, Line = 452
  The expression used must have a constant value.

autoload_func_info spl_alfi = {spl_func_ptr,
NULL, NULL};
   ^

1 error detected in the compilation of
"/local/cole/php5-200511031930/ext/spl/php_spl.c".


I will try with gcc 3.3



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

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


#35091 [Opn->Bgs]: SoapClient leaks memory

2005-11-04 Thread sniper
 ID:   35091
 Updated by:   [EMAIL PROTECTED]
 Reported By:  paul at paulbutcher dot com
-Status:   Open
+Status:   Bogus
 Bug Type: SOAP related
 Operating System: *
 PHP Version:  5.0.5
 New Comment:

Ah, I should get glasses. You can also get all memory used with
something like this:

while (1) { $foo.= "bar"; }

Not bug but expected behaviour. Just don't do that!



Previous Comments:


[2005-11-04 00:36:03] paul at paulbutcher dot com

Same result (on Windows - haven't tried it on Linux yet)



[2005-11-03 21:42:36] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-11-03 19:52:18] paul at paulbutcher dot com

Description:

SoapClient doesn't seem to clean up after itself when garbage
collected. It leaks something around 4K each time. Tested on both
Windows and Linux.

Reproduce code:
---



Expected result:

Assuming that I understand the PHP Garbage Collector (and it's possible
that I don't - I'm struggling to find any good documentation on exactly
how I should expect it to behave - any pointers very welcome!), I would
expect the memory usage of this script to be constant.

Actual result:
--
The memory usage increases very quickly (growing to several hundred
megabytes in less than a minute).





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


#35098 [Opn->Asn]: 5.1RC5 has troubles with Zlib which 5.1RC4 not have

2005-11-04 Thread sniper
 ID:   35098
 Updated by:   [EMAIL PROTECTED]
 Reported By:  spam2 at rhsoft dot net
-Status:   Open
+Status:   Assigned
 Bug Type: Zlib Related
 Operating System: Windows XP
 PHP Version:  5.1.0RC4
-Assigned To:  
+Assigned To:  iliaa
 New Comment:

Ilia, there is apparently something wrong with the fix for the leak?


Previous Comments:


[2005-11-04 04:34:58] spam2 at rhsoft dot net

Description:

The last Nightlys PHP 5.1 (RC5) have on some pages troubles with
zlib_outputcompression = On which RC4 hast not.

Strange caracters will occur - looks like compressed output not
decompressed by browser (firefox)

This is not really reproduceable but in fact on my dev-machine when i
"downgrade" all pages will work, its a cms-system and some other
dev-hosts with the same scripts will running ... 






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


#35096 [Opn->Fbk]: php 4.4.2-dev has still trouble with mod_rewrite/apache2

2005-11-04 Thread sniper
 ID:   35096
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rob at burningsoda dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: FreeBSD 6.0RC1
 PHP Version:  4CVS-2005-11-04 (snap)
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2005-11-04 02:49:53] rob at burningsoda dot com

Description:

I just downloaded

Stable (4.4.x-dev)
Built On: Nov 03, 2005 23:51 GMT

and built it:

PHP 4.4.2-dev (cli) (built: Nov  4 2005 02:17:10)

But it seems like, the following bug is _not_ fixed
in that snapshot:

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

This happens with _any_ RewriteRule I use.

Reproduce code:
---
Try to use mod_rewrite on Apache 2.x to modify any URL.
Small test case:

index.php:


RewriteRule:
RewriteRule ^(.+)/$ index.php?myarg=$1 [L]

URLs to try:
1. http://localhost/index.php?myarg=bla
2. http://localhost/blub/
3. http://localhost/index.php/


Expected result:

In all three cases a document should be delivered:

1. "bla"
2. "blub"
3. "index.php"

Actual result:
--
1. Correctly delivers document.
2. No document is delivered.
3. Correctly delivers document.





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


#35101 [Opn]: A custom handler set with set_error_handler() cannot be unset/removed

2005-11-04 Thread derick
 ID:   35101
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
-Bug Type: Scripting Engine problem
+Bug Type: Feature/Change Request
 Operating System: Any
-PHP Version:  5CVS-2005-11-04 (CVS)
+PHP Version:  6CVS
 New Comment:

Nowhere it says that this is possible, thus marking it as a Feature
Request.


Previous Comments:


[2005-11-04 09:13:35] [EMAIL PROTECTED]

Description:

A custom error handler set with set_error_handler() cannot be removed.

The documentation says that the return value of set_error_handler() is
the previous error handler. In case of no previous error handler, NULL
is returned.

However set_error_handler() cannot be called with NULL to restore the
PHP default error handler. This results in the following:

$ php -r 'set_error_handler(NULL);'
Warning: set_error_handler() expects argument 1, '', to be a valid
callback in Command line code on line 1


Reproduce code:
---



Expected result:

Somehow a way for removing the current error handler and restoring the
original behaviour should be possible.

Actual result:
--
handler called





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


#35101 [NEW]: A custom handler set with set_error_handler() cannot be unset/removed

2005-11-04 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: Any
PHP version:  5CVS-2005-11-04 (CVS)
PHP Bug Type: Scripting Engine problem
Bug description:  A custom handler set with set_error_handler() cannot be 
unset/removed

Description:

A custom error handler set with set_error_handler() cannot be removed.

The documentation says that the return value of set_error_handler() is the
previous error handler. In case of no previous error handler, NULL is
returned.

However set_error_handler() cannot be called with NULL to restore the PHP
default error handler. This results in the following:

$ php -r 'set_error_handler(NULL);'
Warning: set_error_handler() expects argument 1, '', to be a valid
callback in Command line code on line 1


Reproduce code:
---



Expected result:

Somehow a way for removing the current error handler and restoring the
original behaviour should be possible.

Actual result:
--
handler called

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


#35099 [Opn->Bgs]: After Upgrade Applications Timeout after session_start() Called.

2005-11-04 Thread derick
 ID:   35099
 Updated by:   [EMAIL PROTECTED]
 Reported By:  webmaster at rdc dot ab dot ca
-Status:   Open
+Status:   Bogus
 Bug Type: Session related
 Operating System: FreeBSD 4.9-STABLE
 PHP Version:  4.4.1
 New Comment:

Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader.  These extensions often modify engine
behavior which is not related to PHP itself.

.


Previous Comments:


[2005-11-04 06:15:08] webmaster at rdc dot ab dot ca

Description:

Previously to upgrading php-4.4.1 we had no apparent problems with the
php session_start() function. After the upgrade we noticed that this
one specific script was starting to fail at random occurrences on a
production web page.

I did try removing the Zend Optimizer, changing the max_execution
setting and remming out the session_start() function. In all cases the
only difference was the remming out of the session_start().

Currently we have downgraded to php 4.4.0, everything works fine again,
but are nervous about the security issues attached to that.

NOTE: It does look similar to #17451, I'm confused about why the
difference between 4.4.0 and 4.4.1 and hence submitting this.

## Configure Line 

./configure  
--with-mysql=/usr/local/mysql/ 
--with-apache=../apache_1.3.34 --with-jpeg-dir=/usr/local/include
--with-png-dir=/usr/local/include
--with-freetype-dir=/usr/local/include/freetype2
--with-ttf=/usr/local/ttf 
--enable-shmop 
--with-zlib-dir=/usr/local/zlib/ 
--with-mcrypt 
--with-openssl=/usr/local/ssl/

## Unique information...

## Unique PHP.INI information...

zend_optimizer.version=2.5.10a
session.cache_expire = 15
output_buffering = 4096
allow_call_time_pass_reference = Off
memory_limit = 16M (1024MB Base Ram)
display_errors = Off
log_errors = On
error_log = "OUR_LOCAL_PATH"
variables_order = "GPCS"
register_globals = On <<-- php_value register_globals 0 in apache.
register_argc_argv = Off
default_socket_timeout = 60
session.save_path = /tmp <<-- chmod'd 1777
max_execution_time = 30


Reproduce code:
---
## Sample Script

\n"); // Doesn't get here.
  exit();
?>

Expected result:

Got here!

Actual result:
--
Times out.





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


#35095 [Opn->Bgs]: Array internal pointer / function by reference

2005-11-04 Thread derick
 ID:   35095
 Updated by:   [EMAIL PROTECTED]
 Reported By:  yanik at lecourriel dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Variables related
 Operating System: Windows XP SP2
 PHP Version:  4.4.1
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

.


Previous Comments:


[2005-11-04 01:57:01] yanik at lecourriel dot com

Description:

Array internal pointer does't work propely when passed to a function by
reference.

Reproduce code:
---
$t = array('firstName' => 'Yanik', 'lastName' => 'Lupien');

// Cause an infinit loop, always display first key
function test(&$t) {
 for(reset($t); !is_null($key = key($t)); next($t)) {
  print "{$key}";  
 }
}

//Work well
for(reset($t); !is_null($key = key($t)); next($t)) {
print "{$key}";
}

// Infinit loop
test($t);

Expected result:

firstName
lastName
firstName
lastName


Actual result:
--
firstName
lastName
firstName
firstName
firstName
firstName
firstName
firstName
...






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