#32993 [NEW]: implemented Iterator function curreent() don't throw exception

2005-05-09 Thread vojtech at x dot cz
From: vojtech at x dot cz
Operating system: gnu/linux
PHP version:  5.0.4
PHP Bug Type: Zend Engine 2 problem
Bug description:  implemented Iterator function curreent() don't throw exception

Description:

It's seems there is not correctly processed exception from current() and
script ends up with fatal error.

Reproduce code:
---
class Test implements Iterator {

public $arr = array();

public function rewind(){ return reset($this->arr); }
public function current()   { throw new Exception(); }
public function key()   { return key($this->arr); }
public function next()  { return next($this->arr); }
public function valid() { return (current($this->arr) !== false);
}
}

$t = new Test();
$t->arr =  array(1, 2, 3);

try {
foreach ($t as $v) {
; // do something
}
} catch (Exception $e) {
; // handle exception
}


Actual result:
--
Fatal error: Couldn't execute method Test::key in Unknown on line 0

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


#32981 [Opn]: ReflectionMethod::getStaticVariables() causes apache2.0.54 seg fault

2005-05-09 Thread phpbug at swift-web dot com
 ID:   32981
 User updated by:  phpbug at swift-web dot com
 Reported By:  phpbug at swift-web dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Gentoo 2.6.11
 PHP Version:  5.0.5-dev
 New Comment:

The script I run that crashes is a class I called ss_debug and it has a
dump method that will use the Reflection methods to output into a easy
to read table information about a class.

I remembered the ss_debug class has methods with static values so I set
it to report/parse itself and it ran, but only if I did it at the end of
a script that ran normally (If I tried dumping the output at the
beginning of a script or just an empty script like entered as an
example earlier, it crashed).

This confused me why it ran at the end and not at the beginning.  I
tried adding a new method to this class that simple was:

function jason() {
  static $me = true;
}

now it crashed all the time (whether I ran it on it's own or after a
page that normally worked).

Pulled a few hairs out and then it dawned on me to override the default
setting in that class before I dumped it and now it works.

So what I have narrowed it down to consistently is if I have static
variables that are still in their default setting of boolean true or
false then it causes a seg fault.  If I override the default setting
before dumping (running the reflection class/methods) then it works. 
Did I explain this clear enough?


Previous Comments:


[2005-05-10 04:01:09] phpbug at swift-web dot com

Couldn't get a core file (even though compiled with --enable-debug) so
I ran httpd -X under gdb
cut 'n paste bt results here:

#0  0xb7cca595 in memcpy () from /lib/libc.so.6
#1  0xb7a90f71 in zif_vprintf () from
/usr/lib/apache2/modules/libphp5.so
#2  0x0822ee7b in ?? ()
#3  0x in ?? ()
#4  0x0005 in ?? ()
#5  0xb7b2411e in zend_make_printable_zval () from
/usr/lib/apache2/modules/libphp5.so
#6  0xbffed060 in ?? ()
#7  0xb7b99b20 in php_tiff_bytes_per_format () from
/usr/lib/apache2/modules/libphp5.so
#8  0x0103 in ?? ()
#9  0xb7b0ea04 in _emalloc () from /usr/lib/apache2/modules/libphp5.so
#10 0xbffec64c in ?? ()
#11 0xbffec648 in ?? ()
#12 0x0052 in ?? ()
#13 0xb7a903c0 in zif_vprintf () from
/usr/lib/apache2/modules/libphp5.so
#14 0xbffec644 in ?? ()
#15 0xbffec648 in ?? ()
#16 0xbffec64c in ?? ()
#17 0x in ?? ()
#18 0x in ?? ()
#19 0x in ?? ()
#20 0x0020 in ?? ()
#21 0x0001 in ?? ()
#22 0x0004 in ?? ()
#23 0x in ?? ()
#24 0x in ?? ()
#25 0x in ?? ()
#26 0x in ?? ()
#27 0x in ?? ()
#28 0x in ?? ()
#29 0x in ?? ()
#30 0x in ?? ()
#31 0x in ?? ()
#32 0x2000 in ?? ()
#33 0x081e9cbc in ?? ()
#34 0x in ?? ()
#35 0x0007 in ?? ()
#36 0x in ?? ()
#37 0x in ?? ()
#38 0x0001 in ?? ()
#39 0x0007 in ?? ()
#40 0x in ?? ()
#41 0x08220dc4 in ?? ()
#42 0x08220324 in ?? ()
#43 0x0822ed04 in ?? ()
#44 0x0177 in ?? ()
#45 0x01e0 in ?? ()
#46 0x0001 in ?? ()
#47 0x in ?? ()
(line 47 repeats the same until 450)
#451 0xbffecca8 in ?? ()
#452 0x081f2d64 in ?? ()
#453 0x in ?? ()
(line 453 repeats the same until 596)
#597 0x7300 in ?? ()
#598 0xb7d572a0 in ?? () from /lib/libc.so.6
#599 0x in ?? ()
#600 0x in ?? ()
#601 0x in ?? ()
#602 0x in ?? ()
#603 0x in ?? ()
#604 0x081ff8cc in ?? ()
#605 0x in ?? ()
#606 0x0005 in ?? ()
#607 0x1999 in ?? ()
#608 0x in ?? ()
#609 0xb7d6eff4 in ?? () from /lib/libc.so.6
#610 0x081ff8cc in ?? ()
#611 0x0006 in ?? ()
#612 0xbffecf48 in ?? ()
#613 0xb7c8fefa in __strtol_internal () from /lib/libc.so.6
#614 0x0004 in ?? ()



[2005-05-10 00:52:01] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

I can't reproduce it - neither with 5_0-dev nor 5.1-dev 



[2005-05-09 22:19:07] phpbug at swift-web dot com

Tried with the latest stable 5.0 (from the link you sent) and the page
still crashes with seg fault error.

The version reported in phpinfo is 5.0.5-dev from that install.



[2005-05-09 11:36:40] [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

Seems to work

#32981 [Fbk->Opn]: ReflectionMethod::getStaticVariables() causes apache2.0.54 seg fault

2005-05-09 Thread phpbug at swift-web dot com
 ID:   32981
 User updated by:  phpbug at swift-web dot com
 Reported By:  phpbug at swift-web dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Gentoo 2.6.11
 PHP Version:  5.0.5-dev
 New Comment:

Couldn't get a core file (even though compiled with --enable-debug) so
I ran httpd -X under gdb
cut 'n paste bt results here:

#0  0xb7cca595 in memcpy () from /lib/libc.so.6
#1  0xb7a90f71 in zif_vprintf () from
/usr/lib/apache2/modules/libphp5.so
#2  0x0822ee7b in ?? ()
#3  0x in ?? ()
#4  0x0005 in ?? ()
#5  0xb7b2411e in zend_make_printable_zval () from
/usr/lib/apache2/modules/libphp5.so
#6  0xbffed060 in ?? ()
#7  0xb7b99b20 in php_tiff_bytes_per_format () from
/usr/lib/apache2/modules/libphp5.so
#8  0x0103 in ?? ()
#9  0xb7b0ea04 in _emalloc () from /usr/lib/apache2/modules/libphp5.so
#10 0xbffec64c in ?? ()
#11 0xbffec648 in ?? ()
#12 0x0052 in ?? ()
#13 0xb7a903c0 in zif_vprintf () from
/usr/lib/apache2/modules/libphp5.so
#14 0xbffec644 in ?? ()
#15 0xbffec648 in ?? ()
#16 0xbffec64c in ?? ()
#17 0x in ?? ()
#18 0x in ?? ()
#19 0x in ?? ()
#20 0x0020 in ?? ()
#21 0x0001 in ?? ()
#22 0x0004 in ?? ()
#23 0x in ?? ()
#24 0x in ?? ()
#25 0x in ?? ()
#26 0x in ?? ()
#27 0x in ?? ()
#28 0x in ?? ()
#29 0x in ?? ()
#30 0x in ?? ()
#31 0x in ?? ()
#32 0x2000 in ?? ()
#33 0x081e9cbc in ?? ()
#34 0x in ?? ()
#35 0x0007 in ?? ()
#36 0x in ?? ()
#37 0x in ?? ()
#38 0x0001 in ?? ()
#39 0x0007 in ?? ()
#40 0x in ?? ()
#41 0x08220dc4 in ?? ()
#42 0x08220324 in ?? ()
#43 0x0822ed04 in ?? ()
#44 0x0177 in ?? ()
#45 0x01e0 in ?? ()
#46 0x0001 in ?? ()
#47 0x in ?? ()
(line 47 repeats the same until 450)
#451 0xbffecca8 in ?? ()
#452 0x081f2d64 in ?? ()
#453 0x in ?? ()
(line 453 repeats the same until 596)
#597 0x7300 in ?? ()
#598 0xb7d572a0 in ?? () from /lib/libc.so.6
#599 0x in ?? ()
#600 0x in ?? ()
#601 0x in ?? ()
#602 0x in ?? ()
#603 0x in ?? ()
#604 0x081ff8cc in ?? ()
#605 0x in ?? ()
#606 0x0005 in ?? ()
#607 0x1999 in ?? ()
#608 0x in ?? ()
#609 0xb7d6eff4 in ?? () from /lib/libc.so.6
#610 0x081ff8cc in ?? ()
#611 0x0006 in ?? ()
#612 0xbffecf48 in ?? ()
#613 0xb7c8fefa in __strtol_internal () from /lib/libc.so.6
#614 0x0004 in ?? ()


Previous Comments:


[2005-05-10 00:52:01] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

I can't reproduce it - neither with 5_0-dev nor 5.1-dev 



[2005-05-09 22:19:07] phpbug at swift-web dot com

Tried with the latest stable 5.0 (from the link you sent) and the page
still crashes with seg fault error.

The version reported in phpinfo is 5.0.5-dev from that install.



[2005-05-09 11:36:40] [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

Seems to work fine fore me with latest CVS HEAD (5.1-dev) but do try
and see if it's fixed in the 5.0 too.




[2005-05-09 10:15:43] phpbug at swift-web dot com

Description:

Discovered if I am using ReflectionMethod::getStaticVariables() on a
method that has a static variable that is set to boolean true or false
then php crashes (Apache 2 exists with following error)

[notice] child pid 28346 exit signal Segmentation fault (11)

I tried with php version 5.0.3 initially but upgraded to 5.0.4 and
problem still exists.






Reproduce code:
---
class demo_class {
  static function myDemo($toggle) {
static $enabled = true;
// do whatever
  }
}

$class = new ReflectionClass('demo_class');
foreach ($class->getMethods() as $method) {
  $arr_static_vars[] = $method->getStaticVariables();
}
echo "done"; 
// (normally would output $arr_static_var but just put above
//  line for simplicity in this example)

Expected result:

See a screen with just the word 'done' on it



Actual result:
--
Page loading stops immediately (and keeps last page shown displayed. 
Apache logs show:


[notice] child pid 28346 exit signal Segmentation fault (11)
(pid of course varies)

If I ch

#32638 [Bgs]: objects cast as string explictly require a __toString when __call is defined

2005-05-09 Thread alan_k
 ID:   32638
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jason at amp-design dot net
 Status:   Bogus
 Bug Type: Zend Engine 2 problem
 Operating System: CentOS
 PHP Version:  5.0.4
 New Comment:

It's supposed to get fixed, but it's not regarded as critical, just
annoying, so It has to annoy a developer  enough to fix it


Previous Comments:


[2005-05-09 16:14:18] jason at amp-design dot net

Out of interest/curiousity, when a bug is marked as 'bogus', what does
that mean? Although you state it's currently the expected behaviour,
are you suggesting that this could change in future releases in the
long term (i.e. next major release) maybe when you go over and review
certain issues. You seem to suggest that this might be the case in the
second from last comment in http://bugs.php.net/bug.php?id=30791.



[2005-04-14 09:40:53] [EMAIL PROTECTED]

Dupe of #30791



[2005-04-14 09:20:04] [EMAIL PROTECTED]

This is expected behaviour because __call() catches all undefined
methods, including magic ones like __toString().
You have to define __toString() or fix __call() to return appropriate
string representation of the object.



[2005-04-08 19:49:47] jason at amp-design dot net

Description:

This produces an error that should not happen. Instead, when you cast
an object to a string that has no __toString defined, it should produce
the objects internal ID. Oddly enough, the behaviour is inconsistent as
...

class A {
public function __call($name, $args) {echo $name;}
}
echo (new A);

seems to work as expected. I can't see how this should behave
differently from dereferencing from a variable. 

I guess the behaviour of string casting is undefined for objects that
do not have __toString() defined, so I guess it is debateable if this
is really a bug, or a querky language "feature" ;-)

Note that this will work if one returns a value for __call().

Reproduce code:
---


Expected result:

Object id #insert_number_here

Actual result:
--
__tostring
Fatal error: Method A::__toString() must return a string value in
/data/test.php on line 21





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


#32984 [Opn->Fbk]: problem with array_walk()

2005-05-09 Thread sniper
 ID:   32984
 Updated by:   [EMAIL PROTECTED]
 Reported By:  arne dot binder at blue-com dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Windows NT4
 PHP Version:  5.0.4
 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

Works fine for me.




Previous Comments:


[2005-05-09 13:07:51] arne dot binder at blue-com dot de

Description:

The problem is the location of the declaration of the used
callback-function in array_walk(). If this declaration is inside a
switch-block (but if-blocks work!), array_walk() crashes php.

The following sample-code illustrates the problem. If the function
declaration is moved out of the switch-block, everything works fine.

Reproduce code:
---
 ' 1');

print_r($arr);

function trim_it(&$item, $key) { $item=trim($item); }

array_walk($arr, 'trim_it');

print_r($arr);
break;
}
?>

Expected result:

Array
(
[Line] =>  1
)
Array
(
[Line] => 1
)


Actual result:
--
Ask Dr. Watson for NT4 ;-)





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


#32990 [Fbk->Opn]: Invalid statement handle

2005-05-09 Thread kevin dot bluck at mail dot com
 ID:   32990
 User updated by:  kevin dot bluck at mail dot com
 Reported By:  kevin dot bluck at mail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: InterBase related
 Operating System: Win2000
 PHP Version:  5.0.4
 New Comment:

It seems specifically to apply when a query is prepared with
ibase_prepare and run with ibase_execute; ibase_query does not show
warning.


This code reproduces on my system.




Previous Comments:


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

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.






[2005-05-09 19:29:00] kevin dot bluck at mail dot com

Description:

Appears to be a reversion of previously closed Bug #14039: symptoms
seem identical to that bug report.

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

Commenting out the ibase_close call eliminates the warning message.







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


#32992 [Bgs]: display_errors = off does not work correctly

2005-05-09 Thread agarrison at st3 dot cc
 ID:   32992
 User updated by:  agarrison at st3 dot cc
 Reported By:  agarrison at st3 dot cc
 Status:   Bogus
 Bug Type: PHP options/info functions
 Operating System: Windows 2003
 PHP Version:  4.3.11
 New Comment:

No it was using the one in c:\php4 that I was changing.  I used phpinfo
to make sure.  I also copied it to c:\windows in case phpinfo wasn't
showing me the correct information and I restarted IIS after every
change, and display_errors still did not work correctly.


Previous Comments:


[2005-05-10 00:40:08] [EMAIL PROTECTED]

You're most likely using the wrong php.ini. Check the output of
phpinfo() to see which php.ini file is your php install using.



[2005-05-09 23:24:28] agarrison at st3 dot cc

Description:

If you use the CGI binary php.exe instead of the ISAPI module
php4isapi.dll with IIS 6 setting dispaly_errors = off does not work
correctly.  Errors are still displayed.  In my case they were just
NOTICE errors, but changing IIS to use the ISAPI module seems to fix
the issue.

Reproduce code:
---
http://www.smartechcorp.net The errors display in the news box on the
left.  Currently it's fixed since I'm using the ISAPI module.  I can
change it back to display the errors if needed.






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


#32985 [Opn->Bgs]: /e Modifier Escaping Double Quotes With \ Even Though Magic Quotes Is Off

2005-05-09 Thread sniper
 ID:   32985
 Updated by:   [EMAIL PROTECTED]
 Reported By:  crypticcreeper at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: PCRE related
 Operating System: Linux & Windows
 PHP Version:  5.0.4
 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-05-09 16:02:48] crypticcreeper at yahoo dot com

Unfortunately I can't even use stripslashes() in the replace paramter
because it will not work correctly because backslashs are not escaped
so legitimate ones will be stripped. I ended up doing a str_replace for
\" as a temporary fix until this gets resolved.



[2005-05-09 15:32:00] crypticcreeper at yahoo dot com

Description:

When using the /e modifier if the match contains a double quote it is
escaped with a \

If it was magic quotes I am assuming it would effect single quotes too,
but in fact doesnt. I tested this on Windows 2000 5.0.5-dev and on Linux
5.0.4 and both had same results. Even when I test using a conditional to
see if magic quotes is on it still runs it. I even manually set magic
quotes off in the script and still the problem occurred. I'm not sure
if this is documented behavior, I do know /e causes PHP to escape data,
but why only double quotes?

Reproduce code:
---
$data = ' " '
$data = preg_replace('/(")/ie', "'$1'", $data);
echo $data;

Expected result:

"

Actual result:
--
\"





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


#32981 [Opn->Fbk]: ReflectionMethod::getStaticVariables() causes apache2.0.54 seg fault

2005-05-09 Thread johannes
 ID:   32981
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phpbug at swift-web dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Gentoo 2.6.11
 PHP Version:  5.0.5-dev
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

I can't reproduce it - neither with 5_0-dev nor 5.1-dev 


Previous Comments:


[2005-05-09 22:19:07] phpbug at swift-web dot com

Tried with the latest stable 5.0 (from the link you sent) and the page
still crashes with seg fault error.

The version reported in phpinfo is 5.0.5-dev from that install.



[2005-05-09 11:36:40] [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

Seems to work fine fore me with latest CVS HEAD (5.1-dev) but do try
and see if it's fixed in the 5.0 too.




[2005-05-09 10:15:43] phpbug at swift-web dot com

Description:

Discovered if I am using ReflectionMethod::getStaticVariables() on a
method that has a static variable that is set to boolean true or false
then php crashes (Apache 2 exists with following error)

[notice] child pid 28346 exit signal Segmentation fault (11)

I tried with php version 5.0.3 initially but upgraded to 5.0.4 and
problem still exists.






Reproduce code:
---
class demo_class {
  static function myDemo($toggle) {
static $enabled = true;
// do whatever
  }
}

$class = new ReflectionClass('demo_class');
foreach ($class->getMethods() as $method) {
  $arr_static_vars[] = $method->getStaticVariables();
}
echo "done"; 
// (normally would output $arr_static_var but just put above
//  line for simplicity in this example)

Expected result:

See a screen with just the word 'done' on it



Actual result:
--
Page loading stops immediately (and keeps last page shown displayed. 
Apache logs show:


[notice] child pid 28346 exit signal Segmentation fault (11)
(pid of course varies)

If I change the third line in my sample code to:
  static $enabled = 1;

(or string) the page does not crash and things display properly

I haven't tested this to see if it also crashes showing static
variables for the entire class (as opposed to the one in the method)
but if they inherit the same code I guess it would also crash but again
I haven't confirmed that.





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


#32990 [Opn->Fbk]: Invalid statement handle

2005-05-09 Thread sniper
 ID:   32990
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kevin dot bluck at mail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: InterBase related
 Operating System: Win2000
 PHP Version:  5.0.4
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.





Previous Comments:


[2005-05-09 19:29:00] kevin dot bluck at mail dot com

Description:

Appears to be a reversion of previously closed Bug #14039: symptoms
seem identical to that bug report.

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

Commenting out the ibase_close call eliminates the warning message.







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


#32991 [Opn->Bgs]: Error connecting to Access Database using ODBC

2005-05-09 Thread sniper
 ID:   32991
 Updated by:   [EMAIL PROTECTED]
 Reported By:  info at genitek dot net
-Status:   Open
+Status:   Bogus
 Bug Type: ODBC related
 Operating System: Win 2K Pro
 PHP Version:  4.3.10
 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-05-09 21:02:01] info at genitek dot net

The error only arrive sometime, but when arrive, always stay until I
restart apache. After the restart, the error disapear for a moment
then, comme back



[2005-05-09 21:00:22] info at genitek dot net

Description:

php.ini-dist  with register global ON
MDAC 2.8
Apache 1.3.33
PHP 4.3.10

Reproduce code:
---
$conn=odbc_connect("SYSTEM_DNS", "", "");
if (!$conn) { Error_handler( "Error in odbc_connect" , $conn ); }

$query="Select * from QUERY";

$result = odbc_exec($conn,$query);

if (!$result) { 
exit("Error in SQL"); } 



Expected result:

Return no error !

Actual result:
--
Return, ODBC error, I receive in the ODBC trace log this :

httpd   368-3ac EXIT  SQLConnectW  with return code -1
(SQL_ERROR)
HDBC00A412F8
WCHAR * 0x00A42500 [  -3] "SYSTEM_DNS\ 0"
SWORD   -3 
WCHAR * 0x1F7C4AA0 [  -3] "**\ 0"
SWORD   -3 
WCHAR * 0x1F7C4AA0 [  -3] "**\ 0"
SWORD   -3 

DIAG [S1000] [Microsoft][Pilote ODBC Microsoft Access] 
Impossible
d'ouvrir la base de données '(Inconnu)'. Ce n'est peut-être pas une
base de données que votre application reconnaît, ou le fichier est
peut-être endommagé. (-1028) 

And the only thing I have to do to correct the problem, RESTART
APACHE than return or refresh the web site.. and everithing is OK
for a moment... how long, I can figure...







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


#32987 [Opn->Bgs]: PHP code ( fgetcsv() function )below do not working properly

2005-05-09 Thread sniper
 ID:   32987
 Updated by:   [EMAIL PROTECTED]
 Reported By:  max at tehnomir dot com dot ua
-Status:   Open
+Status:   Bogus
-Bug Type: Scripting Engine problem
+Bug Type: Filesystem function related
 Operating System: Linux 2.4.29
 PHP Version:  4.3.10
 New Comment:

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.




Previous Comments:


[2005-05-09 17:00:16] max at tehnomir dot com dot ua

Description:

Hello!

The fgetcsv() function do not working properly.
Below there is a fragment of the source data file. 

source data file---

SZ | 7784252D0  |  | 29.13
SZ | 7784265DA1000  |  | 21.23
SZ | 7784265DA10PG  | "Title ""V6"" | 17.9
SZ | 784270C2   |  | 29.9
SZ | 784360E0   |  | 29.41

-end data file--

On big input files the function after line number 3 of data file need
more and more memory and then crashes with trying to allocate memory.

Reproduce code:
---
#!/usr/bin/php
http://bugs.php.net/?id=32987&edit=1


#32992 [Opn->Bgs]: display_errors = off does not work correctly

2005-05-09 Thread edink
 ID:   32992
 Updated by:   [EMAIL PROTECTED]
 Reported By:  agarrison at st3 dot cc
-Status:   Open
+Status:   Bogus
 Bug Type: PHP options/info functions
 Operating System: Windows 2003
 PHP Version:  4.3.11
 New Comment:

You're most likely using the wrong php.ini. Check the output of
phpinfo() to see which php.ini file is your php install using.


Previous Comments:


[2005-05-09 23:24:28] agarrison at st3 dot cc

Description:

If you use the CGI binary php.exe instead of the ISAPI module
php4isapi.dll with IIS 6 setting dispaly_errors = off does not work
correctly.  Errors are still displayed.  In my case they were just
NOTICE errors, but changing IIS to use the ISAPI module seems to fix
the issue.

Reproduce code:
---
http://www.smartechcorp.net The errors display in the news box on the
left.  Currently it's fixed since I'm using the ISAPI module.  I can
change it back to display the errors if needed.






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


#32973 [Bgs->Csd]: Problem with unbuffered prep. statements

2005-05-09 Thread andrey
 ID:   32973
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Bogus
+Status:   Closed
 Bug Type: MySQLi related
 Operating System: Linux
 PHP Version:  5CVS-2005-05-07 (dev)
 New Comment:

added code that emits an warning in case of there is still error on the
wire. ext/mysqli does it for unbuffered queries.


Previous Comments:


[2005-05-08 15:01:42] [EMAIL PROTECTED]

It makes no sense to do some magic and closing unbuffered statements
when executing mysql_prepare.

$stmt1 = $mysql->prepare("SELECT foo FROM bar");
$stmt1->execute();

$stmt2->prepare("SELECT foo FROM user");

So why should 2nd prepare automatically clean resultset from  first
statement instead of giving an error ??

It's well documented that you have to either store the resultset or to
close the statement before executing any other command (execept you're
using cursors with MySQL 5.0).

The same is also true when executing unbuffered queries in ext/mysql
and ext/mysqli.



[2005-05-07 08:51:52] [EMAIL PROTECTED]

Description:

Prepare does not clean the wire before the next prepare. It should be
discussed whether it should be done but this bug is created to have a
track of this issue.

Reproduce code:
---
prepare("SELECT 1 AS test");
$st->execute();
$st->bind_result($x);
$st->fetch();
var_dump($x);

$st = $db->prepare("SELECT 1.23 AS test");
var_dump($st);
$st->execute();
$st->bind_result($x);
$st->fetch();
var_dump($x);

?>

Expected result:

int(1)
object(mysqli_stmt)#3 (0) {
}
string(4) "1.23"


Actual result:
--
int(1)
bool(false)
PHP Fatal error:  Call to a member function execute() on a non-object
in /home/andrey/tst/ttt.php on line 11






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


#32992 [NEW]: display_errors = off does not work correctly

2005-05-09 Thread agarrison at st3 dot cc
From: agarrison at st3 dot cc
Operating system: Windows 2003
PHP version:  4.3.11
PHP Bug Type: PHP options/info functions
Bug description:  display_errors = off does not work correctly

Description:

If you use the CGI binary php.exe instead of the ISAPI module
php4isapi.dll with IIS 6 setting dispaly_errors = off does not work
correctly.  Errors are still displayed.  In my case they were just NOTICE
errors, but changing IIS to use the ISAPI module seems to fix the issue.

Reproduce code:
---
http://www.smartechcorp.net The errors display in the news box on the
left.  Currently it's fixed since I'm using the ISAPI module.  I can
change it back to display the errors if needed.


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


#32963 [Opn->Fbk]: Hard to find/trace Segfault issues

2005-05-09 Thread derick
 ID:   32963
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Jason at hybd dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: CentOS 4 / RHEL 3
 PHP Version:  5CVS-2005-05-06 (dev)
 New Comment:

Are you using references extensively?


Previous Comments:


[2005-05-09 19:47:01] Jason at hybd dot net

There seems to be no way I can reduce this bug down to a few lines. I
can only think some eariler piece of code triggers some sort of memory
corruption. I've tried with a test script, fiddling about with things
like scopes and making circlar references, thinking maybe that was to
do with it (seeing as it's destruction call to the offset that seems to
be creating the problem, from what I can make out in the src)

Although I don't think it's the same thing as (Certainly I had some
code that was doing what was said in these bugs, but it seems like it
works now, which makes me believe the bugs below are different,
although the behaviour is rather similar at times)...

http://bugs.php.net/bug.php?id=30346
OR
http://bugs.php.net/bug.php?id=32252

It is very similar. The issue is to do with offsetGet(). Frame 5 of the
dump seems to the most likely problem area.



[2005-05-09 15:17:20] Jason at hybd dot net

In a worst case scenario (if I can't get a small test script
developed), would it be OK to email you with access details to the
scripts/server so you can investigate for yourself. I can give you
suitable SSH access to our testing box. That way you can do what you
want in the way of running gdb, recompiling etc if need be.



[2005-05-09 11:38:38] [EMAIL PROTECTED]

We can't do much without a script to reproduce it ourselves, so try
come up with one..




[2005-05-09 11:28:08] jason at amp-design dot net

I normally do try and isolate bugs in PHP by producing a short few
lines of PHP in order to replicate the problem.

I have tried on many occasions when I have had this bug to replicate it
by stripping parts of the code down, but I have not managed to do it
sucessfully yet. Is there any other way I can profide feedback? I could
probably try and limit the amount code down to some extent, but even so
I doubt it would be a small chunk of code.

Anyway, I will attempt to find a way to replicate this as soon as I can
get time.



[2005-05-07 05:48:04] [EMAIL PROTECTED]

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

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the 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/32963

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


#32981 [Fbk->Opn]: ReflectionMethod::getStaticVariables() causes apache2.0.54 seg fault

2005-05-09 Thread phpbug at swift-web dot com
 ID:   32981
 User updated by:  phpbug at swift-web dot com
 Reported By:  phpbug at swift-web dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Gentoo 2.6.11
-PHP Version:  5.0.4
+PHP Version:  5.0.5-dev
 New Comment:

Tried with the latest stable 5.0 (from the link you sent) and the page
still crashes with seg fault error.

The version reported in phpinfo is 5.0.5-dev from that install.


Previous Comments:


[2005-05-09 11:36:40] [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

Seems to work fine fore me with latest CVS HEAD (5.1-dev) but do try
and see if it's fixed in the 5.0 too.




[2005-05-09 10:15:43] phpbug at swift-web dot com

Description:

Discovered if I am using ReflectionMethod::getStaticVariables() on a
method that has a static variable that is set to boolean true or false
then php crashes (Apache 2 exists with following error)

[notice] child pid 28346 exit signal Segmentation fault (11)

I tried with php version 5.0.3 initially but upgraded to 5.0.4 and
problem still exists.






Reproduce code:
---
class demo_class {
  static function myDemo($toggle) {
static $enabled = true;
// do whatever
  }
}

$class = new ReflectionClass('demo_class');
foreach ($class->getMethods() as $method) {
  $arr_static_vars[] = $method->getStaticVariables();
}
echo "done"; 
// (normally would output $arr_static_var but just put above
//  line for simplicity in this example)

Expected result:

See a screen with just the word 'done' on it



Actual result:
--
Page loading stops immediately (and keeps last page shown displayed. 
Apache logs show:


[notice] child pid 28346 exit signal Segmentation fault (11)
(pid of course varies)

If I change the third line in my sample code to:
  static $enabled = 1;

(or string) the page does not crash and things display properly

I haven't tested this to see if it also crashes showing static
variables for the entire class (as opposed to the one in the method)
but if they inherit the same code I guess it would also crash but again
I haven't confirmed that.





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


#32991 [NEW]: Error connecting to Access Database using ODBC

2005-05-09 Thread info at genitek dot net
From: info at genitek dot net
Operating system: Win 2K Pro
PHP version:  4.3.10
PHP Bug Type: ODBC related
Bug description:  Error connecting to Access Database using ODBC

Description:

php.ini-dist  with register global ON
MDAC 2.8
Apache 1.3.33
PHP 4.3.10

Reproduce code:
---
$conn=odbc_connect("SYSTEM_DNS", "", "");
if (!$conn) { Error_handler( "Error in odbc_connect" , $conn ); }

$query="Select * from QUERY";

$result = odbc_exec($conn,$query);

if (!$result) { 
exit("Error in SQL"); } 



Expected result:

Return no error !

Actual result:
--
Return, ODBC error, I receive in the ODBC trace log this :

httpd   368-3ac EXIT  SQLConnectW  with return code -1
(SQL_ERROR)
HDBC00A412F8
WCHAR * 0x00A42500 [  -3] "SYSTEM_DNS\ 0"
SWORD   -3 
WCHAR * 0x1F7C4AA0 [  -3] "**\ 0"
SWORD   -3 
WCHAR * 0x1F7C4AA0 [  -3] "**\ 0"
SWORD   -3 

DIAG [S1000] [Microsoft][Pilote ODBC Microsoft Access] 
Impossible
d'ouvrir la base de données '(Inconnu)'. Ce n'est peut-être pas une base
de données que votre application reconnaît, ou le fichier est peut-être
endommagé. (-1028) 

And the only thing I have to do to correct the problem, RESTART APACHE
than return or refresh the web site.. and everithing is OK for a moment...
how long, I can figure...



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


#32991 [Opn]: Error connecting to Access Database using ODBC

2005-05-09 Thread info at genitek dot net
 ID:   32991
 User updated by:  info at genitek dot net
 Reported By:  info at genitek dot net
 Status:   Open
 Bug Type: ODBC related
 Operating System: Win 2K Pro
 PHP Version:  4.3.10
 New Comment:

The error only arrive sometime, but when arrive, always stay until I
restart apache. After the restart, the error disapear for a moment
then, comme back


Previous Comments:


[2005-05-09 21:00:22] info at genitek dot net

Description:

php.ini-dist  with register global ON
MDAC 2.8
Apache 1.3.33
PHP 4.3.10

Reproduce code:
---
$conn=odbc_connect("SYSTEM_DNS", "", "");
if (!$conn) { Error_handler( "Error in odbc_connect" , $conn ); }

$query="Select * from QUERY";

$result = odbc_exec($conn,$query);

if (!$result) { 
exit("Error in SQL"); } 



Expected result:

Return no error !

Actual result:
--
Return, ODBC error, I receive in the ODBC trace log this :

httpd   368-3ac EXIT  SQLConnectW  with return code -1
(SQL_ERROR)
HDBC00A412F8
WCHAR * 0x00A42500 [  -3] "SYSTEM_DNS\ 0"
SWORD   -3 
WCHAR * 0x1F7C4AA0 [  -3] "**\ 0"
SWORD   -3 
WCHAR * 0x1F7C4AA0 [  -3] "**\ 0"
SWORD   -3 

DIAG [S1000] [Microsoft][Pilote ODBC Microsoft Access] 
Impossible
d'ouvrir la base de données '(Inconnu)'. Ce n'est peut-être pas une
base de données que votre application reconnaît, ou le fichier est
peut-être endommagé. (-1028) 

And the only thing I have to do to correct the problem, RESTART
APACHE than return or refresh the web site.. and everithing is OK
for a moment... how long, I can figure...







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


#32963 [Opn]: Hard to find/trace Segfault issues

2005-05-09 Thread Jason at hybd dot net
 ID:   32963
 User updated by:  Jason at hybd dot net
 Reported By:  Jason at hybd dot net
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: CentOS 4 / RHEL 3
 PHP Version:  5CVS-2005-05-06 (dev)
 New Comment:

There seems to be no way I can reduce this bug down to a few lines. I
can only think some eariler piece of code triggers some sort of memory
corruption. I've tried with a test script, fiddling about with things
like scopes and making circlar references, thinking maybe that was to
do with it (seeing as it's destruction call to the offset that seems to
be creating the problem, from what I can make out in the src)

Although I don't think it's the same thing as (Certainly I had some
code that was doing what was said in these bugs, but it seems like it
works now, which makes me believe the bugs below are different,
although the behaviour is rather similar at times)...

http://bugs.php.net/bug.php?id=30346
OR
http://bugs.php.net/bug.php?id=32252

It is very similar. The issue is to do with offsetGet(). Frame 5 of the
dump seems to the most likely problem area.


Previous Comments:


[2005-05-09 15:17:20] Jason at hybd dot net

In a worst case scenario (if I can't get a small test script
developed), would it be OK to email you with access details to the
scripts/server so you can investigate for yourself. I can give you
suitable SSH access to our testing box. That way you can do what you
want in the way of running gdb, recompiling etc if need be.



[2005-05-09 11:38:38] [EMAIL PROTECTED]

We can't do much without a script to reproduce it ourselves, so try
come up with one..




[2005-05-09 11:28:08] jason at amp-design dot net

I normally do try and isolate bugs in PHP by producing a short few
lines of PHP in order to replicate the problem.

I have tried on many occasions when I have had this bug to replicate it
by stripping parts of the code down, but I have not managed to do it
sucessfully yet. Is there any other way I can profide feedback? I could
probably try and limit the amount code down to some extent, but even so
I doubt it would be a small chunk of code.

Anyway, I will attempt to find a way to replicate this as soon as I can
get time.



[2005-05-07 05:48:04] [EMAIL PROTECTED]

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

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2005-05-06 16:05:48] jason at amp-design dot net

OK, I've tried to narrow down things a little more. This is not proving
easy.

OK, I can see why this is making things crash according to different
browsers. I have a piece of code like this ...

/**
 * Extracts path data from URL into a string.
 *
 * This will attempt to read the path data from many locations, 
 * such as after the .php part of the URL, the path request variable
 * or from the site root.
 */
function iq_extract_path() {
if (!isset($_REQUEST['path'])) {
/* try to extract it from URL */
$path_string = $_SERVER['REQUEST_URI'];
/* Are we hiding the .php file ? */
if (strpos($_SERVER['SCRIPT_NAME'], '.php') !== false) {
/* Remove the index or whatever .php bit */ 
$path_string = preg_replace('/\/[\w]+.php/', '', 
$path_string);
}
/* We need to trim on / or it replaces '/' if we are running 
from
root dir */
$prefix_path = trim(dirname($_SERVER['SCRIPT_NAME']), '/');
/* Remove any prefixed URL path */
$path_string = str_replace($prefix_path, '', $path_string);
/* remove query string */
$path_string = str_replace('?'.$_SERVER['QUERY_STRING'], '',
$path_string);
} else {
$path_string = $_REQUEST['path'];
}
return $path_string;
}

As you can see, this looks at server variables, which explains that. On
the site it's used, it allows us to use a clean search engine / user
friendly URL system, instead of using HTTP GET/POST variables for the
front controller's dispatching. If no server variables are used, it
looks at $_REQUEST['path'] as a safety fallback.

I found that setting $_REQUEST['path'] to the right value (so it
doesn't touch the $_SERVER array) stops the segfault

#32983 [Asn]: Bogus error message when using ArrayAccess / References

2005-05-09 Thread helly
 ID:   32983
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jason at amp-design dot net
 Status:   Assigned
 Bug Type: SPL related
-Operating System: Cent OS 4
+Operating System: *
-PHP Version:  5CVS-2005-05-09 (dev)
+PHP Version:  5.0.4
 Assigned To:  helly
 New Comment:

Actually at the moment this is a known issue which we cannot fix
appropriate right away. But we are working on the matter.


Previous Comments:


[2005-05-09 13:01:24] [EMAIL PROTECTED]

Marcus, your baby -> you decide :)




[2005-05-09 12:38:42] jason at amp-design dot net

Description:

I'm not 100% sure this is considered a "bug" as such, anyway, I thought
I'd point it out, and let you decide. It's more a case of the error
message being a little fuzzy.

When trying to assign an item by reference by using the reference
operator, &, to an element inside a class that implements ArrayAccess
produces a werid error message.

Admittedly, the code I've provided is probably not valid PHP code,
because the nature of the ArrayAccess interface means that data is
assigned and returned from offsetSet and offsetGet by value, so using
refernces should probably not work.

However, the when you do try this, you get an error about about
post/pre increment/decrement. I'm not sure what this refers to, but it
doesn't seem to be very descriptive.

Reproduce code:
---
data[$index] = $value;
}

public function offsetGet($index) {
return $this->data[$index];
}

public function offsetExists($index) {
return isset($this->data[$index]);
}
}

$data = new ArrayAccessImpl();
$test = 'some data';
$data['element'] = &$test;

?>

Expected result:

Unsure, probably an error message relating to the fact ArrayAccess
objects can not assign by reference

Actual result:
--
Fatal error: Objects used as arrays in post/pre increment/decrement
must return values by reference





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


#32990 [NEW]: Invalid statement handle

2005-05-09 Thread kevin dot bluck at mail dot com
From: kevin dot bluck at mail dot com
Operating system: Win2000
PHP version:  5.0.4
PHP Bug Type: InterBase related
Bug description:  Invalid statement handle

Description:

Appears to be a reversion of previously closed Bug #14039: symptoms seem
identical to that bug report.

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

Commenting out the ibase_close call eliminates the warning message.



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


#29860 [Com]: Cannot compile with mysql and mysqli extensions

2005-05-09 Thread jorge dot tiao dot pereira at gmail dot com
 ID:   29860
 Comment by:   jorge dot tiao dot pereira at gmail dot com
 Reported By:  rjanson at msn dot com
 Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: Redhat 9
 PHP Version:  5.0.1
 New Comment:

so do i.
i don´t connect mysql database to the pega in php.
how do it?


Previous Comments:


[2005-02-19 19:32:23] chris at leftbrained dot org

I know this hasn't been looked at in some time, but I've spent that
last few days working out this exact problem.

Apache 2.0.53 - Built by me into /usr/local/apache
MySQL 4.1.9 - Used the RPM download of of mysql.com
>MySQL-client-4.1.9-0
>MySQL-shared-compat-4.1.9-0
>MySQL-server-4.1.9-0
>MySQL-bench-4.1.9-0
>MySQL-devel-4.1.9-0

PHP 5.0.3 - ./configure --with-apxs2=/usr/local/apache/bin/apxs
--with-mysql=/usr --with-mysqli=/usr/bin/mysql_config

I'm on some form of RedHat Enterprise, I'm not quite sure how I would
check which one.

I was coming up witht he same exact errors, and the *only* way I was
able to make it work was this:

cd /usr/lib/mysql
rename .a .a_old *.a
rename .la .la_old *.la

Then run configure/make/make install

Then rename these files back.

cd /usr/lib/mysql
rename .a_old .a *.a_old
rename .la_old .la *.la_old

I'm not sure what precisely these files are, and this was a last resort
attempt for me, but it worked.

Chris



[2004-10-28 21:49:01] kpederson at mail dot ewu dot edu

I can confirm a few things.  I have both the static and 
the shared libraries installed as they both come in the 
standard mysql-devel rpm: 
 
/usr/lib/libmysqlclient.so 
/usr/lib/libmysqlclient.so.14 
/usr/lib/mysql 
/usr/lib/mysql/libmysqlclient.a 
/usr/lib/mysql/libmysqlclient_r.la 
/usr/lib/mysql/libmysqld.a 
/usr/lib/mysql/libmysqlclient_r.a 
/usr/lib/mysql/mysqld.sym 
/usr/lib/mysql/libmysqlclient.la 
/usr/lib/libmysqlclient.so.14.0.0 
/usr/lib/libmysqlclient_r.so 
/usr/lib/libmysqlclient_r.so.14 
/usr/lib/libmysqlclient_r.so.14.0.0 
 
If the static libraries are found, then the make dies with 
linking problems.  I temporarily did a 'rename .a .a_old 
*.a' and 'rename .la .la_old *.la' in my /usr/lib/mysql 
directory, and then was able to make everything 
successfully. 
 
The output of ./configure ... | grep -i mysql gives: 
 
checking for MySQL support... yes 
checking for specified location of the MySQL UNIX 
socket... /var/run/mysql/mysql.sock 
checking for MySQL UNIX socket 
location... /var/run/mysql/mysql.sock 
checking for mysql_close in -lmysqlclient... (cached) yes 
checking for MySQLi support... yes 
checking whether to enable embedded MySQLi support... no 
checking for mysql_set_server_option in -lmysqlclient... 
(cached) yes 
checking for mysql_stmt_field_count in -lmysqlclient... 
(cached) yes 
 
BTW, I'm running Redhat Enterprise AS using PHP-5.0.2 and 
MySQL-4.1.7 (stable).



[2004-10-14 01:00:05] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



[2004-10-07 12:52:08] stormchaser1 at gmail dot com

forgot to mention it's the MySQL 5.0.1-alpha installed from 
rpms from mysql.com



[2004-10-07 12:48:24] stormchaser1 at gmail dot com

Saame problem... cvs HEAD (php 5.1) from yesterday...



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

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


#32989 [Opn->Bgs]: str_pad and str_repeat return wrong string

2005-05-09 Thread derick
 ID:   32989
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gclift at gtsquared dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Strings related
 Operating System: Linux  2.4.21-27.0.2.ELsmp #1
 PHP Version:  4.3.11
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Read the manual again, pay close attention to the examples and the
order of parameters.


Previous Comments:


[2005-05-09 17:10:59] gclift at gtsquared dot com

Description:

str_pad returns the exact same string that was entered as the string
input.

str_repeat returns 0 length string.


'./configure' '--localstatedir=/var/hsphere/php'
'--with-apxs=/hsphere/shared/apache/bin/apxs' '--with-openssl=/usr'
'--with-zlib=/usr' '--with-zlib-dir=/usr' '--with-bz2=/usr'
'--enable-calendar' '--with-jpeg-dir=/usr' '--enable-ftp' '--with-gd'
'--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf'
'--with-png-dir=/usr' '--with-gettext=/usr'
'--with-imap=/hsphere/shared' '--with-mysql=/usr' '--with-pgsql=/usr'
'--with-curl=/hsphere/shared' '--with-curlwrappers' '--with-mhash=/usr'
'--with-iconv=/hsphere/shared' '--enable-sockets' '--with-zip=/usr'
'--enable-versioning' '--enable-track-vars' '--enable-trans-sid'
'--enable-bcmath' '--enable-mbstring' '--disable-debug'

Reproduce code:
---
Start Test!";
echo "";

var_dump( str_repeat(4, "../") );
echo "\r\n";
var_dump( str_pad("TESTING", 6, "../", STR_PAD_LEFT) );
echo "\r\n";
var_dump( str_pad("TESTING", 6, "-==") );
echo "\r\n";
var_dump( str_pad("TEST", 4) );

echo "";
echo "End Test!";
exit(0);


?>

Expected result:

Start Test!

string(0) "../../../../"

string(7) "../../../../../TESTING"

string(7) "TESTING-==-==-==-==-==-=="

string(4) "TEST"


End Test!

Actual result:
--
Start Test!

string(0) ""

string(7) "TESTING"

string(7) "TESTING"

string(4) "TEST"


End Test!





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


#32988 [NEW]: OCI doesn't support DB external authentication

2005-05-09 Thread stephane dot dekeyzer at kmi dot be
From: stephane dot dekeyzer at kmi dot be
Operating system: Any
PHP version:  5.0.4
PHP Bug Type: OCI8 related
Bug description:  OCI doesn't support DB external authentication

Description:

OCILogon, OCIPLogon, doesn't support external authentication to the
database ...

I know this a ecurity hole if you use php with apache, but when you use it
in scripting mode, it is very usefull, and itsn't a security breach.

I met Christopher Jones last week at the PHP conference in Amsterdam who
agreed and asked me to post this bug so OCI developpers can discuss about
it.

It would a be a good idea when php runs without apache, external
authentication would be allowed.

I have a modification of the oci8.c wich support external authentication,
just mail me if you want to have it !

Reproduce code:
---
$conn = OCILogon("", "", mydb); // should work
$conn = OCILogon("/", "", mydb); // should also work
$conn = OCILogon(null, null, mydb); // should also work

Expected result:

$conn = OCILogon(null, null, mydb); // should work and log me in as the os
user curently running the script


Actual result:
--
$conn = OCILogon(null, null, mydb); // gives an error.

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


#32987 [NEW]: PHP code ( fgetcsv() function )below do not working properly

2005-05-09 Thread max at tehnomir dot com dot ua
From: max at tehnomir dot com dot ua
Operating system: Linux 2.4.29
PHP version:  4.3.10
PHP Bug Type: Scripting Engine problem
Bug description:  PHP code ( fgetcsv() function )below do not working properly

Description:

Hello!

The fgetcsv() function do not working properly.
Below there is a fragment of the source data file. 

source data file---

SZ | 7784252D0  |  | 29.13
SZ | 7784265DA1000  |  | 21.23
SZ | 7784265DA10PG  | "Title ""V6"" | 17.9
SZ | 784270C2   |  | 29.9
SZ | 784360E0   |  | 29.41

-end data file--

On big input files the function after line number 3 of data file need more
and more memory and then crashes with trying to allocate memory.

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


#32989 [NEW]: str_pad and str_repeat return wrong string

2005-05-09 Thread gclift at gtsquared dot com
From: gclift at gtsquared dot com
Operating system: Linux  2.4.21-27.0.2.ELsmp #1
PHP version:  4.3.11
PHP Bug Type: Strings related
Bug description:  str_pad and str_repeat return wrong string

Description:

str_pad returns the exact same string that was entered as the string
input.

str_repeat returns 0 length string.


'./configure' '--localstatedir=/var/hsphere/php'
'--with-apxs=/hsphere/shared/apache/bin/apxs' '--with-openssl=/usr'
'--with-zlib=/usr' '--with-zlib-dir=/usr' '--with-bz2=/usr'
'--enable-calendar' '--with-jpeg-dir=/usr' '--enable-ftp' '--with-gd'
'--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf'
'--with-png-dir=/usr' '--with-gettext=/usr' '--with-imap=/hsphere/shared'
'--with-mysql=/usr' '--with-pgsql=/usr' '--with-curl=/hsphere/shared'
'--with-curlwrappers' '--with-mhash=/usr' '--with-iconv=/hsphere/shared'
'--enable-sockets' '--with-zip=/usr' '--enable-versioning'
'--enable-track-vars' '--enable-trans-sid' '--enable-bcmath'
'--enable-mbstring' '--disable-debug'

Reproduce code:
---
Start Test!";
echo "";

var_dump( str_repeat(4, "../") );
echo "\r\n";
var_dump( str_pad("TESTING", 6, "../", STR_PAD_LEFT) );
echo "\r\n";
var_dump( str_pad("TESTING", 6, "-==") );
echo "\r\n";
var_dump( str_pad("TEST", 4) );

echo "";
echo "End Test!";
exit(0);


?>

Expected result:

Start Test!

string(0) "../../../../"

string(7) "../../../../../TESTING"

string(7) "TESTING-==-==-==-==-==-=="

string(4) "TEST"


End Test!

Actual result:
--
Start Test!

string(0) ""

string(7) "TESTING"

string(7) "TESTING"

string(4) "TEST"


End Test!

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


#32638 [Bgs]: objects cast as string explictly require a __toString when __call is defined

2005-05-09 Thread jason at amp-design dot net
 ID:   32638
 User updated by:  jason at amp-design dot net
 Reported By:  jason at amp-design dot net
 Status:   Bogus
 Bug Type: Zend Engine 2 problem
 Operating System: CentOS
 PHP Version:  5.0.4
 New Comment:

Out of interest/curiousity, when a bug is marked as 'bogus', what does
that mean? Although you state it's currently the expected behaviour,
are you suggesting that this could change in future releases in the
long term (i.e. next major release) maybe when you go over and review
certain issues. You seem to suggest that this might be the case in the
second from last comment in http://bugs.php.net/bug.php?id=30791.


Previous Comments:


[2005-04-14 09:40:53] [EMAIL PROTECTED]

Dupe of #30791



[2005-04-14 09:20:04] [EMAIL PROTECTED]

This is expected behaviour because __call() catches all undefined
methods, including magic ones like __toString().
You have to define __toString() or fix __call() to return appropriate
string representation of the object.



[2005-04-08 19:49:47] jason at amp-design dot net

Description:

This produces an error that should not happen. Instead, when you cast
an object to a string that has no __toString defined, it should produce
the objects internal ID. Oddly enough, the behaviour is inconsistent as
...

class A {
public function __call($name, $args) {echo $name;}
}
echo (new A);

seems to work as expected. I can't see how this should behave
differently from dereferencing from a variable. 

I guess the behaviour of string casting is undefined for objects that
do not have __toString() defined, so I guess it is debateable if this
is really a bug, or a querky language "feature" ;-)

Note that this will work if one returns a value for __call().

Reproduce code:
---


Expected result:

Object id #insert_number_here

Actual result:
--
__tostring
Fatal error: Method A::__toString() must return a string value in
/data/test.php on line 21





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


#32985 [Opn]: /e Modifier Escaping Double Quotes With \ Even Though Magic Quotes Is Off

2005-05-09 Thread crypticcreeper at yahoo dot com
 ID:   32985
 User updated by:  crypticcreeper at yahoo dot com
 Reported By:  crypticcreeper at yahoo dot com
 Status:   Open
 Bug Type: PCRE related
 Operating System: Linux & Windows
 PHP Version:  5.0.4
 New Comment:

Unfortunately I can't even use stripslashes() in the replace paramter
because it will not work correctly because backslashs are not escaped
so legitimate ones will be stripped. I ended up doing a str_replace for
\" as a temporary fix until this gets resolved.


Previous Comments:


[2005-05-09 15:32:00] crypticcreeper at yahoo dot com

Description:

When using the /e modifier if the match contains a double quote it is
escaped with a \

If it was magic quotes I am assuming it would effect single quotes too,
but in fact doesnt. I tested this on Windows 2000 5.0.5-dev and on Linux
5.0.4 and both had same results. Even when I test using a conditional to
see if magic quotes is on it still runs it. I even manually set magic
quotes off in the script and still the problem occurred. I'm not sure
if this is documented behavior, I do know /e causes PHP to escape data,
but why only double quotes?

Reproduce code:
---
$data = ' " '
$data = preg_replace('/(")/ie', "'$1'", $data);
echo $data;

Expected result:

"

Actual result:
--
\"





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


#32963 [Fbk->Opn]: Hard to find/trace Segfault issues

2005-05-09 Thread Jason at hybd dot net
 ID:   32963
 User updated by:  Jason at hybd dot net
-Reported By:  jason at amp-design dot net
+Reported By:  Jason at hybd dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: CentOS 4 / RHEL 3
 PHP Version:  5CVS-2005-05-06 (dev)
 New Comment:

In a worst case scenario (if I can't get a small test script
developed), would it be OK to email you with access details to the
scripts/server so you can investigate for yourself. I can give you
suitable SSH access to our testing box. That way you can do what you
want in the way of running gdb, recompiling etc if need be.


Previous Comments:


[2005-05-09 11:38:38] [EMAIL PROTECTED]

We can't do much without a script to reproduce it ourselves, so try
come up with one..




[2005-05-09 11:28:08] jason at amp-design dot net

I normally do try and isolate bugs in PHP by producing a short few
lines of PHP in order to replicate the problem.

I have tried on many occasions when I have had this bug to replicate it
by stripping parts of the code down, but I have not managed to do it
sucessfully yet. Is there any other way I can profide feedback? I could
probably try and limit the amount code down to some extent, but even so
I doubt it would be a small chunk of code.

Anyway, I will attempt to find a way to replicate this as soon as I can
get time.



[2005-05-07 05:48:04] [EMAIL PROTECTED]

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

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2005-05-06 16:05:48] jason at amp-design dot net

OK, I've tried to narrow down things a little more. This is not proving
easy.

OK, I can see why this is making things crash according to different
browsers. I have a piece of code like this ...

/**
 * Extracts path data from URL into a string.
 *
 * This will attempt to read the path data from many locations, 
 * such as after the .php part of the URL, the path request variable
 * or from the site root.
 */
function iq_extract_path() {
if (!isset($_REQUEST['path'])) {
/* try to extract it from URL */
$path_string = $_SERVER['REQUEST_URI'];
/* Are we hiding the .php file ? */
if (strpos($_SERVER['SCRIPT_NAME'], '.php') !== false) {
/* Remove the index or whatever .php bit */ 
$path_string = preg_replace('/\/[\w]+.php/', '', 
$path_string);
}
/* We need to trim on / or it replaces '/' if we are running 
from
root dir */
$prefix_path = trim(dirname($_SERVER['SCRIPT_NAME']), '/');
/* Remove any prefixed URL path */
$path_string = str_replace($prefix_path, '', $path_string);
/* remove query string */
$path_string = str_replace('?'.$_SERVER['QUERY_STRING'], '',
$path_string);
} else {
$path_string = $_REQUEST['path'];
}
return $path_string;
}

As you can see, this looks at server variables, which explains that. On
the site it's used, it allows us to use a clean search engine / user
friendly URL system, instead of using HTTP GET/POST variables for the
front controller's dispatching. If no server variables are used, it
looks at $_REQUEST['path'] as a safety fallback.

I found that setting $_REQUEST['path'] to the right value (so it
doesn't touch the $_SERVER array) stops the segfault.

The segfault it's self is because of the SPL. I'm 99.9% sure of
this. zend_execute.c:1205 confirms this, and other scenarios where I
get segfaults normally involve SPL ArrayAccess objects.

We use a template system, which is modelled as an object. This
implements the ArrayAccess interface, so it makes it easy to set
variables. It's initialized like this ...

$payment_schedule = new IQ_Template('admin/payment_schedule.xml');

we can poke data in like this...

$payment_schedule['schedule_year'] = $year;

likewise, there is some system in place where we can write custom web
controls so it behaves like WACT / ASP.NETs template system.

Anyway, I found another way to prevent the crash, instead of setting
$_REQUEST['path'] was to place ...

$payment_schedule = 'insert random string here';

before the line 

$payment_schedule = new IQ_Template('admin/payment_schedule.xml');

Despite the fact the add

#32985 [NEW]: /e Modifier Escaping Double Quotes With \ Even Though Magic Quotes Is Off

2005-05-09 Thread crypticcreeper at yahoo dot com
From: crypticcreeper at yahoo dot com
Operating system: Linux & Windows
PHP version:  5.0.4
PHP Bug Type: PCRE related
Bug description:  /e Modifier Escaping Double Quotes With \ Even Though Magic 
Quotes Is Off

Description:

When using the /e modifier if the match contains a double quote it is
escaped with a \

If it was magic quotes I am assuming it would effect single quotes too,
but in fact doesnt. I tested this on Windows 2000 5.0.5-dev and on Linux
5.0.4 and both had same results. Even when I test using a conditional to
see if magic quotes is on it still runs it. I even manually set magic
quotes off in the script and still the problem occurred. I'm not sure if
this is documented behavior, I do know /e causes PHP to escape data, but
why only double quotes?

Reproduce code:
---
$data = ' " '
$data = preg_replace('/(")/ie', "'$1'", $data);
echo $data;

Expected result:

"

Actual result:
--
\"

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


#32503 [Opn]: fopen() in cwd: filename must start with ./ under safe mode

2005-05-09 Thread Bjorn dot Wiberg at its dot uu dot se
 ID:   32503
 User updated by:  Bjorn dot Wiberg at its dot uu dot se
 Reported By:  Bjorn dot Wiberg at its dot uu dot se
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: IBM AIX 5.2.0.0 ML5
 PHP Version:  5CVS-2005-03-31
 New Comment:

Hi again!

I just tried the #define HAVE_BROKEN_GETCWD 1 trick from
http://bugs.php.net/bug.php?id=32501, with PHP 5.0.4 (the "fixed"
version) but that didn't help in this regard. I thought I would mention
this.

Best regards,
Björn


Previous Comments:


[2005-04-05 09:28:28] Bjorn dot Wiberg at its dot uu dot se

Hi Tony!

Thank you for your feedback!

I'm afraid that absolute paths aren't a very viable solution to this,
as that probably would break too many scripts, expecting it to be
possible to "just" save a file to the current directory.

Is the "PHP realpath hack" supposed to handle these kind of problems on
AIX?

Please let me know if I can help in any way!

Best regards,
Björn



[2005-04-04 17:11:05] [EMAIL PROTECTED]

Right, this is somehow concerned with broken realpath() on AIX.
The problem is that we end up with relative path in php_checkuid_ex()
function and it fails to check permissions for the directory.
Of course, the easiest solution is to use absolute paths everywhere.




[2005-04-01 16:32:32] Bjorn dot Wiberg at its dot uu dot se

Tried php5-200503310630 (5.1.0-dev), but the problem is still present:

/apache/htdocs/bwiberg/test/safemode
Warning: fopen(): Unable to access a.txt in
/apache/htdocs/bwiberg/test/safemode/write.php on line 5 Warning:
fopen(a.txt): failed to open stream: No such file or directory in
/apache/htdocs/bwiberg/test/safemode/write.php on line 5

(Whereas "./a.txt" works just fine.)

Best regards,
Björn



[2005-03-30 17:17:27] [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-03-30 14:37:04] Bjorn dot Wiberg at its dot uu dot se

Description:

Under safe mode, if one tries to create a new file with fopen(),
specifying a filename without any path part in it (such as "./a.txt" or
/apache/htdocs/bwiberg/test/safemode/a.txt"), fopen() fails, claiming
that the file cannot be found.


If the file already exists, everything works just fine.

If you specify a path part ahead of the filename, everything works just
fine.

If you give fopen() "true" as a third argument, and make sure that your
include_path includes "." as its FIRST path (if you have several
directories in it), everything works just fine. (Perhaps the
restriction of only trying the FIRST path should be mentioned in the
docs as well.)


I'm not sure if this problem is related to the earlier discussions of
php_realpath_hack (that fix should be present as "_AIX" is set by gcc
under AIX), but it sure poses a problem for scripts which rely on being
able to create a file in the current directory without specifying any
path.

Another question is why $handle in the example script isn't set to
FALSE if the open failed -- instead the error propagates to the fputs()
part.

I'd appreciate any input regarding this. Thanks in advance!

Best regards,
Björn

Reproduce code:
---
";

  $handle = fopen("a.txt", "w", false);
  if ( $handle != FALSE ) {
fputs($handle, "testtext");
fclose($handle);
  }

?>


Expected result:

/apache/htdocs/bwiberg/test/safemode

(File a.txt gets created in current directory.)

Actual result:
--
/apache/htdocs/bwiberg/test/safemode
Warning: fopen(): Unable to access a.txt in
/apache/htdocs/bwiberg/test/safemode/write.php on line 5 Warning:
fopen(a.txt): failed to open stream: No such file or directory in
/apache/htdocs/bwiberg/test/safemode/write.php on line 5





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


#32501 [Opn]: acinclude.m4 should set HAVE_BROKEN_GETCWD for AIX, too

2005-05-09 Thread Bjorn dot Wiberg at its dot uu dot se
 ID:   32501
 User updated by:  Bjorn dot Wiberg at its dot uu dot se
 Reported By:  Bjorn dot Wiberg at its dot uu dot se
 Status:   Open
 Bug Type: Directory function related
 Operating System: IBM AIX 5.2.0.0 ML5
-PHP Version:  php5-200504180630
+PHP Version:  5.0.4
 New Comment:

I just tried this on PHP 5.0.4 (the fixed version), but it didn't
work:

Warning: fopen(): open_basedir restriction in effect. File(a.txt) is
not within the allowed path(s):
(.:/apache/php/lib/php/:/apache/htdocs/bwiberg/) in
/apache/htdocs/bwiberg/test/safemode/write.php on line 5 Warning:
fopen(a.txt): failed to open stream: Not owner in
/apache/htdocs/bwiberg/test/safemode/write.php on line 5

I don't know whether this is so because 5.0.4 isn't recent enough, but
I thought I would give it a try anyway.

Best regards,
Björn


Previous Comments:


[2005-04-18 10:58:00] Bjorn dot Wiberg at its dot uu dot se

It seems that the same error is present in the 200504180630 version;
should I try with a php5-stable snapshot instead, or would that render
the tests unusable (too old versions of files)?

Best regards,
Björn



[2005-04-14 18:19:46] Bjorn dot Wiberg at its dot uu dot se

Just tried with the latest snapshot (200504141430), but got the
following error:

/../
ld: 0711-224 WARNING: Duplicate symbol: php_bz2_filter_factory
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
ld: 0711-317 ERROR: Undefined symbol: pdo_row_object_handlers
collect2: ld returned 8 exit status
make: *** [sapi/cli/php] Error 1
[EMAIL PROTECTED]:/usr/local/src/php5-200504141430#

Any ideas? I tried Googling, but "pdo_row_object_handlers" returned no
hits, nor did bugs.php.net. Should I wait for a later snapshot?

Best regards,
Björn



[2005-04-12 08:31:15] [EMAIL PROTECTED]

If you manually change HAVE_BROKEN_GETCWD in php_config.h to 
#define HAVE_BROKEN_GETCWD 1
after configure and do 'make clean && make', does it really work
then..?





[2005-04-04 14:22:17] Bjorn dot Wiberg at its dot uu dot se

An excerpt from my Apache 2 httpd.conf, with all information pertaining
to PHP and the "safe mode protected" directory of mine:

php_admin_flag allow_call_time_pass_reference off
php_admin_flag allow_url_fopen off
php_admin_flag always_populate_raw_post_data off
php_admin_value arg_separator.input "&"
php_admin_value arg_separator.output "&"
php_admin_flag asp_tags off
php_admin_value auto_append_file none
php_admin_value auto_prepend_file none
php_admin_flag child_terminate off
php_admin_value default_charset none
php_admin_value default_mimetype "text/html"
php_admin_value default_socket_timeout 60
php_admin_flag define_syslog_variables off
php_admin_flag display_startup_errors off
php_admin_value docref_ext none
php_admin_value docref_root none
php_admin_value error_append_string none
php_admin_value error_log none
php_admin_value error_prepend_string none
php_admin_value error_reporting 2039
php_admin_flag html_errors off
php_admin_flag ignore_repeated_errors off
php_admin_flag ignore_repeated_source off
php_admin_flag ignore_user_abort off
php_admin_flag implicit_flush off
php_admin_value ldap.max_links -1
php_admin_flag log_errors on
php_admin_value log_errors_max_len 1024
php_admin_flag magic_quotes_gpc on
php_admin_flag magic_quotes_runtime off
php_admin_flag mime_magic.debug on
php_admin_value mysql.connect_timeout 60
php_admin_value mysql.default_host none
php_admin_value mysql.default_password none
php_admin_value mysql.default_port none
php_admin_value mysql.default_socket none
php_admin_value mysql.default_user none
php_admin_value mysqli.default_host none
php_admin_value mysqli.default_port none
php_admin_value mysqli.default_pw none
php_admin_value mysqli.default_socket none
php_admin_value mysqli.default_user none
php_admin_value output_buffering 4096
php_admin_value output_handler none
php_admin_value precision 14
php_admin_flag register_argc_argv on
php_admin_flag register_globals off
php_admin_flag register_long_arrays on
php_admin_flag report_memleaks on
php_admin_flag report_zend_debug on
php_admin_flag session.bug_compat_42 off
php_admin_flag session.bug_compat_warn on
php_admin_value session.entropy_file none
php_admin_value session.entropy_length 0
php_admin_value session.gc_divisor 100
php_admin_value session.gc_maxlifetime 1440
php_admin_value session.gc_probability 1
php_admin_value session.save_handler files
php_admin_value session.save_path "/tmp"
php_admin_value session.serialize_handler php
php_admin_flag session.use_trans_sid 0
php_admin_flag short_open_tag off
php_admin_flag track_errors off
php_admin_value unserialize_callback_func none
php_admin_value variables_order "EGPC

#32116 [Asn->Csd]: mysql_connect() - client_flags broken

2005-05-09 Thread georg
 ID:   32116
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mstuhu at web dot de
-Status:   Assigned
+Status:   Closed
 Bug Type: MySQL related
 Operating System: Windows 2000
 PHP Version:  4.3.10
 Assigned To:  georg
 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-03-14 22:03:00] [EMAIL PROTECTED]

Georg, can you find out why this is disabled on windows?
The CVS commit message(s) didn't reveal anything useful..




[2005-02-27 14:42:05] [EMAIL PROTECTED]

Looks a lot like the whole compression thingie is disabled
for windows for some reason:

config-win.h:/* #define HAVE_COMPRESS -- not with PHP, please */ 





[2005-02-25 23:09:12] mstuhu at web dot de

Description:

None of the function calls below does establish a compressed connection
to a remote mySQL 4.0.21 server:

mysql_connect($server, $user, $password, false, 32);
mysql_connect($server, $user, $password, false,
MYSQL_CLIENT_COMPRESS);
mysql_connect($server, $user, $password, false, CLIENT_COMPRESS);

There's neither a performance boost using these calls nor is the
connection crippled (verified with Etherreal)

Interestingly establishing a compressed connection from a Linux box
with 4.3.10 to the remote mySQL server works fine.

So I suppose there's a bug in the mySQL windows client libs which the
mysql_connect function relies on.






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


#32984 [NEW]: problem with array_walk()

2005-05-09 Thread arne dot binder at blue-com dot de
From: arne dot binder at blue-com dot de
Operating system: Windows NT4
PHP version:  5.0.4
PHP Bug Type: Reproducible crash
Bug description:  problem with array_walk()

Description:

The problem is the location of the declaration of the used
callback-function in array_walk(). If this declaration is inside a
switch-block (but if-blocks work!), array_walk() crashes php.

The following sample-code illustrates the problem. If the function
declaration is moved out of the switch-block, everything works fine.

Reproduce code:
---
 ' 1');

print_r($arr);

function trim_it(&$item, $key) { $item=trim($item); }

array_walk($arr, 'trim_it');

print_r($arr);
break;
}
?>

Expected result:

Array
(
[Line] =>  1
)
Array
(
[Line] => 1
)


Actual result:
--
Ask Dr. Watson for NT4 ;-)

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


#32983 [Opn->Asn]: Bogus error message when using ArrayAccess / References

2005-05-09 Thread sniper
 ID:   32983
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jason at amp-design dot net
-Status:   Open
+Status:   Assigned
-Bug Type: Zend Engine 2 problem
+Bug Type: SPL related
 Operating System: Cent OS 4
 PHP Version:  5CVS-2005-05-09 (dev)
-Assigned To:  
+Assigned To:  helly
 New Comment:

Marcus, your baby -> you decide :)



Previous Comments:


[2005-05-09 12:38:42] jason at amp-design dot net

Description:

I'm not 100% sure this is considered a "bug" as such, anyway, I thought
I'd point it out, and let you decide. It's more a case of the error
message being a little fuzzy.

When trying to assign an item by reference by using the reference
operator, &, to an element inside a class that implements ArrayAccess
produces a werid error message.

Admittedly, the code I've provided is probably not valid PHP code,
because the nature of the ArrayAccess interface means that data is
assigned and returned from offsetSet and offsetGet by value, so using
refernces should probably not work.

However, the when you do try this, you get an error about about
post/pre increment/decrement. I'm not sure what this refers to, but it
doesn't seem to be very descriptive.

Reproduce code:
---
data[$index] = $value;
}

public function offsetGet($index) {
return $this->data[$index];
}

public function offsetExists($index) {
return isset($this->data[$index]);
}
}

$data = new ArrayAccessImpl();
$test = 'some data';
$data['element'] = &$test;

?>

Expected result:

Unsure, probably an error message relating to the fact ArrayAccess
objects can not assign by reference

Actual result:
--
Fatal error: Objects used as arrays in post/pre increment/decrement
must return values by reference





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


#32983 [NEW]: Bogus error message when using ArrayAccess / References

2005-05-09 Thread jason at amp-design dot net
From: jason at amp-design dot net
Operating system: Cent OS 4
PHP version:  5CVS-2005-05-09 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description:  Bogus error message when using ArrayAccess / References

Description:

I'm not 100% sure this is considered a "bug" as such, anyway, I thought
I'd point it out, and let you decide. It's more a case of the error
message being a little fuzzy.

When trying to assign an item by reference by using the reference
operator, &, to an element inside a class that implements ArrayAccess
produces a werid error message.

Admittedly, the code I've provided is probably not valid PHP code, because
the nature of the ArrayAccess interface means that data is assigned and
returned from offsetSet and offsetGet by value, so using refernces should
probably not work.

However, the when you do try this, you get an error about about post/pre
increment/decrement. I'm not sure what this refers to, but it doesn't seem
to be very descriptive.

Reproduce code:
---
data[$index] = $value;
}

public function offsetGet($index) {
return $this->data[$index];
}

public function offsetExists($index) {
return isset($this->data[$index]);
}
}

$data = new ArrayAccessImpl();
$test = 'some data';
$data['element'] = &$test;

?>

Expected result:

Unsure, probably an error message relating to the fact ArrayAccess objects
can not assign by reference

Actual result:
--
Fatal error: Objects used as arrays in post/pre increment/decrement must
return values by reference

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


#32962 [Opn->Asn]: Installer puts php.ini in wrong location

2005-05-09 Thread sniper
 ID:   32962
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ash at theleys dot net
-Status:   Open
+Status:   Assigned
 Bug Type: IIS related
 Operating System: Windows Server 2003
 PHP Version:  5.0.4
 Assigned To:  phildriscoll


Previous Comments:


[2005-05-09 11:38:37] ash at theleys dot net

Under this comment are all the environment variables, - there isn't a
"win" one, but "windir" is pointing to the correct folder. - This was
installed with me using a terminal services session, but that's not
been a problem before. (the comp. names have been changed here for
privacy)

ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Administrator\Application Data
CLIENTNAME=CHANGEDTOPROTECTSERVER
ClusterLog=C:\WINDOWS\Cluster\cluster.log
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=CHANGEDTOPROTECTSERVER
ComSpec=C:\WINDOWS\system32\cmd.exe
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Administrator
LOGONSERVER=\\HENRYV
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0209
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=RDP-Tcp#1
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1
TMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1
USERDOMAIN=HENRYV
USERNAME=Administrator
USERPROFILE=C:\Documents and Settings\Administrator
windir=C:\WINDOWS



[2005-05-09 11:01:08] [EMAIL PROTECTED]

I don't have Windows Server 2003, and I can't reproduce 
the problem on W2K Advanced Server (the only Windows 
machine I have). Can you tell me what the value of the WIN 
environment variable is when you are logged in as 
administrator? 
 
Thanks 



[2005-05-07 06:14:01] [EMAIL PROTECTED]

Assigning to the author of the installer.




[2005-05-06 13:18:01] ash at theleys dot net

Description:

Using the php-5.0.4-installer.exe puts php.ini into
c:\docs&settings\administrator\WINDOWS\ - not in c:\windows, therefore
it's not available, and causes "500" errors. - Found this out by
parsing from php -i and noticing Configuration File (php.ini) Path was
set wrongly.

Expected result:

phpinfo (or whatever the web page contains)

Actual result:
--
500 CGI Error





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


#30452 [Opn->Asn]: php parser does not work properly (1)

2005-05-09 Thread sniper
 ID:   30452
 Updated by:   [EMAIL PROTECTED]
 Reported By:  guth at fiifo dot u-psud dot fr
-Status:   Open
+Status:   Assigned
 Bug Type: Zend Engine 2 problem
 Operating System: Linux
 PHP Version:  5.0.2
 Assigned To:  andi
 New Comment:

Andi, (or Dmitry maybe?) can you look into this?


Previous Comments:


[2005-05-07 03:14:52] guth at fiifo dot u-psud dot fr

No change.

Fatal error: Class 'MyAbstractClass' not found in /www/test3.php on
line 5



[2005-03-25 01:34:07] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-10-16 01:56:33] guth at fiifo dot u-psud dot fr

Description:

The following behaviour seems incorrect.

PHP founds the abstract class if it doesn't implement an interface, but
doen't found it if it implements an interface.

Reproduce code:
---




Expected result:

First :
- Should work

Second :
- Should work

Actual result:
--
First :

Fatal error: Class 'MyAbstractClass' not found in /www/test.php on line
5

Second :
- Work





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


#30453 [Opn->Asn]: php parser does not work properly (2)

2005-05-09 Thread sniper
 ID:   30453
 Updated by:   [EMAIL PROTECTED]
 Reported By:  guth at fiifo dot u-psud dot fr
-Status:   Open
+Status:   Assigned
 Bug Type: Zend Engine 2 problem
 Operating System: Linux
 PHP Version:  5.0.2
 Assigned To:  andi
 New Comment:

Andi, (or Dmitry maybe?) can you look into this?



Previous Comments:


[2005-05-07 03:16:18] guth at fiifo dot u-psud dot fr

No change.

Fatal error: Class 'GroupModule' not found in /www/test3.php on line 5



[2005-03-25 01:34:16] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-10-16 02:06:37] guth at fiifo dot u-psud dot fr

Description:

Look at the following code...

Note that there is no difference between the first case and the third
case. I just add an include in the first case.

Reproduce code:
---
test3.php :








test4.php



Expected result:

Case 1 :
- Should work

Case 2 :
- Should work

Case 3 :
- Should work

Actual result:
--
Case 1 :
Fatal error: Class 'GroupModule' not found in /www/test3.php on line 4

Case 2 :
- Works fine

Case 3 :
- Works fine





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


#32963 [Opn->Fbk]: Hard to find/trace Segfault issues

2005-05-09 Thread sniper
 ID:   32963
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jason at amp-design dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: CentOS 4 / RHEL 3
 PHP Version:  5CVS-2005-05-06 (dev)
 New Comment:

We can't do much without a script to reproduce it ourselves, so try
come up with one..



Previous Comments:


[2005-05-09 11:28:08] jason at amp-design dot net

I normally do try and isolate bugs in PHP by producing a short few
lines of PHP in order to replicate the problem.

I have tried on many occasions when I have had this bug to replicate it
by stripping parts of the code down, but I have not managed to do it
sucessfully yet. Is there any other way I can profide feedback? I could
probably try and limit the amount code down to some extent, but even so
I doubt it would be a small chunk of code.

Anyway, I will attempt to find a way to replicate this as soon as I can
get time.



[2005-05-07 05:48:04] [EMAIL PROTECTED]

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

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2005-05-06 16:05:48] jason at amp-design dot net

OK, I've tried to narrow down things a little more. This is not proving
easy.

OK, I can see why this is making things crash according to different
browsers. I have a piece of code like this ...

/**
 * Extracts path data from URL into a string.
 *
 * This will attempt to read the path data from many locations, 
 * such as after the .php part of the URL, the path request variable
 * or from the site root.
 */
function iq_extract_path() {
if (!isset($_REQUEST['path'])) {
/* try to extract it from URL */
$path_string = $_SERVER['REQUEST_URI'];
/* Are we hiding the .php file ? */
if (strpos($_SERVER['SCRIPT_NAME'], '.php') !== false) {
/* Remove the index or whatever .php bit */ 
$path_string = preg_replace('/\/[\w]+.php/', '', 
$path_string);
}
/* We need to trim on / or it replaces '/' if we are running 
from
root dir */
$prefix_path = trim(dirname($_SERVER['SCRIPT_NAME']), '/');
/* Remove any prefixed URL path */
$path_string = str_replace($prefix_path, '', $path_string);
/* remove query string */
$path_string = str_replace('?'.$_SERVER['QUERY_STRING'], '',
$path_string);
} else {
$path_string = $_REQUEST['path'];
}
return $path_string;
}

As you can see, this looks at server variables, which explains that. On
the site it's used, it allows us to use a clean search engine / user
friendly URL system, instead of using HTTP GET/POST variables for the
front controller's dispatching. If no server variables are used, it
looks at $_REQUEST['path'] as a safety fallback.

I found that setting $_REQUEST['path'] to the right value (so it
doesn't touch the $_SERVER array) stops the segfault.

The segfault it's self is because of the SPL. I'm 99.9% sure of
this. zend_execute.c:1205 confirms this, and other scenarios where I
get segfaults normally involve SPL ArrayAccess objects.

We use a template system, which is modelled as an object. This
implements the ArrayAccess interface, so it makes it easy to set
variables. It's initialized like this ...

$payment_schedule = new IQ_Template('admin/payment_schedule.xml');

we can poke data in like this...

$payment_schedule['schedule_year'] = $year;

likewise, there is some system in place where we can write custom web
controls so it behaves like WACT / ASP.NETs template system.

Anyway, I found another way to prevent the crash, instead of setting
$_REQUEST['path'] was to place ...

$payment_schedule = 'insert random string here';

before the line 

$payment_schedule = new IQ_Template('admin/payment_schedule.xml');

Despite the fact the additional line does nothing, it stops the
segfault. I tried this after realising that the issue was related with
a decreasing reference count due to _zval_ptr_dtor() being called.

I can't say this always happens always when assignments are made
between two objects implementing ArrayAccess through the [] subscripts.
However it does appear that there is always an ArrayAccess object with a
[] subscript the left of the assignment operator at the point of the
segfault.

Obviously this s

#32924 [Csd]: file included with "auto_prepend_file" can be called with require|include_once()

2005-05-09 Thread stas
 ID:  32924
 Updated by:  [EMAIL PROTECTED]
 Reported By: stas at zend dot com
 Status:  Closed
 Bug Type:*General Issues
 PHP Version: 5.0.4
 Assigned To: stas
 New Comment:

I don't think there's any problem with the fix - since include() is not
supposed to check included files, this fix does not affect include() in
any way.


Previous Comments:


[2005-05-09 11:35:22] [EMAIL PROTECTED]

It's exactly same now how it works in PHP4 too.






[2005-05-06 12:26:34] [EMAIL PROTECTED]

IMO, the following SHOULD include the file twice:


normal includes should not get their file names put into the
included_files list... only ones that are included with
include_once/require_once. So I think you fixed the bug in the wrong
way here.



[2005-05-04 18:18:14] [EMAIL PROTECTED]

Fixed for 5HEAD.



[2005-05-04 18:17:45] [EMAIL PROTECTED]

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.





[2005-05-03 11:35:17] stas at zend dot com

Description:

At least starting from 4.3.x, when file is included via include(), it
is added to the list of included files, so that the code:

woould include 'foo' only once.

However, if you put foo in auto_prepend_file and then do  - 'foo' would be included twice.

I see this behaviour as inconsistent and needing to be fixed, though
there can be some BC issues with that. 

Reproduce code:
---
1. 

foo:


2.
auto_prepend_file=foo


Expected result:

"Whatever..." once in both cases

Actual result:
--
"Whatever..."  once in the first case, twice in the second.





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


#30140 [Opn->Asn]: Problem with array in static properties

2005-05-09 Thread sniper
 ID:   30140
 Updated by:   [EMAIL PROTECTED]
 Reported By:  guth at fiifo dot u-psud dot fr
-Status:   Open
+Status:   Assigned
 Bug Type: Zend Engine 2 problem
 Operating System: *
-PHP Version:  5CVS-2005-03-07
+PHP Version:  5CVS-2005-05-07
-Assigned To:  
+Assigned To:  andi
 New Comment:

This same thing happens with boolean too. All other types behave
correctly (or incorrectly, not sure anymore :)

Andi, (or Dmitry maybe?) can you look into this?



Previous Comments:


[2005-04-05 23:24:10] [EMAIL PROTECTED]

Yet another duplicate of bug #30934.



[2004-09-18 17:02:22] guth at fiifo dot u-psud dot fr

Description:

[ sorry for english ] 
 
There is a problem with static properties initialized as 
an array in classes. 
 
In the following code, if you replace "public static $test 
= array();" by "public static $test;" or if you initialize 
the property with not an array ("public static $test = 
12;" for example), it works as expected. 

Reproduce code:
---
set(array('key' => 'value'));

A::view();
B::view();
?>

Expected result:

array(1) { ["key"]=> string(5) "value" } 
array(1) { ["key"]=> string(5) "value" } 

Actual result:
--
array(1) { ["key"]=> string(5) "value" } 
array(0) { } 





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


#32982 [Opn->Bgs]: changing static boolean in subclass

2005-05-09 Thread sniper
 ID:   32982
 Updated by:   [EMAIL PROTECTED]
 Reported By:  chiky at fansajt dot sk
-Status:   Open
+Status:   Bogus
 Bug Type: Zend Engine 2 problem
 Operating System: Windows XP
 PHP Version:  5.0.4
 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 #30140 (same thing happens with array()..)



Previous Comments:


[2005-05-09 11:13:23] chiky at fansajt dot sk

Description:

I have created a class A with static boolean variable $bool and class B
which itherits from A. If I change value of $bool in class B, values
A::$bool and B::$bool differ. All other types (integers and strings)
works fine.
Is this a bug ?

Reproduce code:
---
class A
{
public static $bool = false;
}

class B extends A
{
}

B::$bool = true;

Expected result:

B::$bool = true
A::$bool = true

Actual result:
--
B::$bool = true
A::$bool = false





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


#30451 [Opn->Asn]: static properties don't work properly

2005-05-09 Thread sniper
 ID:   30451
 Updated by:   [EMAIL PROTECTED]
 Reported By:  guth at fiifo dot u-psud dot fr
-Status:   Open
+Status:   Assigned
 Bug Type: Zend Engine 2 problem
 Operating System: Linux
-PHP Version:  5.0.2
+PHP Version:  5CVS-2005-05-07
 Assigned To:  andi
 New Comment:

Andi, (or Dmitry maybe?) can you look into this?


Previous Comments:


[2005-05-07 03:13:33] guth at fiifo dot u-psud dot fr

No change with the last CVS.



[2005-03-25 01:33: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





[2004-10-16 01:50:54] guth at fiifo dot u-psud dot fr

Description:

hello,

Yet another strange behaviour in PHP...

My english is always too bad to explain the problem, so have a look to
the following code...

Reproduce code:
---



Expected result:

bool(true)
bool(true)
bool(true)
bool(true)

Actual result:
--
bool(true)
bool(true)
bool(true)
Fatal error: Cannot access protected property A::$property in
/www/test2.php on line 21





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


#29975 [Opn->Ver]: memory leaks

2005-05-09 Thread sniper
 ID:   29975
 Updated by:   [EMAIL PROTECTED]
 Reported By:  guth at fiifo dot u-psud dot fr
-Status:   Open
+Status:   Verified
 Bug Type: Zend Engine 2 problem
 Operating System: *
-PHP Version:  5CVS-2005-03-07
+PHP Version:  5CVS-2005-04-28


Previous Comments:


[2005-05-07 03:11:03] guth at fiifo dot u-psud dot fr

/usr/src/php5-STABLE-200505070036/Zend/zend_builtin_functions.c(1090) :
 Freeing 0x0824C56C (16 bytes), script=/www/test3.php
Last leak repeated  times
/usr/src/php5-STABLE-200505070036/Zend/zend_builtin_functions.c(1100) :
 Freeing 0x0824C49C (23 bytes), script=/www/test3.php
/usr/src/php5-STABLE-200505070036/Zend/zend_variables.c(137) : Actual
location (location was relayed)
Last leak repeated  times
=== Total 2 memory leaks detected ===



[2005-01-07 20:51:38] [EMAIL PROTECTED]

/Zend/zend_builtin_functions.c(1097) :  Freeing 0x08965664 (16 bytes),
script=t.php
Last leak repeated  times
/Zend/zend_variables.h(45) :  Freeing 0x08965594 (23 bytes),
script=t.php
/Zend/zend_variables.c(120) : Actual location (location was relayed)
Last leak repeated  times
=== Total 2 memory leaks detected ===




[2004-10-12 10:36:00] guth at fiifo dot u-psud dot fr

I use a SimpleTest to do unit tests and it seems that it is this
library which causes the memory leaks.

run();
?>

/usr/src/php5-200410111030/Zend/zend_builtin_functions.c(1058) : 
Freeing 0x082D0C54 (16 bytes), script=/www/test2.php
Last leak repeated  times
/usr/src/php5-200410111030/Zend/zend_variables.h(45) :  Freeing
0x082D0B84 (23 bytes), script=/www/test2.php
/usr/src/php5-200410111030/Zend/zend_variables.c(120) : Actual location
(location was relayed)
Last leak repeated  times



[2004-09-03 21:21:15] guth at fiifo dot u-psud dot fr

Description:

(i'm french, excuse me for my english)

I try to develop a CMS and i take more time to debug PHP than code
PHP...
After 3 segmentation fault, I compiled PHP with --enable-debug, and my
tests give the following errors.

Reproduce code:
---
/usr/src/php-5.0.1/Zend/zend_builtin_functions.c(1023) :  Freeing
0x0846F864 (23 bytes),
script=/www/haricow/0.4/haricow/test/runTests.php
/usr/src/php-5.0.1/Zend/zend_variables.c(137) : Actual location
(location was relayed)
Last leak repeated 32 times
/usr/src/php-5.0.1/Zend/zend_builtin_functions.c(1013) :  Freeing
0x084702C4 (16 bytes),
script=/www/haricow/0.4/haricow/test/runTests.php
Last leak repeated 32 times
/usr/src/php-5.0.1/Zend/zend_execute.c(3718) :  Freeing 0x0844FA94 (44
bytes), script=/www/haricow/0.4/haricow/test/runTests.php
/usr/src/php-5.0.1/Zend/zend_variables.c(149) : Actual location
(location was relayed)
Last leak repeated 1 time
/usr/src/php-5.0.1/Zend/zend_execute.c(3252) :  Freeing 0x0844DCCC (16
bytes), script=/www/haricow/0.4/haricow/test/runTests.php
Last leak repeated 7 times
/usr/src/php-5.0.1/Zend/zend_variables.c(150) :  Freeing 0x0843597C (32
bytes), script=/www/haricow/0.4/haricow/test/runTests.php
/usr/src/php-5.0.1/Zend/zend_hash.c(169) : Actual location (location
was relayed)
/usr/src/php-5.0.1/Zend/zend_execute.c(3389) :  Freeing 0x084315DC (16
bytes), script=/www/haricow/0.4/haricow/test/runTests.php
/usr/src/php-5.0.1/Zend/zend_hash.c(242) :  Freeing 0x08233804 (40
bytes), script=/www/haricow/0.4/haricow/test/runTests.php
=== Total 79 memory leaks detected ===

Expected result:

No memory leaks

Actual result:
--
About 3 Kb of memory leaks.
I tryed to "insulate" them, but i didn't manage, because of the
complexity of the script.





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


#32962 [Fbk->Opn]: Installer puts php.ini in wrong location

2005-05-09 Thread ash at theleys dot net
 ID:   32962
 User updated by:  ash at theleys dot net
 Reported By:  ash at theleys dot net
-Status:   Feedback
+Status:   Open
 Bug Type: IIS related
 Operating System: Windows Server 2003
 PHP Version:  5.0.4
 Assigned To:  phildriscoll
 New Comment:

Under this comment are all the environment variables, - there isn't a
"win" one, but "windir" is pointing to the correct folder. - This was
installed with me using a terminal services session, but that's not
been a problem before. (the comp. names have been changed here for
privacy)

ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Administrator\Application Data
CLIENTNAME=CHANGEDTOPROTECTSERVER
ClusterLog=C:\WINDOWS\Cluster\cluster.log
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=CHANGEDTOPROTECTSERVER
ComSpec=C:\WINDOWS\system32\cmd.exe
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Administrator
LOGONSERVER=\\HENRYV
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0209
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=RDP-Tcp#1
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1
TMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1
USERDOMAIN=HENRYV
USERNAME=Administrator
USERPROFILE=C:\Documents and Settings\Administrator
windir=C:\WINDOWS


Previous Comments:


[2005-05-09 11:01:08] [EMAIL PROTECTED]

I don't have Windows Server 2003, and I can't reproduce 
the problem on W2K Advanced Server (the only Windows 
machine I have). Can you tell me what the value of the WIN 
environment variable is when you are logged in as 
administrator? 
 
Thanks 



[2005-05-07 06:14:01] [EMAIL PROTECTED]

Assigning to the author of the installer.




[2005-05-06 13:18:01] ash at theleys dot net

Description:

Using the php-5.0.4-installer.exe puts php.ini into
c:\docs&settings\administrator\WINDOWS\ - not in c:\windows, therefore
it's not available, and causes "500" errors. - Found this out by
parsing from php -i and noticing Configuration File (php.ini) Path was
set wrongly.

Expected result:

phpinfo (or whatever the web page contains)

Actual result:
--
500 CGI Error





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


#26495 [Opn->Sus]: Using WebSite Pro 2.5 with ISAPI, cookies are not working

2005-05-09 Thread sniper
 ID:   26495
 Updated by:   [EMAIL PROTECTED]
 Reported By:  maura at fastwebnet dot it
-Status:   Open
+Status:   Suspended
 Bug Type: Other web server
 Operating System: win nt4 sp6a
 PHP Version:  5CVS, 4CVS
 New Comment:

Suspended for now.



Previous Comments:


[2003-12-02 01:44:23] [EMAIL PROTECTED]

Those two opcodes are MS specific ISAPI codes to determine
the webroot and send headers respectively.

Currently, our ISAPI module relies on the web server implementing those
opcodes.

It shouldn't be too difficult to use the traditional
HSE_REQ_SEND_RESPONSE_HEADER opcode as a fallback for
the latter code.

Speaking for myself, I don't have the time to do this,
but I don't expect it to take much more than an hour or
so to implement; maybe one of the other isapi guys
has the time?




[2003-12-01 20:03:04] maura at fastwebnet dot it

Description:

I use O'Reilly WebSite Pro 2.5 and php4isapi.dll

All is working but no cookies are sent to browser.

Changes made in php.ini-recommended are:
doc_root = "c:\webroot"


Reproduce code:
---


Expected result:

That cookie is sent to the browser

Actual result:
--
server.log report:

** REQUEST from 192.168.0.1 **
REQ: m=GET u=/prova/provaphp.php a= p= 
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/msword,
application/vnd.ms-powerpoint, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
Host: www.mysite.net
Connection: Keep-Alive
Cookie: userid=maurissia; passw=maurissia;
w=110099120118110121122113106

Request decoding complete...
node=C:/Siti/Mokadom/prova/provaphp.php: params= args=
Calling ISAPI/ISA C:\PHP\sapi\php4isapi.dll
[ISAPI] url  "/prova/provaphp.php"
[ISAPI] args ""
Associated ISA, using bogus MS path info
ISAPI: ServerSupportFunction() called with unknown opcode 1012
ISAPI: ServerSupportFunction() called with unknown opcode 1016





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


#32924 [Asn->Csd]: file included with "auto_prepend_file" can be called with require|include_once()

2005-05-09 Thread sniper
 ID:  32924
 Updated by:  [EMAIL PROTECTED]
 Reported By: stas at zend dot com
-Status:  Assigned
+Status:  Closed
 Bug Type:*General Issues
 PHP Version: 5.0.4
 Assigned To: stas
 New Comment:

It's exactly same now how it works in PHP4 too.





Previous Comments:


[2005-05-06 12:26:34] [EMAIL PROTECTED]

IMO, the following SHOULD include the file twice:


normal includes should not get their file names put into the
included_files list... only ones that are included with
include_once/require_once. So I think you fixed the bug in the wrong
way here.



[2005-05-04 18:18:14] [EMAIL PROTECTED]

Fixed for 5HEAD.



[2005-05-04 18:17:45] [EMAIL PROTECTED]

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.





[2005-05-03 11:35:17] stas at zend dot com

Description:

At least starting from 4.3.x, when file is included via include(), it
is added to the list of included files, so that the code:

woould include 'foo' only once.

However, if you put foo in auto_prepend_file and then do  - 'foo' would be included twice.

I see this behaviour as inconsistent and needing to be fixed, though
there can be some BC issues with that. 

Reproduce code:
---
1. 

foo:


2.
auto_prepend_file=foo


Expected result:

"Whatever..." once in both cases

Actual result:
--
"Whatever..."  once in the first case, twice in the second.





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


#31646 [Opn->Asn]: imap_mail_compose() don't work when body[][charset] has been set

2005-05-09 Thread sniper
 ID:   31646
 Updated by:   [EMAIL PROTECTED]
 Reported By:  webmaster at alikuvkoutek dot cz
-Status:   Open
+Status:   Assigned
 Bug Type: IMAP related
 Operating System: Linux
 PHP Version:  5CVS-2005-05-05 (dev)
-Assigned To:  
+Assigned To:  sniper


Previous Comments:


[2005-05-08 21:54:57] webmaster at alikuvkoutek dot cz

Build Date  May 5 2005 09:49:05 
See backtrace from gandie.



[2005-05-08 21:48:05] gandie at rootshell dot cz

BACKTRACE:

#0  0xb79007d4 in free () from /lib/libc.so.6
#1  0x082e51ee in fs_give ()
#2  0x08351b47 in _IO_stdin_used ()
#3  0x in ?? ()
#4  0x in ?? ()
#5  0x0851d1a0 in ?? ()
#6  0x0882e528 in ?? ()
#7  0x0882e588 in ?? ()
#8  0x0882e520 in ?? ()
#9  0x082fe788 in mail_free_body_parameter ()
#10 0x0882e578 in ?? ()
#11 0x0851d1a0 in ?? ()
#12 0x0882e528 in ?? ()
#13 0x082fe5a2 in mail_free_body_data ()
#14 0xbfffacc4 in ?? ()
#15 0x0882e598 in ?? ()
#16 0xbfffacc0 in ?? ()
#17 0x082fe548 in mail_free_body ()
#18 0x0882e520 in ?? ()
#19 0x0882e694 in ?? ()
#20 0x0882bcbc in ?? ()
#21 0x0810cfc0 in zif_imap_mail_compose ()
#22 0x in ?? ()
(gdb) frame 21
#21 0x0810cfc0 in zif_imap_mail_compose ()
(gdb) frame 22
#22 0x in ?? ()



[2005-01-21 20:58:43] webmaster at alikuvkoutek dot cz






[2005-01-21 20:47:20] [EMAIL PROTECTED]

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

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.



[2005-01-21 19:27:01] webmaster at alikuvkoutek dot cz

Description:

When set $body[][charset], the imap_mail_compose() don't work. The
script is terminated on that line and no output is generated.

The source code and information from phpinfo() is available over the
URL (links are on the top of the page).

Reproduce code:
---
http://www.alikuvkoutek.cz/t.php






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


#32981 [Opn->Fbk]: ReflectionMethod::getStaticVariables() causes apache2.0.54 seg fault

2005-05-09 Thread sniper
 ID:   32981
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phpbug at swift-web dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Gentoo 2.6.11
 PHP Version:  5.0.4
 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

Seems to work fine fore me with latest CVS HEAD (5.1-dev) but do try
and see if it's fixed in the 5.0 too.



Previous Comments:


[2005-05-09 10:15:43] phpbug at swift-web dot com

Description:

Discovered if I am using ReflectionMethod::getStaticVariables() on a
method that has a static variable that is set to boolean true or false
then php crashes (Apache 2 exists with following error)

[notice] child pid 28346 exit signal Segmentation fault (11)

I tried with php version 5.0.3 initially but upgraded to 5.0.4 and
problem still exists.






Reproduce code:
---
class demo_class {
  static function myDemo($toggle) {
static $enabled = true;
// do whatever
  }
}

$class = new ReflectionClass('demo_class');
foreach ($class->getMethods() as $method) {
  $arr_static_vars[] = $method->getStaticVariables();
}
echo "done"; 
// (normally would output $arr_static_var but just put above
//  line for simplicity in this example)

Expected result:

See a screen with just the word 'done' on it



Actual result:
--
Page loading stops immediately (and keeps last page shown displayed. 
Apache logs show:


[notice] child pid 28346 exit signal Segmentation fault (11)
(pid of course varies)

If I change the third line in my sample code to:
  static $enabled = 1;

(or string) the page does not crash and things display properly

I haven't tested this to see if it also crashes showing static
variables for the entire class (as opposed to the one in the method)
but if they inherit the same code I guess it would also crash but again
I haven't confirmed that.





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


#32963 [Fbk->Opn]: Hard to find/trace Segfault issues

2005-05-09 Thread jason at amp-design dot net
 ID:   32963
 User updated by:  jason at amp-design dot net
 Reported By:  jason at amp-design dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: CentOS 4 / RHEL 3
 PHP Version:  5CVS-2005-05-06 (dev)
 New Comment:

I normally do try and isolate bugs in PHP by producing a short few
lines of PHP in order to replicate the problem.

I have tried on many occasions when I have had this bug to replicate it
by stripping parts of the code down, but I have not managed to do it
sucessfully yet. Is there any other way I can profide feedback? I could
probably try and limit the amount code down to some extent, but even so
I doubt it would be a small chunk of code.

Anyway, I will attempt to find a way to replicate this as soon as I can
get time.


Previous Comments:


[2005-05-07 05:48:04] [EMAIL PROTECTED]

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

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2005-05-06 16:05:48] jason at amp-design dot net

OK, I've tried to narrow down things a little more. This is not proving
easy.

OK, I can see why this is making things crash according to different
browsers. I have a piece of code like this ...

/**
 * Extracts path data from URL into a string.
 *
 * This will attempt to read the path data from many locations, 
 * such as after the .php part of the URL, the path request variable
 * or from the site root.
 */
function iq_extract_path() {
if (!isset($_REQUEST['path'])) {
/* try to extract it from URL */
$path_string = $_SERVER['REQUEST_URI'];
/* Are we hiding the .php file ? */
if (strpos($_SERVER['SCRIPT_NAME'], '.php') !== false) {
/* Remove the index or whatever .php bit */ 
$path_string = preg_replace('/\/[\w]+.php/', '', 
$path_string);
}
/* We need to trim on / or it replaces '/' if we are running 
from
root dir */
$prefix_path = trim(dirname($_SERVER['SCRIPT_NAME']), '/');
/* Remove any prefixed URL path */
$path_string = str_replace($prefix_path, '', $path_string);
/* remove query string */
$path_string = str_replace('?'.$_SERVER['QUERY_STRING'], '',
$path_string);
} else {
$path_string = $_REQUEST['path'];
}
return $path_string;
}

As you can see, this looks at server variables, which explains that. On
the site it's used, it allows us to use a clean search engine / user
friendly URL system, instead of using HTTP GET/POST variables for the
front controller's dispatching. If no server variables are used, it
looks at $_REQUEST['path'] as a safety fallback.

I found that setting $_REQUEST['path'] to the right value (so it
doesn't touch the $_SERVER array) stops the segfault.

The segfault it's self is because of the SPL. I'm 99.9% sure of
this. zend_execute.c:1205 confirms this, and other scenarios where I
get segfaults normally involve SPL ArrayAccess objects.

We use a template system, which is modelled as an object. This
implements the ArrayAccess interface, so it makes it easy to set
variables. It's initialized like this ...

$payment_schedule = new IQ_Template('admin/payment_schedule.xml');

we can poke data in like this...

$payment_schedule['schedule_year'] = $year;

likewise, there is some system in place where we can write custom web
controls so it behaves like WACT / ASP.NETs template system.

Anyway, I found another way to prevent the crash, instead of setting
$_REQUEST['path'] was to place ...

$payment_schedule = 'insert random string here';

before the line 

$payment_schedule = new IQ_Template('admin/payment_schedule.xml');

Despite the fact the additional line does nothing, it stops the
segfault. I tried this after realising that the issue was related with
a decreasing reference count due to _zval_ptr_dtor() being called.

I can't say this always happens always when assignments are made
between two objects implementing ArrayAccess through the [] subscripts.
However it does appear that there is always an ArrayAccess object with a
[] subscript the left of the assignment operator at the point of the
segfault.

Obviously this seems like a memory management issue at the heart of the
variable managment / Zend engine's object overloading system, which
explains it's complex, tricky nature as far as tracing is concerned.

I hope thi

#32982 [NEW]: changing static boolean in subclass

2005-05-09 Thread chiky at fansajt dot sk
From: chiky at fansajt dot sk
Operating system: Windows XP
PHP version:  5.0.4
PHP Bug Type: Scripting Engine problem
Bug description:  changing static boolean in subclass

Description:

I have created a class A with static boolean variable $bool and class B
which itherits from A. If I change value of $bool in class B, values
A::$bool and B::$bool differ. All other types (integers and strings) works
fine.
Is this a bug ?

Reproduce code:
---
class A
{
public static $bool = false;
}

class B extends A
{
}

B::$bool = true;

Expected result:

B::$bool = true
A::$bool = true

Actual result:
--
B::$bool = true
A::$bool = false

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


#32962 [Asn->Fbk]: Installer puts php.ini in wrong location

2005-05-09 Thread phildriscoll
 ID:   32962
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ash at theleys dot net
-Status:   Assigned
+Status:   Feedback
 Bug Type: IIS related
 Operating System: Windows Server 2003
 PHP Version:  5.0.4
 Assigned To:  phildriscoll
 New Comment:

I don't have Windows Server 2003, and I can't reproduce 
the problem on W2K Advanced Server (the only Windows 
machine I have). Can you tell me what the value of the WIN 
environment variable is when you are logged in as 
administrator? 
 
Thanks 


Previous Comments:


[2005-05-07 06:14:01] [EMAIL PROTECTED]

Assigning to the author of the installer.




[2005-05-06 13:18:01] ash at theleys dot net

Description:

Using the php-5.0.4-installer.exe puts php.ini into
c:\docs&settings\administrator\WINDOWS\ - not in c:\windows, therefore
it's not available, and causes "500" errors. - Found this out by
parsing from php -i and noticing Configuration File (php.ini) Path was
set wrongly.

Expected result:

phpinfo (or whatever the web page contains)

Actual result:
--
500 CGI Error





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


#32215 [Opn->WFx]: Java Crash

2005-05-09 Thread andrey
 ID:   32215
 Updated by:   [EMAIL PROTECTED]
 Reported By:  albaity at hotmail dot com
-Status:   Open
+Status:   Wont fix
 Bug Type: Feature/Change Request
 Operating System: Win XP Pro
 PHP Version:  5.0.3
 New Comment:

ext/java is no more maintained. Please try PHP-Java Bridge :
http://php-java-bridge.sourceforge.net/

Thank you


Previous Comments:


[2005-03-07 20:38:25] albaity at hotmail dot com

this the result must appear : 
Java version=1.4.2_05 
Java vendor=Sun Microsystems Inc. 
OS=Windows XP 5.1 on x86 
ÇáÇËäíä, ãÇÑÓ 07, 2005 at 10:08:00 ã Arabia Standard Time
---
this is the code that I am test : 
getProperty('java.version').' ';
 print 'Java vendor=' .$system->getProperty('java.vendor').' ';
 print 'OS='.$system->getProperty('os.name').' '.
 $system->getProperty('os.version').' on '.
 $system->getProperty('os.arch').' ';

 // java.util.Date example
 $formatter = new Java('java.text.SimpleDateFormat',
   ",  dd,  'at' h:mm:ss a ");

 print $formatter->format(new Java('java.util.Date'));
?>
-
this is my php.ini setting which work with me with 4.3.10 :

java.class.path = "C:\PHP\ext\php_java.jar;C:\PHP\ext\itext.jar"
java.home = "C:\j2sdk\jre\"
java.library = "c:\j2sdk\jre\bin\server\jvm.dll "
java.library.path = "C:\PHP\ext\"

What I get : 
2 windows give me this message :
the instruction at "0x7c918fea" referennced memory at "0x0010" the
memory could not be "written"



[2005-03-07 10:43:55] albaity at hotmail dot com

Description:

try this code on 4.3.10 is work :
getProperty('java.version').' ';
 print 'Java vendor=' .$system->getProperty('java.vendor').' ';
 print 'OS='.$system->getProperty('os.name').' '.
 $system->getProperty('os.version').' on '.
 $system->getProperty('os.arch').' ';

 // java.util.Date example
 $formatter = new Java('java.text.SimpleDateFormat',
   ",  dd,  'at' h:mm:ss a ");

 print $formatter->format(new Java('java.util.Date'));
?>

but with php5.0.3 is not work .


Reproduce code:
---
windows give me 2 message to terminate program because of memory crash
.

Expected result:

give me the date

Actual result:
--
nothing CGI HEADERS NOT SEND IIS 5.5





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


#32981 [NEW]: ReflectionMethod::getStaticVariables() causes apache2.0.54 seg fault

2005-05-09 Thread phpbug at swift-web dot com
From: phpbug at swift-web dot com
Operating system: Gentoo 2.6.11
PHP version:  5.0.4
PHP Bug Type: Reproducible crash
Bug description:  ReflectionMethod::getStaticVariables() causes apache2.0.54 
seg fault

Description:

Discovered if I am using ReflectionMethod::getStaticVariables() on a
method that has a static variable that is set to boolean true or false
then php crashes (Apache 2 exists with following error)

[notice] child pid 28346 exit signal Segmentation fault (11)

I tried with php version 5.0.3 initially but upgraded to 5.0.4 and problem
still exists.






Reproduce code:
---
class demo_class {
  static function myDemo($toggle) {
static $enabled = true;
// do whatever
  }
}

$class = new ReflectionClass('demo_class');
foreach ($class->getMethods() as $method) {
  $arr_static_vars[] = $method->getStaticVariables();
}
echo "done"; 
// (normally would output $arr_static_var but just put above
//  line for simplicity in this example)

Expected result:

See a screen with just the word 'done' on it



Actual result:
--
Page loading stops immediately (and keeps last page shown displayed. 
Apache logs show:


[notice] child pid 28346 exit signal Segmentation fault (11)
(pid of course varies)

If I change the third line in my sample code to:
  static $enabled = 1;

(or string) the page does not crash and things display properly

I haven't tested this to see if it also crashes showing static variables
for the entire class (as opposed to the one in the method) but if they
inherit the same code I guess it would also crash but again I haven't
confirmed that.

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


#32979 [Fbk->Opn]: socket stream opened with stream_socket_client doesnt work with stream_select

2005-05-09 Thread mjpph at stardust dot fi
 ID:   32979
 User updated by:  mjpph at stardust dot fi
 Reported By:  mjpph at stardust dot fi
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: Linux (Fedora Core 3)
 PHP Version:  5CVS-2005-05-08 (dev)
 New Comment:

No I used http only as an examply not thinking that it doesn't actually
output anything straight away.

I used the example code on several services that output information
straight from connect without needing any input from the client. For
example port 25 welcome message and several others. Telnet straight
away you get a welcome. Use only fgets, you get a welcome. Use the
example code, you get nothing. Didn't try anything which actually
closes the connection after the output, as this isn't the case with my
own implementation either and shouldn't be a requirement anyway.

The case is always the same, fgets would get input straight away but
stream_select stays dead no matter how many times it loops and waits.
Setting the stream to blocking or non-blocking mode has no effect on
stream_select's behaviour on this case. The data in the buffer just
stays there and stream_select is completely ignorant about it. So, the
read wouldn't block (as I know there is data pending), but even despite
that stream_select returns 0 changed streams always. So it thinks that
read would block, in reality, it doesn't.

Partly unrelated: I have this code in a script which also selects
stdin. The stdin select works as expected, the stream_socket selecting
select doesn't. I had a perfectly working implementation with
socket-based functions which stalled at the selects right after I
changed to stream_socket-based functions.


Previous Comments:


[2005-05-09 01:26:32] [EMAIL PROTECTED]

Is the server end of the socket talking http?
If not, does it send data to the client immediately upon client
connection (without expecting data from the client first)?
If not, stream_select() is working precisely as it should.

Also note that stream_select() tells you only if a read or write would
not block, not whether there actually is data pending.



[2005-05-08 23:06:40] mjpph at stardust dot fi

The issue is the same when using stream_socket_server.
stream_socket_accept works as expected, but if you select the socket it
always returns 0, even if there is a pending connection which would be
returned with stream_socket_accept.



[2005-05-08 22:50:58] mjpph at stardust dot fi

Correction to the previous comment. The fread has to be done before
every stream_select to obtain any other value from stream_select other
than 0. stream_get_meta_data also reports pending data as 0 before the
fread and non-zero value right after the 1 byte fread.



[2005-05-08 22:46:55] mjpph at stardust dot fi

Also, adding "fread($c,1);" after stream_socket_client and before the
while loop enables correct functionality of the stream_select function
from that pont on.



[2005-05-08 22:18:29] mjpph at stardust dot fi

Description:

Using stream_socket_client or stream_socket_server to open a connection
fails to report correct values with stream_select. Using fread to get
one byte before stream_select suddenly makes stream_select work as
expected.
Without it stream_select returns 0 changed streams even though there is
data waiting. Service used as an endpoint is persistent and doesn't
close the connection after it's output. PHP is CLI-version.

Reproduce code:
---
$c = stream_socket_client("tcp://127.0.0.1:80");
while (1)
{
  $streams = array($c);
  if (stream_select($streams, $write=NULL, $except=NULL, 0, 5000)) {
print "Data received\n";
  }
}

// IP:Port can be anything which outputs something after connection.

Expected result:

Text "Data received" after connection and output from the service. The
service can be anything which just outputs something right after
connect.

Actual result:
--
Nothing. stream_select returns 0 even though there is data waiting.





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


#32800 [Fbk->Opn]: 64 bit linux + php + IBM DB2

2005-05-09 Thread tinko at siol dot com
 ID:   32800
 User updated by:  tinko at siol dot com
 Reported By:  tinko at siol dot com
-Status:   Feedback
+Status:   Open
 Bug Type: ODBC related
 Operating System: SLES9 64 bit
 PHP Version:  4.3.11
 New Comment:

I simply changed 'long int' to 'SDWORD'
in php_odbc_includes.h like it was said in bug #32830. I had this
problem for a long time, and now is solved. It is a problem only on 64
bit platform...
Tinko
Thanks again


Previous Comments:


[2005-05-08 21:58:37] [EMAIL PROTECTED]

Exactly what did you do? (there was no feedback on the other report..)




[2005-05-03 10:26:18] tinko at siol dot com

Problem solved with Your answer. Thank You very much.
Tinko



[2005-04-27 16:13:40] [EMAIL PROTECTED]

Might be related to bug #32830




[2005-04-22 11:38:50] tinko at siol dot com

Description:

Hello!
Kinda desperate here, since I've read all about php + db2 + apache, so
is 
there a soul to help me?

I'm running SLES 9 (also SLES8 - the problem is the same) under z/VM on
z900 
(1IFL) in 64 bit mode/version.
I successfuly installed IBM DB2 8.1 ESE (64 bit) with latest FixPacks.
DB2 
runs fine, I can connect to DB2 on z/OS...
I've compiled (many versions) of php (with -m64) with IBM-DB2 included
... 
everything by the manual, and everything works fine - apache+php
connect, 
insert, odbc_result_all, but when trying to do odbc_result with
fetching i 
get the number of rows with no values...
After running query for several times I get emalloc errors in apache
log...
(I've tried many different shapes of queries...allways the same
result)
I've also tried to do the same configuration on 32 bit linux on intel 
...same php, db2, queries etc - everything works perfect and fast.
So, i 
think there must be a 64 bit issue...
Any1 has any ideas? Please, please help
Thank You very much in advance,
Tinko


Reproduce code:
---
I found this...
In file included from /home/db2inst1/sqllib/include/sqlcli1.h:42,
 from
/ins/php-4.3.11/ext/odbc/php_odbc_includes.h:176,
 from /ins/php-4.3.11/ext/odbc/php_odbc.c:37:
/home/db2inst1/sqllib/include/sqlcli.h:772:1: warning: "ODBCVER"
redefined
In file included from /ins/php-4.3.11/ext/odbc/php_odbc.c:37:
/ins/php-4.3.11/ext/odbc/php_odbc_includes.h:28:1: warning: this is the
location of the previous definition
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function
`safe_odbc_disconnect':
/ins/php-4.3.11/ext/odbc/php_odbc.c:201: warning: passing arg 1 of
`SQLDisconnect' makes integer from pointer without a cast
/ins/php-4.3.11/ext/odbc/php_odbc.c:204: warning: passing arg 1 of
`SQLTransact' makes integer from pointer without a cast
/ins/php-4.3.11/ext/odbc/php_odbc.c:204: warning: passing arg 2 of
`SQLTransact' makes integer from pointer without a cast
/ins/php-4.3.11/ext/odbc/php_odbc.c:205: warning: passing arg 1 of
`SQLDisconnect' makes integer from pointer without a cast
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `_close_odbc_conn':
/ins/php-4.3.11/ext/odbc/php_odbc.c:231: warning: passing arg 1 of
`safe_odbc_disconnect' makes pointer from integer without a cast
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `_close_odbc_pconn':
/ins/php-4.3.11/ext/odbc/php_odbc.c:259: warning: passing arg 1 of
`safe_odbc_disconnect' makes pointer from integer without a cast
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `odbc_bindcols':
/ins/php-4.3.11/ext/odbc/php_odbc.c:676: warning: passing arg 6 of
`SQLBindCol' from incompatible pointer type
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `zif_odbc_execute':
/ins/php-4.3.11/ext/odbc/php_odbc.c:1042: warning: cast to pointer from
integer of different size
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function
`zif_odbc_data_source':
/ins/php-4.3.11/ext/odbc/php_odbc.c:1223: warning: passing arg 2 of
`odbc_sql_error' makes integer from pointer without a cast
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function
`php_odbc_fetch_hash':
/ins/php-4.3.11/ext/odbc/php_odbc.c:1434: warning: passing arg 6 of
`SQLGetData' from incompatible pointer type
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function
`zif_odbc_fetch_into':
/ins/php-4.3.11/ext/odbc/php_odbc.c:1594: warning: passing arg 6 of
`SQLGetData' from incompatible pointer type
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function `zif_odbc_result':
/ins/php-4.3.11/ext/odbc/php_odbc.c:1825: warning: passing arg 6 of
`SQLGetData' from incompatible pointer type
/ins/php-4.3.11/ext/odbc/php_odbc.c:1868: warning: passing arg 6 of
`SQLGetData' from incompatible pointer type
/ins/php-4.3.11/ext/odbc/php_odbc.c: In function
`zif_odbc_result_all':
/ins/php-4.3.11/ext/odbc/php_odbc.c:1972: warning: passing arg 6 of
`SQLGetDa

#32971 [Opn->Bgs]: SIGPIPE Broken Pipe, occurs on one of two machines

2005-05-09 Thread derick
 ID:   32971
 Updated by:   [EMAIL PROTECTED]
 Reported By:  saeven at saeven dot net
-Status:   Open
+Status:   Bogus
 Bug Type: Zend Engine 2 problem
 Operating System: Fedora Core 2
 PHP Version:  5.0.4
 New Comment:

http://zend.com/support/index.php#SubmitTicket


Previous Comments:


[2005-05-09 02:10:56] saeven at saeven dot net

Hi,

  Having compiled with --enable-debug, being forced then to use the
unencoded version, the problem no longer occurs.  The bug then safely
can be assumed to be with Zend Optimizer?  Where should I direct a Zend
Optimizer bug report?

Thanks!
Alex



[2005-05-07 03:29:56] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

your stack trace is not useful for two reasons:
- you need to build a debug build of PHP (which means running without
the zend optimizer)
- gdb will catch signals like SIGPIPE that are otherwise handled by the
program being debugged.  You can either tell gdb to "cont" when you see
that message, or create a .gdbinit file that has "handle SIGPIPE
nostop" in it.



[2005-05-06 22:16:54] saeven at saeven dot net

Description:

Inclusion of a custom user session object at a particular point causes
segmentation faults.  Occurs in both Zend optimized and un-optimized
code.

Works on several machines, but fails on a distinct few as well.  Apache
as well as PHP have been recompiled.

Help interpreting the stack trace would be appreciated.

Actual result:
--
Program received signal SIGPIPE, Broken pipe.
[Switching to Thread -1208590208 (LWP 15537)]
0x0060d7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) bt
#0 0x0060d7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x006d9eac in writev () from /lib/tls/libc.so.6
#2 0x08073fb9 in ssl_io_hook_writev ()
#3 0x080ac402 in ap_hook_call_func ()
#4 0x080abbea in ap_hook_call ()
#5 0x080884c4 in writev_it_all ()
#6 0x08088859 in large_write ()
#7 0x0808891c in ap_bwrite ()
#8 0x0809beee in ap_rwrite ()
#9 0x0030b9a3 in ?? () from /usr/local/apache/libexec/libphp5.so
#10 0x002c6b8b in ?? () from /usr/local/apache/libexec/libphp5.so
#11 0x002c6bf9 in ?? () from /usr/local/apache/libexec/libphp5.so
#12 0x002c5dfe in ?? () from /usr/local/apache/libexec/libphp5.so
#13 0x002e8639 in ?? () from /usr/local/apache/libexec/libphp5.so
#14 0x002e85df in ?? () from /usr/local/apache/libexec/libphp5.so
#15 0x002e8130 in ?? () from /usr/local/apache/libexec/libphp5.so
#16 0x00b13849 in get_module () from
/usr/local/Zend/lib/Optimizer-2.5.7/php-5.0.x/ZendOptimizer.so
#17 0x00b79738 in ?? () from
/usr/local/Zend/lib/Optimizer-2.5.7/php-5.0.x/ZendOptimizer.so
#18 0x003956f4 in ?? () from /usr/local/apache/libexec/libphp5.so
#19 0x00b134a0 in get_module () from
/usr/local/Zend/lib/Optimizer-2.5.7/php-5.0.x/ZendOptimizer.so
#20 0x00b7c6e0 in ?? () from
/usr/local/Zend/lib/Optimizer-2.5.7/php-5.0.x/ZendOptimizer.so
#21 0xbfe1caf8 in ?? ()
#22 0xbfe1cb38 in ?? ()
#23 0x00b79738 in ?? () from
/usr/local/Zend/lib/Optimizer-2.5.7/php-5.0.x/ZendOptimizer.so
#24 0x00b7c6e0 in ?? () from
/usr/local/Zend/lib/Optimizer-2.5.7/php-5.0.x/ZendOptimizer.so
#25 0xbfe1caf8 in ?? ()
#26 0x in ?? ()





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