#30331 [Opn-Bgs]: Function mktime returns wrong date

2004-10-06 Thread derick
 ID:   30331
 Updated by:   [EMAIL PROTECTED]
 Reported By:  grumiche at powers dot com dot br
-Status:   Open
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: AIX 5.1
 PHP Version:  4.3.9
 New Comment:

Why is this wrong? You're using -3 as parameter... what's the point of
that? The -3rd october is also sept. 27th which is what your mktime
call resolves too:

php -r 'echo date(Y-m-d H:i:s, mktime(2,0,0,10,1 - (5 - 1),
2004,1));'
2004-09-27 02:00:00

No bug here - bogus.


Previous Comments:


[2004-10-05 20:53:13] grumiche at powers dot com dot br

Description:

Function mktime returns wrong date. 
Problem found when installing eGroupWare at AIX. 
Machine: IBM RISC 6000 e30  
OS: AIX 5.1 Maintenance Level 6 
PHP 4.3.9 
Apache 1.3.29-1 
Without changes on php.ini. 
Compiled modules: '/configure' 
'--with-apxs=/opt/freeware/apache/sbin/apxs' '--with-mysql' 
'--enable-trackvars' '--with-ldap' 
'--with-gettext=/opt/freeware' '--with-mbstring' 
'--with-pear' '--with-gd=/opt/freeware' 
'--with-zlib=/opt/freeware' 
'--with-freetype-dir=/opt/freeware' 
'--with-ttf=/opt/freeware' '--enable-mbstring' 
'--with-jpeg-dir=/opt/freeware' 
'--with-png-dir=/opt/freeware' 
'--with-zlib-dir=/opt/freeware' 
 
Same error apears on another installation: 
Machine: IBM RISC 6000 43P 
OS: AIX 5.1 Maintenance Level 3 
PHP 4.3.8 
Apache 1.3.29-1 
Without changes on php.ini. 
Compiled modules: 
'./configure' '--with-apxs=/opt/freeware/apache/sbin/apxs' 
'--with-mysql' '--enable-trackvars' '--with-ldap' 
'--with-gettext=/opt/freeware' '--with-mbstring' 
'--with-pear' '--with-openssl=/opt/freeware' 
'--with-gd=/opt/freeware' '--with-zlib=/opt/freeware' 
 

Reproduce code:
---
mktime(2,0,0,10,1 - (5 - 1), 2004,1) 


Expected result:

1096261200 

Actual result:
--
1096520400 
 





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


#29860 [Opn-Fbk]: Cannot compile with mysql and mysqli extensions

2004-10-06 Thread derick
 ID:   29860
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rjanson at msn dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Redhat 9
 PHP Version:  5.0.1
 New Comment:

That doesn't make sense unless you only have a static version of the
libmysqlclient... in which case I still think that the linker handles
that correctly. Can you please try to use a shared library version of
libmysqlclient though?


Previous Comments:


[2004-10-05 23:33:44] rjanson at msn dot com

OK, finally an answer!

I checked Makefile and found the following line:

EXTRA_LIBS = -lcrypt -lcrypt -lmysqlclient -lpng -lz -lz -lresolv -lm
-ldl -lnsl -lxml2 -
lz -lm -lxml2 -lz -lm -lmysqlclient -lcrypt -lnsl -lm -lz -lnss_files
-lnss_dns -lresolv -lnss_files
 -lnss_dns -lresolv -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lcrypt 

By removing one of the -lmysqlclient entries on this line I was able to
successfully make and make install with both mysql and mysqli. As
confirmed by phpInfo().

I'm not sure why the other libs have multiple entries and don't cause
make to crash.



[2004-10-05 22:52:00] php at kilimajer dot net

Workaround is to execute the last failing command with one
-lmysqlclient removed, then again make.

This should be fixed in ext/mysqli/config.m4.



[2004-10-05 13:50:38] php at kilimajer dot net

This is caused by -lmysqlclient being supplied twice to the linker (at
least it was my case).



[2004-09-24 19:59:01] rjanson at msn dot com

I've tried the same steps with php-5.02 and still the same results.



[2004-09-21 01:12:32] rjanson at msn dot com

I tried backing up and completely uninstalling, then reinstalling
Mysql-4.1.4-0 from RPM, and still get the same result.

Others out there are having this issue as well. Is there nothing to be
done?

--Rich



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29860

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


#30332 [Opn-Asn]: zend.ze1_compatibility_mode isnt fully compatable with array_push()

2004-10-06 Thread derick
 ID:   30332
 Updated by:   [EMAIL PROTECTED]
 Reported By:  justmanj at msu dot edu
-Status:   Open
+Status:   Assigned
 Bug Type: Zend Engine 2 problem
 Operating System: winxp
 PHP Version:  5.0.2
-Assigned To:  
+Assigned To:  andi


Previous Comments:


[2004-10-05 23:35:12] justmanj at msu dot edu

Description:

zend.ze1_compatibility_mode when turned on doesn't honor the same
methodlogy as 4.x when passing a class for some parameters - it passes
by reference in functions like array_push();

this behavior was not in 4.3.x, and the only workaround is the clone
keyword, which should be added in the 4.3.x tree for backwards
compatability.

Reproduce code:
---
?
class x { };

$first = new x;
$second = $first;
$container = array();
array_push($container, $first);

$first-first =  im in the first;

print_r($first);
print_r($second);
print_r($container);


Expected result:

x Object
(
[first] =  im in the first
)

x Object
(
)

Array
(
[0] = x Object
(
)
)

Actual result:
--
x Object
(
[first] =  im in the first
)

x Object
(
)

Array
(
[0] = x Object
(
[first] =  im in the first
)
)






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


#30333 [Opn-Fbk]: fscanf() and() not working correctly with other then English language

2004-10-06 Thread derick
 ID:   30333
 Updated by:   [EMAIL PROTECTED]
 Reported By:  altuhov at nm dot ru
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: WinXP SP2
 PHP Version:  5.0.2
 New Comment:

This example is useles, as we don't know which encoding you are using.
Please put this script in a zip file and provide the link to it in this
bugreport.


Previous Comments:


[2004-10-06 05:05:56] altuhov at nm dot ru

Description:

Functions fscanf() and sscanf() is not working correctly with other
then English language in the handle.

In my example was used Russian language.

Reproduce code:
---
?php 
$cont=Ïðîâåðêà Òåñòèðóþ ÎäèíÄâàÒðè;
// get author info and generate DocBook entry 
$n = sscanf($cont,%s %s %s); 
print_r($n);
?

Expected result:

Array ( [0] = Ïðîâåðêà [1] = Òåñòèðóþ [2] = ÎäèíÄâàÒðè )

Actual result:
--
Array ( [0] = Ïð [1] = âåð [2] = à )





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


#28845 [Opn-Csd]: warning on two TRUE expressions while calling include*() in a if-statement

2004-10-06 Thread david dot rech at virusmedia dot de
 ID:   28845
 User updated by:  david dot rech at virusmedia dot de
 Reported By:  david dot rech at virusmedia dot de
-Status:   Open
+Status:   Closed
 Bug Type: *Directory/Filesystem functions
 Operating System: Windows XP SP1
 PHP Version:  4CVS-2004-06-19 (stable)
 New Comment:

Somehow fixed in 4.3.9, and I don't have a clue why. This was also
reproduced by another developer.

Did just nobody close the bug or anything? Dunno.

Keep up the good work.


Previous Comments:


[2004-06-19 20:04:43] david dot rech at virusmedia dot de

Sorry, missed the closing brace in second if-statement...

Must be:

Whereas that code, with the first expression in braces, prints 1
again.

if( (include_once(__FILE__))  is_integer(1) ) echo 1;



[2004-06-19 20:02:25] david dot rech at virusmedia dot de

Description:

I've notice some strange behaviour with include() and include_once()
calls in an if-statement whereas two expressions are TRUE and logically
combined with the '' operator.

While if( true  true ) echo 1; would print out 1 as expected, this
code however does not:

if( include_once(__FILE__)  is_integer(1) ) echo 1;

Whereas that code, with the first expression in braces, prints 1
again.

if( (include_once(__FILE__)  is_integer(1) ) echo 1;


In the example you should notice that the expression is still TRUE with
other functions - even without braces around first expression.

Also, somehow the result of the second expression gets copied to the
first argument of the first expression as an integer.

Look at this warning:

Warning: main(1): failed to open stream: No such file or directory in
[...] on line 12

That's what happens if second expression is true and include_once()
was'nt put into braces. Try to negate the second expression - you will
get a '0' referred as the argument of include_once() in the warning.

So is this some strange magic, or did I've miss the point completely?

Reproduce code:
---
?php
// Expected behaviour
if( true  true ) { // As expected - the expression is TRUE
echo 1st: That may have worked\n;
}

// Weird behaviour
if( class_exists('stdClass')  is_integer(1) ) { // Again - the
expression is TRUE
echo 2nd: You don't see that, don't you?\n;
}

if( @include_once(__FILE__)  is_integer(1) ) { // Expression seems to
be FALSE and causes a weird warning without the @
echo 3rd: So you see this..?;
}

if( (include_once(__FILE__))  is_integer(1) ) { // TRUE
echo 4rd: In fact, you see this...;
}
?

Expected result:

1st: That may have worked
2nd: You don't see that, don't you?
3rd: So you see this..?
4rd: In fact, you see this...

Actual result:
--
1st: That may have worked
2nd: You don't see that, don't you?
4rd: In fact, you see this...





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


#21802 [Com]: unexpected T_WHITESPACE

2004-10-06 Thread jpmarroquin at mail dot com
 ID:   21802
 Comment by:   jpmarroquin at mail dot com
 Reported By:  gmourani at openna dot com
 Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: OpenNA Linux
 PHP Version:  4.3.0
 New Comment:

I'm getting the same error but with PHP 5.0.2!!!
This is on Mandrake 10.0, Apache 1.3.31


Previous Comments:


[2004-06-25 22:35:00] eggert at gnu dot org

Please see the patch in the PHP bug 28930 description. I think this
patch will fix bug 21802.



[2004-06-25 14:33:58] mandreiana at yahoo dot com

Fedora SRPM has this:

# bison-1.875-2 seems to produce a broken parser; workaround.
mkdir Zend  cp ../Zend/zend_{language,ini}_parser.[ch] Zend



[2004-03-31 02:09:52] monk at farpost dot com

Some error with php-4.3.5 and bison-1.875
Fixed by installing bison-1.35



[2003-07-10 04:26:05] [EMAIL PROTECTED]

Re-classified to the proper category



[2003-07-10 02:07:52] 5689103753 at ma-scha dot de

I get the same bug with bison 1.875.
I installed bison 1.28 and all works fine again.

Try to look at the first lines of output from
the configure script it shows you what version it needs,
but it doesn't stop on a wrong version.



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

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


#30333 [Fbk]: fscanf() and() not working correctly with other then English language

2004-10-06 Thread tony2001
 ID:   30333
 Updated by:   [EMAIL PROTECTED]
 Reported By:  altuhov at nm dot ru
 Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: WinXP SP2
 PHP Version:  5.0.2
 New Comment:

Btw, your example works perfectly for me (PHP 4.3.10-dev, 5.0.3-dev,
5.1-dev, Linux, locale ru_RU.koi8r).


Previous Comments:


[2004-10-06 08:54:36] [EMAIL PROTECTED]

This example is useles, as we don't know which encoding you are using.
Please put this script in a zip file and provide the link to it in this
bugreport.



[2004-10-06 05:05:56] altuhov at nm dot ru

Description:

Functions fscanf() and sscanf() is not working correctly with other
then English language in the handle.

In my example was used Russian language.

Reproduce code:
---
?php 
$cont=Ïðîâåðêà Òåñòèðóþ ÎäèíÄâàÒðè;
// get author info and generate DocBook entry 
$n = sscanf($cont,%s %s %s); 
print_r($n);
?

Expected result:

Array ( [0] = Ïðîâåðêà [1] = Òåñòèðóþ [2] = ÎäèíÄâàÒðè )

Actual result:
--
Array ( [0] = Ïð [1] = âåð [2] = à )





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


#30334 [NEW]: Upper-case encoding's name doesn't get the body decoded

2004-10-06 Thread m_vitaly at topixoft dot com
From: m_vitaly at topixoft dot com
Operating system: linux
PHP version:  4.3.8
PHP Bug Type: *Mail Related
Bug description:  Upper-case encoding's name doesn't get the body decoded

Description:

on _decodeBody($input, $encoding = '7bit') function in mimeDecode.php

the line switch($encoding) {
whould be switch(strtolower($encoding)) {



Reproduce code:
---
When the transfer encoding of the attachemnt is in uppercase
the body doesn't get decoded.


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


#30334 [Opn-Bgs]: Upper-case encoding's name doesn't get the body decoded

2004-10-06 Thread tony2001
 ID:   30334
 Updated by:   [EMAIL PROTECTED]
 Reported By:  m_vitaly at topixoft dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *Mail Related
 Operating System: linux
 PHP Version:  4.3.8
 New Comment:

Please, report PEAR-related bugs to PEAR bug system
(http://pear.php.net/bugs/).



Previous Comments:


[2004-10-06 10:10:08] m_vitaly at topixoft dot com

Description:

on _decodeBody($input, $encoding = '7bit') function in
mimeDecode.php

the line switch($encoding) {
whould be switch(strtolower($encoding)) {



Reproduce code:
---
When the transfer encoding of the attachemnt is in uppercase
the body doesn't get decoded.






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


#30335 [NEW]: fgetcsv + foreign characters

2004-10-06 Thread gruszczol1 at poczta dot onet dot pl
From: gruszczol1 at poczta dot onet dot pl
Operating system: linux
PHP version:  5.0.2
PHP Bug Type: Filesystem function related
Bug description:  fgetcsv + foreign characters

Description:

fgetcsv() doesn't read foreign chracters which are on the beginning of the
field.
Similar bug in http://bugs.php.net/bug.php?id=10896 but it has status
closed.

Reproduce code:
---
File contains:
±abc|¶abc|¿abc¿

Example code:
$aqq=fgetcsv($fp, 4000, |);
echo $aqq[0].$aqq[1].$aqq[2];


Expected result:

Expected result:
±abc¶abc¿abc¿

Actual result:
--
Actual result:
abcabcabc¿

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


#30335 [Opn-Fbk]: fgetcsv + foreign characters

2004-10-06 Thread derick
 ID:   30335
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gruszczol1 at poczta dot onet dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: linux
 PHP Version:  5.0.2
 New Comment:

This example is useles, as we don't know which encoding you are using.
Please put this script in a zip file and provide the link to it in this
bugreport.



Previous Comments:


[2004-10-06 10:29:45] gruszczol1 at poczta dot onet dot pl

Description:

fgetcsv() doesn't read foreign chracters which are on the beginning of
the field.
Similar bug in http://bugs.php.net/bug.php?id=10896 but it has status
closed.

Reproduce code:
---
File contains:
±abc|¶abc|¿abc¿

Example code:
$aqq=fgetcsv($fp, 4000, |);
echo $aqq[0].$aqq[1].$aqq[2];


Expected result:

Expected result:
±abc¶abc¿abc¿

Actual result:
--
Actual result:
abcabcabc¿





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


#30326 [Fbk-Opn]: zip_open cannot open file

2004-10-06 Thread adamsbarker at hotmail dot com
 ID:   30326
 User updated by:  adamsbarker at hotmail dot com
 Reported By:  adamsbarker at hotmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: ZZiplib Related
 Operating System: Windows XP
 PHP Version:  5.0.2
 New Comment:

yes, both the php and zip files are in the same directory... i
completely removed php and got copies of the latest stable version/PECL
extensions for Windows, but still the same problem... this problem seems
to be running throughout the versions, since i first noticed it a couple
of months ago.


Previous Comments:


[2004-10-06 01:17:29] [EMAIL PROTECTED]

Is the script being ran from the same directory as the one where the
zip file is?



[2004-10-05 02:45:02] adamsbarker at hotmail dot com

Description:

when using the following code:

zip_open('file_name.zip');

i get the following error:


Warning: zip_open() [function.zip-open]: Cannot open zip archive
file_name.zip in C:\test.php on line 1


the zip file and php script are in the same directory

when i put in the full directory of the zip file, such as
C:\file_name.zip, the file is opened and everything works as
expected.
i don't think this should be how it works as all other functions (ie,
include()) don't need the full directory!

i am using the latest stable version 5.0.3-dev and PECL extensions






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


#30326 [Opn-Fbk]: zip_open cannot open file

2004-10-06 Thread derick
 ID:   30326
 Updated by:   [EMAIL PROTECTED]
 Reported By:  adamsbarker at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: ZZiplib Related
 Operating System: Windows XP
 PHP Version:  5.0.2
 New Comment:

it probably means that the working directory is different then you
think it is. What does echo getcwd(); output?


Previous Comments:


[2004-10-06 11:19:50] adamsbarker at hotmail dot com

yes, both the php and zip files are in the same directory... i
completely removed php and got copies of the latest stable version/PECL
extensions for Windows, but still the same problem... this problem seems
to be running throughout the versions, since i first noticed it a couple
of months ago.



[2004-10-06 01:17:29] [EMAIL PROTECTED]

Is the script being ran from the same directory as the one where the
zip file is?



[2004-10-05 02:45:02] adamsbarker at hotmail dot com

Description:

when using the following code:

zip_open('file_name.zip');

i get the following error:


Warning: zip_open() [function.zip-open]: Cannot open zip archive
file_name.zip in C:\test.php on line 1


the zip file and php script are in the same directory

when i put in the full directory of the zip file, such as
C:\file_name.zip, the file is opened and everything works as
expected.
i don't think this should be how it works as all other functions (ie,
include()) don't need the full directory!

i am using the latest stable version 5.0.3-dev and PECL extensions






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


#30335 [Fbk-Opn]: fgetcsv + foreign characters

2004-10-06 Thread gruszczol1 at poczta dot onet dot pl
 ID:   30335
 User updated by:  gruszczol1 at poczta dot onet dot pl
 Reported By:  gruszczol1 at poczta dot onet dot pl
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: linux
 PHP Version:  5.0.2
 New Comment:

It was tested with iso-8859-2 and windows-1250 text file.
http://republika.pl/gruszczol1/fgetcsv_bug_example.tgz


Previous Comments:


[2004-10-06 10:32:21] [EMAIL PROTECTED]

This example is useles, as we don't know which encoding you are using.
Please put this script in a zip file and provide the link to it in this
bugreport.




[2004-10-06 10:29:45] gruszczol1 at poczta dot onet dot pl

Description:

fgetcsv() doesn't read foreign chracters which are on the beginning of
the field.
Similar bug in http://bugs.php.net/bug.php?id=10896 but it has status
closed.

Reproduce code:
---
File contains:
±abc|¶abc|¿abc¿

Example code:
$aqq=fgetcsv($fp, 4000, |);
echo $aqq[0].$aqq[1].$aqq[2];


Expected result:

Expected result:
±abc¶abc¿abc¿

Actual result:
--
Actual result:
abcabcabc¿





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


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

2004-10-06 Thread php at kilimajer dot net
 ID:   29860
 Comment by:   php at kilimajer dot net
 Reported By:  rjanson at msn dot com
 Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Redhat 9
 PHP Version:  5.0.1
 New Comment:

The errror occurs with these rpms installed:

MySQL-server-4.1.5-0
MySQL-client-4.1.5-0
MySQL-bench-4.1.5-0
MySQL-shared-4.1.5-0
MySQL-embedded-4.1.5-0
MySQL-devel-4.1.5-0

They are downloaded from mysql.com


Previous Comments:


[2004-10-06 08:52:32] [EMAIL PROTECTED]

That doesn't make sense unless you only have a static version of the
libmysqlclient... in which case I still think that the linker handles
that correctly. Can you please try to use a shared library version of
libmysqlclient though?



[2004-10-05 23:33:44] rjanson at msn dot com

OK, finally an answer!

I checked Makefile and found the following line:

EXTRA_LIBS = -lcrypt -lcrypt -lmysqlclient -lpng -lz -lz -lresolv -lm
-ldl -lnsl -lxml2 -
lz -lm -lxml2 -lz -lm -lmysqlclient -lcrypt -lnsl -lm -lz -lnss_files
-lnss_dns -lresolv -lnss_files
 -lnss_dns -lresolv -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lcrypt 

By removing one of the -lmysqlclient entries on this line I was able to
successfully make and make install with both mysql and mysqli. As
confirmed by phpInfo().

I'm not sure why the other libs have multiple entries and don't cause
make to crash.



[2004-10-05 22:52:00] php at kilimajer dot net

Workaround is to execute the last failing command with one
-lmysqlclient removed, then again make.

This should be fixed in ext/mysqli/config.m4.



[2004-10-05 13:50:38] php at kilimajer dot net

This is caused by -lmysqlclient being supplied twice to the linker (at
least it was my case).



[2004-09-24 19:59:01] rjanson at msn dot com

I've tried the same steps with php-5.02 and still the same results.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29860

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


#30336 [NEW]: Config error with option --with-interbase

2004-10-06 Thread ova at tkvc dot ru
From: ova at tkvc dot ru
Operating system: RH Linux 7.3+FireBird SQL 1.5.1
PHP version:  5.0.2
PHP Bug Type: Compile Failure
Bug description:  Config error with option --with-interbase

Description:

While try to configure PHP 5.0.2 with Interbase support (I have FireBird
1.5.1(classic) installed) under Red Hat Linux 7.3 running 
./configure --with-interbase =/opt/firebird 
results an error like 
  libgds, libib_util or libfbclient not found! Check config.log for more
information.

Config.log tells that 
/opt/firebird/libfbclient.so: undefined reference to 'pthread_create'
and some more lines about undefined references to pthread_* functions

I solved this problem by changing ./configure script.
Found the string 
   LIBS=-lfbclient $LIBS
and modify it like
   LIBS=-lfbclient -lpthread $LIBS
After this a configuring works OK.

Than in Makefile I did almoust the same -
include 
  -lpthread
in
EXTRALIBS='...'
parameter

And than 
  make install
runs fine.




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


#30000 [WFx]: in_array returns the wrong result with long strings

2004-10-06 Thread rcnetto at yahoo dot com
 ID:   3
 User updated by:  rcnetto at yahoo dot com
 Reported By:  rcnetto at yahoo dot com
 Status:   Wont fix
 Bug Type: Arrays related
 Operating System: Linux - Suse 9.1
 PHP Version:  5.0.1
 New Comment:

Interesting,... using the strict parameter will force in_array to check
types (or not converting to int??). Then the result will be ok.


Previous Comments:


[2004-10-06 01:57:08] [EMAIL PROTECTED]

Numeric strings get converted to integers when used as array keys.
Because ints are limited to 32 bits (on x86) they end up being 0 on
very large numbers.



[2004-09-06 17:02:15] rcnetto at yahoo dot com

Description:

I tried to check if a value existed in an array, but in_array did not
return what I expected when I'm dealing with large strings (18 chars or
longer).

I have PHP 5.0.1 compiled with Apache 2.0.50 and DBG v2.11.26 running;



Reproduce code:
---
?php
$needle = '123456789012345671';
$arrayA = array('123456789012345672'); // check number is
different
var_dump(in_array($needle, $arrayA)); // the correct output is
FALSE, but TRUE is printed
?

Expected result:

bool(false)

OBS: $needle does not exists in $arrayA (last number is different),
that's why it should return FALSE.

Actual result:
--
bool(true)

Notes: when the value of the variables are letters, in_array works fine
with the same quantity of chars.
i.e:
?php
$needle = 'abcdefghijklmnopqr1';
$arrayA = array('abcdefghijklmnopqr2'); // last char is different
var_dump(in_array($needle, $arrayA));
?





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


#30337 [NEW]: empty() does not return true on empty objects

2004-10-06 Thread jorma dot tuomainen at softera dot fi
From: jorma dot tuomainen at softera dot fi
Operating system: Solaris
PHP version:  5.0.1
PHP Bug Type: Class/Object related
Bug description:  empty() does not return true on empty objects

Description:

Empty() does not return true on empty objects. My 
understanding is that object that does not have methods or 
properties is empty(am I wrong?). 
 
Someone reported same thing on PHP 5 RC2 and it's still 
open w/o comments http://bugs.php.net/bug.php?id=28502 

Reproduce code:
---
?php
class nuthin {
}
$bar=new nuthin;
$foo=new stdClass;
echo empty($bar);
echo empty($foo);
?

Expected result:

11 

Actual result:
--
nothing aka empty page 

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


#30337 [Opn-Asn]: empty() does not return true on empty objects

2004-10-06 Thread derick
 ID:   30337
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jorma dot tuomainen at softera dot fi
-Status:   Open
+Status:   Assigned
 Bug Type: Class/Object related
 Operating System: Solaris
 PHP Version:  5.0.1
-Assigned To:  
+Assigned To:  andi
 New Comment:

Is this true Andi?


Previous Comments:


[2004-10-06 14:19:26] jorma dot tuomainen at softera dot fi

Description:

Empty() does not return true on empty objects. My 
understanding is that object that does not have methods or 
properties is empty(am I wrong?). 
 
Someone reported same thing on PHP 5 RC2 and it's still 
open w/o comments http://bugs.php.net/bug.php?id=28502 

Reproduce code:
---
?php
class nuthin {
}
$bar=new nuthin;
$foo=new stdClass;
echo empty($bar);
echo empty($foo);
?

Expected result:

11 

Actual result:
--
nothing aka empty page 





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


#30333 [Fbk-Opn]: fscanf() and() not working correctly with other then English language

2004-10-06 Thread altuhov at nm dot ru
 ID:   30333
 User updated by:  altuhov at nm dot ru
 Reported By:  altuhov at nm dot ru
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: WinXP SP2
-PHP Version:  5.0.2
+PHP Version:  5.1.0-dev
 New Comment:

I have installed new version, but, bug is steel present.
sample script: http://altuhov.nm.ru/tt.zip


Previous Comments:


[2004-10-06 10:02:21] [EMAIL PROTECTED]

Btw, your example works perfectly for me (PHP 4.3.10-dev, 5.0.3-dev,
5.1-dev, Linux, locale ru_RU.koi8r).



[2004-10-06 08:54:36] [EMAIL PROTECTED]

This example is useles, as we don't know which encoding you are using.
Please put this script in a zip file and provide the link to it in this
bugreport.



[2004-10-06 05:05:56] altuhov at nm dot ru

Description:

Functions fscanf() and sscanf() is not working correctly with other
then English language in the handle.

In my example was used Russian language.

Reproduce code:
---
?php 
$cont=Ïðîâåðêà Òåñòèðóþ ÎäèíÄâàÒðè;
// get author info and generate DocBook entry 
$n = sscanf($cont,%s %s %s); 
print_r($n);
?

Expected result:

Array ( [0] = Ïðîâåðêà [1] = Òåñòèðóþ [2] = ÎäèíÄâàÒðè )

Actual result:
--
Array ( [0] = Ïð [1] = âåð [2] = à )





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


#30338 [NEW]: download file from server to local harddisk

2004-10-06 Thread qadeer_ahmad at yahoo dot com
From: qadeer_ahmad at yahoo dot com
Operating system: windows 2000
PHP version:  4.3.9
PHP Bug Type: FTP related
Bug description:  download file from server to local harddisk

Description:

i am trying to download a file from my webserver but it did not working
and giving error

before this script i connect to the ftp server and it connected.

Reproduce code:
---
?
$local_file = 'c:/aaa.zip';
$server_file = 'www/download/aaa.zip';
if (ftp_get($conn_id, $local_file, $server_file, FTP_BINARY)) {
   echo Successfully written to $local_file\n;
} else {
   echo There was a problem\n;
   exit();
}
if ($conn_id) {
   ftp_close($conn_id);
}
?

Expected result:

i am trying to download a file naming aaa.zip which is present in
'www/download/aaa.zip' i want to download this file in my local hard drive
path c:/aaa.zip

NOTE: I also give this path as this 

$local_file = 'c:\aaa.zip';
$server_file = 'www/download/aaa.zip';

no error show also no file copy in my drive c:
but when i give this address.
$local_file = 'c:/aaa.zip';
$server_file = 'www/download/aaa.zip';
it give error which i write below

Actual result:
--
error is::

Warning: ftp_get(): Error opening c:/aaa.zip in
/home/comsdev/public_html/ftp2.php on line 27
There was a problem 



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


#30338 [Opn-Bgs]: download file from server to local harddisk

2004-10-06 Thread derick
 ID:   30338
 Updated by:   [EMAIL PROTECTED]
 Reported By:  qadeer_ahmad at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: FTP related
 Operating System: windows 2000
 PHP Version:  4.3.9
 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. 

Thank you for your interest in PHP.

.


Previous Comments:


[2004-10-06 15:42:46] qadeer_ahmad at yahoo dot com

Description:

i am trying to download a file from my webserver but it did not working
and giving error

before this script i connect to the ftp server and it connected.

Reproduce code:
---
?
$local_file = 'c:/aaa.zip';
$server_file = 'www/download/aaa.zip';
if (ftp_get($conn_id, $local_file, $server_file, FTP_BINARY)) {
   echo Successfully written to $local_file\n;
} else {
   echo There was a problem\n;
   exit();
}
if ($conn_id) {
   ftp_close($conn_id);
}
?

Expected result:

i am trying to download a file naming aaa.zip which is present in
'www/download/aaa.zip' i want to download this file in my local hard
drive path c:/aaa.zip

NOTE: I also give this path as this 

$local_file = 'c:\aaa.zip';
$server_file = 'www/download/aaa.zip';

no error show also no file copy in my drive c:
but when i give this address.
$local_file = 'c:/aaa.zip';
$server_file = 'www/download/aaa.zip';
it give error which i write below

Actual result:
--
error is::

Warning: ftp_get(): Error opening c:/aaa.zip in
/home/comsdev/public_html/ftp2.php on line 27
There was a problem 







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


#30339 [NEW]: $PHP_SELF is not set (empty)

2004-10-06 Thread sales at teksigns dot com
From: sales at teksigns dot com
Operating system: windows xp
PHP version:  4.3.9
PHP Bug Type: Scripting Engine problem
Bug description:  $PHP_SELF is not set (empty)

Description:

$PHP_SELF is not getting set .

if i do :

echo http://someurl/.$PHP_SELF;

i only get :

http://someurl/



Reproduce code:
---
echo http://someurl/.$PHP_SELF;


Expected result:

http://someurl/somescript.php


Actual result:
--
http://someurl/

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


#30339 [Opn-Bgs]: $PHP_SELF is not set (empty)

2004-10-06 Thread derick
 ID:   30339
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sales at teksigns dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: windows xp
 PHP Version:  4.3.9
 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. 

Thank you for your interest in PHP.

.


Previous Comments:


[2004-10-06 16:45:18] sales at teksigns dot com

Description:

$PHP_SELF is not getting set .

if i do :

echo http://someurl/.$PHP_SELF;

i only get :

http://someurl/



Reproduce code:
---
echo http://someurl/.$PHP_SELF;


Expected result:

http://someurl/somescript.php


Actual result:
--
http://someurl/





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


#30339 [Bgs-Opn]: $PHP_SELF is not set (empty)

2004-10-06 Thread sales at teksigns dot com
 ID:   30339
 User updated by:  sales at teksigns dot com
 Reported By:  sales at teksigns dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: windows xp
 PHP Version:  4.3.9
 New Comment:

i did not ask for support 


your php is broken .

im going back to a older version until you fix it .

all my scripts that was using $PHP_SELF is now broken 
with these new versions 


Previous Comments:


[2004-10-06 16:46:08] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.



[2004-10-06 16:45:18] sales at teksigns dot com

Description:

$PHP_SELF is not getting set .

if i do :

echo http://someurl/.$PHP_SELF;

i only get :

http://someurl/



Reproduce code:
---
echo http://someurl/.$PHP_SELF;


Expected result:

http://someurl/somescript.php


Actual result:
--
http://someurl/





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


#30339 [Opn-Bgs]: $PHP_SELF is not set (empty)

2004-10-06 Thread derick
 ID:   30339
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sales at teksigns dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: windows xp
 PHP Version:  4.3.9
 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. 

Thank you for your interest in PHP.

No bug here.


Previous Comments:


[2004-10-06 16:49:59] sales at teksigns dot com

i did not ask for support 


your php is broken .

im going back to a older version until you fix it .

all my scripts that was using $PHP_SELF is now broken 
with these new versions 



[2004-10-06 16:46:08] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.



[2004-10-06 16:45:18] sales at teksigns dot com

Description:

$PHP_SELF is not getting set .

if i do :

echo http://someurl/.$PHP_SELF;

i only get :

http://someurl/



Reproduce code:
---
echo http://someurl/.$PHP_SELF;


Expected result:

http://someurl/somescript.php


Actual result:
--
http://someurl/





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


#4060 [Com]: PHP_SELF is not set.

2004-10-06 Thread sales at teksigns dot com
 ID:   4060
 Comment by:   sales at teksigns dot com
 Reported By:  phallstrom at adhesivemedia dot com
 Status:   Closed
 Bug Type: Other
 Operating System: Windows 98 w/PWS
 PHP Version:  4.0 Release Candidate 1
 New Comment:

this is happening again in 4.3.9


i have posted a bug but they just get ignored


Previous Comments:


[2000-04-16 11:49:22] rasmus at cvs dot php dot net

Fixed by Frank in CVS



[2000-04-06 13:22:25] phallstrom at adhesivemedia dot com

Hi -
  I just installed PHP4RC1 with PWS4 on W98 (all brand new, no old
copies of anything) and noticed that PHP_SELF does not get set.  If I
try to print(==$PHP_SELF==) I get .  phpinfo() also does not
provide a value for PHP_SELF.




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


#30339 [Bgs-Opn]: $PHP_SELF is not set (empty)

2004-10-06 Thread sales at teksigns dot com
 ID:   30339
 User updated by:  sales at teksigns dot com
 Reported By:  sales at teksigns dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: windows xp
 PHP Version:  4.3.9
 New Comment:

i am having the same problem as this bug that was fixed in the past.

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


The exact same bug is back ..

if it was a bug that was fixed then its a bug now again 


i dont get you


Previous Comments:


[2004-10-06 16:51:23] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

No bug here.



[2004-10-06 16:49:59] sales at teksigns dot com

i did not ask for support 


your php is broken .

im going back to a older version until you fix it .

all my scripts that was using $PHP_SELF is now broken 
with these new versions 



[2004-10-06 16:46:08] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.



[2004-10-06 16:45:18] sales at teksigns dot com

Description:

$PHP_SELF is not getting set .

if i do :

echo http://someurl/.$PHP_SELF;

i only get :

http://someurl/



Reproduce code:
---
echo http://someurl/.$PHP_SELF;


Expected result:

http://someurl/somescript.php


Actual result:
--
http://someurl/





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


#30339 [Opn-Bgs]: $PHP_SELF is not set (empty)

2004-10-06 Thread derick
 ID:   30339
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sales at teksigns dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: windows xp
 PHP Version:  4.3.9
 New Comment:

IT IS NOT A BUG, please contact the [EMAIL PROTECTED]
mailinglist. And stop re-opening this bug.


Previous Comments:


[2004-10-06 16:55:13] sales at teksigns dot com

i am having the same problem as this bug that was fixed in the past.

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


The exact same bug is back ..

if it was a bug that was fixed then its a bug now again 


i dont get you



[2004-10-06 16:51:23] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

No bug here.



[2004-10-06 16:49:59] sales at teksigns dot com

i did not ask for support 


your php is broken .

im going back to a older version until you fix it .

all my scripts that was using $PHP_SELF is now broken 
with these new versions 



[2004-10-06 16:46:08] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.



[2004-10-06 16:45:18] sales at teksigns dot com

Description:

$PHP_SELF is not getting set .

if i do :

echo http://someurl/.$PHP_SELF;

i only get :

http://someurl/



Reproduce code:
---
echo http://someurl/.$PHP_SELF;


Expected result:

http://someurl/somescript.php


Actual result:
--
http://someurl/





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


#30058 [Opn-Fbk]: Yet Another Solaris compilation problem :-((

2004-10-06 Thread sniper
 ID:   30058
 Updated by:   [EMAIL PROTECTED]
 Reported By:  l_faillie at yahoo dot com
-Status:   Open
+Status:   Feedback
 Bug Type: FTP related
 Operating System: Solaris 8
 PHP Version:  4.3.8
 New Comment:

Why would PHP call ftp_fput() when your script doesn't have any calls
to it in it? (you call ftp_put(), notice the missing  
'f' in front of put...)



Previous Comments:


[2004-10-05 22:43:32] l_faillie at yahoo dot com

 This seems more like feature request (getting more info 
 as an error message if the ftp_*() functions fail..) 
 but anyway,

It should be better if we have better message in case of failure, but
as I said previously, I put some tracing puts() in ext/ftp/php_ftp.c
and it seems that PHP_FUNCTION(ftp_fput), line 768 is never called. So
for me it's more an issue in the PHP parser than in ftp function
themselfs.
Unfortunatly, I'm not confident enough w/ PHP parser to trace deeply in
the code.

 are you sure this isn't some firewall issue..? (like 
 I've had had to struggle with for last 6 months.. :)

Yes, because both machines are on the same networks and
 I can connect using the normal Solaris FTP client.



[2004-10-05 20:14:20] [EMAIL PROTECTED]

This seems more like feature request (getting more info as an error
message if the ftp_*() functions fail..) but anyway,
are you sure this isn't some firewall issue..? (like I've had had to
struggle with for last 6 months.. :)




[2004-10-02 17:01:21] l_faillie at yahoo dot com

Ok, the result is :

bool(false)



[2004-10-02 16:09:39] [EMAIL PROTECTED]

change the ftp_put() line in your script to this:

$retval = ftp_put($con, basename($fch), basename($fch), FTP_BINARY);
var_dump ($retval);

And tell us what you get now..



[2004-10-01 18:16:14] l_faillie at yahoo dot com

 You said you don't get any output. But ftp_put() doesn't
 output anything at all..what do you expect it to output?

Whell, as this function fails and rise the die() clause of
'ftp_put() or die()', I'm expecting an error message saying ... why
ftp_put() fails. Like remote host close the connexion or something
like that.

 What does this output:
 # php -r 'ftp_put();'
$php -r 'ftp_put();'

Warning: ftp_put() expects at least 4 parameters, 0 given in Command
line code on line 1



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

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


#29947 [Opn-Fbk]: exec / system multiexecute

2004-10-06 Thread sniper
 ID:   29947
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sq6elt at zp dot amsnet dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  4.3.8
 New Comment:

Your put this report in 'Reproducible crash' category..so where's the
gdb backtrace?


Previous Comments:


[2004-09-02 11:16:49] sq6elt at zp dot amsnet dot pl

Description:

php with suexec - apache (called as CGI), file foo.php: 
?
   exec('php bar.php');
?
php is from sapi/cgi
File bar.php
?
   phpinfo()
?
When executed from web, I got multi bar.php processess..
But executed as: php foo.php, everything works as expected.
What's wrong ?
php compiled with these arguments:
--with-readline
--enable-inline-optimization

Reproduce code:
---
--enable-memory-limit
--enable-safe-mode
--enable-static
--enable-sysvsem
--enable-sysvshm
--enable-trans-sid
--with-exec-dir=/home
--enable-shmop






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


#30340 [NEW]: libphp4.so do not produce

2004-10-06 Thread orlowscy at hotpop dot com
From: orlowscy at hotpop dot com
Operating system: RedHat 7.2
PHP version:  4.3.9
PHP Bug Type: Apache2 related
Bug description:  libphp4.so do not produce

Description:

I have wanted to do upgrade PHP/APACHE on my RH7.2 system to
httpd-2.0.52 and php-4.3.9 with RedHat 7.2.

Did exactly all steps from manualls

- Stopped my old apache.
- configured new one
./configure --prefix=/usr/local/apache \
 --enable-so \
 --enable-cgi \
 --enable-info \
 --enable-rewrite \
 --enable-speling \
 --enable-usertrack \
 --enable-deflate \
 --enable-ssl \
 --enable-mime-magic

Complied installed and run with success new one.
- configured new php:
./configure \
 --with-apxs2=/usr/local/apache/bin/apxs \
 --with-mysql \
 --prefix=/usr/local/apache/php \
 --with-config-file-path=/usr/local/apache/php \
 --enable-force-cgi-redirect \
 --disable-cgi \
 --with-zlib \
 --with-gettext \
 --with-gdbm


 Compiled with options php but unfortunately libphp4.so library was not
created.
 I have tried to compile PHP with smaller number of options
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
but it did not work too (libphp4.so was not produced).
Although php executables was created. But I using php olny to do web
pages.

Please help if you can.
There are not error during compilation, everything seems clean.

Regards
Slawomir



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


#30214 [Opn-Fbk]: OCIFetchInto works, oci_fetch_array, oci_fetch_row, etc. don't

2004-10-06 Thread tony2001
 ID:   30214
 Updated by:   [EMAIL PROTECTED]
 Reported By:  errynp at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Oracle related
 Operating System: XP
 PHP Version:  5.0.1
 New Comment:

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

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

Thank you for your interest in PHP.


How can we reproduce it? What's your OS, Apache version, Oracle
version?


Previous Comments:


[2004-09-23 20:11:38] errynp at gmail dot com

Description:

Using an abstraction layer, a row was being fetched with OCIFetchInto,
which works. Switching to one of the other functions returns nothing.

Reproduce code:
---
$result =
OCIFetchInto($query_id,$result_row,OCI_ASSOC+OCI_RETURN_NULLS); //
returns data

None of these replacements return data:

$result = oci_fetch_assoc($query_id);
$result = oci_fetch_row($query_id);
$result = oci_fetch_array($query_id,OCI_ASSOC+OCI_RETURN_NULLS);
$result = oci_fetch_object($query_id);

Expected result:

The same data that the same SQL and connection returns with
OCIFetchInto.

Actual result:
--
vardump says string(0) = 





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


#30341 [NEW]: globals not available in functions called from preg_replace_callback

2004-10-06 Thread f_nietsje at hotmail dot com
From: f_nietsje at hotmail dot com
Operating system: Win NT
PHP version:  5.0.1
PHP Bug Type: Scripting Engine problem
Bug description:  globals not available in functions called from preg_replace_callback

Description:

I use preg_replace_callback to substitute parts of an expression with
either true or false after which the expression can be evaluated using
eval:

_q1,1,1-2  _q2,3-4,7
should become
true  false
which can be evaluated to false.

The strings represent answers to questions (it's for an interview system)

The problem is that the answers are stored in a global array. The (global)
array can not be read from a function that is called from
preg_replace_callback

It would be nice if somebody can fix this :-)

Reproduce code:
---
function parseqstring($qstring)
{
global $qre;
preg_match_all('/(\d+-\d+|\d+)/', $qstring, $numbers);
$q = array_shift($numbers[0]);
foreach($numbers[0] as $number)
{
//if its a number check the answer
if(is_numeric($number))
{
//if the answer is there return true because it's all 'or'
conditions
if($qre[$q]['answers'][$number]==1)
{
return 'true';
}
}
//if its a range check all the numbers in the range
if(preg_match('/(\d+)-(\d+)/', $number, $match))
{
for($i=$match[1];$i=$match[2];$i++)
{
if($qre[$q]['answers'][$i])
{
return 'true';
}
}
}
}
return 'false';
}




Expected result:

input: 
$qstring = _q1,1,3-4
$qre[1]['answers'][3]
output:
'true'

Actual result:
--
'false'

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


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

2004-10-06 Thread daukan at thelastgate dot com
 ID:   26286
 Comment by:   daukan at thelastgate dot com
 Reported By:  igg10 at alu dot ua dot es
 Status:   No Feedback
 Bug Type: Apache2 related
 Operating System: Windows 2000
 PHP Version:  4.3.4
 New Comment:

winxp pro sp2
apache 2
php 5.0.0

After I change all the bcpow() functions to pow() it hasn't crashed.

example:
if(rand(1,10)+bcpow($pstat,2)  rand(1,8)+bpow($estat,2))
to
if(rand(1,10)+pow($pstat,2)  rand(1,8)+pow($estat,2))


Previous Comments:


[2004-09-26 17:24:25] ordghio at trava dot lv

Two Win2k servers with Apache 2.0.50 and PHP 5.0.2
after function getmicrotime() call - error with this string in
error.log:

Parent: child process exited with status 3221225477 -- Restarting

back to 4.3.9 - all works fine



[2004-09-21 02:29:21] erikp at visibleworld dot com

Problem persists with php 4.3.8 on win2k, apache/2.0.50 and
apache/2.0.51.



[2004-09-16 14:57:11] dmitri at elista dot org

I also ran across this apache crash. The log file record was the same
as in the first message. Here is how it happened. I run apache2 with
php 4.3.2 under windows 2000. The crash itself occured when I made a
request to MSSQL database selecting a field of type DECIMAL(38). As far
as I understand it means a number 38 digits long taking 17 bytes to be
stored. 

PHP's manual says The size of a float is platform-dependent, although
a maximum of ~1.8e308 with a precision of roughly 14 decimal digits is
a common value (that's 64 bit IEEE format). So I figured I could try
to convert the number into a smaller number. And it helped! I rewrote
the SQL request as follows

SELECT CONVERT(DECIMAL(15,2), [Decimal38]) FROM ...

I don't think cutting the number down is such a big deal as it is
extremely seldom that we deal with such bug numbers in the real life.
38 digits or 15 - make no difference :)



[2004-09-05 20:09:00] nuwp at mail dot com

In my case, this happens when I turn off the cookies in Mozilla for the
site I am developing. The PHP scripts then use some classes stored in
$_SESSION[] during the requests. So if the cookies are not allowed,
session does not work, and then the Apache crashes.



[2004-08-30 23:17:11] ajvdhek at dds dot nl

Exact same bug for me... Win XP pro + XAMMP 1.4.6 (Apache/2.0.50
(Win32) mod_ssl/2.0.50 OpenSSL/0.9.7c PHP/5.0.1 MySQL 4.0.20a-nt)



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/26286

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


#30342 [NEW]: localtime not working properly

2004-10-06 Thread ski_sanjay at yahoo dot com
From: ski_sanjay at yahoo dot com
Operating system: RH Linux 9.0
PHP version:  4.3.9
PHP Bug Type: Date/time related
Bug description:  localtime not working properly

Description:

One of the parameters of array returned by the localtime is the daylight
savings flag(tm_isdst). If you change the system time via shell command
and then execute a PHP script which calls localtime() from the browser
(not from shell, this is important), then you will find that localtime is
returning wrong daylight savings flag. Unless one does a hard webserver
restart localtime does not 
reflect the changes.




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


#8711 [Com]: When I call the the ImageTTFText Function I receive a Segmentation Fault

2004-10-06 Thread jason at axsystech dot net
 ID:   8711
 Comment by:   jason at axsystech dot net
 Reported By:  gafain at fineware dot it
 Status:   Closed
 Bug Type: GD related
 Operating System: Linux Mandrake 7.2
 PHP Version:  4.0.4pl1
 New Comment:

I have the same problem.


Previous Comments:


[2001-06-27 22:34:37] [EMAIL PROTECTED]

No feedback. Can't reproduce.




[2001-06-03 06:59:38] [EMAIL PROTECTED]

Please try the latest release candidate:

http://www.php.net/~andi/php-4.0.6RC2.tar.gz

Also, add a FULL example script which can be just copy/pasted and run
to reproduce this. 
Also a GDB backtrace would be useful. Here are intructions
how to generate one:

http://www.php.net/bugs-generating-backtrace.php

--Jani




[2001-01-15 09:12:27] gafain at fineware dot it

  Header(Content-type: image/gif); 
   $dims=ImageTTFBBox($size,0,$fontname,$text);
   $w=$dims[4]+$dims[6];
   $h=-($dims[5]+$dims[3]);
   $im = imagecreate($w,$h);
   $bg = splitColor($background);
   $fg = splitColor($color);
   $back= ImageColorAllocate($im, $bg[0],$bg[1],$bg[2]);
   $fore= ImageColorAllocate($im, $fg[0],$fg[1],$fg[2]);
   ImageFilledRectangle($im,0,0,$w,$h,$back);
   ImageTTFText($im, $size, 0, -1 ,$h-2 , $fore, $fontname,
$text);
   ImageGif($im);
   ImageDestroy($im); 





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


#30337 [Asn]: empty() does not return true on empty objects

2004-10-06 Thread andi
 ID:   30337
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jorma dot tuomainen at softera dot fi
 Status:   Assigned
 Bug Type: Class/Object related
 Operating System: Solaris
 PHP Version:  5.0.1
 Assigned To:  andi
 New Comment:

Does this also happen in zend.ze1_compatibility_mode? This was changed
for non-compatibility mode with the change of moving objects to
handles. As far as the new OO model is concerned objects are always
handles, they are always true and they aren't empty. This is due to
objects being an entity of their own now and not just a different
syntax for accessing an array like structure. Just an example of why
empty() might not make sense with objects is how you'd expect it to
work with private/public/protected members.


Previous Comments:


[2004-10-06 14:28:55] [EMAIL PROTECTED]

Is this true Andi?



[2004-10-06 14:19:26] jorma dot tuomainen at softera dot fi

Description:

Empty() does not return true on empty objects. My 
understanding is that object that does not have methods or 
properties is empty(am I wrong?). 
 
Someone reported same thing on PHP 5 RC2 and it's still 
open w/o comments http://bugs.php.net/bug.php?id=28502 

Reproduce code:
---
?php
class nuthin {
}
$bar=new nuthin;
$foo=new stdClass;
echo empty($bar);
echo empty($foo);
?

Expected result:

11 

Actual result:
--
nothing aka empty page 





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


#30344 [NEW]: Reflection::getModifierNames() returns too long strings

2004-10-06 Thread mail at patrickwitte dot de
From: mail at patrickwitte dot de
Operating system: Gentoo Linux
PHP version:  5.0.2
PHP Bug Type: Zend Engine 2 problem
Bug description:  Reflection::getModifierNames() returns too long strings

Description:

see Summary

Reproduce code:
---
var_dump(Reflection::getModifierNames(1));

Expected result:

array(1) { [0]=  string(6) static }

Actual result:
--
array(1) { [0]=  string(7) static  }
//with character #0 at this point  ^

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


#30345 [NEW]: Unable to access predifined variables as variable variables from functions

2004-10-06 Thread talex_id at o2 dot ru
From: talex_id at o2 dot ru
Operating system: FreeBSD
PHP version:  4.3.8
PHP Bug Type: *General Issues
Bug description:  Unable to access predifined variables as variable variables from 
functions

Description:

PHP allows to use 'variable variables', constructions, like a $$name or
${$name}, where $name is a string. But if i try to access to $GLOBALS from
function using this method ($$name or ${$name}, where $name = 'GLOBALS') i
can't get it until i use its name at least one time into function (or
method) body. It's enouth to add string $GLOBALS; (to 'touch') to make it
visible from $$name construction. Another predifned variables are
unaccessible even if i set some values to them into function body. See
code examples
(http://talex-id.o2.ru/devel/php/bugs/predefined_variables1.php.txt and
http://talex-id.o2.ru/devel/php/bugs/predefined_variables2.php.txt). I
used CLI version of PHP to test them.


Reproduce code:
---
?php
function f1()
{   
echo 'GLOBALS, direct : ' . $GLOBALS . \n;
echo 'GLOBALS, string in {} : ' . ${'GLOBALS'} . \n;
} 
function f2()
{
$g_name = 'GLOBALS';
echo 'GLOBALS, string from variable in {} : ' . ${$g_name} . \n; 
} 
function f3()
{   
$g_name = 'GLOBALS';
$GLOBALS; // Now we just have to touch GLOBALS variable to make it
visible
echo 'GLOBALS, toched, string from variable in {} : ' . ${$g_name} .
\n; 
} 
f1();
echo \n;
f2();
echo \n;
f3();
? 

Expected result:

GLOBALS, direct : Array
GLOBALS, string in {} : Array

GLOBALS, string from variable in {} : Array

GLOBALS, toched, string from variable in {} : Array


Actual result:
--
GLOBALS, direct : Array
GLOBALS, string in {} : Array

GLOBALS, string from variable in {} :

GLOBALS, toched, string from variable in {} : Array


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


#30344 [Opn-Csd]: Reflection::getModifierNames() returns too long strings

2004-10-06 Thread helly
 ID:   30344
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mail at patrickwitte dot de
-Status:   Open
+Status:   Closed
 Bug Type: Zend Engine 2 problem
 Operating System: *
 PHP Version:  5.0.2
 Assigned To:  helly


Previous Comments:


[2004-10-06 22:12:05] mail at patrickwitte dot de

Description:

see Summary

Reproduce code:
---
var_dump(Reflection::getModifierNames(1));

Expected result:

array(1) { [0]=  string(6) static }

Actual result:
--
array(1) { [0]=  string(7) static  }
//with character #0 at this point  ^





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


#30344 [Csd]: Reflection::getModifierNames() returns too long strings

2004-10-06 Thread helly
 ID:   30344
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mail at patrickwitte dot de
 Status:   Closed
 Bug Type: Zend Engine 2 problem
 Operating System: *
 PHP Version:  5.0.2
 Assigned To:  helly
 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-10-06 22:12:05] mail at patrickwitte dot de

Description:

see Summary

Reproduce code:
---
var_dump(Reflection::getModifierNames(1));

Expected result:

array(1) { [0]=  string(6) static }

Actual result:
--
array(1) { [0]=  string(7) static  }
//with character #0 at this point  ^





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


#30346 [NEW]: arrayAcces using $this

2004-10-06 Thread profic at kursknet dot ru
From: profic at kursknet dot ru
Operating system: WinXP
PHP version:  5.0.2
PHP Bug Type: Zend Engine 2 problem
Bug description:  arrayAcces  using $this

Description:

Class inherited of class implemented ArrayAccess have problems with using
$this['some' . $var] = $var . 'str';
if $var passed as method parameter.
Seems this is a memory problem.
Look at the 3 last entries in rtfHelperArray::haStore.

Reproduce code:
---
?php
abstract class rtfHelperArray implements arrayAccess {
private $haStore = array ();

final public function offsetExists ($offset) {
return true;
}

final public function offsetGet ($offset) {
if (array_key_exists ($offset, $this-haStore)) {
return $this-haStore[$offset];
} else {
$temp = NULL;
return $temp;
}
}

final public function offsetSet ($offset, $value) {
$this-haStore[$offset] = $value;
return true;
}

final public function offsetUnset ($offset) {
unset ($this-haStore[$offset]);
return true;
}
}

error_reporting (E_ALL);

class test extends rtfHelperArray {
public function doTest ($idx) {
$this[$idx] = $idx;
echo $idx, ' : ', $this[$idx], \n;
$this[$idx . '-2'] = $idx . '-2';
echo $idx . '-2', ' : ', $this[$idx . '-2'], \n;
$this['3-' . $idx] = $idx . '-333';
echo '3-' . $idx, ' : ', $this['3-' . $idx], \n;
$this['4-' . $idx] = $idx . '-';
echo '4-' . $idx, ' : ', $this['4-' . $idx], \n;
$this['5-' . $idx] = $idx . '-5';
echo '5-' . $idx, ' : ', $this['5-' . $idx], \n;
var_dump ($this);
}
}

$o = new test ();
$o-doTest ('idx');
?

Expected result:

idx : idx
idx-2 : idx-2
3-idx : idx-333
4-idx : idx-
5-idx : idx-5
object(test)#1 (1) {
  [haStore:private]=
  array(5) {
[idx]=
string(3) idx
[idx-2]=
string(5) idx-2
[3-idx]=
string(7) idx-333
[4-idx]=
string(8) idx-
[5-idx]=
string(5) idx-5
  }
}

Actual result:
--
idx : idx
idx-2 : idx-2
3-idx :
4-idx : idx-
5-idx :
object(test)#1 (1) {
  [haStore:private]=
  array(5) {
[idx]=
string(3) idx
[idx-2]=
string(5) idx-2
[idx-3]=
string(7) test  3
[4-idx]=
string(8) idx-
[idx-5]=
string(5) test 
  }
}

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


#30347 [NEW]: ereg_replace() removes the last capital letter

2004-10-06 Thread porost at gazeta dot pl
From: porost at gazeta dot pl
Operating system: Windows XP SP1, Apache/2.0.48
PHP version:  4.3.9
PHP Bug Type: *Regular Expressions
Bug description:  ereg_replace() removes the last capital letter

Description:

I've found out that some combinations of special characters in regular
expressions cause the ereg_replace to cut the last letter in the string,
but only if it is a capital letter.
Here is the code:

?php
 echo ereg_replace('[\+-\.,]$','','MTM') . br;
 echo ereg_replace('[\+-\.,]$','','mtm') . br;
 echo ereg_replace('[\+-\.,]$','','MTm') . br;
 echo ereg_replace('[\+-\.,]$','','mtM') . br;
?

IMHO one should see:

MTM
mtm
MTm
mtM

but in 2 cases, the last (capital) letter is cut out and you see:

MT
mtm
MTm
mt

There is an easy fix for this problem - you just have to change the
regular expression from '[\+-\.,]' to '[-\.\+,]$' and voila - everything
is OK.


Reproduce code:
---
?php
 echo ereg_replace('[-\.\+,]$','','MTM') . br;
 echo ereg_replace('[-\.\+,]$','','mtm') . br;
 echo ereg_replace('[-\.\+,]$','','MTm') . br;
 echo ereg_replace('[-\.\+,]$','','mtM') . br;

 echo ereg_replace('[\+-\.,]$','','MTM') . br;
 echo ereg_replace('[\+-\.,]$','','mtm') . br;
 echo ereg_replace('[\+-\.,]$','','MTm') . br;
 echo ereg_replace('[\+-\.,]$','','mtM') . br;
?

Expected result:

MTM
mtm
MTm
mtM
MTM
mtm
MTm
mtM

Actual result:
--
MTM
mtm
MTm
mtM
MT
mtm
MTm
mt

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


#23526 [Com]: I am using Apache and PHP,Sess files empty...plz read....

2004-10-06 Thread SKJoy2001 at Yahoo dot Com
 ID:   23526
 Comment by:   SKJoy2001 at Yahoo dot Com
 Reported By:  sa dot hassam at ntlworld dot com
 Status:   Bogus
 Bug Type: Session related
 Operating System: WinXP (NTFS Filesystem)
 PHP Version:  4.3.2RC2
 New Comment:

u must use session_name(sessionname) before the session_start()
statement.


Previous Comments:


[2003-05-09 05:22:33] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.

Search the bug db before you submit new report..




[2003-05-07 07:12:16] sa dot hassam at ntlworld dot com

I am hosting an rpg Gaming site, under windows xp (tfs filesystem), and
apache web server (httpd).

I have set up PHP FULLY, and everything works.

The problem is, we use 
session_start();
session_register(user_id);
on our index page (ALL pages are called through this indx page, to
setup variables and configs/includes).

When a user logs in CORRECTLY, t will show the new/updates page and so
on. but when a link is clicked, it says You arent logged in.

this is not a code defect of our own, as the site was fully functional
under red hat Linux webserver at www.flump.net temporarily.

I have included the index page in full and extracts from my current
php.ini file, of which i think are relevant to the issue...

--INDEX.PHP---
?php

session_start();
session_name(user_id);


/* Index.php

* All pages should be called through this page.

* It sets up objects needed and config.

*/



// Register globals and magic_quotes must be on for this script to
work.

if ((strtolower(ini_get('register_globals')) != 1) or
(get_magic_quotes_gpc() != 1)) {

die('bFatal error/bbr /Register globals and magic quotes
imust/i be set to on in php.ini for this script to work.'); 

}



require_once('config.ssl-secure');

if ($config['debug']) $start_time = microtime();

require_once('lib/db.class.ssl-secure');

require_once('lib/user.class.ssl-secure');

require_once('lib/html.ssl-secure');

require_once('lib/recordset.class.ssl-secure');

require_once('lib/misc.ssl-secure');

// Start session-handling

// session_start();

// session_register('user_id');



// Timestamp var

// Note: The array is used in drugmarked to seed a random number
generator

$timestamp = time();

$correct_timestamp_array = getdate(correct_timestamp($timestamp));



// Setup db-object

$db = new db($config['db']['host'], $config['db']['user'],
$config['db']['pass'], $config['db']['db']);



// Define user_groups

define('UC_GROUP_MEMBER', 1);

define('UC_GROUP_POLICE', 2);

define('UC_GROUP_MOD', 3);

define('UC_GROUP_ADMIN', 4);



// Call daily_update.ssl-secure if a new day is breaking.

$last_action_row = $db-row_query(

SELECT max(last_action) as last_action

FROM users

);

$total_last_action_array =
getdate(correct_timestamp($last_action_row['last_action']));

for ($i = $total_last_action_array['yday']; $i 
$correct_timestamp_array['yday']; $i++) {

// Includes the daily_update for as many days that has gone by
since last action.

include('lib/daily_update.ssl-secure');

}



// Login and logout

if ($do_login == 1) {



$user_id = user::login($frm_username, $frm_password);

if ($user_id  0) {

// Success

// When ppl login, they see the news

$p = 'news';

} else {

// Wrong username and password sent.

redirect_page(highlight('Username or password was wrong, please try
again.'), '?p=lost_pass');

exit();

}

} else if ($do_logout == 1) {

user::logout();

// Default page

redirect_page('Thanks for visiting urbanconflict.net.br /Come
back soon!', 'index.php');

exit();

}



// Setup user object if logged in.

if ($user_id  0) {

// set $user_id variable

$user = new user($user_id);



// check banned

if ($user-fields['banned'] == 1) {

user::logout();

// banned message and logout and default page

redirect_page('You have been BANNED from our sitebr /Contact us
via e-mail found on Game Rules!', '?p=tos');

exit();

}

// carry on with the set update last_action arrays



/* This is now moved to daily_update.php... Keep the code in case
the var is used someplace else.

$last_action_array =
getdate(correct_timestamp($user-fields['last_action']));

if (($last_action_array['mday'] != $correct_timestamp_array['mday'])
or ($last_action_array['mon'] != $correct_timestamp_array['mon'])) {

// It's 

#27711 [Com]: implicit garbage collector for sessions in PHP

2004-10-06 Thread SKJoy2001 at Yahoo dot Com
 ID:   27711
 Comment by:   SKJoy2001 at Yahoo dot Com
 Reported By:  mazsolt at yahoo dot com
 Status:   No Feedback
 Bug Type: Session related
 Operating System: win32 + iis 6.0
 PHP Version:  4.3.4
 New Comment:

well, though the issue is very old, but as I could discover what really
happens right now, i am posting.

this trouble is not a windows issue, but a PHP issue. it happens for
the way GC is implemented in PHP.

when a request is made, PHP doesn't really check for the session time
out for the requested session. instead, PHP checks the other sessions
for time out  deletes the files if the session associated to that file
is timed out.

so, your session will never be timed out, until another session request
comes to PHP after the amount of time your session is suppose to time
out.

this is not an issue any developer can solve, but this has to be solved
by PHP itself (if you really find it a trouble like me, there are logics
in favoure  against regarding what PHP does now). it's much like a
trigger that fires to some wrong target.


Previous Comments:


[2004-04-12 17:56:24] [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.





[2004-04-07 10:56:54] [EMAIL PROTECTED]

Everything and anything can affect it when speaking of windows..so make
it have ALL rights on the files..




[2004-04-07 09:22:20] mazsolt at yahoo dot com

all the session files are placed in the ./tmp directory, which is a
folder all of the current virtual directories.
the owner is IUSER_pcname for all. it has all rights, except change
rights. I don't think this affects the gc



[2004-04-07 08:58:05] [EMAIL PROTECTED]

Are you sure the file permissions / owners are the same..?
(this worked fine with latest CVS in Linux, WHEN I ran the script as
root :) So try the latest STABLE snapshot too.





[2004-03-30 02:51:10] mazsolt at yahoo dot com

operating system: windows 2003 (ntfs). 
I've read in the documentation, that older filesystems cannot keep
track the modify time, and the garbage collector is checking the modify
time, not the last access time. 

all three functions: 
 - filectime()
 - fileatime()
 - filemtime()
 seems to work correctly.

I believe that the problem is elsewhere. Couldn't it be , that GC
simply doesn't work on windows' systems???
I repeat, when I wrote my own session_handler, the gc was executed
after the open  read functions, but before the write  close
functions. I tested this very easy, putting an echo function_name in
each of them. but the implicit gc doesn't move anything



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

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


#30218 [Fbk-NoF]: xsltApplyOneTeplate warning c'se nbsp;

2004-10-06 Thread php-bugs
 ID:   30218
 Updated by:   [EMAIL PROTECTED]
 Reported By:  robert dot dahlin at jerntorget dot se
-Status:   Feedback
+Status:   No Feedback
 Bug Type: XSLT related
 Operating System: Linux Slackware 2.6
 PHP Version:  5.0.1
 New Comment:

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.


Previous Comments:


[2004-09-29 18:03:02] [EMAIL PROTECTED]

Currently can't reproduce that, can you please upgrade to a recent
libxml2/libxslt version and see if the problem persists?



[2004-09-28 11:06:47] robert dot dahlin at jerntorget dot se

XML and XSL example.

The same thing happens when i use for example raquo; but if 
spanraquo;/span it does not appear either. If i wan't it to be 
visible i have to use #187; instead, but that's not OK.

Here is an example that does not work for me, I just get the following

warnings.

Warning: xsltApplyOneTemplate: apply-templates was not compiled in 
xsltest.php on line 20

Warning: xsltApplyOneTemplate: apply-templates was not compiled in 
xsltest.php on line 20

//Robert Dahlin

---

XML:
-
?xml version=1.0 encoding=UTF-8?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;[ !ENTITY nbsp 
#160;]
document
data
sessid/sessid
oid/oid
object type=html id=12345
pageOID=4![CDATA[TESTSTRING]]/object
/data
/document
-
XSL:
-
!DOCTYPE wasp [
!ENTITY lt #38;#60;
!ENTITY gt #62;
!ENTITY amp#38;#38;
!ENTITY apos   #39;
!ENTITY quot   #34;
!ENTITY nbsp   #32;
!ENTITY raquo  #187;
!ENTITY deg#176;
!ENTITY space   
]

xsl:stylesheet  version=1.0 
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xsl:include href='/www/xsl-includes/menu.xsl'/
xsl:template match=/
xsl:apply-templates select=document/
 /xsl:template
 xsl:template match=document
 html
xsl:apply-templates select=data/
 /html
 /xsl:template

xsl:template match=data
 body bgcolor=#FF marginwidth= topmargin=
marginheight= 
leftmargin= 
table border=0 background= width=100% cellspacing=0 
cellpadding=0
trtd style=raquo;xsl:apply-templates
select=object//td/tr
trtd style=nbsp;xsl:apply-templates
select=object//td/tr
/table
/body
/xsl:template
/xsl:stylesheet
-



[2004-09-24 14:24:36] [EMAIL PROTECTED]

Can you please provide a full XSLT and XML example and did you declare
the nbsp; entity?



[2004-09-24 13:13:45] robert dot dahlin at jerntorget dot se

Version info from phpifo() just in case.

Zend Engine v2.0.1
Zend Extension Manager v1.0.2
---
xml
XML Support  active  
XML Namespace Support  active  
libxml2 Version  2.5.11  
---
xsl
XSL  enabled  
libxslt Version  1.0.33  
libxslt compiled against libxml Version  2.5.11  
EXSLT  enabled  
libexslt Version  1.0.33  
---



[2004-09-24 13:10:08] robert dot dahlin at jerntorget dot se

Description:

xsltApplyOneTemplate is always shown if i have an nbsp; followed by
for example xsl:if test=object in an xsl file.

xsltApplyOneTemplate: if was not compiled in (if can for example be
apply-template or some other method), i've found that the problem seems
to be an nbsp; directly before the xsl:if or what ever method is
causing the problem.

One way to get thru the problem is to use span tags around nbsp;  like
: spannbsp;/span but I don't think that it should be nessesary to
do that.


Reproduce code:
---
  tdnbsp;xsl:apply-templates select=object//td

Expected result:

td(the value of object in xml)/td


Actual result:
--
Warning: xsltApplyOneTemplate: if was not compiled in
/www/include/xslttest.php on line 19
td(the value of object in xml)/td






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


#30208 [Fbk-NoF]: Strange Notice when trying to define the same constant twice

2004-10-06 Thread php-bugs
 ID:   30208
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: Slackware Linux
 PHP Version:  4.3.8
 New Comment:

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.


Previous Comments:


[2004-09-28 22:49:32] [EMAIL PROTECTED]

I can not reproduce with latest CVS. And what might have been your
configure line?? With --enable-debug or not? Some wierd optimizations
set for gcc?? etc. etc.. (People with @php.net addresses REALLY should
know better to send better bug reports..)




[2004-09-23 15:53:22] [EMAIL PROTECTED]

Description:

Redefining a constant in a required file produces a strange Notice.
This occurs on Commandline and Modul (both 4.3.8)

Reproduce code:
---
File main.php:
?PHP
error_reporting( E_ALL );
define( 'FOO', 'MAIN' );
require_once( './sub.php' );
echo FOO;
?

File sub.php:
?PHP
define( 'FOO', 'SUB' );
?

Expected result:

I would expect the Notice to complain about redefining FOO, not some
weird chars.

Actual result:
--
Executing main.php (Commandline or Modul) I get ouptut like:

Notice: Constant ;[EMAIL PROTECTED] already defined in [...]/sub.php on line 2
MAIN

The weird chars for the constant name differ.






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


#30347 [Opn-Bgs]: ereg_replace() removes the last capital letter

2004-10-06 Thread iliaa
 ID:   30347
 Updated by:   [EMAIL PROTECTED]
 Reported By:  porost at gazeta dot pl
-Status:   Open
+Status:   Bogus
 Bug Type: *Regular Expressions
 Operating System: Windows XP SP1, Apache/2.0.48
 PHP Version:  4.3.9
 New Comment:

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

Read documentation.


Previous Comments:


[2004-10-07 00:12:06] porost at gazeta dot pl

Description:

I've found out that some combinations of special characters in regular
expressions cause the ereg_replace to cut the last letter in the
string, but only if it is a capital letter.
Here is the code:

?php
 echo ereg_replace('[\+-\.,]$','','MTM') . br;
 echo ereg_replace('[\+-\.,]$','','mtm') . br;
 echo ereg_replace('[\+-\.,]$','','MTm') . br;
 echo ereg_replace('[\+-\.,]$','','mtM') . br;
?

IMHO one should see:

MTM
mtm
MTm
mtM

but in 2 cases, the last (capital) letter is cut out and you see:

MT
mtm
MTm
mt

There is an easy fix for this problem - you just have to change the
regular expression from '[\+-\.,]' to '[-\.\+,]$' and voila -
everything is OK.


Reproduce code:
---
?php
 echo ereg_replace('[-\.\+,]$','','MTM') . br;
 echo ereg_replace('[-\.\+,]$','','mtm') . br;
 echo ereg_replace('[-\.\+,]$','','MTm') . br;
 echo ereg_replace('[-\.\+,]$','','mtM') . br;

 echo ereg_replace('[\+-\.,]$','','MTM') . br;
 echo ereg_replace('[\+-\.,]$','','mtm') . br;
 echo ereg_replace('[\+-\.,]$','','MTm') . br;
 echo ereg_replace('[\+-\.,]$','','mtM') . br;
?

Expected result:

MTM
mtm
MTm
mtM
MTM
mtm
MTm
mtM

Actual result:
--
MTM
mtm
MTm
mtM
MT
mtm
MTm
mt





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


#30333 [Opn-Fbk]: fscanf() and() not working correctly with other then English language

2004-10-06 Thread iliaa
 ID:   30333
 Updated by:   [EMAIL PROTECTED]
 Reported By:  altuhov at nm dot ru
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: WinXP SP2
 PHP Version:  5.1.0-dev
 New Comment:

If the system using russian locale?


Previous Comments:


[2004-10-06 14:35:59] altuhov at nm dot ru

I have installed new version, but, bug is steel present.
sample script: http://altuhov.nm.ru/tt.zip



[2004-10-06 10:02:21] [EMAIL PROTECTED]

Btw, your example works perfectly for me (PHP 4.3.10-dev, 5.0.3-dev,
5.1-dev, Linux, locale ru_RU.koi8r).



[2004-10-06 08:54:36] [EMAIL PROTECTED]

This example is useles, as we don't know which encoding you are using.
Please put this script in a zip file and provide the link to it in this
bugreport.



[2004-10-06 05:05:56] altuhov at nm dot ru

Description:

Functions fscanf() and sscanf() is not working correctly with other
then English language in the handle.

In my example was used Russian language.

Reproduce code:
---
?php 
$cont=Ïðîâåðêà Òåñòèðóþ ÎäèíÄâàÒðè;
// get author info and generate DocBook entry 
$n = sscanf($cont,%s %s %s); 
print_r($n);
?

Expected result:

Array ( [0] = Ïðîâåðêà [1] = Òåñòèðóþ [2] = ÎäèíÄâàÒðè )

Actual result:
--
Array ( [0] = Ïð [1] = âåð [2] = à )





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


#30326 [Fbk-Opn]: zip_open cannot open file

2004-10-06 Thread adamsbarker at hotmail dot com
 ID:   30326
 User updated by:  adamsbarker at hotmail dot com
 Reported By:  adamsbarker at hotmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: ZZiplib Related
 Operating System: Windows XP
 PHP Version:  5.0.2
 New Comment:

This is how i've done it:

- my home directory is D:\home
- both open_zip.php AND abc.zip are in D:\home
- zip_open('D:\home\abc.zip');
  - this works perfectly
- zip_open('abc.zip');
  - has this error:
Warning: zip_open() [function.zip-open]: Cannot open zip archive
abc.zip in D:\home\open_zip.php on line 3
  - echo getcwd(); = produces this:
D:\home


i hope this makes sense :)


Previous Comments:


[2004-10-06 11:22:00] [EMAIL PROTECTED]

it probably means that the working directory is different then you
think it is. What does echo getcwd(); output?



[2004-10-06 11:19:50] adamsbarker at hotmail dot com

yes, both the php and zip files are in the same directory... i
completely removed php and got copies of the latest stable version/PECL
extensions for Windows, but still the same problem... this problem seems
to be running throughout the versions, since i first noticed it a couple
of months ago.



[2004-10-06 01:17:29] [EMAIL PROTECTED]

Is the script being ran from the same directory as the one where the
zip file is?



[2004-10-05 02:45:02] adamsbarker at hotmail dot com

Description:

when using the following code:

zip_open('file_name.zip');

i get the following error:


Warning: zip_open() [function.zip-open]: Cannot open zip archive
file_name.zip in C:\test.php on line 1


the zip file and php script are in the same directory

when i put in the full directory of the zip file, such as
C:\file_name.zip, the file is opened and everything works as
expected.
i don't think this should be how it works as all other functions (ie,
include()) don't need the full directory!

i am using the latest stable version 5.0.3-dev and PECL extensions






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


#30335 [Opn-Ver]: fgetcsv + foreign characters

2004-10-06 Thread iliaa
 ID:   30335
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gruszczol1 at poczta dot onet dot pl
-Status:   Open
+Status:   Verified
 Bug Type: Filesystem function related
 Operating System: linux
 PHP Version:  5.0.2
 New Comment:

Specific to 5.X


Previous Comments:


[2004-10-06 11:40:37] gruszczol1 at poczta dot onet dot pl

It was tested with iso-8859-2 and windows-1250 text file.
http://republika.pl/gruszczol1/fgetcsv_bug_example.tgz



[2004-10-06 10:32:21] [EMAIL PROTECTED]

This example is useles, as we don't know which encoding you are using.
Please put this script in a zip file and provide the link to it in this
bugreport.




[2004-10-06 10:29:45] gruszczol1 at poczta dot onet dot pl

Description:

fgetcsv() doesn't read foreign chracters which are on the beginning of
the field.
Similar bug in http://bugs.php.net/bug.php?id=10896 but it has status
closed.

Reproduce code:
---
File contains:
±abc|¶abc|¿abc¿

Example code:
$aqq=fgetcsv($fp, 4000, |);
echo $aqq[0].$aqq[1].$aqq[2];


Expected result:

Expected result:
±abc¶abc¿abc¿

Actual result:
--
Actual result:
abcabcabc¿





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


#30347 [Bgs]: ereg_replace() removes the last capital letter

2004-10-06 Thread porost at gazeta dot pl
 ID:   30347
 User updated by:  porost at gazeta dot pl
 Reported By:  porost at gazeta dot pl
 Status:   Bogus
 Bug Type: *Regular Expressions
 Operating System: Windows XP SP1, Apache/2.0.48
 PHP Version:  4.3.9
 New Comment:

I must have been looking at this code with the back-side of my head not
to see the - in the regexp. I'm ashamed :(.

The broken regexp code has been taken from one of the open source CMS
systems (Typo3 - it is eating the last capital letter when using its
search function) so at least I'm only 99% responsible for posting this
stupid mistake ;). Once again - sorry for taking your time.


Previous Comments:


[2004-10-07 01:11:09] [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

Read documentation.



[2004-10-07 00:12:06] porost at gazeta dot pl

Description:

I've found out that some combinations of special characters in regular
expressions cause the ereg_replace to cut the last letter in the
string, but only if it is a capital letter.
Here is the code:

?php
 echo ereg_replace('[\+-\.,]$','','MTM') . br;
 echo ereg_replace('[\+-\.,]$','','mtm') . br;
 echo ereg_replace('[\+-\.,]$','','MTm') . br;
 echo ereg_replace('[\+-\.,]$','','mtM') . br;
?

IMHO one should see:

MTM
mtm
MTm
mtM

but in 2 cases, the last (capital) letter is cut out and you see:

MT
mtm
MTm
mt

There is an easy fix for this problem - you just have to change the
regular expression from '[\+-\.,]' to '[-\.\+,]$' and voila -
everything is OK.


Reproduce code:
---
?php
 echo ereg_replace('[-\.\+,]$','','MTM') . br;
 echo ereg_replace('[-\.\+,]$','','mtm') . br;
 echo ereg_replace('[-\.\+,]$','','MTm') . br;
 echo ereg_replace('[-\.\+,]$','','mtM') . br;

 echo ereg_replace('[\+-\.,]$','','MTM') . br;
 echo ereg_replace('[\+-\.,]$','','mtm') . br;
 echo ereg_replace('[\+-\.,]$','','MTm') . br;
 echo ereg_replace('[\+-\.,]$','','mtM') . br;
?

Expected result:

MTM
mtm
MTm
mtM
MTM
mtm
MTm
mtM

Actual result:
--
MTM
mtm
MTm
mtM
MT
mtm
MTm
mt





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


#29878 [Bgs]: ImageCreateFromJpeg returns 'not a valid jpeg file'

2004-10-06 Thread cyleriggs at kc dot rr dot com
 ID:   29878
 User updated by:  cyleriggs at kc dot rr dot com
 Reported By:  cyleriggs at kc dot rr dot com
 Status:   Bogus
 Bug Type: GD related
 Operating System: Linux 2.6.8.1
 PHP Version:  5.0.1
 Assigned To:  pajoye
 New Comment:

Okay, so how about a feature suggestion than, i think that there should
be the option in GD that allows you to try and open images that have a
few corrupted bytes. If other programs can open them just fine what
would be the harm in allowing programmers to choose to live with the
corruptions?


Previous Comments:


[2004-10-05 09:33:47] [EMAIL PROTECTED]

PHP only reads non-coprrupted files - there is no bug here.



[2004-10-05 04:34:39] cyleriggs at kc dot rr dot com

After playing around with the images themselves i have found that
converting them from jpeg to png then back to jpeg fixed the problem
and yielded no quality loss. I used the linux tool set called
ImageMagick to do this. I wrote a short perl script to go through all
my images and fix them. Other than this i have found no other way of
stopping this. one interesting fact though is that while converting the
images with the imagemagick utility it complained about some
corruptions, however it was still able to open them fine and convert
them. Maybe PHP is being too picky about the images that it opens as
despite a few corrupted bytes EVERYthing was able to open these images
except for PHP.



[2004-09-30 21:05:50] paul at gslip dot com

I disagree. I have used my code successfully on montypics.com until the
upgrade to php 5.0.1. I now get exactly the same results as the original
poster.
Images that worked fine on previous versions now do not. I have a
sample image that can be provided. I also have code I can share with
the PHP team although I cannot post it here as it is lengthy and
copyrighted.



[2004-08-29 12:22:14] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Your jpeg file is not valid. PHP could not take care of each possible
failures in image files. Desktop softwares could. Fix your image and
replace it.

--Pierre




[2004-08-28 23:00:25] cyleriggs at kc dot rr dot com

Description:

When calling ImageCreateFromJPEG() on a valid jpeg file it fails and i
get errors such as the following in my php error log:

code
[28-Aug-2004 05:21:29] PHP Warning:  imagecreatefromjpeg() [a
href='function.imagecreatefromjpeg'function.imagecreatefromjpeg/a]:
'/usr/local/apache2/htdocs/pictures/Before Dad Went to
Iraq/IMGP0008.JPG' is not a valid JPEG file in
/home/www/pictures/index.php on line 43
/code

however as can be seen through this link the file is a valid jpeg
file:

http://cyle.dyndns.org/pictures/Before Dad Went to Iraq/IMGP0008.JPG

Also i have a memory_limit of 25mb so this cannot be the issue.

Something that might help:
http://cyle.dyndns.org/phpinfo.php

I am writing this code for a picture gallery browser, while most
pictures load, about 10% of my pictures cannot be opened through
ImageCreateFromJpeg(), however it is always the same pictures that
cannot be opened. The only trend i can see is that this does not appear
to be happening on small jpegs.

The page that I am having problems with is
http://cyle.dyndns.org/pictures/index.php.  The source code for this is
at http://cyle.dyndns.org/pictures/index.phps.

Expected result:

The image would be loaded and code continue to execute and i get the
error message described above.

Actual result:
--
Sometimes images load sometimes images cannot be opened.





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


#30348 [NEW]: GD imagegif temp files not removed

2004-10-06 Thread phpsupport at shopandlearn dot net
From: phpsupport at shopandlearn dot net
Operating system: Windows XP with SP2
PHP version:  5.0.2
PHP Bug Type: GD related
Bug description:  GD imagegif temp files not removed

Description:

After using the script included with this report, I find temp files in my
root directory with names in hexidecimal numbers. (examples: 137.tmp and
13A.tmp) I renamed one file from 137.tmp to 137.gif and it displayed as
the same image that the script created.

I found that if I remeove the line containing imagegif() from the script,
I do not get the unwanted temp files.

I also found that if I output as imagegif() or imagejpeg(), I don't get
the unwanted temp files.

This leads me to believe that the problem is in the imagegif() function.


My Computer is:
Windows XP with Service Pack 2
MB: Intel D850GB
Processor: Intel P4 1.6GHZ
RAM: 512 MB

Apache 2.0.52
PHP 5.0.2 with php_gd2.dll (5.0.2.2)  php_mysql.dll


Reproduce code:
---
?php
# This function creates an image of a number
# Tested using PHP 5.0.2 and the included GD2 dll
header (Content-type: image/gif); 
$font = 3;
$number = $_REQUEST['no'];
$width = (strlen($number) * 8)+1; # Make counter only as wide as input
$im = @imagecreate($width, 16)  # ($width, $height)
 or die(Cannot Initialize new GD image stream);
$background_color = imagecolorallocate($im, 0, 0, 0);
$text_color = imagecolorallocate($im, 255, 255, 255); # ($image, $r, $g,
$b)
$line_color = imagecolorallocate($im, 200, 200, 200); # ($image, $r, $g,
$b)
for ($x=8;$x($width-5);$x+=7){ # draw vertical lines between numbers (for
counter reel effect)
  imageline($im, $x, 0, $x, 20, $line_color);
}
imagestring($im, $font, 2, 1,  $number, $text_color);# ($image,
$font, $x, $y, $color)
imagegif($im);
imagedestroy($im);
?

Expected result:

I expect it to execute and show an image in the browser. I also expect the
script to delete any tempory files it creates.

Actual result:
--
The script does what is expected with the exception of leaving the
unwanted temp files.

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


#30349 [NEW]: MySQL returning false result array when using large query

2004-10-06 Thread cgroen at xs4all dot nl
From: cgroen at xs4all dot nl
Operating system: Linux (Debian Sarge)
PHP version:  5.0.2
PHP Bug Type: MySQL related
Bug description:  MySQL returning false result array when using large query

Description:

Mysql version: 4.1.4-gamma-standard-log
PHP version: 5.0.2
PHP config: /configure --with-apxs=/usr/bin/apxs
--with-mysqli=/usr/bin/mysql_config
--with-oci8=/usr/local/oracle/product/8.1.7 --with-config-file-path=/etc

I have built a PHP program that automatically builds very complex queries
and parses them.. Up until version 5.0.1 of PHP, everything worked fine
but since I installed 5.0.2 everything falls apart.. 
When running a very big/complex query, somehow the result array gets
mangled.. It contains index numbers that where never in the query to begin
with (like in the query below, it returns indexes ranging from 1 till 565)
and index numbers that should have values don't..
This is the case with both MySQL and MySQLi.. Like I said, everything
worked fine with PHP 5.0.1, it's just 5.0.2 that has this problem..

When running the query in MySQL client everything goes well and the right
values are assigned to the right columns..

Hope I made the problem clear..
Regards,
Carlos


Reproduce code:
---
http://www.gris.nl/code.html

Expected result:

An associative array with the column numbers specified in the query as
index keys for the appropriate values..

Actual result:
--
An array with non existing keys (in the query) and with keys that point to
the wrong column's result..

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


#30209 [Com]: ReflectionClass::getMethod() lowercases attribute

2004-10-06 Thread sohu119 at sohu dot com
 ID:   30209
 Comment by:   sohu119 at sohu dot com
 Reported By:  sb at sebastian-bergmann dot de
 Status:   Closed
 Bug Type: Zend Engine 2 problem
 Operating System: *
 PHP Version:  5.0.1
 Assigned To:  helly
 New Comment:

111


Previous Comments:


[2004-09-23 21:04:51] [EMAIL PROTECTED]

This bug has been fixed in CVS.

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





[2004-09-23 16:26:55] sb at sebastian-bergmann dot de

Description:

Calling getMethod() on a ReflectionClass object for the current object
lowercases the contents of the variable that is passed to it.

Hardcoding the getMethod() parameter prevents the lowercasing while
copying the value from $this-name to $name and passing that to
getMethod() does not.

Reproduce code:
---
?php
class Foo {
private $name = 'testBar';
 
public function testBar() {
try {
   $class  = new ReflectionClass($this);
   var_dump($this);
   $method = $class-getMethod($this-name);
   var_dump($this);
}
 
catch (Exception $e) {}
}
}

$foo = new Foo;
$foo-testBar();
?


Expected result:

object(Foo)#1 (1) {
  [name:private]=
  string(7) testBar
}
object(Foo)#1 (1) {
  [name:private]=
  string(7) testBar
}

Actual result:
--
object(Foo)#1 (1) {
  [name:private]=
  string(7) testBar
}
object(Foo)#1 (1) {
  [name:private]=
  string(7) testbar
}





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


#30350 [NEW]: Returning reference to array element produces strange result

2004-10-06 Thread colin at encode dot net dot au
From: colin at encode dot net dot au
Operating system: Windows XP Pro SP2
PHP version:  5.0.2
PHP Bug Type: Arrays related
Bug description:  Returning reference to array element produces strange result

Description:

I'm not entirely sure if this is a bug or not, but it seems very odd
nonetheless.  I have an array of attributes as a protected class property,
and some simple functions to manipulate this array:

?php

class Test
{
   protected $attributes;

   public function __construct()
   {
  $this-attributes = array();
   }

   public function setAttribute($name=null,$value=null)
   {
  $this-attributes[$name] = $value;
   }

   public function getAttribute($name=null)
   {
  return $this-attributes[$name];
   }
}

$test = new Test();

$test-setAttribute('foo','bar');
$test-setAttribute('omg','bbq');

echo $test-getAttribute('foo');
echo $test-getAttribute('eep');

print_r($test);

?

Upon executing this code we should define two elements in the attributes
array, show the output of one, then generate a notice error because the
index 'eep' does not exist, and then receive a dump of the $test object,
which should look like this:

Test Object
(
[attributes:protected] = Array
(
[foo] = bar
[omg] = bbq
)

)

This is all fine and to be expected.  Now typically with code like this in
PHP4, I would have used an ampersand in front of the getAttribute function
definition to allow a reference to an attribute array element to be
returned.  To my understanding only objects are *always* passed around by
reference in PHP5, everything else is still copied (though I may be
wrong), so that would seem to imply to me that we still need the ampersand
to allow a reference to be returned.  So let's see what happens when we put
an ampersand in front of the getAttribute function definition above, like
so:

public function getAttribute($name=null)
{
   return $this-attributes[$name];
}

Ok, upon execution now, I receive *no* notice error that the index 'eep'
does not exist - instead, a new null element is added to the array mapped
to the key 'eep'.  The print_r($test) now shows:

Test Object
(
[attributes:protected] = Array
(
[foo] = bar
[omg] = bbq
[eep] = 
)

)

What gives?  Am I doing something really stupid?  I don't understand this.


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


#30349 [Opn-Csd]: MySQL returning false result array when using large query

2004-10-06 Thread cgroen at xs4all dot nl
 ID:   30349
 User updated by:  cgroen at xs4all dot nl
 Reported By:  cgroen at xs4all dot nl
-Status:   Open
+Status:   Closed
 Bug Type: MySQL related
 Operating System: Linux (Debian Sarge)
 PHP Version:  5.0.2
 New Comment:

Guess it's not a bug.. Started thinking about it and looked up the
mysql_fetch_array description.. 
The lower index numbers are the indexes the function adds
(mysql_fetch_array returns an array with both associative and numbered
keys)..

What still remains is the question why PHP versions prior to 5.0.2
didn't have a problem with this ? Somehow 5.0.2 implements the
mysql_fetch_array function different from it's predecessors..


Previous Comments:


[2004-10-07 05:17:28] cgroen at xs4all dot nl

Description:

Mysql version: 4.1.4-gamma-standard-log
PHP version: 5.0.2
PHP config: /configure --with-apxs=/usr/bin/apxs
--with-mysqli=/usr/bin/mysql_config
--with-oci8=/usr/local/oracle/product/8.1.7
--with-config-file-path=/etc

I have built a PHP program that automatically builds very complex
queries and parses them.. Up until version 5.0.1 of PHP, everything
worked fine but since I installed 5.0.2 everything falls apart.. 
When running a very big/complex query, somehow the result array gets
mangled.. It contains index numbers that where never in the query to
begin with (like in the query below, it returns indexes ranging from 1
till 565) and index numbers that should have values don't..
This is the case with both MySQL and MySQLi.. Like I said, everything
worked fine with PHP 5.0.1, it's just 5.0.2 that has this problem..

When running the query in MySQL client everything goes well and the
right values are assigned to the right columns..

Hope I made the problem clear..
Regards,
Carlos


Reproduce code:
---
http://www.gris.nl/code.html

Expected result:

An associative array with the column numbers specified in the query as
index keys for the appropriate values..

Actual result:
--
An array with non existing keys (in the query) and with keys that point
to the wrong column's result..





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


#30349 [Csd-Bgs]: MySQL returning false result array when using large query

2004-10-06 Thread georg
 ID:   30349
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cgroen at xs4all dot nl
-Status:   Closed
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: Linux (Debian Sarge)
 PHP Version:  5.0.2
 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

Don't use numeric column aliases when you use mysql_fetch_assoc with
MYSQL_BOTH. These aliases will override numeric indexes (or vice versa)
in your array.


Previous Comments:


[2004-10-07 05:40:59] cgroen at xs4all dot nl

Guess it's not a bug.. Started thinking about it and looked up the
mysql_fetch_array description.. 
The lower index numbers are the indexes the function adds
(mysql_fetch_array returns an array with both associative and numbered
keys)..

What still remains is the question why PHP versions prior to 5.0.2
didn't have a problem with this ? Somehow 5.0.2 implements the
mysql_fetch_array function different from it's predecessors..



[2004-10-07 05:17:28] cgroen at xs4all dot nl

Description:

Mysql version: 4.1.4-gamma-standard-log
PHP version: 5.0.2
PHP config: /configure --with-apxs=/usr/bin/apxs
--with-mysqli=/usr/bin/mysql_config
--with-oci8=/usr/local/oracle/product/8.1.7
--with-config-file-path=/etc

I have built a PHP program that automatically builds very complex
queries and parses them.. Up until version 5.0.1 of PHP, everything
worked fine but since I installed 5.0.2 everything falls apart.. 
When running a very big/complex query, somehow the result array gets
mangled.. It contains index numbers that where never in the query to
begin with (like in the query below, it returns indexes ranging from 1
till 565) and index numbers that should have values don't..
This is the case with both MySQL and MySQLi.. Like I said, everything
worked fine with PHP 5.0.1, it's just 5.0.2 that has this problem..

When running the query in MySQL client everything goes well and the
right values are assigned to the right columns..

Hope I made the problem clear..
Regards,
Carlos


Reproduce code:
---
http://www.gris.nl/code.html

Expected result:

An associative array with the column numbers specified in the query as
index keys for the appropriate values..

Actual result:
--
An array with non existing keys (in the query) and with keys that point
to the wrong column's result..





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


#30350 [Opn-Bgs]: Returning reference to array element produces strange result

2004-10-06 Thread colin at encode dot net dot au
 ID:   30350
 User updated by:  colin at encode dot net dot au
 Reported By:  colin at encode dot net dot au
-Status:   Open
+Status:   Bogus
 Bug Type: Arrays related
 Operating System: Windows XP Pro SP2
 PHP Version:  5.0.2
 New Comment:

Ok, it appears that the element is created because we are attempting to
return a reference to something that does not exist.  Updating status. 
:)


Previous Comments:


[2004-10-07 05:26:07] colin at encode dot net dot au

Description:

I'm not entirely sure if this is a bug or not, but it seems very odd
nonetheless.  I have an array of attributes as a protected class
property, and some simple functions to manipulate this array:

?php

class Test
{
   protected $attributes;

   public function __construct()
   {
  $this-attributes = array();
   }

   public function setAttribute($name=null,$value=null)
   {
  $this-attributes[$name] = $value;
   }

   public function getAttribute($name=null)
   {
  return $this-attributes[$name];
   }
}

$test = new Test();

$test-setAttribute('foo','bar');
$test-setAttribute('omg','bbq');

echo $test-getAttribute('foo');
echo $test-getAttribute('eep');

print_r($test);

?

Upon executing this code we should define two elements in the
attributes array, show the output of one, then generate a notice error
because the index 'eep' does not exist, and then receive a dump of the
$test object, which should look like this:

Test Object
(
[attributes:protected] = Array
(
[foo] = bar
[omg] = bbq
)

)

This is all fine and to be expected.  Now typically with code like this
in PHP4, I would have used an ampersand in front of the getAttribute
function definition to allow a reference to an attribute array element
to be returned.  To my understanding only objects are *always* passed
around by reference in PHP5, everything else is still copied (though I
may be wrong), so that would seem to imply to me that we still need the
ampersand to allow a reference to be returned.  So let's see what
happens when we put an ampersand in front of the getAttribute function
definition above, like so:

public function getAttribute($name=null)
{
   return $this-attributes[$name];
}

Ok, upon execution now, I receive *no* notice error that the index
'eep' does not exist - instead, a new null element is added to the
array mapped to the key 'eep'.  The print_r($test) now shows:

Test Object
(
[attributes:protected] = Array
(
[foo] = bar
[omg] = bbq
[eep] = 
)

)

What gives?  Am I doing something really stupid?  I don't understand
this.






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