#26173 [Opn->Bgs]: Global vs function scope problem?

2003-11-07 Thread myle34 at hotmail dot com
 ID:   26173
 User updated by:  myle34 at hotmail dot com
 Reported By:  myle34 at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Variables related
 Operating System: Windows XP Home
 PHP Version:  5.0.0b2 (beta2)
 New Comment:

Sorry, bad reporduce code


Previous Comments:


[2003-11-08 01:52:20] myle34 at hotmail dot com

sorry, forgot to call Test() at the bottom of the reproduce code...
simply put in Test(); at the bottom.



[2003-11-08 01:49:16] myle34 at hotmail dot com

Description:

I'm not sure if this is a bug, but I haven't found anything so far
stating that it isn't so...

I am using Windows XP Home and Apache 2.0.47 with PHP beta 2.

Reproduce code:
---
// Uncommenting the following makes it work...
// global $foo;

$foo = 'bar';

// Uncommenting the following doesn't help...
// global $foo;

function Test()
{
  global $foo;

  echo $foo;
}

Expected result:

bar

Actual result:
--
No output





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


#26173 [Opn]: Global vs function scope problem?

2003-11-07 Thread myle34 at hotmail dot com
 ID:   26173
 User updated by:  myle34 at hotmail dot com
 Reported By:  myle34 at hotmail dot com
 Status:   Open
 Bug Type: Variables related
 Operating System: Windows XP Home
 PHP Version:  5.0.0b2 (beta2)
 New Comment:

sorry, forgot to call Test() at the bottom of the reproduce code...
simply put in Test(); at the bottom.


Previous Comments:


[2003-11-08 01:49:16] myle34 at hotmail dot com

Description:

I'm not sure if this is a bug, but I haven't found anything so far
stating that it isn't so...

I am using Windows XP Home and Apache 2.0.47 with PHP beta 2.

Reproduce code:
---
// Uncommenting the following makes it work...
// global $foo;

$foo = 'bar';

// Uncommenting the following doesn't help...
// global $foo;

function Test()
{
  global $foo;

  echo $foo;
}

Expected result:

bar

Actual result:
--
No output





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


#26173 [NEW]: Global vs function scope problem?

2003-11-07 Thread myle34 at hotmail dot com
From: myle34 at hotmail dot com
Operating system: Windows XP Home
PHP version:  5.0.0b2 (beta2)
PHP Bug Type: Variables related
Bug description:  Global vs function scope problem?

Description:

I'm not sure if this is a bug, but I haven't found anything so far stating
that it isn't so...

I am using Windows XP Home and Apache 2.0.47 with PHP beta 2.

Reproduce code:
---
// Uncommenting the following makes it work...
// global $foo;

$foo = 'bar';

// Uncommenting the following doesn't help...
// global $foo;

function Test()
{
  global $foo;

  echo $foo;
}

Expected result:

bar

Actual result:
--
No output

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


#26171 [NEW]: using /(a)+/ to match a long string makes php crash

2003-11-07 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: win
PHP version:  4.3.4
PHP Bug Type: PCRE related
Bug description:  using /(a)+/ to match a long string makes php crash

Description:

if just crash

Reproduce code:
---



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


#26170 [Opn->Bgs]: ip2long() fails if IP begins with a 0 (zero)

2003-11-07 Thread pollita
 ID:   26170
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phpbugspam at netebb dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Windows 2000 SP4
 PHP Version:  5.0.0b2 (beta2)
 New Comment:

Unable to confirm.

Works locally on Win2K/SP4, Linux 2.4.22, and FreeBSD 5.1


Previous Comments:


[2003-11-07 20:05:20] phpbugspam at netebb dot com

Description:

Line 4 (09.0.0.0) fails in the following code.

Fails on both 4.3.4 and 5.0.0b2.

Haven't tried it in *nix.

Thanks,

Ross

Reproduce code:
---



Expected result:

Nothing.

Actual result:
--
$ php -q bug_ip2long.php 

Warning: assert(): Assertion failed in
c:\ross\freebeer\www\demo\bug_ip2long.php on line 4
phpversion=4.3.4

$ php -q bug_ip2long.php 

Warning: assert(): Assertion failed in
c:\ross\freebeer\www\demo\bug_ip2long.php on line 4
phpversion=5.0.0b2





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


#26168 [Opn]: phpize changes don't check for execute status on shtool

2003-11-07 Thread robbat2 at gentoo dot org
 ID:   26168
 User updated by:  robbat2 at gentoo dot org
 Reported By:  robbat2 at gentoo dot org
 Status:   Open
 Bug Type: *Compile Issues
 Operating System: Gentoo Linux
 PHP Version:  4.3.4
 New Comment:

i do realize that /usr/lib/build/* will have the execute bits set on
them if the install-build make target has been used, but the purpose of
this patch is to


Previous Comments:


[2003-11-07 17:13:55] robbat2 at gentoo dot org

Patch that fixes phpize:
--- php-4.3.4/./scripts/phpize.in.old   2003-11-07 14:20:41.0
-0800
+++ php-4.3.4/./scripts/phpize.in   2003-11-07 14:21:07.0
-0800
@@ -57,6 +57,7 @@
 aclocal || exit 1
 autoconf || exit 1
 autoheader || exit 1
+test -x $builddir/build/shtool || chmod +x $builddir/build/shtool
 libtoolize=`$builddir/build/shtool path glibtoolize libtoolize`
 $libtoolize -f -c || exit 1



[2003-11-07 17:09:08] robbat2 at gentoo dot org

Description:

phpize as of 4.3.4 does NOT check that $builddir/build/shtool is
executable before it tries to run it.

Reproduce code:
---
1. unpack any source based php extension (I used turck-mmcache-2.4.6)
2. ensure that your /usr/lib/php/build/shtool does NOT have execute
set.
3. in the new dir, run phpize.

Expected result:

should complete correctly.

phpize should set shtool to be executable before it tries to run it, or
at the very least it should check if it is executable.

Actual result:
--
you get this error:
/usr/bin/phpize: line 1:
/var/tmp/portage/turck-mmcache-2.4.6/work/turck-mmcache-2.4.6/build/shtool:
Permission denied
/usr/bin/phpize: line 61: -f: command not found





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


#26170 [NEW]: ip2long() fails if IP begins with a 0 (zero)

2003-11-07 Thread phpbugspam at netebb dot com
From: phpbugspam at netebb dot com
Operating system: Windows 2000 SP4
PHP version:  5.0.0b2 (beta2)
PHP Bug Type: Scripting Engine problem
Bug description:  ip2long() fails if IP begins with a 0 (zero)

Description:

Line 4 (09.0.0.0) fails in the following code.

Fails on both 4.3.4 and 5.0.0b2.

Haven't tried it in *nix.

Thanks,

Ross

Reproduce code:
---



Expected result:

Nothing.

Actual result:
--
$ php -q bug_ip2long.php 

Warning: assert(): Assertion failed in
c:\ross\freebeer\www\demo\bug_ip2long.php on line 4
phpversion=4.3.4

$ php -q bug_ip2long.php 

Warning: assert(): Assertion failed in
c:\ross\freebeer\www\demo\bug_ip2long.php on line 4
phpversion=5.0.0b2

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


#25881 [Com]: Session is not saved at first time...

2003-11-07 Thread omarh at cox dot net
 ID:   25881
 Comment by:   omarh at cox dot net
 Reported By:  adriano at steelconsultoria dot com dot br
 Status:   No Feedback
 Bug Type: Session related
 Operating System: Windows 2000
 PHP Version:  4.3.3
 New Comment:

The problem went away after I updated to the latest snapshot at 
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip


Previous Comments:


[2003-11-07 14:50:31] omarh at cox dot net

I think I am seeing the same bug. 
I'm also using Windows 2000 Professional (latest service pack) with IIS
5.x. 

I'm just trying to get the sample session code to work, and it does not
increment my counter each time I reload the page. It acts like it isn't
storing the session at all between page loads.
Here is the code I'm using.


Counter : 


This should increment each time you refresh the page.

In our session we have the following: 




[2003-10-28 04:47:57] [EMAIL PROTECTED]

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





[2003-10-17 11:28:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2003-10-15 10:01:31] adriano at steelconsultoria dot com dot br

Description:

I´m using Win2K + IIS.

I call my script like that:

http://localhost/test.php?id=2

And the script is:



In the test2.php I have:



So when I call the script for the first time it calls the error.php
Then I call again through IE and it works.

With Apache it works correctly...







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


#26168 [Opn]: phpize changes don't check for execute status on shtool

2003-11-07 Thread robbat2 at gentoo dot org
 ID:   26168
 User updated by:  robbat2 at gentoo dot org
 Reported By:  robbat2 at gentoo dot org
 Status:   Open
 Bug Type: *Compile Issues
 Operating System: Gentoo Linux
 PHP Version:  4.3.4
 New Comment:

Patch that fixes phpize:
--- php-4.3.4/./scripts/phpize.in.old   2003-11-07 14:20:41.0
-0800
+++ php-4.3.4/./scripts/phpize.in   2003-11-07 14:21:07.0
-0800
@@ -57,6 +57,7 @@
 aclocal || exit 1
 autoconf || exit 1
 autoheader || exit 1
+test -x $builddir/build/shtool || chmod +x $builddir/build/shtool
 libtoolize=`$builddir/build/shtool path glibtoolize libtoolize`
 $libtoolize -f -c || exit 1


Previous Comments:


[2003-11-07 17:09:08] robbat2 at gentoo dot org

Description:

phpize as of 4.3.4 does NOT check that $builddir/build/shtool is
executable before it tries to run it.

Reproduce code:
---
1. unpack any source based php extension (I used turck-mmcache-2.4.6)
2. ensure that your /usr/lib/php/build/shtool does NOT have execute
set.
3. in the new dir, run phpize.

Expected result:

should complete correctly.

phpize should set shtool to be executable before it tries to run it, or
at the very least it should check if it is executable.

Actual result:
--
you get this error:
/usr/bin/phpize: line 1:
/var/tmp/portage/turck-mmcache-2.4.6/work/turck-mmcache-2.4.6/build/shtool:
Permission denied
/usr/bin/phpize: line 61: -f: command not found





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


#26168 [NEW]: phpize changes don't check for execute status on shtool

2003-11-07 Thread robbat2 at gentoo dot org
From: robbat2 at gentoo dot org
Operating system: Gentoo Linux
PHP version:  4.3.4
PHP Bug Type: *Compile Issues
Bug description:  phpize changes don't check for execute status on shtool

Description:

phpize as of 4.3.4 does NOT check that $builddir/build/shtool is
executable before it tries to run it.

Reproduce code:
---
1. unpack any source based php extension (I used turck-mmcache-2.4.6)
2. ensure that your /usr/lib/php/build/shtool does NOT have execute set.
3. in the new dir, run phpize.

Expected result:

should complete correctly.

phpize should set shtool to be executable before it tries to run it, or at
the very least it should check if it is executable.

Actual result:
--
you get this error:
/usr/bin/phpize: line 1:
/var/tmp/portage/turck-mmcache-2.4.6/work/turck-mmcache-2.4.6/build/shtool:
Permission denied
/usr/bin/phpize: line 61: -f: command not found

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


#26003 [Ver->Csd]: fgetcsv() not binary-safe on null bytes

2003-11-07 Thread iliaa
 ID:   26003
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mr dot heat at gmx dot de
-Status:   Verified
+Status:   Closed
 Bug Type: Filesystem function related
 Operating System: Irrelevant
 PHP Version:  4CVS-20031028
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2003-10-27 09:58:22] mr dot heat at gmx dot de

Description:

If the .csv file contains any 0x00 character, fgetcsv() stops reading
the line and continues on the next one. Assume the folowing .csv file
(with _ as place marker for the 0x00 character).

"a","bb_bb"
"c","d"

fgetcsv() breaks at 0x00 (with slightly different behaviours in 4.x and
5.x), the EOL character is skipped, the '"' in front of 'c' becomes
the closing enclosure, 'c' is skipped, 'd' becomes value [2].

(This bug may be related to http://bugs.php.net/bug.php?id=22382 - see
the last comment.)

Reproduce code:
---


Expected result:

array(3) {
  [0]=> string(5) "a"
  [1]=> string(5) "bb_bb"
}
(_ as a place marker for 0x00.)

Actual result:
--
In 4.3.4RC3-dev:
array(3) {
  [0]=> string(5) "a"
  [1]=> string(2) "bb"
  [2]=> string(5) "d"
}

In 5.0.0b2-dev (_ as a place marker for 0x00):
array(3) {
  [0]=> string(5) "a"
  [1]=> string(7) "bb_bb"
"
  [2]=> string(5) "d"
}





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


#26167 [NEW]: OSX Build fails: yytext returns

2003-11-07 Thread aleigh at tessier dot com
From: aleigh at tessier dot com
Operating system: OS X 10.3
PHP version:  4CVS-2003-11-07 (stable)
PHP Bug Type: Compile Failure
Bug description:  OSX Build fails: yytext returns

Description:

php4-STABLE-200311072030:
 
ld: multiple definitions of symbol _yytext
Zend/zend_language_scanner.lo definition of _yytext in section
(__DATA,__common)
Zend/zend_ini_scanner.lo definition of _yytext in section
(__DATA,__common)
make: *** [libphp4.la] Error 1

Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
Thread model: posix
gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)

Darwin sandbender 7.0.0 Darwin Kernel Version 7.0.0: Wed Sep 24 15:48:39
PDT 2003; root:xnu/xnu-517.obj~1/RELEASE_PPC  Power Macintosh powerpc

XCode 1.1

Removing char *yytext, from, say Zend/php_langauge_scanner.c gets at least
libphp4.la to build, but then:

cc: sapi/cli/php_cli.o: No such file or directory
cc: sapi/cli/getopt.o: No such file or directory
cc: main/internal_functions_cli.o: No such file or directory
make: *** [sapi/cli/php] Error 1

Entire session available at:
http://www.ashpool.com/phpbug/php_session1.txt



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


#26166 [NEW]: __toString() crash when no values returned

2003-11-07 Thread lphuberdeau at phpquebec dot org
From: lphuberdeau at phpquebec dot org
Operating system: Linux
PHP version:  5CVS-2003-11-07 (dev)
PHP Bug Type: Reproducible crash
Bug description:  __toString() crash when no values returned

Description:

It's actually the same bug as before with __get() not returning any value.
__toString() simply crashed when you throw an exception inside.

There is an other problem with __toString(). If you call an other
__toString() method from an other object to return it, the value is not
considered as a string.

The version I tested on is actually the one from yesterday.

Reproduce code:
---
class Foo
{
function __toString()
{
return "Hello World!";
}
}

class Bar
{
private $obj;

function __construct()
{
$this->obj = new Foo();
}

function __toString()
{
return $this->obj->__toString();
}
}

$o = new Bar();
echo $o;


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


#25881 [Com]: Session is not saved at first time...

2003-11-07 Thread omarh at cox dot net
 ID:   25881
 Comment by:   omarh at cox dot net
 Reported By:  adriano at steelconsultoria dot com dot br
 Status:   No Feedback
 Bug Type: Session related
 Operating System: Windows 2000
 PHP Version:  4.3.3
 New Comment:

I think I am seeing the same bug. 
I'm also using Windows 2000 Professional (latest service pack) with IIS
5.x. 

I'm just trying to get the sample session code to work, and it does not
increment my counter each time I reload the page. It acts like it isn't
storing the session at all between page loads.
Here is the code I'm using.


Counter : 


This should increment each time you refresh the page.

In our session we have the following: 



Previous Comments:


[2003-10-28 04:47:57] [EMAIL PROTECTED]

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





[2003-10-17 11:28:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2003-10-15 10:01:31] adriano at steelconsultoria dot com dot br

Description:

I´m using Win2K + IIS.

I call my script like that:

http://localhost/test.php?id=2

And the script is:



In the test2.php I have:



So when I call the script for the first time it calls the error.php
Then I call again through IE and it works.

With Apache it works correctly...







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


#26083 [Fbk->Csd]: Problem with uri-string in function xpath_register_ns()

2003-11-07 Thread iliaa
 ID:   26083
 Updated by:   [EMAIL PROTECTED]
 Reported By:  daju at passagen dot se
-Status:   Feedback
+Status:   Closed
 Bug Type: DOM XML related
 Operating System: Linux
 PHP Version:  4.3.3
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2003-11-07 12:00:51] [EMAIL PROTECTED]

are you sure, the file is writable. 

The method just returns false in your case, which means, it couldn't
write for whatever reason.

chregu



[2003-11-06 13:37:37] daju at passagen dot se

Yes, only when destination file already exist. But that's the point.

If I want to update a xml file I already have using DOM then I can't
use save() function to save my changes.

Shouldn't save() function work as DomDocument->dump_file() in PHP
4.3.x?



[2003-11-05 11:44:32] [EMAIL PROTECTED]

The problem with saving only occures when the destination file already
exists. 



[2003-11-02 13:57:25] daju at passagen dot se

Description:

Hi folks,

I just downloaded development version av PHP 5 (CVS 2003-11-02) and
tried the new DOM functions that uses libxml2 library. It's working
great but there is one thing that I don't understand.

I tried to update a xml file I have and I can add nodes and attributes
but when i try to save file then nothing happens. There is no error
messages at all.

How ever if I choose another file name for the save function then it is
working. New file is created and I see both the old and the new nodes
in the xml file.

Am I missing something here?

Reproduce code:
---
Just a simple DOM test";

$dom = new domDocument();
$load = $dom->load('test.xml');
$root = $dom->documentElement;

$element = $dom->createElement("temp", "Just a test text");
$attr = $element->setAttribute("id", "0007");
$attr = $element->setAttribute("author", "darren");
$tmp = $root->appendChild($element);

$tmp = $dom->save('test.xml');
echo $tmp." bytes was saved to the xml file.";
?>

Expected result:

The file should be updated. Output i my browser should be:

363 bytes was saved to the xml file.

Actual result:
--
0 bytes was saved to the xml file.





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


#26083 [Opn->Fbk]: Problem with uri-string in function xpath_register_ns()

2003-11-07 Thread chregu
 ID:   26083
 Updated by:   [EMAIL PROTECTED]
-Summary:  save function isn't working
 Reported By:  daju at passagen dot se
-Status:   Open
+Status:   Feedback
 Bug Type: DOM XML related
-Operating System: Windows XP Home
+Operating System: Linux
-PHP Version:  5CVS-2003-11-02 (dev)
+PHP Version:  4.3.3
 New Comment:

are you sure, the file is writable. 

The method just returns false in your case, which means, it couldn't
write for whatever reason.

chregu


Previous Comments:


[2003-11-06 13:37:37] daju at passagen dot se

Yes, only when destination file already exist. But that's the point.

If I want to update a xml file I already have using DOM then I can't
use save() function to save my changes.

Shouldn't save() function work as DomDocument->dump_file() in PHP
4.3.x?



[2003-11-05 11:44:32] [EMAIL PROTECTED]

The problem with saving only occures when the destination file already
exists. 



[2003-11-02 13:57:25] daju at passagen dot se

Description:

Hi folks,

I just downloaded development version av PHP 5 (CVS 2003-11-02) and
tried the new DOM functions that uses libxml2 library. It's working
great but there is one thing that I don't understand.

I tried to update a xml file I have and I can add nodes and attributes
but when i try to save file then nothing happens. There is no error
messages at all.

How ever if I choose another file name for the save function then it is
working. New file is created and I see both the old and the new nodes
in the xml file.

Am I missing something here?

Reproduce code:
---
Just a simple DOM test";

$dom = new domDocument();
$load = $dom->load('test.xml');
$root = $dom->documentElement;

$element = $dom->createElement("temp", "Just a test text");
$attr = $element->setAttribute("id", "0007");
$attr = $element->setAttribute("author", "darren");
$tmp = $root->appendChild($element);

$tmp = $dom->save('test.xml');
echo $tmp." bytes was saved to the xml file.";
?>

Expected result:

The file should be updated. Output i my browser should be:

363 bytes was saved to the xml file.

Actual result:
--
0 bytes was saved to the xml file.





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


#26163 [NEW]: Cannot load php as a module

2003-11-07 Thread flusv02 at student dot vxu dot se
From: flusv02 at student dot vxu dot se
Operating system: Windows 2000
PHP version:  4.3.3
PHP Bug Type: Apache related
Bug description:  Cannot load php as a module

Description:

I've followed the instructions on how to install php as a module for
apache, but it isn't working. After restarting the server I get the
following error:

"Cannot load c:/program files/apache group/php/sapi/php4apache.dll into
server: (126) The specified module could not be found"

I've checked the directory structure more times than I can recall and it
is correct, the dll file is in the directory where apache says it can't
find it..

At one point I tried added the path to the root directories of apache and
php to the path, but then I got another error about the module already
being loaded instead.






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


#14882 [Com]: PHP as ISAPI dll causes ASP to generate Internal Server Error 5000

2003-11-07 Thread epohs at blurryphoto dot com
 ID:   14882
 Comment by:   epohs at blurryphoto dot com
 Reported By:  carlosi at bellatlantic dot net
 Status:   No Feedback
 Bug Type: IIS related
 Operating System: Windows 2000
 PHP Version:  4.1.1
 New Comment:

is the official answer to this apparent bug, 'just use the cgi
extension instead'?


Previous Comments:


[2002-10-28 13:17:16] bdbourn at qualityonewoodwork dot com

PHP Version 4.2.3 + IIS 5/Win2k Server SP 3

Exact same symptoms.  Please email me if someone has a solution.



[2002-07-07 01:00:06] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, 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".



[2002-06-03 12:23:54] [EMAIL PROTECTED]

Please try a newever version and also see if the CGI works better for
you.



[2002-01-06 00:09:27] carlosi at bellatlantic dot net

I just noticed that if you also install the php4isapi.dll as an ISAPI
Filter then the problem disappears

What I mean is I installed the ISAPI version of PHP under:

Home directory, settings, etc


and the ISAPI Filter under the ISAPI Filters Tab.






[2002-01-05 23:45:49] carlosi at bellatlantic dot net

The problem only appears when running under Windows 2000 and IIS5.  I
tried the same configuration with Windows NT with no problems.  The
problem appears even when no extensions are loaded.

After running a PHP script using the ISAPI PHP dll almost all ASPs
start generating "Internal Server Error messages (500)".  I checked the
logs and the Event viewer and couldn't come up with anything useful.  I
saw this reported by many people in the bug database but no successfull
solution has been found.

PLEASE NOTE that all php scripts continue to work perfectly!  therefore
if you are trying to find problems with php you won't!  It is only when
you have to have phps and asps running on the same server on a Windows
2000 with IIS5.

As soon as I change to the CGI version (php.exe) the problem disappears
but it is too slow!  I need to prove PHP is faster than ASP because I
want to get rid of those ASPs in the meantime they have to "live
together"


Thanks!




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


#25757 [NoF->Opn]: odbc_primarykeys error

2003-11-07 Thread dlaroche at nobug dot lu
 ID:   25757
 User updated by:  dlaroche at nobug dot lu
 Reported By:  dlaroche at nobug dot lu
-Status:   No Feedback
+Status:   Open
 Bug Type: ODBC related
 Operating System: Windows XP Professional
 PHP Version:  4.3.3
 New Comment:

It doesn't work with NULL values ...


Previous Comments:


[2003-11-05 00:34:57] [EMAIL PROTECTED]

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





[2003-10-31 09:51:23] [EMAIL PROTECTED]

Try using a NULL value instead of "" for the empty 
slots.  That should solve the problem you're seeing.  



[2003-10-05 17:12:12] dlaroche at nobug dot lu

Description:

I'm trying to write a script to convert tables from a Microsoft Access
(version from 97 to 2002) to MySQL. The first step is that I just want
the structure of the tables, so I need several functions from odbc.

But for the primary keys, the function odbc_primarykeys doesn't work.

I read that I can get the key information of a table using the
odbc_statistics function but this function doesn't work aswell.

Reproduce code:
---
$resAccessPrimaryKeyList = odbc_primarykeys($resAccessConnection, "",
"", "tblManif");
echo(odbc_result_all($resAccessPrimaryKeyList));

Expected result:

don't know the result but I want to get a list with the primary keys of
the table.

Actual result:
--
Warning:  odbc_primarykeys(): SQL error: , SQL state 0 in
SQLPrimaryKeys in E:\htdocs\ltam\odbc.php on line 65

Warning:  odbc_result_all(): supplied argument is not a valid ODBC
result resource in E:\htdocs\ltam\odbc.php on line 66





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


#26158 [Fbk->Opn]: Open arbitrary file descriptor with fopen

2003-11-07 Thread mattias at sudac dot org
 ID:   26158
 User updated by:  mattias at sudac dot org
 Reported By:  mattias at sudac dot org
-Status:   Feedback
+Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.3.3
 New Comment:

It seams to work if the file descriptor is a pipe, but it fails on
network sockets.

Example:

testfd.php:
#!/usr/local/bin/php -q


Server:
tcpserver 127.0.0.1 8000 ./testfd.php

Client:
[EMAIL PROTECTED]:~$ nc localhost 8000
total 0
lrwx--1 mattias  mattias64 2003-11-07 13:35 0 ->
socket:[2611215]
l-wx--1 mattias  mattias64 2003-11-07 13:35 1 ->
pipe:[2611234]
lrwx--1 mattias  mattias64 2003-11-07 13:35 2 ->
/dev/pts/3
lr-x--1 mattias  mattias64 2003-11-07 13:35 3 ->
/proc/12706/fd
lrwx--1 mattias  mattias64 2003-11-07 13:35 4 ->
socket:[2611215]
lrwx--1 mattias  mattias64 2003-11-07 13:35 5 ->
socket:[2611215]
lrwx--1 mattias  mattias64 2003-11-07 13:35 6 ->
/dev/pts/3

Warning: fopen(/dev/fd/0): failed to open stream: No such device or
address in /home/mattias/projects/jssocket/tests/testfd on line 6

Warning: fopen(/dev/fd/1): failed to open stream: No such device or
address in /home/mattias/projects/jssocket/tests/testfd on line 7


If we run the script without tcpserver we get this:

[EMAIL PROTECTED]:~$ ./testfd
total 0
lrwx--1 mattias  mattias64 2003-11-07 13:37 0 ->
/dev/pts/3
l-wx--1 mattias  mattias64 2003-11-07 13:37 1 ->
pipe:[2611379]
lrwx--1 mattias  mattias64 2003-11-07 13:37 2 ->
/dev/pts/3
lr-x--1 mattias  mattias64 2003-11-07 13:37 3 ->
/proc/12709/fd
lrwx--1 mattias  mattias64 2003-11-07 13:37 4 ->
/dev/pts/3
lrwx--1 mattias  mattias64 2003-11-07 13:37 5 ->
/dev/pts/3
lrwx--1 mattias  mattias64 2003-11-07 13:37 6 ->
/dev/pts/3


Notice the difference, also notice that /dev/fd is a symlink  to
/proc/self/fd:
[EMAIL PROTECTED]:~$ ls -l /dev/fd
lrwxrwxrwx1 root root   13 2001-12-21 18:29 /dev/fd ->
/proc/self/fd


This is on Debian unstable, Linux 2.4.21. I noticed this when i moved a
script from FreeBSD 4.8 to Linux.


Previous Comments:


[2003-11-07 06:44:39] [EMAIL PROTECTED]

Why does fopen("/dev/fd/x", "r") fail ?




[2003-11-06 20:26:32] mattias at sudac dot org

Description:

On some operating systems (BSD?) it is possible to open a arbitrary
file descriptor with fopen like this:
fopen("/dev/fd/", "r");
But on at least Linux this fails. So here is patch that makes it
possible to open fd:s by useing fopen("php://", "r").

in ext/standard/php_fopen_wrapper.c:php_stream_url_wrap_php add two
lines:
 } else if (!strcasecmp(path, "stderr")) {
  fd = STDERR_FILENO;
+} else
+ fd = atoi(path);

Maybe some checks are needed.






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


#26158 [Opn->Fbk]: Open arbitrary file descriptor with fopen

2003-11-07 Thread wez
 ID:   26158
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mattias at sudac dot org
-Status:   Open
+Status:   Feedback
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.3.3
 New Comment:

Why does fopen("/dev/fd/x", "r") fail ?



Previous Comments:


[2003-11-06 20:26:32] mattias at sudac dot org

Description:

On some operating systems (BSD?) it is possible to open a arbitrary
file descriptor with fopen like this:
fopen("/dev/fd/", "r");
But on at least Linux this fails. So here is patch that makes it
possible to open fd:s by useing fopen("php://", "r").

in ext/standard/php_fopen_wrapper.c:php_stream_url_wrap_php add two
lines:
 } else if (!strcasecmp(path, "stderr")) {
  fd = STDERR_FILENO;
+} else
+ fd = atoi(path);

Maybe some checks are needed.






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



#26162 [Opn->Bgs]: $a="0abcdefg";if ($a==0) echo "OK"; result is "OK" ?!

2003-11-07 Thread didou
 ID:   26162
 Updated by:   [EMAIL PROTECTED]
 Reported By:  zhuminglun at yahoo dot com dot cn
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: linux/win2000
 PHP Version:  4.3.4
 New Comment:

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

use === to compare


Previous Comments:


[2003-11-07 06:35:44] zhuminglun at yahoo dot com dot cn

Description:

$a="0abcdefg";
if ($a==0) echo "OK"; 

result is "OK" ?!

Reproduce code:
---
$a="0abcdefg";
if ($a==0) echo "OK"; 

Expected result:

Nothing output






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


#26162 [NEW]: $a="0abcdefg";if ($a==0) echo "OK"; result is "OK" ?!

2003-11-07 Thread zhuminglun at yahoo dot com dot cn
From: zhuminglun at yahoo dot com dot cn
Operating system: linux/win2000
PHP version:  4.3.4
PHP Bug Type: *General Issues
Bug description:  $a="0abcdefg";if ($a==0) echo "OK"; result is "OK" ?!

Description:

$a="0abcdefg";
if ($a==0) echo "OK"; 

result is "OK" ?!

Reproduce code:
---
$a="0abcdefg";
if ($a==0) echo "OK"; 

Expected result:

Nothing output


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


#23188 [Com]: CDB databases created with "c" mode do not work.

2003-11-07 Thread lx-box at gmx dot de
 ID:   23188
 Comment by:   lx-box at gmx dot de
 Reported By:  rhondle at hotmail dot com
 Status:   Closed
 Bug Type: DBM/DBA related
 Operating System: ANY
 PHP Version:  4.3.0
 Assigned To:  helly
 New Comment:

Creating a db with mode "c" works for me but an existing db is cleared!


Manual says it is not cleared with "c"...

PHP 4.3.4 on SunOS hermes 5.8


Previous Comments:


[2003-04-14 16:57:35] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

CDB_MAKE can handle only NEW and READ. Therefore allowing
"C" was an error. Thanks for the mail and time.



[2003-04-13 15:40:13] rhondle at hotmail dot com

dba_open does not return null, implying success. In fact, it
*technically* does succeed; it's just that the resulting file is
corrupt in some way.





[2003-04-13 15:20:52] [EMAIL PROTECTED]

Check again:
"c" should return NULL in case an error happend and you don not check
for that.



[2003-04-13 15:09:39] rhondle at hotmail dot com

The docs indicate that either the 'c' or 'n' modes can be used to
create a dba database. When creating a CDB database, the 'n' mode
produces a functional database, while the 'c' mode does not. No errors
are reported; the database just does not work.

The database created using 'c' doesn't work:


This will create a working database:


tested with:






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


#26119 [Bgs]: Random SESSION-ID given in URL is accepted for the session

2003-11-07 Thread glattfahrservice at web dot de
 ID:   26119
 User updated by:  glattfahrservice at web dot de
 Reported By:  glattfahrservice at web dot de
 Status:   Bogus
 Bug Type: Session related
 Operating System: Windows XP Professional
 PHP Version:  4.3.4
 New Comment:

session_regenerate_id() can solve the problem, that's right.

I just thought this behaviour could be achieved through some
config-option or enabled by default...

Thanks, anyways!


Previous Comments:


[2003-11-05 11:16:38] [EMAIL PROTECTED]

This is a feature actually. And the safe way is: Use only cookies and
change the ID after login, for example.
(see http://www.php.net/session_regenerade_id )




[2003-11-05 05:22:28] glattfahrservice at web dot de

Of course I know about the possibilities to hijack a session.

I just wanted to point out that it SHOULD be checked if the session-ID
passed to the script has been generated by the system before. If I
understand it correctly, a possible attacker can just call a script 1
Million times with random session-IDs and these sessions are then
automatically created in the system. There must be a way around this!

Cheers,
Dan.



[2003-11-04 15:41:41] [EMAIL PROTECTED]

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

The checks only validate the session id for special characters etc...
You've come across the inherit vulnerability of URL session. Anyone can
modify their value and should they stumble across a valid session id of
another user become that user.



[2003-11-04 14:04:24] glattfahrservice at web dot de

Description:

Normally PHP is using some clever algorithms to provide for safe and
unique SESSION-IDs. However, when a simple session-id is passed to the
script in which session_start() is called, a session with the given ID
is generated.

e.g.: www.test.com/index.php&PHPSESSID=blabla

should not be accepted and a new SESSION-ID should be generated for the
session. BUT: this session-ID (blabla) is obviously valid and not
rejected.

Functionality is not impaired, but right now a visitor is able to
"choose" his own session-id. Not very safe, right?

I have disabled cookies and turned off trans-sid.

Ciao,
Dan.






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


#24053 [Com]: include issues spurious "stream" warning that clutters up the page ...

2003-11-07 Thread al at hosteurope dot de
 ID:   24053
 Comment by:   al at hosteurope dot de
 Reported By:  jphey at netdoor dot com
 Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: Linux 2.4.20
 PHP Version:  4.3.2
 New Comment:

The bug still exists in php-4.3.4. If you use
include("http://www.example.com/test.php";); you will get a stream
doesn't support seeking error.

We've investigated the problem and we think that there is only a 2 line
if cause missing (compared to the bugfree version 4.3.1) at the
beginning of the function _php_stream_seek in the main/streams.c code:

954a955,958
>   /* not moving anywhere */
>   if ((offset == 0 && whence == SEEK_CUR) || (offset ==
stream->position && whence == SEEK_SET))
>   return 0;
> 

if you insert this if cause the error disappears and all other
functions still seem to work fine in our tests.

Best regards

Andree Lindenblatt
Software Development
Host Europe GmbH


Previous Comments:


[2003-11-06 15:45:26] info at web-bureau dot com

I think this should be opened again - especially as it's not just a
case of cluttering up the page - the include only half-works! The file
is evaluated, but it's variables don't get back to the calling file.



[2003-11-06 15:40:56] info at web-bureau dot com

Hi,
  I'm experiencing this on PHP 4.3.3 on Linux. I notice that variables
defined in the remote included file are *not* then available in the
including file!..

Is there any way round this for remote files?



[2003-09-22 06:48:49] [EMAIL PROTECTED]

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





[2003-09-16 23:48:12] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

Cannot replicate the described problem.



[2003-07-25 03:49:57] [EMAIL PROTECTED]

Apparently there is still a problem. Will investigate this weekend.



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

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


#26161 [NEW]: apache2 "can not" load libphp4.so

2003-11-07 Thread artistoex at yahoo dot com
From: artistoex at yahoo dot com
Operating system: Debian/unstable
PHP version:  4.3.3
PHP Bug Type: Apache2 related
Bug description:  apache2 "can not" load libphp4.so

Description:

- i compiled php:
   ./configure --with-apxs2=/usr/bin/apxs2 --with-mysql

- apache2 says he could not load libphp4.so into server:

Syntax error on line 390 of /etc/apache2/apache2.conf:
Cannot load /usr/lib/apache2/modules/libphp4.so into server:
/usr/lib/apache2/modules/libphp4.so: undefined symbol: core_globals_id
- i am using latest versions of both apache2 and php and the bug still
exists (so is it a php or actually an apache2 bug???)


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


#26107 [Bgs]: user defined session handlers cropping output.

2003-11-07 Thread debug at libertas-solutions dot com
 ID:   26107
 User updated by:  debug at libertas-solutions dot com
 Reported By:  debug at libertas-solutions dot com
 Status:   Bogus
 Bug Type: Session related
 Operating System: XP
 PHP Version:  4.3.3
 New Comment:

would you have an example that works that I could see?


Previous Comments:


[2003-11-06 15:00:25] [EMAIL PROTECTED]

You're doing something wrong, this works just fine for me with properly
written script. (your example is not complete..)




[2003-11-04 06:58:45] debug at libertas dot  dot  dot com

I have a uploaded a tidied up version of the session code.

http://www.libertas-solutions.com/session.zip

I removed the debug code. if you want it back in just create a Global
variable and add your debug content to it then print the global
variable after the functions.

Adrian Sweeney



[2003-11-04 04:53:26] debug at libertas-solutions dot com

Description:

I have create a series of functions to manage the session information
via a database.  but for some reason the end of the produced html is
cropped dropping from 20768 btyes to 20399 bytes. and I get a internal
server error if I attempt to use header redirects.

I have tracked it down to my session functions I believe that on the
header redirects the output is trying to remove the tail if the output
which is empty and is causeing php to crash

I have globals turned off and have initialised my software engine to be
held in $GLOBALS["engine"]

the session functions can then call the database functions of the
engine through the $GLOBAL variable, which are able to talk with
multiple database types. mySql , msSQL , .

these functions work but will crop the ends of the files.

Also it does not seen to crop the same amount on different pages but
does seem to crop the same amount on the same page ie with a refresh on
page one it will crop to the same place each time, as I am using
templates and the footer of the web page is the same on all pages but
the crop position is different on different URI's






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


#26155 [Bgs]: phpinfo() shows false info

2003-11-07 Thread koko at ofi dot hu
 ID:   26155
 User updated by:  koko at ofi dot hu
 Reported By:  koko at ofi dot hu
 Status:   Bogus
 Bug Type: CGI related
 Operating System: solaris 9
 PHP Version:  4.3.4
 New Comment:

OK. But phpinfo() and getenv() shows different values. That's right?


Previous Comments:


[2003-11-06 14:20:15] [EMAIL PROTECTED]

PHP gets/shows whatever the webserver sets those variables at.
No PHP bug here.




[2003-11-06 13:23:54] koko at ofi dot hu

Description:

On Solaris9-sparc php4.3.4 as fastcgi with Sun ONE Web Server 6.1
phpinfo() show false environment/server variables.

It's shows values from the admin server (SERVER_NAME,PORT,etc.) not
from the virtualhost. The getinfo("SERVER_NAME") shows correct values.







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


#22108 [Com]: php doesn't ignore the utf-8 BOM

2003-11-07 Thread trunghongnguyen at yahoo dot com
 ID:   22108
 Comment by:   trunghongnguyen at yahoo dot com
 Reported By:  bugzilla at jellycan dot com
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  *
 Assigned To:  moriyoshi
 New Comment:

ertre


Previous Comments:


[2003-10-31 11:12:06] [EMAIL PROTECTED]

I added i18n support to Zend Engine 2 (though it's still partial
one...), and one of its features contain awareness of BOM. So now you
can gracefully parse scripts with BOM if you use PHP 5.0.0b2 and
configure it with the option '--enable-zend-multibyte'.

These features are still experimental and under testing, so that I have
not been documented these but I'll add the entry to the manual,
ZEND_CHANGES and so on if I feel certain of the stability and
robustness of my patch, though I do not know when it is:)

Anyway, I'll close this bug if '--enable-zend-multibyte' option in PHP
5.0.0b2 is assured to work well for this problem. Comments are welcome.



[2003-02-07 23:13:07] bugzilla at jellycan dot com

The BOM (byte order mark) is a few bytes at the very front of a file
that act as a signature denoting what type of encoding has been used,
and in UTF16/32 it also makes the byte order (LE or BE). Although utf-8
is byte order independent, it has become popular on windows (perhaps
not so on unix) to make use of the BOM encoded in UTF-8 to flag the
file as being in UTF-8 format. This allows editors to determine the
type of the file from the first few characters instead of trying to
guess what type the file is. Ref: Textpad 4.6 (http://textpad.com)

See the Unicode FAQ for details of the utf-8 BOM...
http://www.unicode.org/unicode/faq/utf_bom.html#25

The use of this should be obvious, you have to leave the
my-language-only mindset that afflicts too many programmers (myself
included before this job) and think about the growing multiplicity of
languages on the web. I am writing web applications in Japan, with
European language and CJK (Chinese/Japanese/Korean) language processing
and interfaces. Thus I have php files where variable values are strings
of all sorts of languages - hence utf-8 encoding.

I feel that this is definitely a bug in php. Considering that:
* php is slowly growing into a language-neutral (i18n/l10n possible)
language
* php is designed such that php commands can be liberally sprinkled
through html, and html is increasing encoded in utf-8 these days
* the utf-8 bom is becoming increasingly popular for reasons of
indentifying the file character format
* if the utf-8 bom exists php actually outputs it incorrectly and in
doing so prevents header output

I request that you don't see this as a feature request, but as a bug in
the handling of utf-8 files. Whether the output generator is the
correct characterization of this bug or not I leave up to you.

Regards,
Brodie.



[2003-02-07 08:46:36] bugzilla at jellycan dot com

Problem:
When a php file is saved in utf-8 format with the UTF-8 BOM as the
first three bytes of the file (EF BB BF), PHP doesn't ignore these
bytes when loading and compiling the file, but instead considers them
output coming prior to the http://bugs.php.net/?id=22108&edit=1