#33099 [NEW]: Relative paths in require(), require_once(), include(), include_once()

2005-05-22 Thread blue2 at hat dot net
From: blue2 at hat dot net
Operating system: Windows XP
PHP version:  5.0.3
PHP Bug Type: Feature/Change Request
Bug description:  Relative paths in require(), require_once(), include(), 
include_once()

Description:

Relative paths in require(), require_once(), include(), include_once()
does not resolve correctly (i.e. relative to the file that reference the
script, not the file that execute the script).

Reproduce code:
---
Say, there is the main script 'test.php' and two other files, 'a.inc'
and 'b.inc' (in subdirs):

File './test.php':


File './include/a/a.inc':


File './include/b.inc':


Running 'test.php' fails.

Expected result:

When a.inc include "../b.inc", it should reference from the location of
./include/a/a.inc, not the executing file, ./test.php.

This happens on both Windows XP and UNIX (Red Hat Linux), and probably all
other platforms (which I can't verify).

This really hurt modularity.

I know this is not consider a bug, but would you improve this please?
(like adding a realtive_include() function would really be nice)

Actual result:
--
Fatal error: main() [function.require]: Failed opening required '../b.inc'
(include_path='.;C:\php5\pear') in X on line 4

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


#33098 [Opn->Csd]: mysql_fetch_array(mysql_query("mysql query here")) crashes

2005-05-22 Thread tloudimm at go2 dot pl
 ID:   33098
 User updated by:  tloudimm at go2 dot pl
 Reported By:  tloudimm at go2 dot pl
-Status:   Open
+Status:   Closed
 Bug Type: MySQL related
 Operating System: Linux
 PHP Version:  4.3.11
 New Comment:

sorry for making unnecessary mess - friend of mine told me that in the
first code there is an infinite loop.. sorry once again


Previous Comments:


[2005-05-22 01:06:44] tloudimm at go2 dot pl

Description:

hi there. i found a bug [well, i think it's a bug, it onced  crashed my
apache server].. found it in 4.3.10 first, than in 4.3.11 again. anyway,
here's some sample code:



however


i searched bug database and found nothing like my observations. sorry
if i make too much mess - delete my report if so :) greetings.






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


#25876 [Com]: session_start(): Failed to initialize storage module

2005-05-22 Thread dmih at in-solve dot ru
 ID:   25876
 Comment by:   dmih at in-solve dot ru
 Reported By:  golden at riscom dot com
 Status:   No Feedback
 Bug Type: Session related
 Operating System: freebsd 4.8
 PHP Version:  4.3.9-4.3.10
 Assigned To:  sniper
 New Comment:

Please someone in PHP team confirm that you are reading from this bug
(it has 'No Feedback' status).
Or may be we are writing for ourselves here?


Previous Comments:


[2005-05-21 14:30:13] gul_murjani at yahoo dot com

Hi,

I'm experiencing this problem in at least 2 sites.

Since it's a error that appears in random, I wrote a simple script to
try and reproduce the error. This is the script:




All it does is invoke "session_start()" and use one session variable.
It then reloads itself every 10 seconds. On HOSTMANIL.ORG and
HOSTMANIL.NET, the error comes up. But there is no pattern at all.
Sometimes out of 20 refreshes, there's an error, half the time. If the
error comes up, I have to do a manual refresh. I notice that the
session variable is not destroyed at all. It continues counting from
where it stopped. 

The problem is at one point in HOSTMANILA.ORG, it kept on coming up
every 2 auto refreshes (and I do an F5). But now, it's was good for 45
straign auto refreshes before the error came up. That's how random the
error is.

I do a lot of programming, mostly in PHP but I'm not "deep" technical.
So I'm not sure if I'm missing something.

I'm running the scripts on 5 sites. These are all on different servers
although all of them are from shared hosting services using cPanel /
WHM.
http://www.hostmanila.org/test.php
http://www.hostmanila.biz/test.php
http://www.hostmanila.net/test.php
http://www.vcdpix.com/test.php
http://www.smokedbangus.com/test.php

So far, it's only happened on HOSTMANILA.ORG and HOSTMANILA.NET.

Here's the rundown on each site:
HOSTMANILA.ORG (error)
Linux 2.4.30-gator_r1
Apache 1.3.33 (Unix)
PERL 5.8.4
PHP 4.3.11
cPanel 9.9.9-STABLE 15

HOSTMANILA.BIZ (fine)
Linux 2.4.30-1-s5
Apache 1.3.33 (Unix)
PERL 5.8.3
PHP 4.3.11
cPanel 10.2.0-RELEASE 82

HOSTMANILA.NET (error)
Linux 2.4.26-grsec
Apache 1.3.33 (Unix)
PERL 5.8.0
PHP 4.3.11
cPanel 10.0.0-RELEASE 7

VCDPIX.COM (fine)
Linux 2.4.20-24.9
Apache 1.3.33 (Unix)
PERL 5.8.1
PHP 4.3.9
cPanel 10.0.0-RELEASE 7

SMOKEDBANGUS.COM (fine)
Linux 2.4.20-20.7smp
Apache 1.3.33 (Unix)
PERL 5.8.4
PHP 4.3.10
cPanel 10.0.0-CURRENT 107

I can't imagine developing anything in PHP without making use of
session_start() so I hope the issue is resolved.


Regards,

Gul
hostmanila.com



[2005-05-21 01:24:55] jspec at bellsouth dot net

I have now experienced this beast with a completely different hosting
company.  They are both running 4.3.10 - is this fixed in 4.3.11?



[2005-05-18 22:48:45] dmih at in-solve dot ru

We (as hosting company) are hoping that PHP team will track this bug
down some day.
Indeed, we can do not much to help or to fix it.

This bug is hard to fix because it appears randomly, and there is no
definite recreate scenario. There is assumption that this is
http://bugs.php.net/bug.php?id=32330 bug, but I am not completely
sure.

You may suggest your hosting company to lower average server load - it
will help this bug to happen rarely or even at no times. Lower - I mean
- something lower than 50% avg CPU load on 1CPU server or 80% on 2+ CPU
server.
But that is only our hosting company workaround, not the solution.



[2005-05-17 18:00:36] jspec at bellsouth dot net

My hosting company is unable to fix the random "Failed to initialize
storage module" error and it is making my account unusable.  They
cannot seem to fix it.  What is the story with this!?



[2005-04-29 11:04:06] dmih at in-solve dot ru

Please kindly pay attention to this bug.
It is REAL bug, not fantasy of 100+ man. Random session handler error.

No Feedback status is surely lame for this, as you are getting
feedback.
There is no reproduce code because bug is "random bug under heavy load"
class.

We hope for you.
Thanks.



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

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


#33099 [Opn->Fbk]: Relative paths in require(), require_once(), include(), include_once()

2005-05-22 Thread tony2001
 ID:   33099
 Updated by:   [EMAIL PROTECTED]
 Reported By:  blue2 at hat dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  5.0.3
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2005-05-22 09:47:44] blue2 at hat dot net

Description:

Relative paths in require(), require_once(), include(), include_once()
does not resolve correctly (i.e. relative to the file that reference
the script, not the file that execute the script).

Reproduce code:
---
Say, there is the main script 'test.php' and two other files, 'a.inc'
and 'b.inc' (in subdirs):

File './test.php':


File './include/a/a.inc':


File './include/b.inc':


Running 'test.php' fails.

Expected result:

When a.inc include "../b.inc", it should reference from the location of
./include/a/a.inc, not the executing file, ./test.php.

This happens on both Windows XP and UNIX (Red Hat Linux), and probably
all other platforms (which I can't verify).

This really hurt modularity.

I know this is not consider a bug, but would you improve this please?
(like adding a realtive_include() function would really be nice)

Actual result:
--
Fatal error: main() [function.require]: Failed opening required
'../b.inc' (include_path='.;C:\php5\pear') in X on line 4





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


#33098 [Csd->Bgs]: mysql_fetch_array(mysql_query("mysql query here")) crashes

2005-05-22 Thread tony2001
 ID:   33098
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tloudimm at go2 dot pl
-Status:   Closed
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: Linux
 PHP Version:  4.3.11
 New Comment:

.


Previous Comments:


[2005-05-22 10:17:59] tloudimm at go2 dot pl

sorry for making unnecessary mess - friend of mine told me that in the
first code there is an infinite loop.. sorry once again



[2005-05-22 01:06:44] tloudimm at go2 dot pl

Description:

hi there. i found a bug [well, i think it's a bug, it onced  crashed my
apache server].. found it in 4.3.10 first, than in 4.3.11 again. anyway,
here's some sample code:



however


i searched bug database and found nothing like my observations. sorry
if i make too much mess - delete my report if so :) greetings.






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


#33093 [Fbk->Bgs]: token_get_all() inconsistent results?

2005-05-22 Thread derick
 ID:   33093
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: Mac OS X 10.4.1
 PHP Version:  5.0.4
 New Comment:

Indeed, there is no bug here.


Previous Comments:


[2005-05-22 05:55:48] [EMAIL PROTECTED]

Actually the tokenizer just plugs into the internal tokenize code used
by the engine. As such, the engine doesnt need to know some
information, and is written to work as quickly and effeciently as
possible, rather than being 100% dead on for parsing.

It's unlikely to be fixed just for token_get_all(), as introducing
changes can have quite radical effects sometimes when touching that bit
of code.

The values with the tokens should enable you to get the CR/LF count
ok.. 



[2005-05-22 05:51:20] [EMAIL PROTECTED]

wheres the missing data?

php -r 'var_dump(token_get_all(""));'
array(6) {
  [0]=>
  array(2) {
[0]=>
int(366)
[1]=>
string(6) "
  array(2) {
[0]=>
int(316)
[1]=>
string(4) "echo"
  }
  [2]=>
  array(2) {
[0]=>
int(369)
[1]=>
string(1) " "
  }
  [3]=>
  array(2) {
[0]=>
int(309)
[1]=>
string(4) "$var"
  }
  [4]=>
  array(2) {
[0]=>
int(369)
[1]=>
string(1) " "
  }
  [5]=>
  array(2) {
[0]=>
int(368)
[1]=>
string(2) "?>"
  }
}




php -r 'var_dump(token_get_all(""));'
array(7) {
  [0]=>
  array(2) {
[0]=>
int(366)
[1]=>
string(6) "
  array(2) {
[0]=>
int(369)
[1]=>
string(1) "
"
  }
  [2]=>
  array(2) {
[0]=>
int(316)
[1]=>
string(4) "echo"
  }
  [3]=>
  array(2) {
[0]=>
int(369)
[1]=>
string(1) " "
  }
  [4]=>
  array(2) {
[0]=>
int(309)
[1]=>
string(4) "$var"
  }
  [5]=>
  array(2) {
[0]=>
int(369)
[1]=>
string(1) "
"
  }
  [6]=>
  array(2) {
[0]=>
int(368)
[1]=>
string(2) "?>"
  }




[2005-05-21 18:40:38] [EMAIL PROTECTED]

Description:

It appears that token_get_all() does not report T_OPEN_TAG and
T_WHITESPACE properly, depending on the whitespace following the
opening tag.  For example, when parsing ...



... you get T_OPEN_TAG, T_ECHO, T_WHITESPACE, T_VAR, T_WHITESPACE, and
T_CLOSE_TAG.  This is not entirely the expected result (I would expect
T_WHITESPACE between the open tag and the echo).

However, when parsing the functional equivalent...



you get "<", "?", T_STRING ("php"), T_WHITESPACE, T_ECHO, T_WHITESPACE,
T_VAR, T_WHITESPACE, and T_CLOSE_TAG.  In addition, the first whitespace
value reported does not include all the newlines (it drops one).

Although Macs use \r for their newlines natively, the test code uses
the Unix-standard \n, so I don't think it's Mac-related.

If this is in fact a bug, the current behavior makes it difficult to
write a reliable userland code auditor and report proper line numbers.

Am I missing some assumptions behind the behavior of the tokenizer
function?






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


#33100 [NEW]: file_exists() doesn't work correctly after realpath()

2005-05-22 Thread palacsint at freemail dot hu
From: palacsint at freemail dot hu
Operating system: linux
PHP version:  4.3.10
PHP Bug Type: Filesystem function related
Bug description:  file_exists() doesn't work correctly after realpath()

Description:

If the upload_tmp_dir is a symlink, file_exists() doesn't work after a
realpath() call. In my server the default /tmp is a symlink to /home/tmp.
It works if i change the upload_tmp_dir to the /home/tmp. (safe_mode on)

Reproduce code:
---
$t = $_FILES["uf"]["tmp_name"];
// $t = /tmp/phpAbcde
// realpath($t) = /home/tmp/phpAbcde
var_dump(file_exists($t)); // true
var_dump(file_exists(realpath($t))); // false
var_dump(is_file($t)); // true
var_dump(is_file(realpath($t))); // false


Expected result:

I got false when i called the file_exists() and is_file() with
realpath($t).


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


#33100 [Opn->Fbk]: file_exists() doesn't work correctly after realpath()

2005-05-22 Thread tony2001
 ID:   33100
 Updated by:   [EMAIL PROTECTED]
 Reported By:  palacsint at freemail dot hu
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: linux
 PHP Version:  4.3.10
 New Comment:

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

And please provide a short but complete reproduce script. The code you
provided will cause parse errors.


Previous Comments:


[2005-05-22 14:04:14] palacsint at freemail dot hu

Description:

If the upload_tmp_dir is a symlink, file_exists() doesn't work after a
realpath() call. In my server the default /tmp is a symlink to
/home/tmp. It works if i change the upload_tmp_dir to the /home/tmp.
(safe_mode on)

Reproduce code:
---
$t = $_FILES["uf"]["tmp_name"];
// $t = /tmp/phpAbcde
// realpath($t) = /home/tmp/phpAbcde
var_dump(file_exists($t)); // true
var_dump(file_exists(realpath($t))); // false
var_dump(is_file($t)); // true
var_dump(is_file(realpath($t))); // false


Expected result:

I got false when i called the file_exists() and is_file() with
realpath($t).






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


#33102 [NEW]: Can't run programs in safe_mode_exec_dir

2005-05-22 Thread php-bugs at jensthebrain dot de
From: php-bugs at jensthebrain dot de
Operating system: Windows 2003
PHP version:  4.3.11
PHP Bug Type: Safe Mode/open_basedir
Bug description:  Can't run programs in safe_mode_exec_dir

Description:

I can't execute binaries which are in safe_mode_exec_dir 
(safe_mode=on)   

Reproduce code:
---


Expected result:

The output of identify.exe 

Actual result:
--
>d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:/wwwroot/safe_bin/ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Der Befehl "d:/wwwroot/safe_bin/" ist entweder falsch 
geschrieben oder konnte nicht gefunden werden.  
Content-type: text/html  
Array  
(  
)  
1 
 
 
 
With \ instead of /  
>d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:\wwwroot\safe_bin\ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Content-type: text/html  
Array  
(  
)  
0 

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


#33100 [Opn->Csd]: file_exists() doesn't work correctly after realpath()

2005-05-22 Thread tony2001
 ID:   33100
 Updated by:   [EMAIL PROTECTED]
 Reported By:  palacsint at freemail dot hu
-Status:   Open
+Status:   Closed
 Bug Type: Filesystem function related
 Operating System: linux
 PHP Version:  4.3.10
 New Comment:

Works fine -> closed.


Previous Comments:


[2005-05-22 15:10:09] palacsint at freemail dot hu

I tried the CVS snapshot. Its work correctly. Thanks!



[2005-05-22 14:14:34] [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

And please provide a short but complete reproduce script. The code you
provided will cause parse errors.



[2005-05-22 14:04:14] palacsint at freemail dot hu

Description:

If the upload_tmp_dir is a symlink, file_exists() doesn't work after a
realpath() call. In my server the default /tmp is a symlink to
/home/tmp. It works if i change the upload_tmp_dir to the /home/tmp.
(safe_mode on)

Reproduce code:
---
$t = $_FILES["uf"]["tmp_name"];
// $t = /tmp/phpAbcde
// realpath($t) = /home/tmp/phpAbcde
var_dump(file_exists($t)); // true
var_dump(file_exists(realpath($t))); // false
var_dump(is_file($t)); // true
var_dump(is_file(realpath($t))); // false


Expected result:

I got false when i called the file_exists() and is_file() with
realpath($t).






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


#33070 [Opn->Fbk]: bzdecompress inefficient

2005-05-22 Thread tony2001
 ID:   33070
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lindsay at bitleap dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Performance problem
 Operating System: Linux 2.6.10 kernel
 PHP Version:  5.0.3
 New Comment:

And how do you think it should work?
I don't see any more effective way that will not hit memory instead of
CPU usage.


Previous Comments:


[2005-05-20 16:56:48] lindsay at bitleap dot com

Script:



Data:
If you run linux:
dd if=/dev/urandom bs=1024 count=256 of=256K
dd if=/dev/urandom bs=1024 count=512 of=512K
dd if=/dev/urandom bs=1024 count=1024 of=1M
dd if=/dev/urandom bs=1024 count=2048 of=2M
dd if=/dev/urandom bs=1024 count=3072 of=3M
dd if=/dev/urandom bs=1024 count=4096 of=4M
bzip2 256K 512K 1M 2M 3M 4M

If not, let me know and I'll upload or email data samples.



[2005-05-19 23:44:05] [EMAIL PROTECTED]

Please provide a short but complete reproduce script and (if possible)
the data too.



[2005-05-19 17:22:47] lindsay at bitleap dot com

Description:

I found bug #13860 regarding bzdecompress speeds on 4.2.x.  The bug
suggests its fixed for 4.2.0 but I see slowness in 5.0.3.

On 5.0.3, bzdecompress seems to get exponentionally slower as data
sizes increase.  I timed the length of decompression on increasing file
sizes containing compressed random data:

file length 256K ran in: 2 seconds
file length 512K ran in: 10 seconds
file length 1M ran in: 41 seconds
file length 2M ran in: 135 seconds
file length 3M ran in: 278 seconds
file length 4M ran in: 476 seconds


I'm not a c coder but the do while loop at line 472 of:
 
http://cvs.php.net/co.php/php-src/ext/bz2/bz2.c?r=1.9

seems to decompress the string over and over.  Each iteration attempts
a decompress w/ a buffer size based on the iteration count.  If the
decompress fails, a larger buffer is tried.  If I'm reading this
correctly, the same data could be decompressed hundreds of times until
the buffer gets large enough.






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


#33093 [Bgs]: token_get_all() inconsistent results?

2005-05-22 Thread [EMAIL PROTECTED]
 ID:   33093
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: Mac OS X 10.4.1
 PHP Version:  5.0.4
 New Comment:

The second command-line test should have pairs of \n newlines, not
singles.

A corollary issue is that the results on the same code are
inconsistent.  Sometimes my token_get_all() returns the expected result
(T_OPEN_TAG) and sometimes an unexpected result ("<", "?", T_STRING of
"php").  Could there be a reason for the engine being "finicky"?


Previous Comments:


[2005-05-22 13:16:04] [EMAIL PROTECTED]

Indeed, there is no bug here.



[2005-05-22 05:55:48] [EMAIL PROTECTED]

Actually the tokenizer just plugs into the internal tokenize code used
by the engine. As such, the engine doesnt need to know some
information, and is written to work as quickly and effeciently as
possible, rather than being 100% dead on for parsing.

It's unlikely to be fixed just for token_get_all(), as introducing
changes can have quite radical effects sometimes when touching that bit
of code.

The values with the tokens should enable you to get the CR/LF count
ok.. 



[2005-05-22 05:51:20] [EMAIL PROTECTED]

wheres the missing data?

php -r 'var_dump(token_get_all(""));'
array(6) {
  [0]=>
  array(2) {
[0]=>
int(366)
[1]=>
string(6) "
  array(2) {
[0]=>
int(316)
[1]=>
string(4) "echo"
  }
  [2]=>
  array(2) {
[0]=>
int(369)
[1]=>
string(1) " "
  }
  [3]=>
  array(2) {
[0]=>
int(309)
[1]=>
string(4) "$var"
  }
  [4]=>
  array(2) {
[0]=>
int(369)
[1]=>
string(1) " "
  }
  [5]=>
  array(2) {
[0]=>
int(368)
[1]=>
string(2) "?>"
  }
}




php -r 'var_dump(token_get_all(""));'
array(7) {
  [0]=>
  array(2) {
[0]=>
int(366)
[1]=>
string(6) "
  array(2) {
[0]=>
int(369)
[1]=>
string(1) "
"
  }
  [2]=>
  array(2) {
[0]=>
int(316)
[1]=>
string(4) "echo"
  }
  [3]=>
  array(2) {
[0]=>
int(369)
[1]=>
string(1) " "
  }
  [4]=>
  array(2) {
[0]=>
int(309)
[1]=>
string(4) "$var"
  }
  [5]=>
  array(2) {
[0]=>
int(369)
[1]=>
string(1) "
"
  }
  [6]=>
  array(2) {
[0]=>
int(368)
[1]=>
string(2) "?>"
  }




[2005-05-21 18:40:38] [EMAIL PROTECTED]

Description:

It appears that token_get_all() does not report T_OPEN_TAG and
T_WHITESPACE properly, depending on the whitespace following the
opening tag.  For example, when parsing ...



... you get T_OPEN_TAG, T_ECHO, T_WHITESPACE, T_VAR, T_WHITESPACE, and
T_CLOSE_TAG.  This is not entirely the expected result (I would expect
T_WHITESPACE between the open tag and the echo).

However, when parsing the functional equivalent...



you get "<", "?", T_STRING ("php"), T_WHITESPACE, T_ECHO, T_WHITESPACE,
T_VAR, T_WHITESPACE, and T_CLOSE_TAG.  In addition, the first whitespace
value reported does not include all the newlines (it drops one).

Although Macs use \r for their newlines natively, the test code uses
the Unix-standard \n, so I don't think it's Mac-related.

If this is in fact a bug, the current behavior makes it difficult to
write a reliable userland code auditor and report proper line numbers.

Am I missing some assumptions behind the behavior of the tokenizer
function?






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


#33100 [Fbk->Opn]: file_exists() doesn't work correctly after realpath()

2005-05-22 Thread palacsint at freemail dot hu
 ID:   33100
 User updated by:  palacsint at freemail dot hu
 Reported By:  palacsint at freemail dot hu
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: linux
 PHP Version:  4.3.10
 New Comment:

I tried the CVS snapshot. Its work correctly. Thanks!


Previous Comments:


[2005-05-22 14:14:34] [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

And please provide a short but complete reproduce script. The code you
provided will cause parse errors.



[2005-05-22 14:04:14] palacsint at freemail dot hu

Description:

If the upload_tmp_dir is a symlink, file_exists() doesn't work after a
realpath() call. In my server the default /tmp is a symlink to
/home/tmp. It works if i change the upload_tmp_dir to the /home/tmp.
(safe_mode on)

Reproduce code:
---
$t = $_FILES["uf"]["tmp_name"];
// $t = /tmp/phpAbcde
// realpath($t) = /home/tmp/phpAbcde
var_dump(file_exists($t)); // true
var_dump(file_exists(realpath($t))); // false
var_dump(is_file($t)); // true
var_dump(is_file(realpath($t))); // false


Expected result:

I got false when i called the file_exists() and is_file() with
realpath($t).






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


#33088 [Opn->Fbk]: Output Buffering + Callback method = unable to change object properties

2005-05-22 Thread tony2001
 ID:   33088
 Updated by:   [EMAIL PROTECTED]
 Reported By:  spam at cimmanon dot org
-Status:   Open
+Status:   Feedback
 Bug Type: Output Control
 Operating System: OpenBSD
 PHP Version:  4.3.11
 New Comment:

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

A proper reproducing script starts with ,
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.

Please provide a more real-life example with expected and actual
results.


Previous Comments:


[2005-05-21 02:10:51] spam at cimmanon dot org

Description:

For some reason output buffering inside a callback method prevents an
object's properties from being modified outside of the object.  Using
output buffering without a callback works as expected, though.

Reproduce code:
---
var = 'rar';
print 'foo started';
ob_start(array(&$this, 'bar'));
}

function bar() {
print $this->var . "";
$this->var = 'asdf';
print $this->var;
}
}

$foo = new foo;
$foo->var = 'rarar';
?>

Expected result:

I expected $foo->var to be set to 'rarar' after the initial object
creation via constructor, then 'asdf'.  Instead, it remains set to
'rar', then 'asdf'.






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


#33093 [Bgs->Opn]: token_get_all() inconsistent results?

2005-05-22 Thread [EMAIL PROTECTED]
 ID:   33093
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Bogus
+Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Mac OS X 10.4.1
 PHP Version:  5.0.4
 New Comment:

The second command-line test should have pairs of \n newlines, not
singles.

A corollary issue is that the results on the same code are
inconsistent. Sometimes my token_get_all() returns the expected result
(T_OPEN_TAG) and sometimes an unexpected result ("<", "?", T_STRING of
"php").  Could there be a reason for the engine being "finicky"?


Previous Comments:


[2005-05-22 15:09:39] [EMAIL PROTECTED]

The second command-line test should have pairs of \n newlines, not
singles.

A corollary issue is that the results on the same code are
inconsistent.  Sometimes my token_get_all() returns the expected result
(T_OPEN_TAG) and sometimes an unexpected result ("<", "?", T_STRING of
"php").  Could there be a reason for the engine being "finicky"?



[2005-05-22 13:16:04] [EMAIL PROTECTED]

Indeed, there is no bug here.



[2005-05-22 05:55:48] [EMAIL PROTECTED]

Actually the tokenizer just plugs into the internal tokenize code used
by the engine. As such, the engine doesnt need to know some
information, and is written to work as quickly and effeciently as
possible, rather than being 100% dead on for parsing.

It's unlikely to be fixed just for token_get_all(), as introducing
changes can have quite radical effects sometimes when touching that bit
of code.

The values with the tokens should enable you to get the CR/LF count
ok.. 



[2005-05-22 05:51:20] [EMAIL PROTECTED]

wheres the missing data?

php -r 'var_dump(token_get_all(""));'
array(6) {
  [0]=>
  array(2) {
[0]=>
int(366)
[1]=>
string(6) "
  array(2) {
[0]=>
int(316)
[1]=>
string(4) "echo"
  }
  [2]=>
  array(2) {
[0]=>
int(369)
[1]=>
string(1) " "
  }
  [3]=>
  array(2) {
[0]=>
int(309)
[1]=>
string(4) "$var"
  }
  [4]=>
  array(2) {
[0]=>
int(369)
[1]=>
string(1) " "
  }
  [5]=>
  array(2) {
[0]=>
int(368)
[1]=>
string(2) "?>"
  }
}




php -r 'var_dump(token_get_all(""));'
array(7) {
  [0]=>
  array(2) {
[0]=>
int(366)
[1]=>
string(6) "
  array(2) {
[0]=>
int(369)
[1]=>
string(1) "
"
  }
  [2]=>
  array(2) {
[0]=>
int(316)
[1]=>
string(4) "echo"
  }
  [3]=>
  array(2) {
[0]=>
int(369)
[1]=>
string(1) " "
  }
  [4]=>
  array(2) {
[0]=>
int(309)
[1]=>
string(4) "$var"
  }
  [5]=>
  array(2) {
[0]=>
int(369)
[1]=>
string(1) "
"
  }
  [6]=>
  array(2) {
[0]=>
int(368)
[1]=>
string(2) "?>"
  }




[2005-05-21 18:40:38] [EMAIL PROTECTED]

Description:

It appears that token_get_all() does not report T_OPEN_TAG and
T_WHITESPACE properly, depending on the whitespace following the
opening tag.  For example, when parsing ...



... you get T_OPEN_TAG, T_ECHO, T_WHITESPACE, T_VAR, T_WHITESPACE, and
T_CLOSE_TAG.  This is not entirely the expected result (I would expect
T_WHITESPACE between the open tag and the echo).

However, when parsing the functional equivalent...



you get "<", "?", T_STRING ("php"), T_WHITESPACE, T_ECHO, T_WHITESPACE,
T_VAR, T_WHITESPACE, and T_CLOSE_TAG.  In addition, the first whitespace
value reported does not include all the newlines (it drops one).

Although Macs use \r for their newlines natively, the test code uses
the Unix-standard \n, so I don't think it's Mac-related.

If this is in fact a bug, the current behavior makes it difficult to
write a reliable userland code auditor and report proper line numbers.

Am I missing some assumptions behind the behavior of the tokenizer
function?






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


#33102 [Opn->Fbk]: Can't run programs in safe_mode_exec_dir

2005-05-22 Thread tony2001
 ID:   33102
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php-bugs at jensthebrain dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Safe Mode/open_basedir
 Operating System: Windows 2003
 PHP Version:  4.3.11
 New Comment:

And what if you execute "d:/wwwroot/safe_bin/identify.exe" instead of
"d:\wwwroot\safe_bin\identify.exe" ?


Previous Comments:


[2005-05-22 14:43:41] php-bugs at jensthebrain dot de

Description:

I can't execute binaries which are in safe_mode_exec_dir 
(safe_mode=on)   

Reproduce code:
---


Expected result:

The output of identify.exe 

Actual result:
--
>d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:/wwwroot/safe_bin/ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Der Befehl "d:/wwwroot/safe_bin/" ist entweder falsch 
geschrieben oder konnte nicht gefunden werden.  
Content-type: text/html  
Array  
(  
)  
1 
 
 
 
With \ instead of /  
>d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:\wwwroot\safe_bin\ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Content-type: text/html  
Array  
(  
)  
0 





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


#33102 [Fbk->Opn]: Can't run programs in safe_mode_exec_dir

2005-05-22 Thread php-bugs at jensthebrain dot de
 ID:   33102
 User updated by:  php-bugs at jensthebrain dot de
 Reported By:  php-bugs at jensthebrain dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: Windows 2003
 PHP Version:  4.3.11
 New Comment:

The same:




>d:\Programme\php\php -n -d safe_mode=on -d
safe_mode_exec_dir=d:\wwwroot\safe_bin\
d:\wwwroot\www-test.xy.de\htdocs\test.php
Content-type: text/html
X-Powered-By: PHP/4.3.11

Array
(
)
0


Previous Comments:


[2005-05-22 15:28:22] [EMAIL PROTECTED]

And what if you execute "d:/wwwroot/safe_bin/identify.exe" instead of
"d:\wwwroot\safe_bin\identify.exe" ?



[2005-05-22 14:43:41] php-bugs at jensthebrain dot de

Description:

I can't execute binaries which are in safe_mode_exec_dir 
(safe_mode=on)   

Reproduce code:
---


Expected result:

The output of identify.exe 

Actual result:
--
>d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:/wwwroot/safe_bin/ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Der Befehl "d:/wwwroot/safe_bin/" ist entweder falsch 
geschrieben oder konnte nicht gefunden werden.  
Content-type: text/html  
Array  
(  
)  
1 
 
 
 
With \ instead of /  
>d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:\wwwroot\safe_bin\ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Content-type: text/html  
Array  
(  
)  
0 





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


#33102 [Opn->Fbk]: Can't run programs in safe_mode_exec_dir

2005-05-22 Thread tony2001
 ID:   33102
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php-bugs at jensthebrain dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Safe Mode/open_basedir
 Operating System: Windows 2003
 PHP Version:  4.3.11
 New Comment:

No. Try when slashes in both safe_mode_exec_dir and the command are the
same.


Previous Comments:


[2005-05-22 16:23:44] php-bugs at jensthebrain dot de

The same:




>d:\Programme\php\php -n -d safe_mode=on -d
safe_mode_exec_dir=d:\wwwroot\safe_bin\
d:\wwwroot\www-test.xy.de\htdocs\test.php
Content-type: text/html
X-Powered-By: PHP/4.3.11

Array
(
)
0



[2005-05-22 15:28:22] [EMAIL PROTECTED]

And what if you execute "d:/wwwroot/safe_bin/identify.exe" instead of
"d:\wwwroot\safe_bin\identify.exe" ?



[2005-05-22 14:43:41] php-bugs at jensthebrain dot de

Description:

I can't execute binaries which are in safe_mode_exec_dir 
(safe_mode=on)   

Reproduce code:
---


Expected result:

The output of identify.exe 

Actual result:
--
>d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:/wwwroot/safe_bin/ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Der Befehl "d:/wwwroot/safe_bin/" ist entweder falsch 
geschrieben oder konnte nicht gefunden werden.  
Content-type: text/html  
Array  
(  
)  
1 
 
 
 
With \ instead of /  
>d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:\wwwroot\safe_bin\ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Content-type: text/html  
Array  
(  
)  
0 





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


#33102 [Fbk->Opn]: Can't run programs in safe_mode_exec_dir

2005-05-22 Thread php-bugs at jensthebrain dot de
 ID:   33102
 User updated by:  php-bugs at jensthebrain dot de
 Reported By:  php-bugs at jensthebrain dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: Windows 2003
 PHP Version:  4.3.11
 New Comment:

Both with /



>d:\Programme\php\php -n -d safe_mode=on -d
safe_mode_exec_dir=d:/wwwroot/safe_bin/
d:\wwwroot\www-test.xy.de\htdocs\test.php
Die Syntax für den Dateinamen, Verzeichnisnamen oder die
Datenträgerbezeichnung ist falsch.
Content-type: text/html
X-Powered-By: PHP/4.3.11

Array
(
)
1


It seems that safe_mode_exec_dir with / causes problems: Die Syntax für
den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist
falsch.
-> Syntax for filename, directoryname or partitionname is wrong


Previous Comments:


[2005-05-22 16:28:29] [EMAIL PROTECTED]

No. Try when slashes in both safe_mode_exec_dir and the command are the
same.



[2005-05-22 16:23:44] php-bugs at jensthebrain dot de

The same:




>d:\Programme\php\php -n -d safe_mode=on -d
safe_mode_exec_dir=d:\wwwroot\safe_bin\
d:\wwwroot\www-test.xy.de\htdocs\test.php
Content-type: text/html
X-Powered-By: PHP/4.3.11

Array
(
)
0



[2005-05-22 15:28:22] [EMAIL PROTECTED]

And what if you execute "d:/wwwroot/safe_bin/identify.exe" instead of
"d:\wwwroot\safe_bin\identify.exe" ?



[2005-05-22 14:43:41] php-bugs at jensthebrain dot de

Description:

I can't execute binaries which are in safe_mode_exec_dir 
(safe_mode=on)   

Reproduce code:
---


Expected result:

The output of identify.exe 

Actual result:
--
>d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:/wwwroot/safe_bin/ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Der Befehl "d:/wwwroot/safe_bin/" ist entweder falsch 
geschrieben oder konnte nicht gefunden werden.  
Content-type: text/html  
Array  
(  
)  
1 
 
 
 
With \ instead of /  
>d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:\wwwroot\safe_bin\ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Content-type: text/html  
Array  
(  
)  
0 





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


#29338 [Ver->Csd]: highlight_* don't translate single leading space to  

2005-05-22 Thread iliaa
 ID:   29338
 Updated by:   [EMAIL PROTECTED]
 Reported By:  francois at bonzon dot com
-Status:   Verified
+Status:   Closed
 Bug Type: Strings related
 Operating System: *
 PHP Version:  5CVS, 4CVS (2004-12-12)
 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:


[2004-07-22 19:41:18] francois at bonzon dot com

Description:

The highlight_file() and highlight_string() functions don't translate
the leading space of a line to   when this line has exactly one
leading space (or identation space if you prefer).

As web browsers don't display leading spaces of a line (that are not
  of course), this single leading space then disapears on the
output visible in the browser.

When there are two or more spaces, they are all correctly translated to
  however, and the identation is visible.

Reproduce code:
---
highlight_string('');


Expected result:



with HTML source (excerpt):

... ); one_leading_space ...

Actual result:
--


with HTML source (excerpt):

... ); one_leading_space ...





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


#33088 [Fbk->Opn]: Output Buffering + Callback method = unable to change object properties

2005-05-22 Thread spam at cimmanon dot org
 ID:   33088
 User updated by:  spam at cimmanon dot org
 Reported By:  spam at cimmanon dot org
-Status:   Feedback
+Status:   Open
 Bug Type: Output Control
 Operating System: OpenBSD
 PHP Version:  4.3.11
 New Comment:

In the constructor, $this->var gets set to 'rar'.  Output buffering is
started using foo::bar as the callback.  I attempt to set $this->var to
'rarar' from outside of the object, which fails because of the output
buffering callback method.  The script finishes executing and the
callback method is executed, prints $this->var (which is supposed to be
set to 'rarar' at this point, but is still just 'rar'), sets $this->var
to 'asdf' (successfully), then prints $this->var yet again.

If I attempt to print $foo->var right after I modify it on line #20, it
displays exactly what I expect:  'rarar'.

This problem does not exist if I use a callback that is a function, nor
does it happen if I start output buffering without a callback and just
manually call foo::bar() at the end of the script.  Also, PHP 5 doesn't
have this problem, for whatever reason, and performs exactly as I
expect.

PHP 5.0.4:
http://www.sketchdiary.com/testcases/buffertest.php
http://www.sketchdiary.com/testcases/viewsource.php?file=buffertest.php

Modified source (forgot 1 line):
var = 'rar';
print 'foo started';
ob_start(array(&$this, 'bar'));
}

function bar() {
print $this->var . "";
$this->var = 'asdf';
print $this->var;
return ob_get_contents(); // missing line from example
}
}

$foo = new foo;
$foo->var = 'rarar';
?>


Previous Comments:


[2005-05-22 15:34:39] [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.

Please provide a more real-life example with expected and actual
results.



[2005-05-21 02:10:51] spam at cimmanon dot org

Description:

For some reason output buffering inside a callback method prevents an
object's properties from being modified outside of the object.  Using
output buffering without a callback works as expected, though.

Reproduce code:
---
var = 'rar';
print 'foo started';
ob_start(array(&$this, 'bar'));
}

function bar() {
print $this->var . "";
$this->var = 'asdf';
print $this->var;
}
}

$foo = new foo;
$foo->var = 'rarar';
?>

Expected result:

I expected $foo->var to be set to 'rarar' after the initial object
creation via constructor, then 'asdf'.  Instead, it remains set to
'rar', then 'asdf'.






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


#33103 [NEW]: make install syntax error

2005-05-22 Thread gregrlb at softhome dot net
From: gregrlb at softhome dot net
Operating system: AIX 5.2
PHP version:  4CVS-2005-05-22 (stable)
PHP Bug Type: Compile Failure
Bug description:  make install syntax error

Description:

Hello,

I had problems to do the 'configure' of php-5.0.3 and found the solution
here (bug #31131). On the page of this #31131 bug, I downloaded the
php5-STABLE-latest.tar.gz package and the configure and the make
succeeded.
But I can't do the 'make install'.
Can anyone help me on this?

Thank you,

Greg.

Reproduce code:
---
cd php5-STABLE-200505212231
./configure
make
make install

Actual result:
--
Installing PHP SAPI module:   cgi
Installing PHP CGI into: /usr/local/bin/
Installing PEAR environment:  /usr/local/lib/php/
[PEAR] Archive_Tar- already installed: 1.1
[PEAR] Console_Getopt - already installed: 1.2
[PEAR] PEAR   - already installed: 1.3.5
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
[PEAR] HTML_Template_IT- already installed: 1.1
[PEAR] Net_UserAgent_Detect- already installed: 2.0.1
[PEAR] XML_RPC- already installed: 1.2.2
Installing build environment: /usr/local/lib/php/build/
Installing header files:  /usr/local/include/php/
Installing helper programs:   /usr/local/bin/
  program: phpize
  program: php-config
/bin/sh: 0403-057 Syntax error at line 1 : `;' is not expected.
make: 1254-004 The error code from the last command is 2.


Stop.


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


#32568 [Com]: session data is not available

2005-05-22 Thread fabienf at gmail dot com
 ID:   32568
 Comment by:   fabienf at gmail dot com
 Reported By:  duh at dowebwedo dot com
 Status:   No Feedback
 Bug Type: Session related
 Operating System: Debian stable
 PHP Version:  5.0.4
 New Comment:

I experience the same issues as described. Running on Mac OS X 
10.4.1 (Tiger). Version 5.0.3 was fine, 5.0.4 introduced 
trouble; saved session files were empty. It happens when I put 
an object in the SESSION. Simple tests with scalars were fine.


Previous Comments:


[2005-04-12 01:00:09] 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".



[2005-04-04 16:59:35] [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-04-04 15:42:07] duh at dowebwedo dot com

In addition to my bugreport some additional information:

The session file appearantly does not contain the last session
information that is shown through the print_r($_SESSION):
cat sess_9ces9k67hse393stv6dns4t964 
DF_debug|b:1;

At first I wanted to use the class destructor (__destruct(..) ) with my
debugger but appearantly sessions are not available when destructing.
Adding $db->show() to my append.inc instead solved that problem.
Perhaps the behaviour of __destruct and append.inc are now based on the
same rules?



[2005-04-04 15:28:16] duh at dowebwedo dot com

Description:

Session data stored in the session is not available when reloading the
page again. This problem occured after upgrading from php 5.0.3 to
5.0.4; in 5.0.3 we do not experience this problem.

The last (append.inc) session listing in the first page request shows
the session variables added to the session. One would expect these
variables to show in the first (prepend.inc) session listing in the
second page request. However, they do not show?

The same situation using php 5.0.3 returns the expected result, so it
can safely be assumed that modifications made in php 5.0.3 to php 5.0.4
has introduced this session problem. 

Reproduce code:
---
Example source:
---
prepend.inc


---application---

append.inc
show();
  ...
  print_r($_SESSION);
?>


Info:
-
The application reads and writes to the session which means the session
in the prepend can contain different values than in the append. Reading
and Writing is done in classes (in this example: class debugger). 


Expected result:

Output first page request:
--
Array ( ) 
...
Array ( [DF_debug] => 1 [DF] => Array ( [debugger] => Array (
[debug_script] => [debug_php] => [debug_debugging] => [debug_queries]
=> [debug_get] => [debug_post] => [debug_cookie] => [debug_session] =>
) ) ) 

Output second page request:
---
Array ( [DF_debug] => 1 [DF] => Array ( [debugger] => Array (
[debug_script] => [debug_php] => [debug_debugging] => [debug_queries]
=> [debug_get] => [debug_post] => [debug_cookie] => [debug_session] =>
) ) ) 
...
Array ( [DF_debug] => 1 [DF] => Array ( [debugger] => Array (
[debug_script] => [debug_php] => [debug_debugging] => [debug_queries]
=> [debug_get] => [debug_post] => [debug_cookie] => [debug_session] =>
) ) ) 



Actual result:
--
Output first page request:
--
Array ( ) 
...
Array ( [DF_debug] => 1 [DF] => Array ( [debugger] => Array (
[debug_script] => [debug_php] => [debug_debugging] => [debug_queries]
=> [debug_get] => [debug_post] => [debug_cookie] => [debug_session] =>
) ) ) 

Output second page request:
---
Array ( [DF_debug] => 1 ) 
...
Array ( [DF_debug] => 1 [DF] => Array ( [debugger] => Array (
[debug_script] => [debug_php] => [debug_debugging] => [debug_queries]
=> [debug_get] => [debug_post] => [debug_cookie] => [debug_session] =>
) ) ) 







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


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

2005-05-22 Thread max at tehnomir dot com dot ua
 ID:   32987
 User updated by:  max at tehnomir dot com dot ua
 Reported By:  max at tehnomir dot com dot ua
 Status:   Bogus
-Bug Type: Filesystem function related
+Bug Type: Unknown/Other Function
 Operating System: Linux 2.4.29
 PHP Version:  4.3.11
 New Comment:

category changed: other function related


Previous Comments:


[2005-05-20 11:26:12] max at tehnomir dot com dot ua

This bug is also in new php 4.3.11



[2005-05-10 00:47:07] [EMAIL PROTECTED]

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.





[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


#33070 [Fbk->Opn]: bzdecompress inefficient

2005-05-22 Thread lindsay at bitleap dot com
 ID:   33070
 User updated by:  lindsay at bitleap dot com
 Reported By:  lindsay at bitleap dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Performance problem
 Operating System: Linux 2.6.10 kernel
 PHP Version:  5.0.3
 New Comment:

Given that bzip can be used in a stream, could the data be decompressed
in chunks?


Previous Comments:


[2005-05-22 15:20:22] [EMAIL PROTECTED]

And how do you think it should work?
I don't see any more effective way that will not hit memory instead of
CPU usage.



[2005-05-20 16:56:48] lindsay at bitleap dot com

Script:



Data:
If you run linux:
dd if=/dev/urandom bs=1024 count=256 of=256K
dd if=/dev/urandom bs=1024 count=512 of=512K
dd if=/dev/urandom bs=1024 count=1024 of=1M
dd if=/dev/urandom bs=1024 count=2048 of=2M
dd if=/dev/urandom bs=1024 count=3072 of=3M
dd if=/dev/urandom bs=1024 count=4096 of=4M
bzip2 256K 512K 1M 2M 3M 4M

If not, let me know and I'll upload or email data samples.



[2005-05-19 23:44:05] [EMAIL PROTECTED]

Please provide a short but complete reproduce script and (if possible)
the data too.



[2005-05-19 17:22:47] lindsay at bitleap dot com

Description:

I found bug #13860 regarding bzdecompress speeds on 4.2.x.  The bug
suggests its fixed for 4.2.0 but I see slowness in 5.0.3.

On 5.0.3, bzdecompress seems to get exponentionally slower as data
sizes increase.  I timed the length of decompression on increasing file
sizes containing compressed random data:

file length 256K ran in: 2 seconds
file length 512K ran in: 10 seconds
file length 1M ran in: 41 seconds
file length 2M ran in: 135 seconds
file length 3M ran in: 278 seconds
file length 4M ran in: 476 seconds


I'm not a c coder but the do while loop at line 472 of:
 
http://cvs.php.net/co.php/php-src/ext/bz2/bz2.c?r=1.9

seems to decompress the string over and over.  Each iteration attempts
a decompress w/ a buffer size based on the iteration count.  If the
decompress fails, a larger buffer is tried.  If I'm reading this
correctly, the same data could be decompressed hundreds of times until
the buffer gets large enough.






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


#33104 [NEW]: POST Method on HTML form performs GET Method

2005-05-22 Thread paigrande at yahoo dot com
From: paigrande at yahoo dot com
Operating system: Win 2003
PHP version:  5.0.4
PHP Bug Type: *URL Functions
Bug description:  POST Method on HTML form performs GET Method

Description:

Just learning PHP. I have simple HTML form performing a POST to a PHP
script which retrieves the posted values from $_POST variable. I get no
results. If I look in $_GET without changing HTML form, I have values. See
example code.

My setup:
Windows 2003 Enterprise
Apache 2.0.54-win32-x86-no ssl
jakarta-tomcat 5.5.9
jakarta-connectors jk 2.0.4 win32 apache 2.0.49
PHP 5.0.4 win32

Reproduce code:
---


Test Search Form




Date: 






post.php:


Expected result:

I expect the date I enter on the HTML form to be printed.

Actual result:
--
This URL: 
http://localhost/test/post.php?eDate=1999-09-09&Submit=Search

Error message:
[client 127.0.0.1] PHP Notice:  Undefined index:  eDate in C:\\Program
Files\\Apache Group\\Apache2\\htdocs\\test\\post.php on line 3, referer:
http://localhost/test/test_form.html

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


#33070 [Opn]: bzdecompress inefficient

2005-05-22 Thread derick
 ID:   33070
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lindsay at bitleap dot com
 Status:   Open
 Bug Type: Performance problem
 Operating System: Linux 2.6.10 kernel
 PHP Version:  5.0.3
 New Comment:

Yes, this is possibel with the BZ2_bzRead() api call.


Previous Comments:


[2005-05-22 20:56:20] lindsay at bitleap dot com

Given that bzip can be used in a stream, could the data be decompressed
in chunks?



[2005-05-22 15:20:22] [EMAIL PROTECTED]

And how do you think it should work?
I don't see any more effective way that will not hit memory instead of
CPU usage.



[2005-05-20 16:56:48] lindsay at bitleap dot com

Script:



Data:
If you run linux:
dd if=/dev/urandom bs=1024 count=256 of=256K
dd if=/dev/urandom bs=1024 count=512 of=512K
dd if=/dev/urandom bs=1024 count=1024 of=1M
dd if=/dev/urandom bs=1024 count=2048 of=2M
dd if=/dev/urandom bs=1024 count=3072 of=3M
dd if=/dev/urandom bs=1024 count=4096 of=4M
bzip2 256K 512K 1M 2M 3M 4M

If not, let me know and I'll upload or email data samples.



[2005-05-19 23:44:05] [EMAIL PROTECTED]

Please provide a short but complete reproduce script and (if possible)
the data too.



[2005-05-19 17:22:47] lindsay at bitleap dot com

Description:

I found bug #13860 regarding bzdecompress speeds on 4.2.x.  The bug
suggests its fixed for 4.2.0 but I see slowness in 5.0.3.

On 5.0.3, bzdecompress seems to get exponentionally slower as data
sizes increase.  I timed the length of decompression on increasing file
sizes containing compressed random data:

file length 256K ran in: 2 seconds
file length 512K ran in: 10 seconds
file length 1M ran in: 41 seconds
file length 2M ran in: 135 seconds
file length 3M ran in: 278 seconds
file length 4M ran in: 476 seconds


I'm not a c coder but the do while loop at line 472 of:
 
http://cvs.php.net/co.php/php-src/ext/bz2/bz2.c?r=1.9

seems to decompress the string over and over.  Each iteration attempts
a decompress w/ a buffer size based on the iteration count.  If the
decompress fails, a larger buffer is tried.  If I'm reading this
correctly, the same data could be decompressed hundreds of times until
the buffer gets large enough.






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


#33104 [Opn->Bgs]: POST Method on HTML form performs GET Method

2005-05-22 Thread derick
 ID:   33104
 Updated by:   [EMAIL PROTECTED]
 Reported By:  paigrande at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *URL Functions
 Operating System: Win 2003
 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.

You use curly quotes around POST in your form, that's obviously not
working. Not a bug in PHP.


Previous Comments:


[2005-05-22 21:39:26] paigrande at yahoo dot com

Description:

Just learning PHP. I have simple HTML form performing a POST to a PHP
script which retrieves the posted values from $_POST variable. I get no
results. If I look in $_GET without changing HTML form, I have values.
See example code.

My setup:
Windows 2003 Enterprise
Apache 2.0.54-win32-x86-no ssl
jakarta-tomcat 5.5.9
jakarta-connectors jk 2.0.4 win32 apache 2.0.49
PHP 5.0.4 win32

Reproduce code:
---


Test Search Form




Date: 






post.php:


Expected result:

I expect the date I enter on the HTML form to be printed.

Actual result:
--
This URL: 
http://localhost/test/post.php?eDate=1999-09-09&Submit=Search

Error message:
[client 127.0.0.1] PHP Notice:  Undefined index:  eDate in C:\\Program
Files\\Apache Group\\Apache2\\htdocs\\test\\post.php on line 3,
referer: http://localhost/test/test_form.html





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


#33070 [Com]: bzdecompress inefficient

2005-05-22 Thread jeff at vertexdev dot com
 ID:   33070
 Comment by:   jeff at vertexdev dot com
 Reported By:  lindsay at bitleap dot com
 Status:   Open
 Bug Type: Performance problem
 Operating System: Linux 2.6.10 kernel
 PHP Version:  5.0.3
 New Comment:

The fix is really easy. In function bzdecompress, you need to do the
following:

1. Before the 'do' loop, initialize size to some reasonable value:

   size = PHP_BZ_DECOMPRESS_SIZE;

2. Inside of the loop, double the size each time (replace the existing
'size = dest_len * iter;' statement with this):

   size *= 2;

This will temporarily use up a little bit more memory than stricly
necessary, but it will make the function usable.

Drop me an email if you need more information.


Previous Comments:


[2005-05-22 22:04:49] [EMAIL PROTECTED]

Yes, this is possibel with the BZ2_bzRead() api call.



[2005-05-22 20:56:20] lindsay at bitleap dot com

Given that bzip can be used in a stream, could the data be decompressed
in chunks?



[2005-05-22 15:20:22] [EMAIL PROTECTED]

And how do you think it should work?
I don't see any more effective way that will not hit memory instead of
CPU usage.



[2005-05-20 16:56:48] lindsay at bitleap dot com

Script:



Data:
If you run linux:
dd if=/dev/urandom bs=1024 count=256 of=256K
dd if=/dev/urandom bs=1024 count=512 of=512K
dd if=/dev/urandom bs=1024 count=1024 of=1M
dd if=/dev/urandom bs=1024 count=2048 of=2M
dd if=/dev/urandom bs=1024 count=3072 of=3M
dd if=/dev/urandom bs=1024 count=4096 of=4M
bzip2 256K 512K 1M 2M 3M 4M

If not, let me know and I'll upload or email data samples.



[2005-05-19 23:44:05] [EMAIL PROTECTED]

Please provide a short but complete reproduce script and (if possible)
the data too.



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

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


#31222 [Fbk->Opn]: ocicommit not working

2005-05-22 Thread amonw at hotmail dot com
 ID:   31222
 User updated by:  amonw at hotmail dot com
 Reported By:  amonw at hotmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: OCI8 related
 Operating System: *
 PHP Version:  4CVS-2005-04-04
 Assigned To:  tony2001
 New Comment:

I tried php5 yesterday and the problem doesn't exists. So can you fix
it in php4? Thanks.


Previous Comments:


[2005-05-18 00:14:03] [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

We really need to know if this is fixed in HEAD, so please try the
snapshot. Nobody is telling you should put it on PRODUCTION machine.
You do have some test/dev machines?!




[2005-05-17 07:09:52] amonw at hotmail dot com

I've tried the newest version of php4 but it can't solve my problem.
Please refer to my last 2 comments.



[2005-05-12 12:37:33] [EMAIL PROTECTED]

I'm not suggesting you to upgrade, I just want you to try newer
version.



[2005-04-29 05:15:01] amonw at hotmail dot com

Thank you for your suggestion. But I'm not ready to upgrade my system
to php5 because I don't have much time to modify the old codes to fit
in php5 yet.



[2005-04-28 12:56:06] [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





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

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


#33106 [NEW]: Session handling problem

2005-05-22 Thread eswar at cgvakindia dot com
From: eswar at cgvakindia dot com
Operating system: windows 2003
PHP version:  5.0.4
PHP Bug Type: *General Issues
Bug description:  Session handling problem

Description:

Dear Sir

I changed in php.ini file the auto start for session =1.
I also tried by settin auto start=0;
I set the session.save_path=c:\\temp;
I also created the folder in windows.
I am using IIS and windows 2003.
Nothing else i had made change.

Problem is:

I created a two files. One file which is used to write the session and
where another file I used to read the session.
But i cann't able to read the data in the another file. 
I identified the bug as. When I write my file in session path it creating
one session_id with file name and it stores the data. When i am moving to
the next page, i observed that one more session file is created with empty
content. So when I try to read the conten in the second page i am not able
to read the stored session data. It is saying not defined. I understood
that the second page is reading the session data from that empty file. How
to short out this problem. Please help me. It is very urgent.


Reproduce code:
---
/*Session is started in server and i also tried by using session_start()
and session_register()
(/
1.Write.php

read

2.Read.php



error: Undefined variable test




Expected result:

I want the o/p as "foo" in read.php the echo to print that. But i getting
a error message. I tried all the option i don't please help me in this
situation.


Actual result:
--
Waring:Undefined variable in read.php 'test'

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


#33106 [Opn]: Session handling problem

2005-05-22 Thread eswar at cgvakindia dot com
 ID:   33106
 User updated by:  eswar at cgvakindia dot com
 Reported By:  eswar at cgvakindia dot com
 Status:   Open
 Bug Type: *General Issues
 Operating System: windows 2003
 PHP Version:  5.0.4
 New Comment:

It works fine in server machine.But it produces error during the remote
host or remote terminals.


Previous Comments:


[2005-05-23 07:38:07] eswar at cgvakindia dot com

Description:

Dear Sir

I changed in php.ini file the auto start for session =1.
I also tried by settin auto start=0;
I set the session.save_path=c:\\temp;
I also created the folder in windows.
I am using IIS and windows 2003.
Nothing else i had made change.

Problem is:

I created a two files. One file which is used to write the session and
where another file I used to read the session.
But i cann't able to read the data in the another file. 
I identified the bug as. When I write my file in session path it
creating one session_id with file name and it stores the data. When i
am moving to the next page, i observed that one more session file is
created with empty content. So when I try to read the conten in the
second page i am not able to read the stored session data. It is saying
not defined. I understood that the second page is reading the session
data from that empty file. How to short out this problem. Please help
me. It is very urgent.


Reproduce code:
---
/*Session is started in server and i also tried by using
session_start() and session_register()
(/
1.Write.php

read

2.Read.php



error: Undefined variable test




Expected result:

I want the o/p as "foo" in read.php the echo to print that. But i
getting a error message. I tried all the option i don't please help me
in this situation.


Actual result:
--
Waring:Undefined variable in read.php 'test'





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