#49249 [Opn-WFx]: Call-time pass-by-reference deprecated - undeprecate

2009-08-14 Thread derick
 ID:   49249
 Updated by:   der...@php.net
 Reported By:  ile at dennisgiese dot de
-Status:   Open
+Status:   Wont fix
 Bug Type: Feature/Change Request
 Operating System: Win XP Sp3
 PHP Version:  5.3.0
 New Comment:

You're using references for all the wrong reasons here as well. Please
refer to the php-general list as to why.


Previous Comments:


[2009-08-14 05:20:52] ile at dennisgiese dot de

Description:

Please undreprecate Call-Time pass-by-reference, since it is a fully
supported and used way of programming style in almost EVERY serious and
big language!

Reproduce code:
---
If you have any kind of class or stack of functions you surely want to
keep lines of code as short as possible. on the other hand you surely
don't want to copy your variables just to call a function...

example:

building an XML document, while using a (sub)function in order to
create only sligthly different paths:

private function _prepareRequest()
 {
   //[some other code]
$this-_StoreInterval(from,$xmlwriter,$this-startdate);
$this-_StoreInterval(to,$xmlwriter,$this-enddate);
   //[some other code]
 }

private function _StoreInterval($kind,$xmlwriter,$date)
 {
$xmlwriter-startElement($kind);
$xmlwriter-writeElement(day,date(d,$date));
$xmlwriter-writeElement(month,date(m,$date));
$xmlwriter-writeElement(year,date(Y,$date));
$xmlwriter-writeElement(hour,date(H,$date));
$xmlwriter-endElement();
 }

Expected result:

in 5.3.0 this still works, but got an warning because this is
deprecated...

Actual result:
--
actually this should be working anyway, since i don't want to waste
memory just to copy and paste back results from this subfunction. 

if this won't work it makes - to some extend - building functions
useles.





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



#49151 [Fbk-Opn]: relocation must bind locally

2009-08-14 Thread tech at uscki dot nl
 ID:   49151
 User updated by:  tech at uscki dot nl
 Reported By:  tech at uscki dot nl
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: Sun Solaris 5.10 (i386)
 PHP Version:  5.3.0
 Assigned To:  nlopess
 New Comment:

Hmmm, adding static isn't trivial, these first two methods were the tip
of the iceberg... Looks like I'll be adding it all through the code if I
go through with this (I stopped after about 10 changes in various
files). 

How do I disable the visibility thing, as Nuno noted?


Previous Comments:


[2009-08-13 10:01:53] j...@php.net

in ext/date/php_date.c:485, add static in front of this line:

ZEND_DECLARE_MODULE_GLOBALS(date)




[2009-08-13 09:50:30] tech at uscki dot nl

Hi, the suggestion of making date_ce_date static seems to help! But I'm
not quite there yet :( , date_globals gives a similar error:

ld: fatal: relocation error: R_386_GOTOFF: file
ext/date/.libs/php_date.o: symbol date_globals: relocation must bind
locally

I'm not quite able to find its definition to make that one static as
well (due to my lousy C-skills ... ;) ). Any ideas where to do this?



[2009-08-10 22:51:29] nlop...@php.net

If adding static doesn't help, we can disable the visibility thing on
solaris. (due to the apparently broken compiler/assembler).



[2009-08-05 14:48:12] j...@php.net

Would this help:

ext/date/php_date.c:511

-zend_class_entry *date_ce_date, *date_ce_timezone, *date_ce_interval,
*date_ce_period;
+static zend_class_entry *date_ce_date, *date_ce_timezone,
*date_ce_interval, *date_ce_period;

(add static there :)



[2009-08-05 14:39:14] j...@php.net

Assigned to Nuno who's patch broke this.



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

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



#49224 [Fbk-Opn]: Segmentation fault

2009-08-14 Thread alahaye at fm2i dot com
 ID:   49224
 User updated by:  alahaye at fm2i dot com
 Reported By:  alahaye at fm2i dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: HPUX 11.31
 PHP Version:  5.3.0
 New Comment:

Hi, did you receive my files ?


Previous Comments:


[2009-08-12 10:36:34] scott...@php.net

Can you mail me your config.log and your resolv.h file.





[2009-08-12 09:37:01] alahaye at fm2i dot com

Bind version is 9.3.2. For me it's very strange because last
compilation about PHP 5.3.0 stable was successfull and not with the
snap.



[2009-08-12 09:24:47] alahaye at fm2i dot com

unfortunatly no... it's on a local network, no VPN or DMZ access.



[2009-08-12 09:12:21] scott...@php.net

Is there any chance to get an account on this box to do some testing?

I can provide an SSH key.



[2009-08-12 08:42:00] alahaye at fm2i dot com

Hi, here the structure in /usr/lib/resolv.h

Version of file is 

 *  @(#)B.11.31_LRresolv.h  8.1 (Berkeley) 6/2/93
 *  $Id: resolv.h,v 8.10 1996/11/18 09:08:49 vixie Exp $

No field res_h_errno

struct __res_state {
int retrans;/* retransmition time interval */
int retry;  /* number of times to retransmit */
unsigned int options;   /* option flags - see below.
*/
int nscount;/* number of name servers */
#ifdef IPV6
union {
   struct sockaddr_in6
   *nsaddr_list6;
   struct sockaddr_in
nsaddr_list[MAXNS]; /* address of name server */
} nsaddr_list;
#define nsaddr  nsaddr_list.nsaddr_list[0]/* for backward
compatibility */
#else
struct sockaddr_in
nsaddr_list[MAXNS]; /* address of name server */
#define nsaddr  nsaddr_list[0]
#endif
u_short id; /* current message id */
chardefdname[256];  /* default domain (deprecated) */
char*dnsrch[MAXDNSRCH+1];   /* components of domain to search */
unsigned int pfcode;/* RES_PRF_ flags - see below. */
u_char ndots:4; /* threshold for initial abs. query */
u_char nsort:4; /* number of elements in sort_list[] */
charunused[3];
#ifdef IPV6
union {
  struct in6_addr 
*sort_list6;
  struct {
struct in_addr  addr;
uint32_tmask;
  } sort_list[MAXRESOLVSORT];
  } sort_list;
#else
struct {
  struct in_addr  addr;
  uint32_tmask;
} sort_list[MAXRESOLVSORT];
#endif

} ;



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

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



#48700 [Bgs]: uninstall/install PHP problem?

2009-08-14 Thread yagogalego at hotmail dot com
 ID:   48700
 User updated by:  yagogalego at hotmail dot com
 Reported By:  yagogalego at hotmail dot com
 Status:   Bogus
 Bug Type: Windows Installer
 Operating System: Windows XP Professional SP3
-PHP Version:  5.2.10
+PHP Version:  5.3.0
 New Comment:

- QUOTE --
jmertic AT php DOT net = Unable to reproduce this issue.
--

Hi jmertic! 

Unable to reproduce this issue? It is very easy. 

You need:

- Windows XP Professional Edition SP3
- php-5.3.0-Win32-VC6-x86.msi (PHP Win32 Installer VC6)
- apache_2.2.11-win32-x86-openssl-0.9.8i.msi (apache 2.x.x)

steps:

(1) execute and install apache_2.2.11-win32-x86-openssl-0.9.8i.msi.
(2) go to environment variables, find the PATH variable and backup
it in a text file.

NOTE: environment variables are placed in Control Panel  System
properties  advanced options  environment variables.

(3) execute and install php-5.3.0-Win32-VC6-x86.msi.
(4) now, go to environment variables and view the result. 


What happens? 

The PHP WINDOWS INSTALLER overwrite the environment variable called
'PATH'. Id est, the PHP WINDOWS INSTALLER delete old before data that
'PATH' contained and put the new one. 

I write an example that you view how the PHP WINDOWS INSTALLER  modify
'path' variable. 

.
Example: 

- PATH environment variable content BEFORE install PHP 5.3.0

path =
C:\programfiles\Java\sdk\;C:\programfiles\msgplus;C:\programfiles\webCamera\run;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

- PATH environment variable content AFTER install PHP 5.3.0

PATH = C:\programfiles\mySoft\PHP\
.

NOTE: Not only overwrite the content, modify the original environment
variable name 'path' (in lowercase) to 'PATH' (in uppercase) too. 

It is very easy. I don't know why is unable to reproduce this issue.

I think that this php windows installer bug is very important for
windows users because applications (may) not run fine.  

Obviously, this bug is not fixed in PHP 5.3.0.

Greetings. Thanks for all.


Previous Comments:


[2009-06-28 18:26:30] jmer...@php.net

Unable to reproduce this issue.



[2009-06-26 12:04:51] yagogalego at hotmail dot com

Description:

I am running PHP previous at 5.2.10 (exactly 5.2.9-2). 

I uninstall this previous PHP version (with uninstaller).

After, I install PHP 5.2.10 (exactly php-5.2.10-win32-installer.msi)
for upgrading my php system. 

Ok. No problem. 

Later, I look at windows environment variables and... the path
variable have been replaced with only value c:\programfiles\php!, id
est, the other values separated with ';' had been deleted. 

This similar issue I have it when I installed the previous php version
(5.2.9-2). 

It is not problem for me because I have a updated backup of these
environment variables but other people might have problems.

Thanks for listen. Greetings. 

 

- Yago L.R.






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



#46683 [NoF-Asn]: fopen() file name in warning is upper cased if the arguments are invalid

2009-08-14 Thread pajoye
 ID:   46683
 Updated by:   paj...@php.net
 Reported By:  a...@php.net
-Status:   No Feedback
+Status:   Assigned
 Bug Type: Filesystem function related
 Operating System: win32 only
 PHP Version:  5.3CVS-2008-11-26 (snap)
 Assigned To:  pajoye
 New Comment:

stupid! stupid! auto no feedback.


Previous Comments:


[2009-03-12 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.



[2009-03-04 12:30:06] a...@php.net

Yes I agree the updated error message is better than the previous 
invalid argument message. On the subject of clear tests I don't 
actually find this test too bad. The code has logic to test a bunch 
of different conditions and so requires some eye balling to 
understand. Each iteration includes the current item (see below). 

I find this approach preferable to unrolling the loop and duplicating 
the code as I think that would make the test significantly less 
maintainable.

--c:\/--
file in root

--c:\fopen11.tmpdirTwo\/--
file in fopen11.tmpdirTwo

--c:\fopen11.tmpdirTwo\--
file in fopen11.tmpdirTwo



[2009-03-02 21:06:42] paj...@php.net

UNC path begins with \\, that's why it was necessary to upper case the
path.

However, why do you expect an invalid argument in this case? Here is
what I get, which makes more sense (after the fix for the correct path
in the error message):

018+ Warning: fopen(\\fopen_variation11.tmp): failed to open stream: No
such file or directory in
ext\standard\test\file\fopen_variation11-win32.php on line 52
018- Warning: fopen(\\fopen_variation11.tmp): failed to open stream:
Invalid argument in %s on line %d
025+ Warning: fopen(/\fopen_variation11.tmp): failed to open stream: No
such file or directory in
ext\standard\tests\file\fopen_variation11-win32.php on line 52
025- Warning: fopen(\\fopen_variation11.tmp): failed to open stream:
Invalid argument in %s on line %d





[2009-03-02 20:28:05] paj...@php.net

Side note:

Please (PLEASE!!) try to create tests we can read. Like having an index
telling which iteration we are or other similar tricks to ease the
debugging. I already asked for cleaner tests many times on php-qa,
without much success :)



[2008-11-26 18:03:22] a...@php.net

These tests are also now checked into 6.0.



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

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



#28038 [Opn-Asn]: Sent incorrect RCPT TO commands to SMTP server

2009-08-14 Thread pajoye
 ID:   28038
 Updated by:   paj...@php.net
 Reported By:  jordi at jcanals dot net
-Status:   Open
+Status:   Assigned
 Bug Type: Mail related
 Operating System: win32 only
 PHP Version:  5.*, 6SVN
-Assigned To:  
+Assigned To:  pajoye


Previous Comments:


[2009-04-06 14:29:44] php at shitware dot nl

I'm no C expert, but wouldn't this provide a quick fix:

instead of:

snprintf(Buffer, MAIL_BUFFER_SIZE, RCPT TO:%s\r\n, token);

use:

snprintf(Buffer, MAIL_BUFFER_SIZE, token[(strlen(token)-1)] ==  ?
RCPT TO:%s\r\n : RCPT TO:%s\r\n, token);

for EVERY use of token (including RPath)?

(plain e-mail addresses are still placed between ..., formatted
e-mail addresses get in the transaction unaltered)

I tried setting up the Windows build environment to test this, but got
lost in the different how-to's ...



[2009-02-24 23:25:22] mark at lbisat dot com

By modifying the following in PHP.ini

[mail function]
sendmail_from = em...@domain.com

It fixed the issue for me on Windows 2003 Server SP2.



[2009-01-12 11:49:18] julioworld at hotmail dot com

I also had this problem and I solved it by adding this line in the
php.ini in the section [mail function]:

[mail function]
sendmail_from = em...@domain.com



[2009-01-06 19:41:42] ghooey at gmail dot com

Unlike with a linux server the email address in
ini_set('sendmail_from', 'm...@domain.com); has to be a valid email
address



[2008-12-10 19:46:45] jordi at jcanals dot net

You did not understand where the bug is (or was). We pass the proper
headers exactly the same in any platform. PHP mail layer change them to
the wrong format, by adding extra signs.

What you say we have to consider, Is what we are doing. Read carefully
the bug description, the headers sent to PHP mail function, and the
headers sent by the mail layer to the mail server.



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=28038edit=1



#49250 [NEW]: issue with ImageSetTile when image hander goes out of scope

2009-08-14 Thread pookey at pookey dot co dot uk
From: pookey at pookey dot co dot uk
Operating system: N/A
PHP version:  5.3.0
PHP Bug Type: GD related
Bug description:  issue with ImageSetTile when image hander goes out of scope

Description:

here's a method in an object:

public function setTilePath($path)
{
  $bgimage = imageCreateFromPNG($path);
  ImageSetTile($this-imgHdl, $bgimage);
} 
that tile is used elsewhere in a different method later

in 5.2, this works. in 5.3, it only works if I amend it to be:

public function setTilePath($path)
{
  $this-bgimage = imageCreateFromPNG($path);
  ImageSetTile($this-imgHdl, $this-bgimage);
} 

I spoke briefly about this with Pierre online, I'm pookey on freenode if
anyone wants to talk to me about it.

Reproduce code:
---
author is very lazy, no reproduction code I'm afraid.

Expected result:

I expect it to work despite going out of scope

Actual result:
--
It doesn't work, broken, fail, no image, unhappy coder.

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



#49251 [NEW]: wrong object created

2009-08-14 Thread ies_clan at hotmail dot com
From: ies_clan at hotmail dot com
Operating system: Windows XP SP3
PHP version:  5.3.0
PHP Bug Type: Class/Object related
Bug description:  wrong object created

Description:

if u try to create a new object from an simple xml-objekt-property you got
an simple xml object :(

Reproduce code:
---
class test {}

$Xml = new
SimpleXMLElement('rootclassnamestdclass/classname/root');
$XmlClass = new $Xml-classname('root /');
print_r($XmlClass);

$MyClass = new stdclass();
$MyClass-classname = 'test';
$stdclass = new $MyClass-classname();
print_r($stdclass);


Expected result:

stdclass Object
(
)
test Object
(
)


Actual result:
--
SimpleXMLElement Object
(
)
test Object
(
)


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



#48182 [Csd-Opn]: asynchronous socket connection over ssl fails entirely

2009-08-14 Thread frase at cs dot wisc dot edu
 ID:   48182
 User updated by:  frase at cs dot wisc dot edu
-Summary:  ssl handshake fails during asynchronous socket
   connection
 Reported By:  frase at cs dot wisc dot edu
-Status:   Closed
+Status:   Open
 Bug Type: OpenSSL related
 Operating System: *
-PHP Version:  5.2.10, 5.3.0
+PHP Version:  5.2.11RC1
 Assigned To:  srinatar
 New Comment:

I'm re-opening this bug as the fix appears not to work in 5.2.11RC1. 
With the same testing code as in the original report, when connecting
synchronously, all is well.  But when connecting asynchronously I get
these warnings:


Warning: stream_socket_client() [function.stream-socket-client]: SSL:
The operation completed successfully. in test-async-ssl.php on line 14

Warning: stream_socket_client() [function.stream-socket-client]: Failed
to enable crypto in test-async-ssl.php on line 14

Warning: stream_socket_client() [function.stream-socket-client]: unable
to connect to ssl://91.189.90.211:443 (Unknown error) in
test-async-ssl.php on line 14


Line 14 is of course the stream_socket_client() call.  Additionally,
after these warnings, $errno contains 10035 and $errstr is empty.


Previous Comments:


[2009-07-28 19:34:15] srina...@php.net

This bug has been fixed in SVN.

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.

Committed revision 286465.



[2009-07-10 13:38:01] frase at cs dot wisc dot edu

The supplied patch does fix the problem in 5.3.0 on Linux; I have no
Windows build environment so I can't test it there but can't see why it
wouldn't also work.  Since the patch was to OpenSSL I've changed the
category back.

Many thanks!



[2009-07-09 21:53:03] sriram dot natarajan at gmail dot com

better still, here is the patch (more readable format)
http://pastebin.org/805



[2009-07-09 21:47:44] sriram dot natarajan at gmail dot com

thanks for your patience.

here is a patch that should address your issue. to apply this patch,
save the above text into a file and run

--- ext/openssl/xp_ssl.c.ORIG   Thu Jul  9 12:20:44 2009
+++ ext/openssl/xp_ssl.cThu Jul  9 12:29:18 2009
@@ -672,7 +672,11 @@
 * we notice that the connect
has actually been established */
   
php_stream_socket_ops.set_option(stream, option, value, ptrparam
TSRMLS_CC);
 
-   if (xparam-outputs.returncode
== 0  sslsock-enable_on_connect) {
+   if
((sslsock-enable_on_connect) 
+  
((xparam-outputs.returncode == 0) ||
+(xparam-op ==
STREAM_XPORT_OP_CONNECT_ASYNC  xparam-outputs.returncode == 1  
+   
xparam-outputs.error_code == EINPROGRESS)))
+   {
if
(php_stream_xport_crypto_setup(stream, sslsock-method, NULL TSRMLS_CC)
 0 ||
   
php_stream_xport_crypto_enable(stream, 1 TSRMLS_CC)  0) {
   
php_error_docref(NULL TSRMLS_CC, E_WARNING, Failed to enable crypto);


- download and unzip the latest php 5.3snapshot from
http://snaps.php.net
- cd php-workspace ; patch -p0 -d .  filename

now, you can run make and should be able to test it.

i will wait for some one to review this patch . hopefully, should
happen before next release :-)



[2009-07-01 16:28:14] frase at cs dot wisc dot edu

This bug remains also in 5.2.10.

Let's try a new summary and changing the category to Sockets, maybe
it will get someone's attention.



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

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



#48182 [Com]: asynchronous socket connection over ssl fails entirely

2009-08-14 Thread frase at cs dot wisc dot edu
 ID:   48182
 Comment by:   frase at cs dot wisc dot edu
 Reported By:  frase at cs dot wisc dot edu
 Status:   Open
 Bug Type: OpenSSL related
 Operating System: *
 PHP Version:  5.2.11RC1
 Assigned To:  srinatar
 New Comment:

To clarify, I tested the posted patch by recompiling 5.3.0 on Ubuntu
Linux, and the fix worked.  I was not able to test the patch in 5.2.10
on Windows as I have no suitable build environment.  The posted
5.2.11RC1 binaries (under Apache 2.2.11) now exhibit this new problem.


Previous Comments:


[2009-08-14 13:49:53] frase at cs dot wisc dot edu

I'm re-opening this bug as the fix appears not to work in 5.2.11RC1. 
With the same testing code as in the original report, when connecting
synchronously, all is well.  But when connecting asynchronously I get
these warnings:


Warning: stream_socket_client() [function.stream-socket-client]: SSL:
The operation completed successfully. in test-async-ssl.php on line 14

Warning: stream_socket_client() [function.stream-socket-client]: Failed
to enable crypto in test-async-ssl.php on line 14

Warning: stream_socket_client() [function.stream-socket-client]: unable
to connect to ssl://91.189.90.211:443 (Unknown error) in
test-async-ssl.php on line 14


Line 14 is of course the stream_socket_client() call.  Additionally,
after these warnings, $errno contains 10035 and $errstr is empty.



[2009-07-28 19:34:15] srina...@php.net

This bug has been fixed in SVN.

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.

Committed revision 286465.



[2009-07-10 13:38:01] frase at cs dot wisc dot edu

The supplied patch does fix the problem in 5.3.0 on Linux; I have no
Windows build environment so I can't test it there but can't see why it
wouldn't also work.  Since the patch was to OpenSSL I've changed the
category back.

Many thanks!



[2009-07-09 21:53:03] sriram dot natarajan at gmail dot com

better still, here is the patch (more readable format)
http://pastebin.org/805



[2009-07-09 21:47:44] sriram dot natarajan at gmail dot com

thanks for your patience.

here is a patch that should address your issue. to apply this patch,
save the above text into a file and run

--- ext/openssl/xp_ssl.c.ORIG   Thu Jul  9 12:20:44 2009
+++ ext/openssl/xp_ssl.cThu Jul  9 12:29:18 2009
@@ -672,7 +672,11 @@
 * we notice that the connect
has actually been established */
   
php_stream_socket_ops.set_option(stream, option, value, ptrparam
TSRMLS_CC);
 
-   if (xparam-outputs.returncode
== 0  sslsock-enable_on_connect) {
+   if
((sslsock-enable_on_connect) 
+  
((xparam-outputs.returncode == 0) ||
+(xparam-op ==
STREAM_XPORT_OP_CONNECT_ASYNC  xparam-outputs.returncode == 1  
+   
xparam-outputs.error_code == EINPROGRESS)))
+   {
if
(php_stream_xport_crypto_setup(stream, sslsock-method, NULL TSRMLS_CC)
 0 ||
   
php_stream_xport_crypto_enable(stream, 1 TSRMLS_CC)  0) {
   
php_error_docref(NULL TSRMLS_CC, E_WARNING, Failed to enable crypto);


- download and unzip the latest php 5.3snapshot from
http://snaps.php.net
- cd php-workspace ; patch -p0 -d .  filename

now, you can run make and should be able to test it.

i will wait for some one to review this patch . hopefully, should
happen before next release :-)



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

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



#49250 [Opn-Asn]: issue with ImageSetTile when image hander goes out of scope

2009-08-14 Thread pajoye
 ID:   49250
 Updated by:   paj...@php.net
 Reported By:  pookey at pookey dot co dot uk
-Status:   Open
+Status:   Assigned
 Bug Type: GD related
 Operating System: N/A
 PHP Version:  5.3.0
-Assigned To:  
+Assigned To:  pajoye


Previous Comments:


[2009-08-14 13:25:02] pookey at pookey dot co dot uk

Description:

here's a method in an object:

public function setTilePath($path)
{
  $bgimage = imageCreateFromPNG($path);
  ImageSetTile($this-imgHdl, $bgimage);
} 
that tile is used elsewhere in a different method later

in 5.2, this works. in 5.3, it only works if I amend it to be:

public function setTilePath($path)
{
  $this-bgimage = imageCreateFromPNG($path);
  ImageSetTile($this-imgHdl, $this-bgimage);
} 

I spoke briefly about this with Pierre online, I'm pookey on freenode
if anyone wants to talk to me about it.

Reproduce code:
---
author is very lazy, no reproduction code I'm afraid.

Expected result:

I expect it to work despite going out of scope

Actual result:
--
It doesn't work, broken, fail, no image, unhappy coder.





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



#48182 [Opn-Asn]: asynchronous socket connection over ssl fails entirely

2009-08-14 Thread pajoye
 ID:   48182
 Updated by:   paj...@php.net
 Reported By:  frase at cs dot wisc dot edu
-Status:   Open
+Status:   Assigned
 Bug Type: OpenSSL related
 Operating System: *
 PHP Version:  5.2.11RC1
 Assigned To:  srinatar


Previous Comments:


[2009-08-14 13:56:38] frase at cs dot wisc dot edu

To clarify, I tested the posted patch by recompiling 5.3.0 on Ubuntu
Linux, and the fix worked.  I was not able to test the patch in 5.2.10
on Windows as I have no suitable build environment.  The posted
5.2.11RC1 binaries (under Apache 2.2.11) now exhibit this new problem.



[2009-08-14 13:49:53] frase at cs dot wisc dot edu

I'm re-opening this bug as the fix appears not to work in 5.2.11RC1. 
With the same testing code as in the original report, when connecting
synchronously, all is well.  But when connecting asynchronously I get
these warnings:


Warning: stream_socket_client() [function.stream-socket-client]: SSL:
The operation completed successfully. in test-async-ssl.php on line 14

Warning: stream_socket_client() [function.stream-socket-client]: Failed
to enable crypto in test-async-ssl.php on line 14

Warning: stream_socket_client() [function.stream-socket-client]: unable
to connect to ssl://91.189.90.211:443 (Unknown error) in
test-async-ssl.php on line 14


Line 14 is of course the stream_socket_client() call.  Additionally,
after these warnings, $errno contains 10035 and $errstr is empty.



[2009-07-28 19:34:15] srina...@php.net

This bug has been fixed in SVN.

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.

Committed revision 286465.



[2009-07-10 13:38:01] frase at cs dot wisc dot edu

The supplied patch does fix the problem in 5.3.0 on Linux; I have no
Windows build environment so I can't test it there but can't see why it
wouldn't also work.  Since the patch was to OpenSSL I've changed the
category back.

Many thanks!



[2009-07-09 21:53:03] sriram dot natarajan at gmail dot com

better still, here is the patch (more readable format)
http://pastebin.org/805



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

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



#49252 [NEW]: ext/ldap/config.m4 sasl2 checks wrong

2009-08-14 Thread crrodriguez at opensuse dot org
From: crrodriguez at opensuse dot org
Operating system: Linux
PHP version:  5.3SVN-2009-08-14 (SVN)
PHP Bug Type: LDAP related
Bug description:  ext/ldap/config.m4 sasl2 checks wrong

Description:

in ext/ldap/config.m4 there is the following check

  PHP_CHECK_LIBRARY(ldap, sasl_version,

sasl_version symbol is not really found in ldap library but in sasl2,
that is correctly added soon after with

PHP_ADD_LIBRARY_WITH_PATH(sasl2, $LDAP_SASL_LIBDIR, LDAP_SHARED_LIBADD)



I think you mean 

PHP_CHECK_LIBRARY(sasl2, sasl_version

Reproduce code:
---
...

Expected result:

extension build correctly

Actual result:
--
failure to build

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



#49253 [NEW]: add support for libcurl's CERTINFO option

2009-08-14 Thread daniel at haxx dot se
From: daniel at haxx dot se
Operating system: all
PHP version:  5.2SVN-2009-08-14 (SVN)
PHP Bug Type: Feature/Change Request
Bug description:  add support for libcurl's CERTINFO option

Description:

libcurl's CURLOPT_CERTINFO and CURLINFO_CERTINFO offer an application to
extract a lot of information from the chain of certificates that a server
offer at connect. This patch brings these options to PHP's CURL extension.

Note that the libcurl option actually still only works when libcurl is
built to use OpenSSL (and not with GnuTLS or NSS etc).

This patch was written Linus Nielsen Feltzing li...@haxx.se

Patch URL: http://daniel.haxx.se/curl/curl-certinfo-090814.patch


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



#49253 [Opn-Asn]: add support for libcurl's CERTINFO option

2009-08-14 Thread pajoye
 ID:   49253
 Updated by:   paj...@php.net
 Reported By:  daniel at haxx dot se
-Status:   Open
+Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  5.2SVN-2009-08-14 (SVN)
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

hi Daniel,

Thanks for the patch. I will review and apply it to HEAD over the
weekend. I'm not sure we can add it yet to 5.2 or 5.3 (but after 5.3.1,
certainly).


Previous Comments:


[2009-08-14 14:45:02] daniel at haxx dot se

Description:

libcurl's CURLOPT_CERTINFO and CURLINFO_CERTINFO offer an application
to extract a lot of information from the chain of certificates that a
server offer at connect. This patch brings these options to PHP's CURL
extension.

Note that the libcurl option actually still only works when libcurl is
built to use OpenSSL (and not with GnuTLS or NSS etc).

This patch was written Linus Nielsen Feltzing li...@haxx.se

Patch URL: http://daniel.haxx.se/curl/curl-certinfo-090814.patch






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



#49254 [NEW]: setlocale affects math functions

2009-08-14 Thread stakadush at yahoo dot com
From: stakadush at yahoo dot com
Operating system: Ubuntu 9.04  OS X 10.5.7
PHP version:  5.3.0
PHP Bug Type: Math related
Bug description:  setlocale affects math functions

Description:

setlocalte affects the return of math functions, making them unusable.
in this example the dot is being replaced with the italian comma 
notation.

Reproduce code:
---
setlocale(LC_ALL, 'it_IT.UTF-8');

echo abs(-5.5);

Expected result:

5.5

Actual result:
--
5,5

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



#49255 [NEW]: PDO fails to insert boolean FALSE to MySQL in prepared statement

2009-08-14 Thread carysmith at creighton dot edu
From: carysmith at creighton dot edu
Operating system: Windows 2003 Ent.
PHP version:  5.2.10
PHP Bug Type: PDO related
Bug description:  PDO fails to insert boolean FALSE to MySQL in prepared 
statement

Description:

Before I report the bug, would just like to say that PDO is excellent and
I am enjoying working with it.

The Issue:
When attempting to insert a Boolean FALSE into a MySQL Boolean column, the
insert fails. Inserting a 0 does not. 

The following example code is borrowed from another post which was similar
http://bugs.php.net/bug.php?id=38386 and modified to accommodate how I am
using it.

Reproduce code:
---
?php
$dbh = new PDO( 'mysql:host=localhost; dbname=Testing', 'DevUser',
'p...@ssw0rd!');

// Create table
$query = 'CREATE TABLE Testing.test_boolean(TheBoolean BOOLEAN);';
$createStatement = $dbh-prepare( $query);
$createStatement-execute();

// Attempt to insert Boolean records into table - (FALSE insert fails
without error)
$query = 'insert into Testing.test_boolean set TheBoolean = ?;';
$statement = $dbh-prepare( $query);
$statement-execute(array(true));
$statement-execute(array(false));

// However by replacing Boolean with integers does work
$statement-execute(array(1));
$statement-execute(array(0));
?

Expected result:

4 rows added to the table:

1
0
1
0



Actual result:
--
3 rows added to the table:

1
1
0

Investigation of the MySQL logs shows the Boolean FALSE is inserted as an
empty string '' which fails. Please verify if I am missing something or
this cannot be reproduced. In the meantime I am changing the code to use
numbers instead of Boolean.

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



#49256 [NEW]: PHP ignores Where clause on Where with boolean fields

2009-08-14 Thread rafinguer at gmail dot com
From: rafinguer at gmail dot com
Operating system: Windows Vista
PHP version:  5.2SVN-2009-08-14 (snap)
PHP Bug Type: PostgreSQL related
Bug description:  PHP ignores Where clause on Where with boolean fields

Description:

PHP ignores the true or false values in a SQL sentence, returning always 

all the records:

select id_product_type, name_product_type 
from sch_trazalogic.product_type 
where deleted=false
order by name_product_type

I tried with where deleted='f' and with where not deleted. The 
result is the same. With PGAdmin (Query tool), the result is correct.

Reproduce code:
---
$result=;
$qry = select id_product_type, name_product_type .
   from sch_trazalogic.product_type .
   where deleted=false .
   order by name_product_type;
$result_qry = pg_query($connection, $qry);
$num_rows = pg_numrows($result_qry);
$current=0;
while ($current$num_rows) {
  $row = pg_fetch_row($result_qry, $current);  // fetch current row
  $result = $result_xml.$row[0].-.$row[1].\n;
  $current++;
}
pg_close($connection);
echo $result_xml;


Expected result:

All the records with deleted with false value

Actual result:
--
All the records (deleted=true and deleted=false)

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



#49259 [NEW]: Add month 13 to date_parse()

2009-08-14 Thread alan at wilcoxengineering dot com
From: alan at wilcoxengineering dot com
Operating system: Linux
PHP version:  5.2.10
PHP Bug Type: Feature/Change Request
Bug description:  Add month 13 to date_parse()

Description:

date_parse expects months 1..12 only.

date_parse(13/1/5769)  for  month=13, Ehul in Jewish calendar, results 
in  month==3 instead of month==13.

It does, however, report the error array showing Unexpected Character.

It would be nice if date_parse could handle the months properly (just 
report back a 13 for the month). The older approach of substr() is my 
workaround.

Reproduce code:
---
---
From manual page: function.date-parse
---
date_parse(13/1/5769)  

Expected result:

Array for month should show 13 instead of 3


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



#49249 [WFx]: Call-time pass-by-reference deprecated - undeprecate

2009-08-14 Thread ile at dennisgiese dot de
 ID:   49249
 User updated by:  ile at dennisgiese dot de
 Reported By:  ile at dennisgiese dot de
 Status:   Wont fix
 Bug Type: Feature/Change Request
 Operating System: Win XP Sp3
 PHP Version:  5.3.0
 New Comment:

maybe but think of php functions like array_walk! you can turn them off
then as well... 

don't tell me what is wrong-reasoned or not. just look at what is
wrong-reasoned from YOUR site. i just tool that simple example since it
was the closest i had used. 

just telling me ONE single reason, WHY it should be turned off!

it is nonsense - and, as stated above - throws php back to stoneage
since EVERY other good programming language i know, make use of
call-time pass-by-reference. 

and i won't look up general lists for reasons why because there are
no reasons why to turn that off.


Previous Comments:


[2009-08-14 08:48:21] der...@php.net

You're using references for all the wrong reasons here as well. Please
refer to the php-general list as to why.



[2009-08-14 05:20:52] ile at dennisgiese dot de

Description:

Please undreprecate Call-Time pass-by-reference, since it is a fully
supported and used way of programming style in almost EVERY serious and
big language!

Reproduce code:
---
If you have any kind of class or stack of functions you surely want to
keep lines of code as short as possible. on the other hand you surely
don't want to copy your variables just to call a function...

example:

building an XML document, while using a (sub)function in order to
create only sligthly different paths:

private function _prepareRequest()
 {
   //[some other code]
$this-_StoreInterval(from,$xmlwriter,$this-startdate);
$this-_StoreInterval(to,$xmlwriter,$this-enddate);
   //[some other code]
 }

private function _StoreInterval($kind,$xmlwriter,$date)
 {
$xmlwriter-startElement($kind);
$xmlwriter-writeElement(day,date(d,$date));
$xmlwriter-writeElement(month,date(m,$date));
$xmlwriter-writeElement(year,date(Y,$date));
$xmlwriter-writeElement(hour,date(H,$date));
$xmlwriter-endElement();
 }

Expected result:

in 5.3.0 this still works, but got an warning because this is
deprecated...

Actual result:
--
actually this should be working anyway, since i don't want to waste
memory just to copy and paste back results from this subfunction. 

if this won't work it makes - to some extend - building functions
useles.





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



#49260 [NEW]: IPC msg_get_queue fails to retrieve common resource id across scripts

2009-08-14 Thread ivan dot barrios at gmail dot com
From: ivan dot barrios at gmail dot com
Operating system: MacOS v10.5.7
PHP version:  5.2.10
PHP Bug Type: Semaphore related
Bug description:  IPC msg_get_queue fails to retrieve common resource id across 
scripts

Description:

Identical PHP scripts function on Ubuntu 9.04 Desktop perfectly. 

Mac OSX configuration:

PHP version: 5.2.10
sysvmsg version: $Revision: 1.20.2.3.2.8 $
sysvmsg package installed as an extension (.so file)

Ubuntu configuration:

PHP version: 5.2.10
sysvmsg version: $Revision: 1.20.2.3.2.7 $
sysvmsg package installed as an extension (.so file)



Reproduce code:
---
See http://www.phpfreaks.com/forums/index.php/topic,264945.0.html

for source code: 2 files (msg_client.php, msg_server.php)

Expected result:

Code should print following text to PHP error log:

queue_id says hello.\n
COREPHP\n



Actual result:
--
Nothing gets printed because the $serverQueue in the Client script 
(msg_client.php) never gets loaded with the correct queue id for the 
Server.

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



#49261 [NEW]: Default arguments on interface implicitly passed to implementing classes

2009-08-14 Thread a dot dotreppe at aspyct dot org
From: a dot dotreppe at aspyct dot org
Operating system: Windows Vista 32bit
PHP version:  5.3.0
PHP Bug Type: Feature/Change Request
Bug description:  Default arguments on interface implicitly passed to 
implementing classes

Description:

Hi,

The aim of interfaces is to provide the same external behavior, no matter
what class implements it.

Maybe it would be nice for interfaces to be able to force a default value
for argument on implemented methods.
Moreover, that way we could change all method's default argument by
modifying it on one place only: the interface.

Reproduce code:
---
interface Fetchable {
const FETCH_ASSOC = 1;

function fetch($fetchStyle=self::FETCH_ASSOC);
function fetchAll($fetchStyle=self::FETCH_ASSOC);
}

class PDOLayerStatement implements Fetchable {
/* This one works fine, but I have to know the default value on
interface,
 * and even reference the interface,
 * which will raise the amount of maintenance work
 */
public function fetch($fetchStyle=Fetchable::FETCH_ASSOC);

/* These two won't work, sadly :( */
public function fetch($fetchStyle) {}
public function fetchAll($fetchStyle) {}
}

Expected result:

It would be nice if PHP could automatically give Fetchable::FETCH_ASSOC as
default value for $fetchStyle in every implementing class.

Actual result:
--
Fatal error: Declaration of PDOLayerStatement::fetch() must be compatible
with that of Fetchable::fetch() in C:\xampp\htdocs\aspyct\src\test.php

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



#49262 [NEW]: PDO MySQL doesn't take STRING params

2009-08-14 Thread grzegorz at heex dot pl
From: grzegorz at heex dot pl
Operating system: Win XP Sp3
PHP version:  5.3.0
PHP Bug Type: PDO related
Bug description:  PDO MySQL doesn't take STRING params

Description:

Now, PDO in PHP 5.3 is usless.

Reproduce code:
---
$name = 'same_name';
$pdo= new PDO(mysql:host=localhost;dbname=[base];,'[user]','[pass]');
$sth = $pdo-prepare(SELECT * FROM lng WHERE lng_name=:Name);
$sth-bindValue(':Name',$name,PDO::PARAM_STR);
$sth-execute();
die('OK');

Expected result:

OK

Actual result:
--
PHP CGI / FastCGI crash

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



#49263 [NEW]: SplObjectStorage fails to serialize references

2009-08-14 Thread m dot kurzyna at crystalpoint dot pl
From: m dot kurzyna at crystalpoint dot pl
Operating system: Linux
PHP version:  5.3.0
PHP Bug Type: SPL related
Bug description:  SplObjectStorage fails to serialize references

Description:

splObjectStorage fails to keep objects stored properly when they are
internally referenced (see [obj]= NULL in the dump).



Reproduce code:
---
$o1 = new stdClass;
$o2 = new stdClass;

$s = new splObjectStorage();

$s[$o1] = array('prev' = null, 'next' = $o2);
$s[$o2] = array('prev' = $o1, 'next' = null);

var_dump(unserialize(serialize($s)));


Expected result:

object(SplObjectStorage)#3 (1) {
  [storage:SplObjectStorage:private]=
  array(2) {
[3696c2e4eec51f06]=
array(2) {
  [obj]=
  object(stdClass)#1 (0) {
  }
  [inf]=
  array(2) {
[prev]=
NULL
[next]=
object(stdClass)#2 (0) {
}
  }
}
[3696c2e7eec51f06]=
array(2) {
  [obj]=
  object(stdClass)#2 (0) {
  }
  [inf]=
  array(2) {
[prev]=
object(stdClass)#1 (0) {
}
[next]=
NULL
  }
}
  }
}

Actual result:
--
object(SplObjectStorage)#4 (1) {
  [storage:SplObjectStorage:private]=
  array(2) {
[3696c2e0eec51f06]=
array(2) {
  [obj]=
  object(stdClass)#5 (0) {
  }
  [inf]=
  array(2) {
[prev]=
NULL
[next]=
object(stdClass)#6 (0) {
}
  }
}
[3696c2e5593811c6]=
array(2) {
  [obj]=
  NULL
  [inf]=
  array(2) {
[prev]=
object(stdClass)#5 (0) {
}
[next]=
NULL
  }
}
  }
}


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



#49151 [Opn]: relocation must bind locally

2009-08-14 Thread nlopess
 ID:   49151
 Updated by:   nlop...@php.net
 Reported By:  tech at uscki dot nl
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Sun Solaris 5.10 (i386)
 PHP Version:  5.3.0
 Assigned To:  nlopess
 New Comment:

sorry, I forgot to say that before ./configure you must run ./buildconf


Previous Comments:


[2009-08-14 16:49:14] nlop...@php.net

you can disable the visibility patch by editing the configure.in file
and removing the occurrence of -fvisibility=hidden. Then do a
./vcsclean  ./configure  make. Then please report if it worked, and
which compiler version you used. thanks.



[2009-08-14 10:08:07] tech at uscki dot nl

Hmmm, adding static isn't trivial, these first two methods were the tip
of the iceberg... Looks like I'll be adding it all through the code if I
go through with this (I stopped after about 10 changes in various
files). 

How do I disable the visibility thing, as Nuno noted?



[2009-08-13 10:01:53] j...@php.net

in ext/date/php_date.c:485, add static in front of this line:

ZEND_DECLARE_MODULE_GLOBALS(date)




[2009-08-13 09:50:30] tech at uscki dot nl

Hi, the suggestion of making date_ce_date static seems to help! But I'm
not quite there yet :( , date_globals gives a similar error:

ld: fatal: relocation error: R_386_GOTOFF: file
ext/date/.libs/php_date.o: symbol date_globals: relocation must bind
locally

I'm not quite able to find its definition to make that one static as
well (due to my lousy C-skills ... ;) ). Any ideas where to do this?



[2009-08-10 22:51:29] nlop...@php.net

If adding static doesn't help, we can disable the visibility thing on
solaris. (due to the apparently broken compiler/assembler).



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

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



#49264 [NEW]: Can use any scalar as an array

2009-08-14 Thread a dot dotreppe at aspyct dot org
From: a dot dotreppe at aspyct dot org
Operating system: Windows Vista 32bit
PHP version:  5.3.0
PHP Bug Type: Scripting Engine problem
Bug description:  Can use any scalar as an array

Description:

Hi

I just noticed that any scalar type could be used as an array.
This could be source of a long list of undetectable bugs.
Should this be considered as a bug ?

Except for strings, that should be indexable. But then, only with numeric
indexes, not strings (that are anyway evaluated to 0).

Reproduce code:
---
$value = false;
var_dump($value['hello']);

$value = 4;
var_dump($value['hello']);

$value = 74.6;
var_dump($value['hello']);

$value = 'hello';
var_dump($value['hello']);

Expected result:

Some Fatal error, something brutal that will halt the script.

Actual result:
--
NULL NULL NULL string(1) h 

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



#49249 [WFx]: Call-time pass-by-reference deprecated - undeprecate

2009-08-14 Thread rasmus
 ID:   49249
 Updated by:   ras...@php.net
 Reported By:  ile at dennisgiese dot de
 Status:   Wont fix
 Bug Type: Feature/Change Request
 Operating System: Win XP Sp3
 PHP Version:  5.3.0
 New Comment:

There are actually really good technical reasons for turning them off
and not allowing by-refs to functions that do not handle them properly.


Previous Comments:


[2009-08-14 19:43:25] ile at dennisgiese dot de

maybe but think of php functions like array_walk! you can turn them off
then as well... 

don't tell me what is wrong-reasoned or not. just look at what is
wrong-reasoned from YOUR site. i just tool that simple example since it
was the closest i had used. 

just telling me ONE single reason, WHY it should be turned off!

it is nonsense - and, as stated above - throws php back to stoneage
since EVERY other good programming language i know, make use of
call-time pass-by-reference. 

and i won't look up general lists for reasons why because there are
no reasons why to turn that off.



[2009-08-14 08:48:21] der...@php.net

You're using references for all the wrong reasons here as well. Please
refer to the php-general list as to why.



[2009-08-14 05:20:52] ile at dennisgiese dot de

Description:

Please undreprecate Call-Time pass-by-reference, since it is a fully
supported and used way of programming style in almost EVERY serious and
big language!

Reproduce code:
---
If you have any kind of class or stack of functions you surely want to
keep lines of code as short as possible. on the other hand you surely
don't want to copy your variables just to call a function...

example:

building an XML document, while using a (sub)function in order to
create only sligthly different paths:

private function _prepareRequest()
 {
   //[some other code]
$this-_StoreInterval(from,$xmlwriter,$this-startdate);
$this-_StoreInterval(to,$xmlwriter,$this-enddate);
   //[some other code]
 }

private function _StoreInterval($kind,$xmlwriter,$date)
 {
$xmlwriter-startElement($kind);
$xmlwriter-writeElement(day,date(d,$date));
$xmlwriter-writeElement(month,date(m,$date));
$xmlwriter-writeElement(year,date(Y,$date));
$xmlwriter-writeElement(hour,date(H,$date));
$xmlwriter-endElement();
 }

Expected result:

in 5.3.0 this still works, but got an warning because this is
deprecated...

Actual result:
--
actually this should be working anyway, since i don't want to waste
memory just to copy and paste back results from this subfunction. 

if this won't work it makes - to some extend - building functions
useles.





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



#49151 [Opn]: relocation must bind locally

2009-08-14 Thread tech at uscki dot nl
 ID:   49151
 User updated by:  tech at uscki dot nl
 Reported By:  tech at uscki dot nl
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Sun Solaris 5.10 (i386)
 PHP Version:  5.3.0
 Assigned To:  nlopess
 New Comment:

Yeah, got it compiling! I removed -fvisibility=hidden from the
Makefile after running ./configure, guess that boils down to the same
result, though your suggestion is a bit tidier.

Compiler: gcc (GCC) 4.0.1

Thanks for all your help!


Previous Comments:


[2009-08-14 21:54:04] nlop...@php.net

sorry, I forgot to say that before ./configure you must run ./buildconf



[2009-08-14 16:49:14] nlop...@php.net

you can disable the visibility patch by editing the configure.in file
and removing the occurrence of -fvisibility=hidden. Then do a
./vcsclean  ./configure  make. Then please report if it worked, and
which compiler version you used. thanks.



[2009-08-14 10:08:07] tech at uscki dot nl

Hmmm, adding static isn't trivial, these first two methods were the tip
of the iceberg... Looks like I'll be adding it all through the code if I
go through with this (I stopped after about 10 changes in various
files). 

How do I disable the visibility thing, as Nuno noted?



[2009-08-13 10:01:53] j...@php.net

in ext/date/php_date.c:485, add static in front of this line:

ZEND_DECLARE_MODULE_GLOBALS(date)




[2009-08-13 09:50:30] tech at uscki dot nl

Hi, the suggestion of making date_ce_date static seems to help! But I'm
not quite there yet :( , date_globals gives a similar error:

ld: fatal: relocation error: R_386_GOTOFF: file
ext/date/.libs/php_date.o: symbol date_globals: relocation must bind
locally

I'm not quite able to find its definition to make that one static as
well (due to my lousy C-skills ... ;) ). Any ideas where to do this?



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

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



#49259 [Opn-WFx]: Add month 13 to date_parse()

2009-08-14 Thread derick
 ID:   49259
 Updated by:   der...@php.net
 Reported By:  alan at wilcoxengineering dot com
-Status:   Open
+Status:   Wont fix
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  5.2.10
 New Comment:

The date_parse() function is meant to parse dates in the proleptic
Gregorian calendar.


Previous Comments:


[2009-08-14 18:02:26] alan at wilcoxengineering dot com

Description:

date_parse expects months 1..12 only.

date_parse(13/1/5769)  for  month=13, Ehul in Jewish calendar,
results 
in  month==3 instead of month==13.

It does, however, report the error array showing Unexpected
Character.

It would be nice if date_parse could handle the months properly (just 
report back a 13 for the month). The older approach of substr() is my

workaround.

Reproduce code:
---
---
From manual page: function.date-parse
---
date_parse(13/1/5769)  

Expected result:

Array for month should show 13 instead of 3






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



#48761 [Com]: php crashes on start - getaddrinfo could not be located

2009-08-14 Thread bruce at thinkcorporate dot com
 ID:   48761
 Comment by:   bruce at thinkcorporate dot com
 Reported By:  aheckmann at m-s dot de
 Status:   To be documented
 Bug Type: Reproducible crash
 Operating System: win32 only - Windows 2000 SP4
 PHP Version:  5.3.0
 New Comment:

I run IIS 6 on W2K SP4 and get the same error.

I reviewed

http://msdn.microsoft.com/en-us/library/ms738520%28VS.85%29.aspx

How do I implement the fix?


Previous Comments:


[2009-08-10 11:45:18] paj...@php.net

Only 2000 and xp with SP1 (or no SP) are affected. 2003 does work as
expected.

By the way, I very much doubt that most servers use 2000.

Set as to be documented.



[2009-07-29 23:00:21] jon dot harrell at gmail dot com

Until this bug is fixed wouldn't it make sense to place a notice
warning all potential users that the binary downloads at
http://windows.php.net/download/ require XP SP2 or above?



[2009-07-17 12:04:31] jet5y at hotmail dot co dot uk

However, considering that most servers running it would either be 2000
or 2003 and not XP then a workaround would seem more sensible at the
slight detriment for now of XP SP2 systems.



[2009-07-02 23:48:19] ka...@php.net

The problem with fixing this (by doing an include to emulate the
functions on systems without it (Windows 2000, XP prior SP2) is that it
will slow down for other system that already got it, as it will attempt
to load the ws2_32 library and search for the symbol locations, which is
just slowing us down for no *real* reason.

The question whether to fix this is trival, Me, Pierre and the others
will discuss this and how to deal with it.



[2009-07-02 17:08:20] jon dot harrell at gmail dot com

If PHP support for w2k remains then use of GetAddrInfoW must be woked
around. The article above explains very plainly that this function is XP
SP2+ ONLY. Currently PHP 5.3 is not compatible with w2k-XP SP1.


The GetAddrInfoW function is the Unicode version of getaddrinfo. The
GetAddrInfoW function was added to the Ws2_32.dll in Windows XP with
Service Pack 2 (SP2). The GetAddrInfoW function cannot be used on
versions of Windows earlier than Windows XP with SP2.



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

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



#49247 [Opn-Bgs]: preg_match_all and \w issues

2009-08-14 Thread felipe
 ID:   49247
 Updated by:   fel...@php.net
 Reported By:  mariusads at helpedia dot com
-Status:   Open
+Status:   Bogus
 Bug Type: PCRE related
 Operating System: Windows 2003 Web Edition
 PHP Version:  5.2.10
 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

See bug #49036


Previous Comments:


[2009-08-13 23:16:35] mariusads at helpedia dot com

Description:

I was under the impression that \w matches any word character, as in
a-z, A-Z, 0-9 and _ characters (documentation also says some character
codes greater than 128 are used for accented letters, and these are
matched by \w if a specific code page is used but it's not the case
here, it's a default PHP installation).

However, I have noticed the following issue and I'm not sure if it's a
bug in PHP or an error in the way I've written the regular expression in
the code below. As I understood regular expressions work, the code below
should not return any match but it does.



Reproduce code:
---
$text = 'start://abcd'.chr(255).chr(255).'efgh';

$results = preg_match_all('/(start:\/\/|finish:\/\/){1}([\w\x3A -
\x40]*)$/is',$text,$matches,PREG_OFFSET_CAPTURE);
var_dump($results,$matches);

Expected result:

The could above should return no matches. If the $ at the end is
omitted, I think it should return start://abcd. Replacing \w with
0-9a-zA-Z_ produces the correct output.

Actual result:
--
Output of the above code:

int(1)
array(3) {
  [0]=
  array(1) {
[0]=
array(2) {
  [0]=
  string(18) start://abcd��efgh
  [1]=
  int(0)
}
  }
  [1]=
  array(1) {
[0]=
array(2) {
  [0]=
  string(8) start://
  [1]=
  int(0)
}
  }
  [2]=
  array(1) {
[0]=
array(2) {
  [0]=
  string(10) abcd��efgh
  [1]=
  int(8)
}
  }
}






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



#49258 [NEW]: PDO MySQL execute(array) causes CGI/FastCGI crash

2009-08-14 Thread grzegorz at heex dot pl
From: grzegorz at heex dot pl
Operating system: Win XP Sp3
PHP version:  5.3.0
PHP Bug Type: PDO related
Bug description:  PDO MySQL execute(array) causes CGI/FastCGI crash

Description:

PHP crashes if there is no PDO_Type of param

Reproduce code:
---
$pdo = new PDO(mysql:host=localhost;dbname=[base];,'[user]','[pass]');

$sth = $pdo-prepare(SELECT * FROM lng WHERE lng_id=:Id);
$id = 1;

//causes PHP crash
$sth-execute(array(':Id'=$id));
//OR
//$sth-bindParam(':Id',$id);$sth-execute();

//works fine:
//$sth-bindValue(':Id',$id,PDO::PARAM_INT);
//$sth-execute();

die('OK');

Expected result:

OK

Actual result:
--
PHP CGI/FastCGI crash

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



#49151 [Opn]: relocation must bind locally

2009-08-14 Thread nlopess
 ID:   49151
 Updated by:   nlop...@php.net
 Reported By:  tech at uscki dot nl
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Sun Solaris 5.10 (i386)
 PHP Version:  5.3.0
 Assigned To:  nlopess
 New Comment:

you can disable the visibility patch by editing the configure.in file
and removing the occurrence of -fvisibility=hidden. Then do a
./vcsclean  ./configure  make. Then please report if it worked, and
which compiler version you used. thanks.


Previous Comments:


[2009-08-14 10:08:07] tech at uscki dot nl

Hmmm, adding static isn't trivial, these first two methods were the tip
of the iceberg... Looks like I'll be adding it all through the code if I
go through with this (I stopped after about 10 changes in various
files). 

How do I disable the visibility thing, as Nuno noted?



[2009-08-13 10:01:53] j...@php.net

in ext/date/php_date.c:485, add static in front of this line:

ZEND_DECLARE_MODULE_GLOBALS(date)




[2009-08-13 09:50:30] tech at uscki dot nl

Hi, the suggestion of making date_ce_date static seems to help! But I'm
not quite there yet :( , date_globals gives a similar error:

ld: fatal: relocation error: R_386_GOTOFF: file
ext/date/.libs/php_date.o: symbol date_globals: relocation must bind
locally

I'm not quite able to find its definition to make that one static as
well (due to my lousy C-skills ... ;) ). Any ideas where to do this?



[2009-08-10 22:51:29] nlop...@php.net

If adding static doesn't help, we can disable the visibility thing on
solaris. (due to the apparently broken compiler/assembler).



[2009-08-05 14:48:12] j...@php.net

Would this help:

ext/date/php_date.c:511

-zend_class_entry *date_ce_date, *date_ce_timezone, *date_ce_interval,
*date_ce_period;
+static zend_class_entry *date_ce_date, *date_ce_timezone,
*date_ce_interval, *date_ce_period;

(add static there :)



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

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



#49257 [NEW]: stream_socket_enable_crypto problems outside of child process

2009-08-14 Thread jerrywilborn at gmail dot com
From: jerrywilborn at gmail dot com
Operating system: CentOS 4.4
PHP version:  5.2.10
PHP Bug Type: Streams related
Bug description:  stream_socket_enable_crypto problems outside of child process

Description:

Open a tcp connection using stream_socket_client, spawn a child process 
with pcntl_fork, encrypt the stream in the child, fetch data from the 
stream.  In the parent wait for the child to finish and then fetch data 
out of the stream; it is not decrypted.

Reproduce code:
---
?

$s = stream_socket_client(tcp://smtpout.secureserver.net:465, $errno,
$errstr, 5, STREAM_CLIENT_CONNECT);

if (!pcntl_fork()) {
if (stream_socket_enable_crypto($s, TRUE,
STREAM_CRYPTO_METHOD_SSLv23_CLIENT)) {
print child:  . fgets($s);
}
exit;
}

pcntl_wait($status);
print parent:  . fgets($s) . \n;

?

Expected result:

child: 220 smtpauth18.prod.mesa1.secureserver.net ESMTP
parent: 220 smtpauth18.prod.mesa1.secureserver.net ESMTP

Actual result:
--
child: 220 smtpauth18.prod.mesa1.secureserver.net ESMTP
parent:  ??1)?cV^~?
   ??n?0?s`wh?9


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