#46095 [Opn->Bgs]: avoiding some duplicated code (switch)

2008-09-16 Thread mkoppanen
 ID:   46095
 Updated by:   [EMAIL PROTECTED]
 Reported By:  abdallah at gmx dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Windows XP SP3
 PHP Version:  5.2.6
 New Comment:

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

Thank you for your interest in PHP.

Please read http://php.net/switch with care.


Previous Comments:


[2008-09-16 13:57:54] abdallah at gmx dot com

Description:

I think the switch instruction should allow a nice technique for the
default case:

like this :

Reproduce code:
---
switch ($x):

case 'a':
 //some code (eg. 10 lines)
break;

case 'b':
 //some other code (eg. 10 lines)
break;

case 'n':
 //etc...
break;

// And then what that should be nice

default:
goto case 'a';
break;

endswitch;

Expected result:

Avoid the duplication of the content of case 'A' if we need the default
case to act same case 'A'.






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



#28038 [Com]: Sent incorrect RCPT TO commands to SMTP server

2008-09-16 Thread david at thedatabridge dot com
 ID:   28038
 Comment by:   david at thedatabridge dot com
 Reported By:  jordi at jcanals dot net
 Status:   Open
 Bug Type: Mail related
 Operating System: win32 only
 PHP Version:  5CVS, 6CVS (2008-08-27)
 New Comment:

I had the same problem until I changed the format of my headers.

I had this problem with this style:

"From: Foo Bar <[EMAIL PROTECTED]>"

fixed by using this style:

"From: Foo Bar<[EMAIL PROTECTED]>"

Don't include space between Name and  and you should be ok!

:P


Previous Comments:


[2008-09-11 13:11:19] andreas at pcdaemon dot gr

Yes this worked fine for me.
Thanks



[2008-09-07 08:53:17] renouard_roch at hotmail dot fr

cool



[2008-09-01 12:11:00] anon at anon dot com

Workaround is:

Set the following before calling the mail function:

ini_set('sendmail_from', '[EMAIL PROTECTED]);



[2008-04-17 16:04:39] kmax at live dot com

Issalys, you fix dont work and make no sense.
My suggestion is get some free email class (like XPertMailer) and use
it instead of mail() native function.



[2008-01-13 17:31:36] issalys at hotmail dot com

hi i have de same problem and i fix it in that way:

$headers = "From: " . $fm_snd['from'] . "( Some guy)\n"; 


it work perfect :p by



Hola tuve el mismo problema y lo solucione asi 

$headers = "From: " . $fm_snd['from'] . "( quiern sea)\n"; 


funcionoo :p by



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

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



#46096 [NEW]: SoapClient constructor:'stream_context' key of 'options' parameter is not used

2008-09-16 Thread alberto at edistar dot com
From: alberto at edistar dot com
Operating system: linux Ubuntu (kernel: 2.6.17)
PHP version:  5.2.6
PHP Bug Type: SOAP related
Bug description:  SoapClient constructor:'stream_context' key of 'options' 
parameter is not used

Description:

I need to add an http header to a Soap request using SoapClient class.
The way I found in documentation is using 'stream_context' of '$options'
constructor's parameter. But the class doesn't consider that option, either
in "wsdl" mode and "non wsdl" mode. So the target web service doesn't
receive the added  http header.

Reproduce code:
---
$additionalHeader = array( 'http'=>array('header' => "Token: 123"));
$context = stream_context_create($additionalHeader);
$clientSoap = new SOAPClient('http://yoururl/yourwsdl.wsdl',
array('trace' => 1, 'stream_context' => $context, 'exceptions' =>
false));
$clientSoap->yourMethod($yourParameter);

Expected result:

Target web service receives an http header named 'Token' with value "123"

Actual result:
--
Target web service doesn't receive an http header named 'Token' with value
"123"

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



#46097 [NEW]: rand maxes out after a few calls.

2008-09-16 Thread RQuadling at GMail dot com
From: RQuadling at GMail dot com
Operating system: Windows XP SP3
PHP version:  5.3.0alpha2
PHP Bug Type: Math related
Bug description:  rand maxes out after a few calls.

Description:

Hi.

I was testing an encryption/decryption routine by passing it random
lengths of random data.

I realized that in a very short amount of time, all the strings being
tested were the same length.

I've reduced the string building code to the bare minimum.

Reproduce code:
---
http://bugs.php.net/?id=46097&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=46097&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=46097&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=46097&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46097&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=46097&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=46097&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=46097&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=46097&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=46097&r=support
Expected behavior:http://bugs.php.net/fix.php?id=46097&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=46097&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=46097&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46097&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=46097&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46097&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=46097&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=46097&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=46097&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=46097&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=46097&r=mysqlcfg



#17290 [Com]: Cannot use [] for reading

2008-09-16 Thread naugtur at gmail dot com
 ID:   17290
 Comment by:   naugtur at gmail dot com
 Reported By:  mellow at mellow dot dk
 Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  4.1.2
 New Comment:

I've had the same problem. It reported the error in line 26, but the
line was ok. I often try entering empty lines - it reveals if the error
is somewhere else. The problem with this error is just trying to read
something like this:
$somename[]

if you try:
$this=$thatarray[]; 
without putting something between [] you get this error. 

Everything would be ok if PHP reported it in correct line. Please fix
that! It would save people ages of looking the code through!


Previous Comments:


[2007-07-20 21:56:05] asohn at aircanopy dot net

PHP 4.3.4
I got this error when mistakenly used "return $variable[];" instead of
"return $variable" in a user defined function.



[2006-06-12 13:01:07] Matt_B at TinyOnline dot co dot uk

I've just had the same problem, from changing a variable from global,
to class specific. After some confusion I realised I forgot to remove
the $, just like in your example:

$this->$resultado_array[] should be
$this->resultado_array[]

and then it all works fine.



[2006-04-18 19:03:41] oliver at samera dot com dot py

Seems to be a class related bug, here is a simple test-case:

$resultado_array = array();
}

// abre un archivo y lo carga en memoria
function cache_open() {
$archivo_array = array(array('1'), array('2'), array('3'));
$resultado_array = array();

foreach($archivo_array as $linea) {
$resultado_array[] = $linea;
$this->$resultado_array[] = $linea;
}
}
}

// without a class
$archivo_array = array(array('1'), array('2'), array('3'));
$resultado_array = array();

foreach($archivo_array as $linea) {
$resultado_array[] = $linea;
}

?>



[2006-03-18 21:17:37] 7l9it46r1adm1l1 at jetable dot com

I got the same strange Fatal error (using Windows XP, PHP PHP 5.0.4):
Fatal error: Cannot use [] for reading in ... on line 82

[php]
if ($insert->check($_POST['value']) === FALSE)
{
   $error[] == 'Error'; // line 82
}
[/php]

Zend Developer didn't give any warnings so there shouldn't be any
syntax mistakse in that PHP file.



[2002-08-11 01:00:13] php-bugs at lists dot php dot net

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



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

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



#46084 [Bgs]: PHP needs a source code analyzer

2008-09-16 Thread kevin dot benton at beatport dot com
 ID:   46084
 User updated by:  kevin dot benton at beatport dot com
 Reported By:  kevin dot benton at beatport dot com
 Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  5.2.6
 New Comment:

"your problem does not imply a bug in PHP itself"

I didn't file a bug, I filed a feature / change request.  I'm also not
asking a support question - I want to see an improvement to PHP though I
don't have time to write a PHP SCA myself or I'd have already done it
and contributed it back.  I'm sorry to see that the core team doesn't
see value in taking this on.


Previous Comments:


[2008-09-15 23:50:15] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.

This is no feature to be done by the "core" group of developers, it's
better to be done in userland PHP, there are projects like php under
control or zend code analyzer as part of zend ide or soem other
solutions  or feel free to implement your own (and become famous)



[2008-09-15 17:23:18] kevin dot benton at beatport dot com

Description:

PHP needs a really good source code analyzer to report common problems
in PHP code (i.e. defaulted parameters before required parameters). 
Having such a feature makes it easier for new PHP developers to see
where problematic code may lie, as well as providing some good
best-practices guidelines.

I really like the way perltidy does this for Perl code.  What's really
neat about perltidy is it allows you to help it understand what best
practices you want to enforce and what best practices you want to ignore
or modify.








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



#46098 [NEW]: _Post canot asign a variable , only a fixed string

2008-09-16 Thread eusebiomarques at hotmail dot es
From: eusebiomarques at hotmail dot es
Operating system: centos
PHP version:  5.3.0alpha2
PHP Bug Type: Feature/Change Request
Bug description:  _Post  canot asign a variable , only a fixed string

Description:

the php can not asign the "date_1_fila_".$i  in the _POST argument then i
must to write a lot of code to do this 

Reproduce code:
---



 
 











Expected result:

i spect the result the data in the text field

the php can not asign the "date_1_fila_".$i  in the _POST argument then i
must to write a lot of code to do this 

Actual result:
--
post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=




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



#46098 [Opn->Csd]: _Post canot asign a variable , only a fixed string

2008-09-16 Thread eusebiomarques at hotmail dot es
 ID:   46098
 User updated by:  eusebiomarques at hotmail dot es
 Reported By:  eusebiomarques at hotmail dot es
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: centos
 PHP Version:  5.3.0alpha2
 New Comment:

bad code


Previous Comments:


[2008-09-16 18:15:29] eusebiomarques at hotmail dot es

Description:

the php can not asign the "date_1_fila_".$i  in the _POST argument then
i must to write a lot of code to do this 

Reproduce code:
---



 
 











Expected result:

i spect the result the data in the text field

the php can not asign the "date_1_fila_".$i  in the _POST argument then
i must to write a lot of code to do this 

Actual result:
--
post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=








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



#46099 [NEW]: Xsltprocessor::setProfiling - memory leak

2008-09-16 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: 
PHP version:  5.3CVS-2008-09-16 (CVS)
PHP Bug Type: XSLT related
Bug description:  Xsltprocessor::setProfiling - memory leak

Description:

See below.

The intern->profiling isn't freed and not checked when calling
setProfiling() two or more times.

Reproduce code:
---
setProfiling('foo');
$x->setProfiling('foo');


Actual result:
--
Memory leak.

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



#46099 [Opn->Asn]: Xsltprocessor::setProfiling - memory leak

2008-09-16 Thread felipe
 ID:  46099
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
-Status:  Open
+Status:  Assigned
 Bug Type:XSLT related
 PHP Version: 5.3CVS-2008-09-16 (CVS)
-Assigned To: 
+Assigned To: rrichards
 New Comment:

A probable fix:
http://felipe.ath.cx/diff/bug46099.diff



Previous Comments:


[2008-09-16 18:57:42] [EMAIL PROTECTED]

Description:

See below.

The intern->profiling isn't freed and not checked when calling
setProfiling() two or more times.

Reproduce code:
---
setProfiling('foo');
$x->setProfiling('foo');


Actual result:
--
Memory leak.





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



#43402 [Com]: FILTER_VALIDATE_EMAIL is not RFC2822 compliant

2008-09-16 Thread drewish at katherinehouse dot com
 ID:   43402
 Comment by:   drewish at katherinehouse dot com
 Reported By:  nobody at example dot org
 Status:   Open
 Bug Type: Filter related
 Operating System: *
 PHP Version:  5.2.5
 New Comment:

The current code also bounces valid email addresses like
"[EMAIL PROTECTED]". I haven't been able to test out the suggested regex.


Previous Comments:


[2007-11-26 14:23:55] nobody at example dot org

Updated test, php_filter_validate_email() returns string on success.
Surely bool would be a more appropriate return value for a logic filter?


Updated regex above fixes the specific issue I was having, I'm
uncertain about other edge cases ([EMAIL PROTECTED]@example.org)?

--TEST--
Bug 43402, RFC2822 allows chars (?, =) in dot-atoms
--SKIPIF--

--FILE--

--EXPECT--  
bool(true)



[2007-11-26 11:34:19] nobody at example dot org

I may be missing something about the unit tests, following regex update
to php_filter_validate_email() will not pass my test case (after doing
rm ext/filter/tests/*.o ext/filter/tests/*.lo, clearing .out .log .exp
.diff from tests and doing make; make test).

const char regexp[] =
"/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}\\=\\?]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}\\=\\?]+)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\\-])+\\.)+[A-Za-z\\-]+))$/D";

Yet the equivalent regex works as expected in both PHP and my patched
install.

true,
  '[EMAIL PROTECTED]'=>false,
  "!#$%&'*+-/=.?^_`{|[EMAIL PROTECTED]"=>true,
  );

$failed = 0;
$fail = array();

foreach ($test as $k => $v){
  if (!(validate_email($k) === $v)){
$failed++;
$fail[].= $k;
  }
}

if ($failed > 0){
  echo "Failed $failed of ",count($test), " tests using PHP func\n";
  print_r($fail);
}
$failed = 0;
$fail = array();

foreach ($test as $k => $v){
  if (!((bool)filter_var($k, FILTER_VALIDATE_EMAIL) == (bool)$v)){
$failed++;
$fail[].= $k;
  }
}

if ($failed > 0){
  echo "Failed $failed of ",count($test), " tests using filter
func\n";
  print_r($fail);
}



[2007-11-25 23:46:34] nobody at example dot org

--TEST--
RFC2822 conformance for local atoms
--SKIPIF--

--FILE--

--EXPECT--  
bool(true)


# Apologies for bug spam



[2007-11-25 22:22:59] nobody at example dot org

Description:

The regex used in php_filter_validate_email does not permit all valid
atom chars from RFC2822 (eg: ASCII 61, 63). 

Reproduce code:
---
http://bugs.php.net/?id=43402&edit=1



#43402 [Com]: FILTER_VALIDATE_EMAIL is not RFC2822 compliant

2008-09-16 Thread matt at mattfarina dot com
 ID:   43402
 Comment by:   matt at mattfarina dot com
 Reported By:  nobody at example dot org
 Status:   Open
 Bug Type: Filter related
 Operating System: *
 PHP Version:  5.2.5
 New Comment:

Please correct me if I'm wrong but isn't localhost an alias and RFC
2822 requires a fully qualified domain name or IP address. That would be
the issue with [EMAIL PROTECTED]


Previous Comments:


[2008-09-16 19:37:41] drewish at katherinehouse dot com

The current code also bounces valid email addresses like
"[EMAIL PROTECTED]". I haven't been able to test out the suggested regex.



[2007-11-26 14:23:55] nobody at example dot org

Updated test, php_filter_validate_email() returns string on success.
Surely bool would be a more appropriate return value for a logic filter?


Updated regex above fixes the specific issue I was having, I'm
uncertain about other edge cases ([EMAIL PROTECTED]@example.org)?

--TEST--
Bug 43402, RFC2822 allows chars (?, =) in dot-atoms
--SKIPIF--

--FILE--

--EXPECT--  
bool(true)



[2007-11-26 11:34:19] nobody at example dot org

I may be missing something about the unit tests, following regex update
to php_filter_validate_email() will not pass my test case (after doing
rm ext/filter/tests/*.o ext/filter/tests/*.lo, clearing .out .log .exp
.diff from tests and doing make; make test).

const char regexp[] =
"/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}\\=\\?]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}\\=\\?]+)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\\-])+\\.)+[A-Za-z\\-]+))$/D";

Yet the equivalent regex works as expected in both PHP and my patched
install.

true,
  '[EMAIL PROTECTED]'=>false,
  "!#$%&'*+-/=.?^_`{|[EMAIL PROTECTED]"=>true,
  );

$failed = 0;
$fail = array();

foreach ($test as $k => $v){
  if (!(validate_email($k) === $v)){
$failed++;
$fail[].= $k;
  }
}

if ($failed > 0){
  echo "Failed $failed of ",count($test), " tests using PHP func\n";
  print_r($fail);
}
$failed = 0;
$fail = array();

foreach ($test as $k => $v){
  if (!((bool)filter_var($k, FILTER_VALIDATE_EMAIL) == (bool)$v)){
$failed++;
$fail[].= $k;
  }
}

if ($failed > 0){
  echo "Failed $failed of ",count($test), " tests using filter
func\n";
  print_r($fail);
}



[2007-11-25 23:46:34] nobody at example dot org

--TEST--
RFC2822 conformance for local atoms
--SKIPIF--

--FILE--

--EXPECT--  
bool(true)


# Apologies for bug spam



[2007-11-25 22:22:59] nobody at example dot org

Description:

The regex used in php_filter_validate_email does not permit all valid
atom chars from RFC2822 (eg: ASCII 61, 63). 

Reproduce code:
---
http://bugs.php.net/?id=43402&edit=1



#42616 [Com]: CLI crashes

2008-09-16 Thread andrew at mercuric dot net
 ID:   42616
 Comment by:   andrew at mercuric dot net
 Reported By:  ashish_chap at yahoo dot co dot in
 Status:   No Feedback
 Bug Type: CGI related
 Operating System: Windows XP
 PHP Version:  5.2.4
 New Comment:

I also have this problem with both 5.2.6 and the latest snapshot on
Windows XP 64-bit. I made sure that everything was deleted before
running the snapshot installer. Neither disabling php_sam nor
php_threads fixed the crash, though it does eliminate the "fatal error"
message.


Previous Comments:


[2008-05-02 23:47:16] uncle_coolj at hotmail dot com

Hey,
i've tried to disable different modules to find out which one causes
the crash.

I've found out that the "php_threads.dll" is the problem.
if you comment out the module it works...

best regards



[2007-10-12 20:51:13] robert2s at hotmail dot com

I solved this in the following way.
In the php.ini file, add a semicolon (;) in front of the line
extension=php_sam.dl



[2007-09-24 00:19:42] mburke at cordovabay dot com

I am having the same problem. The configuration is:
Apache 2.2.4 (Win32)
PHP 5.2.4
MySQL 5.0.45

All php pages result in error 500

error log shows:

PHP Warning:  require_once(SAM/php_sam.php): failed to open stream: No
such file
 or directory in sam_factory on line 1

each time a php page is requested.

Any help would be appreciated!!



[2007-09-21 01:00:00] php-bugs at lists dot php dot net

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



[2007-09-13 10:15:17] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

Something related to this was fixed in CVS, so please try the latest
snapshot.



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

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



#46071 [Fbk->Asn]: finfo_open() segfaults with wrong file name in BSD

2008-09-16 Thread felipe
 ID:   46071
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Assigned
 Bug Type: Filesystem function related
 Operating System: FreeBSD6
 PHP Version:  5.3CVS-2008-09-13 (CVS)
 Assigned To:  derick


Previous Comments:


[2008-09-14 03:27:03] [EMAIL PROTECTED]

Ok, I found the problem.

Index: ext/fileinfo/libmagic/apprentice.c
===
RCS file: /repository/php-src/ext/fileinfo/libmagic/apprentice.c,v
retrieving revision 1.7.2.5
diff -u -p -r1.7.2.5 apprentice.c
--- ext/fileinfo/libmagic/apprentice.c  2 Sep 2008 12:43:24 -  
1.7.2.5
+++ ext/fileinfo/libmagic/apprentice.c  14 Sep 2008 03:23:45 -
@@ -1901,7 +1901,7 @@ internal_loaded:
ptr = (uint32_t *)(void *)*magicp;
if (*ptr != MAGICNO) {
if (swap4(*ptr) != MAGICNO) {
-   file_error(ms, 0, "bad magic in `%s'");
+   file_error(ms, 0, "bad magic in `%s'",
dbname);
goto error1;
}
needsbyteswap = 1;


Derick, can I commit it, or will you?



[2008-09-13 21:49:12] [EMAIL PROTECTED]

I can't reproduce this on Linux.
Looking at the code, it shouldn't even get to that point as it calls
realpath() first and does not continue if the file did resolve right.
This might mean there is a YARWOB (yet another realpath() weirdness on
FreeBSD), but I guess you'll have to figure it out yourself as I don't
have any FBSD machines around.



[2008-09-13 20:30:24] [EMAIL PROTECTED]

Description:

See below.

Reproduce code:
---
Starting program: /usr/home/felipe/php5/sapi/cli/php -r 'print
finfo_open(NULL, PHP_INT_MAX);'
warning: Unable to get location for thread creation breakpoint: generic
error
[New LWP 100130]
[New Thread 0xbad000 (LWP 100130)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xbad000 (LWP 100130)]
0x000801cd2520 in strlen () from /lib/libc.so.6
(gdb) bt
#0  0x000801cd2520 in strlen () from /lib/libc.so.6
#1  0x00672713 in vspprintf (pbuf=0x7fffdb98, max_len=0,
format=0x7fffdc08 "", ap=0x7fffdbd0)
at /usr/home/felipe/php5/main/spprintf.c:564
#2  0x004ba7a3 in file_error_core (ms=0xbd64c8, error=0,
f=0x9713b4 "bad magic in `%s'", va=0x7fffdbd0, lineno=0)
at /usr/home/felipe/php5/ext/fileinfo/libmagic/funcs.c:96
#3  0x004ba904 in file_error (ms=0x400, error=5128,
f=0x7fffdc08 "") at
/usr/home/felipe/php5/ext/fileinfo/libmagic/funcs.c:119
#4  0x004b9127 in apprentice_1 (ms=0xbd64c8, fn=0xbd6610
"/usr/home/felipe/php5/9223372036854775807", action=0, mlist=0xbd6650)
at /usr/home/felipe/php5/ext/fileinfo/libmagic/apprentice.c:1904
#5  0x004b926d in file_apprentice (ms=0xbd64c8, fn=0x0,
action=0) at
/usr/home/felipe/php5/ext/fileinfo/libmagic/apprentice.c:336
#6  0x004bb078 in magic_load (ms=0xbd64c8, magicfile=0x1408
)
at /usr/home/felipe/php5/ext/fileinfo/libmagic/magic.c:192
#7  0x004b5f3f in zif_finfo_open (ht=1024,
return_value=0xbd5640, return_value_ptr=0x7fffdc08, this_ptr=0x0,
return_value_used=12,
tsrm_ls=0xba4640) at
/usr/home/felipe/php5/ext/fileinfo/fileinfo.c:351
#8  0x006ed5a5 in zend_do_fcall_common_helper_SPEC
(execute_data=0xef5040, tsrm_ls=0xba4640) at zend_vm_execute.h:315
#9  0x006ec792 in execute (op_array=0xbd5d70, tsrm_ls=0xba4640)
at zend_vm_execute.h:104
#10 0x006bb866 in zend_eval_string (str=0xbd5d70
"\004]�", retval_ptr=0x0, string_name=0x0, tsrm_ls=0xba4640)
at /usr/home/felipe/php5/Zend/zend_execute_API.c:1118
#11 0x006bba1b in zend_eval_string_ex (str=0x400 , retval_ptr=0x1408,
string_name=0x7fffdc08 "", handle_exceptions=1,
tsrm_ls=0xba4640) at /usr/home/felipe/php5/Zend/zend_execute_API.c:1153
#12 0x0076c00f in main (argc=3, argv=0x7fffe878) at
/usr/home/felipe/php5/sapi/cli/php_cli.c:1219







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



#46082 [Opn->Asn]: [PATCH] stream_set_blocking() can cause a crash in some circumstances

2008-09-16 Thread felipe
 ID:   46082
 Updated by:   [EMAIL PROTECTED]
 Reported By:  shaunspiller at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Streams related
 Operating System: Windows
 PHP Version:  5.2.6
-Assigned To:  
+Assigned To:  pajoye


Previous Comments:


[2008-09-15 00:06:20] [EMAIL PROTECTED]

Probably that will fix the crash:
http://felipe.ath.cx/diff/bug46082.diff (untested)



[2008-09-14 23:19:38] shaunspiller at gmail dot com

Description:

Hello developers!

I found what looks like a reproducible crash in the
stream/sockets/thingy. I think...


Code to reproduce:
--


The var_dumps and echo are not necessary to cause the problem, but just
to show the tracing of the code.


Expected result:

resource(5) of type (stream)
bool(true)
hello


Actual result:
--
resource(5) of type (stream)


...And then the darn thing just implodes -- doesn't even say goodbye,
nevermind hello. If STREAM_SERVER_BIND is specified for the flags to
stream_socket_server() then it works fine.


Tested on all the PHP versions I had installed (using the CLI
interface):
6.0.0-dev (Windows): crashes
5.2.6 (Windows): crashes
5.2.5 (Windows): crashes
5.2.3 (Windows): crashes
5.2.4-2ubuntu5.3 (Linux): no crash (typicial of Linux to be different
huh? :)


Backtrace what-cha-ma-call-it:
--

(This was generated with PHP 5.2.6.)

Thread 0 - System ID 2864
Entry point php!mainCRTStartup 
Create time 2008-09-13 23:00:03 
Time spent in user mode 0 Days 0:0:0.46 
Time spent in kernel mode   0 Days 0:0:0.31 

FunctionArg 1Arg 2 
  Arg 3   Source 
php5ts!xbuf_format_converter+68a00c0f978 102c178d  
  00c0fa04
php5ts!vspprintf+29 00c0f9b0   
  102c178c
php5ts!php_verror+4d 102c169c  
  0002
php5ts!php_error_docref0+23  00f11d10  
  0002
php5ts!php_set_sock_blocking+45  0001  
  00f11d10
php5ts!php_sockop_set_option+121011ee248 0001  
  
php5ts!php_tcp_sockop_set_option+56e011ee248 0001  
  
php5ts!_php_stream_set_option+2c011ee248 0001  
  
php5ts!zif_stream_set_blocking+10c  011e28f8 011ee1a0  
  
php5ts!zend_do_fcall_common_helper_SPEC+7d9 00c0fbd0 00f11d10  
  011ed67f
php5ts!ZEND_DO_FCALL_SPEC_CONST_HANDLER+e5   00f11d10  
  00f11d10
php5ts!execute+1c5  011ed6e0 00f11d10  
  
php5ts!zend_execute_scripts+107 0008 00f11d10  
  
php5ts!php_execute_script+20d   00c0fec8 00f11d10  
  
php!main+c070003 00f11d80  
  00f10c10
php!mainCRTStartup+e3      
  7ffde000
kernel32!IsProcessorFeaturePresent+9e   00402fc2   
  00c1

PHP5TS!XBUF_FORMAT_CONVERTER+68AIn
php__PID__2860__Date__09_13_2008__Time_11_00_07PM__202__Second_Chance_Exception_C005.dmp
the assembly instruction at php5ts!xbuf_format_converter+68a in
c:\Server\php\php5ts.dll from The PHP Group has caused an access
violation exception (0xC005) when trying to read from memory
location 0x2736 on thread 0



(Actually, all I wanted to do was use SSL with the sockets extension.
But it doesn't seem to support that so I switched my program to the
stream_socket functions instead. But that doesn't seem to support raw
sockets, except under stream_socket_pair() (What's the point of that
function anyway? It doesn't let you connect to anything!). So I tried to
use the context/options/params thing to set up a notification function
so I could let stream_sockets notifications be sent directly to the
handler functions while socket_select handles ordinary Berkeley sockets
events, because I need them both, but I couldn't get the notification
thing working at all, so I tried specifying the context directly when
the listener socket was created, and that requires specifying the errno,
errstr, and flags values as well, so I tried that. Well it was a real
rollercoaster. It still didn't call the notifier, but it did crash, and
that's how I found this muddle. If I was clever I would have tried to
fix it myself but I couldn't find out where the actual the problem was.
/end of rant)


Anyway, I figured even though the problem only happens with incorrect
values for the flags parameter, that I should report it anyway, just in
case it's exploitable. I wo

#46100 [NEW]: tidy does not replace fonts with styles

2008-09-16 Thread lukemoynihan at gmail dot com
From: lukemoynihan at gmail dot com
Operating system: windows xp
PHP version:  5.2.6
PHP Bug Type: Unknown/Other Function
Bug description:  tidy does not replace fonts with styles

Description:

when tidy has the 'clean' option set it should convert font tags into css
styles, php's tidy extension does not seem to do this. I found this problem
mentioned in bug #28841 however it is marked as wont fix, i cannot see
problems like this with tools built upon recent versions of libtitdy, has
the issue been fixed since 2004?

Reproduce code:
---

persons name
(occupation)

http://www.example.com/image.jpg"; border=0 name="img name">

some text.


FILTHY;

$tidy = new tidy();
$tidyConfig = array('clean'=>true);
$tidy->parseString($testHtml, $tidyConfig);
$tidy->cleanRepair();
$testHtml = (string)$tidy;

var_dump($testHtml);

Expected result:

Produced from other tools that use libtitdy: (note the style added)



  


 span.c1 {color: #CC9900}

  
  

  

  

persons name
 (occupation)
  
  
http://www.example.com/image.jpg"; border="0"
name="img name" />
  


  
some text.

  

  

  



Actual result:
--
string(589) "







persons name
 (occupation)
http://www.example.com/image.jpg"; border="0" name=
"img name">




some text.






"


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



#46071 [Asn->Csd]: finfo_open() segfaults with wrong file name on BSD

2008-09-16 Thread felipe
 ID:   46071
 Updated by:   [EMAIL PROTECTED]
-Summary:  finfo_open() segfaults with wrong file name in BSD
 Reported By:  [EMAIL PROTECTED]
-Status:   Assigned
+Status:   Closed
 Bug Type: Filesystem function related
 Operating System: FreeBSD6
 PHP Version:  5.3CVS-2008-09-13 (CVS)
 Assigned To:  derick
 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:


[2008-09-14 03:27:03] [EMAIL PROTECTED]

Ok, I found the problem.

Index: ext/fileinfo/libmagic/apprentice.c
===
RCS file: /repository/php-src/ext/fileinfo/libmagic/apprentice.c,v
retrieving revision 1.7.2.5
diff -u -p -r1.7.2.5 apprentice.c
--- ext/fileinfo/libmagic/apprentice.c  2 Sep 2008 12:43:24 -  
1.7.2.5
+++ ext/fileinfo/libmagic/apprentice.c  14 Sep 2008 03:23:45 -
@@ -1901,7 +1901,7 @@ internal_loaded:
ptr = (uint32_t *)(void *)*magicp;
if (*ptr != MAGICNO) {
if (swap4(*ptr) != MAGICNO) {
-   file_error(ms, 0, "bad magic in `%s'");
+   file_error(ms, 0, "bad magic in `%s'",
dbname);
goto error1;
}
needsbyteswap = 1;


Derick, can I commit it, or will you?



[2008-09-13 21:49:12] [EMAIL PROTECTED]

I can't reproduce this on Linux.
Looking at the code, it shouldn't even get to that point as it calls
realpath() first and does not continue if the file did resolve right.
This might mean there is a YARWOB (yet another realpath() weirdness on
FreeBSD), but I guess you'll have to figure it out yourself as I don't
have any FBSD machines around.



[2008-09-13 20:30:24] [EMAIL PROTECTED]

Description:

See below.

Reproduce code:
---
Starting program: /usr/home/felipe/php5/sapi/cli/php -r 'print
finfo_open(NULL, PHP_INT_MAX);'
warning: Unable to get location for thread creation breakpoint: generic
error
[New LWP 100130]
[New Thread 0xbad000 (LWP 100130)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xbad000 (LWP 100130)]
0x000801cd2520 in strlen () from /lib/libc.so.6
(gdb) bt
#0  0x000801cd2520 in strlen () from /lib/libc.so.6
#1  0x00672713 in vspprintf (pbuf=0x7fffdb98, max_len=0,
format=0x7fffdc08 "", ap=0x7fffdbd0)
at /usr/home/felipe/php5/main/spprintf.c:564
#2  0x004ba7a3 in file_error_core (ms=0xbd64c8, error=0,
f=0x9713b4 "bad magic in `%s'", va=0x7fffdbd0, lineno=0)
at /usr/home/felipe/php5/ext/fileinfo/libmagic/funcs.c:96
#3  0x004ba904 in file_error (ms=0x400, error=5128,
f=0x7fffdc08 "") at
/usr/home/felipe/php5/ext/fileinfo/libmagic/funcs.c:119
#4  0x004b9127 in apprentice_1 (ms=0xbd64c8, fn=0xbd6610
"/usr/home/felipe/php5/9223372036854775807", action=0, mlist=0xbd6650)
at /usr/home/felipe/php5/ext/fileinfo/libmagic/apprentice.c:1904
#5  0x004b926d in file_apprentice (ms=0xbd64c8, fn=0x0,
action=0) at
/usr/home/felipe/php5/ext/fileinfo/libmagic/apprentice.c:336
#6  0x004bb078 in magic_load (ms=0xbd64c8, magicfile=0x1408
)
at /usr/home/felipe/php5/ext/fileinfo/libmagic/magic.c:192
#7  0x004b5f3f in zif_finfo_open (ht=1024,
return_value=0xbd5640, return_value_ptr=0x7fffdc08, this_ptr=0x0,
return_value_used=12,
tsrm_ls=0xba4640) at
/usr/home/felipe/php5/ext/fileinfo/fileinfo.c:351
#8  0x006ed5a5 in zend_do_fcall_common_helper_SPEC
(execute_data=0xef5040, tsrm_ls=0xba4640) at zend_vm_execute.h:315
#9  0x006ec792 in execute (op_array=0xbd5d70, tsrm_ls=0xba4640)
at zend_vm_execute.h:104
#10 0x006bb866 in zend_eval_string (str=0xbd5d70
"\004]�", retval_ptr=0x0, string_name=0x0, tsrm_ls=0xba4640)
at /usr/home/felipe/php5/Zend/zend_execute_API.c:1118
#11 0x006bba1b in zend_eval_string_ex (str=0x400 , retval_ptr=0x1408,
string_name=0x7fffdc08 "", handle_exceptions=1,
tsrm_ls=0xba4640) at /usr/home/felipe/php5/Zend/zend_execute_API.c:1153
#12 0x0076c00f in main (argc=3, argv=0x7fffe878) at
/usr/home/felipe/php5/sapi/cli/php_cli.c:1219







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



#42616 [Com]: CLI crashes

2008-09-16 Thread andrew at mercuric dot net
 ID:   42616
 Comment by:   andrew at mercuric dot net
 Reported By:  ashish_chap at yahoo dot co dot in
 Status:   No Feedback
 Bug Type: CGI related
 Operating System: Windows XP
 PHP Version:  5.2.4
 New Comment:

It only happens, however, when the installer is used. Extracting the
zip file works fine.


Previous Comments:


[2008-09-16 21:30:17] andrew at mercuric dot net

I also have this problem with both 5.2.6 and the latest snapshot on
Windows XP 64-bit. I made sure that everything was deleted before
running the snapshot installer. Neither disabling php_sam nor
php_threads fixed the crash, though it does eliminate the "fatal error"
message.



[2008-05-02 23:47:16] uncle_coolj at hotmail dot com

Hey,
i've tried to disable different modules to find out which one causes
the crash.

I've found out that the "php_threads.dll" is the problem.
if you comment out the module it works...

best regards



[2007-10-12 20:51:13] robert2s at hotmail dot com

I solved this in the following way.
In the php.ini file, add a semicolon (;) in front of the line
extension=php_sam.dl



[2007-09-24 00:19:42] mburke at cordovabay dot com

I am having the same problem. The configuration is:
Apache 2.2.4 (Win32)
PHP 5.2.4
MySQL 5.0.45

All php pages result in error 500

error log shows:

PHP Warning:  require_once(SAM/php_sam.php): failed to open stream: No
such file
 or directory in sam_factory on line 1

each time a php page is requested.

Any help would be appreciated!!



[2007-09-21 01:00:00] php-bugs at lists dot php dot net

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



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

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



#46090 [Opn->Csd]: mysqlnd segfault during connection

2008-09-16 Thread phpwnd at gmail dot com
 ID:   46090
 User updated by:  phpwnd at gmail dot com
 Reported By:  phpwnd at gmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: Reproducible crash
 Operating System: Linux 2.6.24-gentoo-r8
 PHP Version:  5.3CVS-2008-09-16 (CVS)
 New Comment:

Fixed in CVS.

http://marc.info/?l=php-cvs&m=122157573024024&w=2


Previous Comments:


[2008-09-16 02:02:45] phpwnd at gmail dot com

Changed category.



[2008-09-16 01:24:13] phpwnd at gmail dot com

I forgot to mention this is on MySQL 5.0.60 (more precisely, it's
mysql-5.0.60-r1 from Gentoo's Portage)



[2008-09-16 01:20:14] phpwnd at gmail dot com

Description:

mysqlnd makes PHP segfault on connect.

This bug is filed as "PDO", but it's really a mysqlnd bug. The issue is
the same regardless of what extension is used: PDO, MySQL or MySQLi. PHP
was compiled from CVS, with --with-mysql=mysqlnd --with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd

- Connecting via TCP or socket does not change the behaviour.
- It doesn't require a valid account either, attempting to connect with
an inexistent account produces the same result.
- It does require a valid DSN, otherwise a PDOException with message
'SQLSTATE[HY000] [2002] Connection refused' is thrown, as expected.

Backtrace below, if you need anything else please ask. Thanks :)

Reproduce code:
---
$db = new PDO('mysql:dbname=test;host=127.0.0.1;port=3307',
'inexistent_user', 'password');

Actual result:
--
#0  0x0075d729 in mysqlnd_connect (conn=0xece3c8, host=0xece288
"127.0.0.1", user=0xece160 "inexistent_user", passwd=0xece1c8
"password",
passwd_len=8, db=0xece228 "test", db_len=4, port=3307, socket=0x0,
mysql_flags=196736, zval_cache=0xea0c50)
at /root/src/php5/ext/mysqlnd/mysqlnd.c:823
#1  0x0058475a in pdo_mysql_handle_factory (dbh=0xecdbc0,
driver_options=0x0) at /root/src/php5/ext/pdo_mysql/mysql_driver.c:717
#2  0x005739c7 in zim_PDO_dbh_constructor (ht=3,
return_value=0xece068, return_value_ptr=0x0, this_ptr=0xecc200,
return_value_used=0)
at /root/src/php5/ext/pdo/pdo_dbh.c:372
#3  0x0083a574 in zend_do_fcall_common_helper_SPEC
(execute_data=0x2add638ad090) at
/root/src/php5/Zend/zend_vm_execute.h:315
#4  0x0083b509 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(execute_data=0x2add638ad090) at
/root/src/php5/Zend/zend_vm_execute.h:428
#5  0x008395a7 in execute (op_array=0xeccfb0) at
/root/src/php5/Zend/zend_vm_execute.h:104
#6  0x0080981e in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /root/src/php5/Zend/zend.c:1197
#7  0x0078e21a in php_execute_script
(primary_file=0x7fff472a8590) at /root/src/php5/main/main.c:2075
#8  0x008ad1d4 in main (argc=2, argv=0x7fff472a8808) at
/root/src/php5/sapi/cli/php_cli.c:1130





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



#44862 [Opn->Csd]: Invalid encoding in pspell_config_create() w/ pspell_new_config() causes abort

2008-09-16 Thread iliaa
 ID:   44862
 Updated by:   [EMAIL PROTECTED]
 Reported By:  twm at twmacinta dot com
-Status:   Open
+Status:   Closed
 Bug Type: Pspell related
 Operating System: Red Hat Enterprise Linux ES 3
 PHP Version:  5.2.5
 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:


[2008-04-30 14:19:13] twm at twmacinta dot com

Here is a list of all of my 'aspell' and 'pspell' RPMs, with version
numbers:

aspell-0.33.7.1-25.3.rhel3.i386
aspell-config-0.33.7.1-25.3.rhel3.i386
aspell-da-1.4.22-7.i386
aspell-de-0.1.1-17.i386
aspell-devel-0.33.7.1-25.3.rhel3.i386
aspell-en-ca-0.33.7.1-25.3.rhel3.i386
aspell-en-gb-0.33.7.1-25.3.rhel3.i386
aspell-es-0.2-13.i386
aspell-fr-0.6-8.i386
aspell-it-0.1-16.i386
aspell-nl-0.1-17.i386
aspell-no-0.3-6.i386
aspell-pt-0.1-12.i386
aspell-pt_BR-2.4-12.i386
aspell-sv-1.3.8-4.i386
pspell-0.12.2-16.1.i386
pspell-devel-0.12.2-16.1.i386

It does appear to be dying because of a failed assertion, so maybe it
doesn't die for you because your 'pspell' library wasn't compiled to
enforce assertions?



[2008-04-30 00:01:18] [EMAIL PROTECTED]

Which version of aspell library are you using? here things work as 
intended.



[2008-04-29 17:18:41] twm at twmacinta dot com

Description:

When I pass an invalid encoding as the fourth argument to the function
pspell_config_create() and then pass that return value to
pspell_new_config(), PHP aborts and stops running.  This is causing the
"make test" script named "ext/pspell/tests/003.phpt" to fail on my
system when I try to test my new build of PHP.  I have created a simpler
test case for this bug report and also read through the code a bit more
to come up with an analysis which I think might be helpful.

My test script works as expected in older versions of PHP on the same
operating system.  In particular, it works fine in PHP 4.3 on the same
OS.  This applies to both my custom compiled version of PHP as well as
the most recent build from Red Hat.  I believe that the problem was
introduced in revision 1.45.2.4.2.5.  See line 405 below:

http://cvs.php.net/viewvc.cgi/php-src/ext/pspell/pspell.c?r1=1.45.2.4.2.4&r2=1.45.2.4.2.5&pathrev=PHP_5_2

The problem is that delete_pspell_manager() is called on a pointer
obtained from new_pspell_manager() which isn't necessarily a pspell
manager.  It can either be an error or a pspell manager.  Here is the
code from the pspell library - note that the first return statement can
result in PHP getting something which isn't a pspell manager (which is
what it incorrectly frees):

PspellCanHaveError * new_pspell_manager(PspellConfig * c) 
{
  PspellCanHaveError * possible_err = find_word_list(c);
  if (possible_err->error_number() != 0)
return possible_err;
  PspellConfig * config = (PspellConfig *)(possible_err);
  possible_err = new_pspell_manager_class(config);
  delete config;
  return possible_err;
}

Perhaps this error isn't being triggered on your test systems since it
depends upon whether the system's pspell library was compiled to enforce
assertions.

Note that there were several other changes like this made in revision
1.45.2.4.2.5.  There were other lines added which call
delete_pspell_*(), possibly with an invalid argument.  I don't know if
they are a problem in reality - I only caught the line that I'm
reporting because "make test" failed for me.  I was a little hesitant to
remove those lines in my own code since they were added without other
major changes, so there was presumably some reason for them, though the
revision comment and change log don't mention what it was.

I used "php -n" to run all of the tests, so as to rule out "php.ini" as
a problem.  I tried the test script with both PHP 5.2.5 and the latest
CVS snapshot, php5.2-200804291230.


Reproduce code:
---
$cfg2 = pspell_config_create('en', 'british', '', 'b0rked');
$p2 = pspell_new_config($cfg2);
print("Done\n");


Expected result:

Warning: pspell_new_config(): PSPELL couldn't open the dictionary.
reason: The encoding "b0rked" is not known. This could also mean that
the file "/usr/share/pspell/b0rked.map" could not be opened for reading
or does not exist.  in /tmp/timtest20080429.php on line 3
Done


Actual result:
--
Warning: pspell_new_config(): PSPELL couldn't open the dictionary.
reason: The encoding "b0rked" is not known. This could also mean that
the file "/usr/share/pspell/b0rked.map" could not be opened for reading
or does not exist.  in /tmp/timtest20080429.php on line 3
php: manager_impl.cc:30: v

#44425 [Opn->Csd]: Extending PDO/MySQL class with a __call() function doesn't work

2008-09-16 Thread johannes
 ID:   44425
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phpbugs at wayoverthere dot com
-Status:   Open
+Status:   Closed
 Bug Type: PDO related
 Operating System: Linux/Windows
 PHP Version:  5.2CVS-2008-03-13 (snap)
 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:


[2008-03-29 16:45:32] phpbugs at wayoverthere dot com

I have compiled directly from a CVS checkout (PHP_5_3) on openSuse 
10.2, and I still see this problem. Is there anything I can do to 
convince someone that this bug actually exists? I don't understand 
how I'm the only one who can reproduce it, when I can reproduce it 
anywhere I test it - even using the precompiled Windows snapshots.

I followed the instructions on compiling from CVS (meaning compiling 
all the specific version requirements of autoconf, etc. and running 
buildconf), and used these configure options:

./configure --prefix=/home/shared/php5cvs/ --with-zlib
--with-mysql=shared --enable-pdo=shared --with-pdo-mysql=shared
--with-pdo-sqlite=shared --with-sqlite=shared

My php.ini:
extension=pdo.so
extension=pdo_mysql.so
extension=pdo_sqlite.so

Running this test script:
';
}
function foo() {
echo "Called foo in ".__CLASS__.'';
}
}

$sqlite = new test('sqlite::memory:');
$sqlite->foo();
$sqlite->bar();

$mysql = new test('mysql:dbname=test;host=localhost','root','');
$mysql->foo();
$mysql->bar();

?>

Gives:
Called foo in testCalled bar in testCalled foo in test
Fatal error: Call to undefined method test::bar() 
in /home/shared/php5cvs/test.php on line 17

If necessary, I might be able to provide ssh access to one of the 
boxes I'm seeing this on.



[2008-03-15 19:34:40] phpbugs at wayoverthere dot com

Can someone confirm/deny this bug using the Windows binary version as 
I did? At least that way there's no compiling issues to complicate 
things.

Also, I poked around cvs.php.net and found what I think is the fix 
for #43663:

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_dbh.c?r1=1.82.2.31.2.17.2.2&r2=1.82.2.31.2.17.2.3

I checked my local 5.3 snapshot and it does have those added lines.



[2008-03-14 06:07:22] crrodriguez at suse dot de

Works for me as well, with current 5_3 CVS



[2008-03-13 22:25:06] phpbugs at wayoverthere dot com

I'm still seeing the problem. I have recompiled PHP 
(php5.3-200803131930) on several different boxes - all Linux, but 
different distros (Ubuntu 7.10, openSuse 10.2, and a very old Gentoo 
box). On a hunch, I uninstalled the system PHP, thinking the custom 
PHP was using the system .so's. Same thing.

I even tried installing PHP on a Win2k box using the snapshot  
http://snaps.php.net/win32/php5.3-win32-200803132030.zip. I used the 
recommended php.ini file as a base config file, but enabled 
php_pdo.dll, php_pdo_mysql.dll, and php_pdo_sqlite.dll extensions. 
Then I created test.php and put this in it:

';
}
function foo() {
echo "Called foo in ".__CLASS__.'';
}
}

$sqlite = new test('sqlite::memory:');
$sqlite->foo();
$sqlite->bar();

$mysql = new test('mysql:dbname=foo;host=10.1.1.142','foo','bar');
$mysql->foo();
$mysql->bar();

?>

Running "php test.php" gives:

Called foo in testCalled bar in testCalled foo in 
testFatal error: Call to undefined method test::bar() in C:
\php5\test.php on line 17



[2008-03-13 16:10:44] [EMAIL PROTECTED]

Works fine in snapshot and PHP 5.3



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

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



#45392 [Asn->Csd]: ob_start()/ob_end_clean() and memory_limit

2008-09-16 Thread iliaa
 ID:   45392
 Updated by:   [EMAIL PROTECTED]
 Reported By:  flebron at bumeran dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: Output Control
 Operating System: Fedora Linux 2
 PHP Version:  5.3CVS-2008-06-29 (snap)
 Assigned To:  lbarnaud
 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:


[2008-08-18 07:47:20] [EMAIL PROTECTED]

The patch caused prolems and has been reverted.



[2008-08-18 04:13:36] [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.





[2008-07-14 11:26:09] [EMAIL PROTECTED]

This slightly modified script shows the bug without massive output:






[2008-06-29 22:30:08] flebron at bumeran dot com

Description:

When memory_limit is reached, and one is using the output buffering
functions, instead of just dying with an "out of memory" error, the
contents of the buffer are spilled onto stdout.
The output_buffering ini setting wasn't set to any particular limit.

Reproduce code:
---
http://bugs.php.net/?id=45392&edit=1



#46102 [NEW]: getenv() memory leak

2008-09-16 Thread jim at centerfuse dot net
From: jim at centerfuse dot net
Operating system: Windows XP
PHP version:  5.2.6
PHP Bug Type: Performance problem
Bug description:  getenv() memory leak

Description:

getenv() appears to cause a memory leak on Windows XP, 5.2.5. Could not
reproduce on FreeBSD 4/PHP 5.0.5. It seems to only happen in the Apache
module - the CLI exhibits the expected behavior.

Reproduce code:
---
echo memory_get_usage() . '';
for ( $j = 0; $j < 100; $j++ ) {
@getenv('SCRIPT_NAME');
echo memory_get_usage() . '';
}



Expected result:

memory_get_usage() should report the same amount through all iterations

Actual result:
--
memory_get_usage() reports the same amount for the first 28 iterations,
then begins to climb and continues to climb

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



#46103 [NEW]: ReflectionObject memory leak

2008-09-16 Thread jim dot keller at contextsolutions dot net
From: jim dot keller at contextsolutions dot net
Operating system: Windows XP
PHP version:  5.2.6
PHP Bug Type: Performance problem
Bug description:  ReflectionObject memory leak 

Description:

when a reflector is stored in a class property, the reflector appears to
stay in memory after the object is destroyed. This could be related to
#33595

Reproduce code:
---
class testclass {

   protected $_r;

   public function __construct() {

 $this->getr();

   }


   public function getr() {

 if ( !$this->_r ) $this->_r = new ReflectionObject($this);

 return $this->_r;

   }

}

for ( $j = 0; $j < 100; $j++ ) {

  $t = new testclass();
  echo memory_get_usage() . '';
}



Expected result:

memory usage should stay constant

Actual result:
--
memory usage increases with every iteration

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



#46104 [NEW]: list supportiong OS

2008-09-16 Thread Mike_G at ufamts dot ru
From: Mike_G at ufamts dot ru
Operating system: 
PHP version:  5.3.0alpha2
PHP Bug Type: Feature/Change Request
Bug description:  list supportiong OS

Description:

Please don't drop support Windows NT 4.0.
What real reasons in refusal of support?
If this is connected with VC9 why not to compile by means of MingGW?


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



#46104 [Opn->Bgs]: list supportiong OS

2008-09-16 Thread pajoye
 ID:  46104
 Updated by:  [EMAIL PROTECTED]
 Reported By: Mike_G at ufamts dot ru
-Status:  Open
+Status:  Bogus
 Bug Type:Feature/Change Request
 PHP Version: 5.3.0alpha2
-Assigned To: 
+Assigned To: pajoye
 New Comment:

NT4 and win 9x are not supported anymore by Microsoft. They have
limitation affecting PHP code or features. We can't afford to maintain
an extra branch only to support museum softwares. windows 2k is 10 years
old, don't you think you can update? Or even better, move to 2008 ;)


Previous Comments:


[2008-09-17 05:58:00] Mike_G at ufamts dot ru

Description:

Please don't drop support Windows NT 4.0.
What real reasons in refusal of support?
If this is connected with VC9 why not to compile by means of MingGW?






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