#43325 [Opn-Fbk]: feof() hangs on UDP stream

2007-11-20 Thread jani
 ID:   43325
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mertcan at dpozitif dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Streams related
 Operating System: Centos 5.0
 PHP Version:  5.2.5
 New Comment:

That's still just a piece of the script, a proper test script starts
with ?php and ends in ? and can be just copy'pasted and run..


Previous Comments:


[2007-11-19 17:19:22] mertcan at dpozitif dot com

i gave $tanim in function use:

function rcon_komut($komut, $rcon_pass, $ip, $port)
{
$msg = challenge rcon;
$fp = fsockopen(udp://.$ip,$port, $errno, $errstr);

stream_set_blocking($fp, 0);

fputs($fp, $msg, strlen($msg));
$response = fgets($fp, 1024);   
$challenge = substr($response, 19, strlen($response) - 20);

$msg=rcon.$challenge.\.$rcon_pass.\.$komut.chr(0);
fputs($fp, $msg, strlen($msg));

while (!feof($fp))
$response .= fgets($fp, 32);

fclose ($fp);
$response = substr($response, 6, strlen($response)-6);
return $response;
}



[2007-11-19 16:31:10] [EMAIL PROTECTED]

Well, can you give a script that has some possibility of working
properly? In the give script you have at least one variable which is not
set anywhere: $komut




[2007-11-19 14:56:21] mertcan at dpozitif dot com

It still hangs:

$fp = fsockopen(udp://.$ip,$port, $errno, $errstr);
stream_set_blocking($fp, 0);



[2007-11-19 13:29:07] [EMAIL PROTECTED]

Shouldn't you make the stream non-blocking? Try adding this after
fsockopen:

stream_set_blocking($fp, false);



[2007-11-18 23:12:34] mertcan at dpozitif dot com

Description:

Using feof on UDP hangs. It should give true or false, in my example it
should give true but it hangs. I've tried many ways but it always hangs.

Reproduce code:
---
$msg = challenge rcon;

$fp = fsockopen(udp://62.68.207.16,27015, $errno, $errstr);
fputs($fp, $msg, strlen($msg));
$response = fgets($fp, 1024);   
$challenge = substr($response, 19, strlen($response) - 20);

$msg = rcon .$challenge. \123456\ .$komut.chr(0);
fputs($fp, $msg, strlen($msg));

echo feof($fp) ? 'true':'false';

$response .= fgets($fp, 32);

fclose ($fp);

Expected result:

true

Actual result:
--
hangs





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


#43341 [Opn-Fbk]: Make install fails to install .so and others

2007-11-20 Thread jani
 ID:   43341
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jay3ld at yahoo dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Mac os X 10.5 Leopard
 PHP Version:  5.3CVS-2007-11-20 (snap)
 New Comment:

What was the full configure line you used? And you used a snapshot from
http://snaps.php.net/ ?


Previous Comments:


[2007-11-20 06:19:37] jay3ld at yahoo dot com

Description:

While building php 5.3 on my Macbook pro running 10.5 leopard. It will
not complete the compile. 5.2 works just fine. The only thing I changed
between 5.3 and 5.2 compiles is the prefix into different directories.

After It completes I check the /home/php53/bin directory and no php or
php-cli file exists. As well as the .so file is not created.

I do have php 5.2 compiled as well on the same machine in a different
directory (/home/php52) and it will compile just fine.

As well until I used --without-pear I also received a pear error.

Using Apache 2.2.6

Reproduce code:
---
This is what the make install outputs:

Installing PHP SAPI module:   apache2handler
/home/apache/build/instdso.sh SH_LIBTOOL='/home/apache/build/libtool'
libs/libphp5.so /home/apache/modules
/home/apache/build/libtool --mode=install cp libs/libphp5.so
/home/apache/modules/
cp libs/libphp5.so /home/apache/modules/libphp5.so
Warning!  dlname not found in /home/apache/modules/libphp5.so.
Assuming installing a .so rather than a libtool archive.
chmod 755 /home/apache/modules/libphp5.so
[activating module `php5' in /home/apache/conf/httpd.conf]
Installing PHP CLI binary:/home/php53/bin/
Installing PHP CLI man page:  /usr/share/man/man1/
Installing build environment: /home/php53/lib/php/build/
Installing header files:  /home/php53/include/php/
Installing helper programs:   /home/php53/bin/
  program: phpize
  program: php-config
Installing man pages: /usr/share/man/man1/
  page: phpize.1
  page: php-config.1
Installing PDO headers:  /home/php53/include/php/ext/pdo/

If I don't include --without-pear I receive this as well:

Installing PEAR environment:  /home/php53/lib/php/

No download utilities found. Don\'t know how to download PEAR archive.
+--+
| The installation process is incomplete. The following resources were
|
| not installed:  
|
| 
|
|   PEAR: PHP Extension and Application Repository
|
| 
|
| To install these components,
|
| download http://pear.php.net/install-pear.phar to php-src/pear/ 
|
| become the superuser and execute:   
|
| 
|
|   # make install-su 
|
+--+







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


#43325 [Opn-Fbk]: feof() hangs on UDP stream

2007-11-20 Thread jani
 ID:   43325
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mertcan at dpozitif dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Streams related
 Operating System: Centos 5.0
 PHP Version:  5.2.5
 New Comment:

Your script doesn't work because you don't get anything in $response in
the first place. So you're passing invalid data around long before
feof() is used and the server just sits there propably waiting for more
data to be input before it gives any back..


Previous Comments:


[2007-11-20 09:10:45] mertcan at dpozitif dot com

Here is the full program:

?php

echo rcon_komut(meta list, 123456, 62.68.207.16, 27015);

function rcon_komut($komut, $rcon_pass, $ip, $port)
{
$response = ;
$msg = challenge rcon;
$fp = fsockopen(udp://.$ip,$port, $errno, $errstr);

stream_set_blocking($fp, 0);

fputs($fp, $msg, strlen($msg));
$response = fgets($fp, 1024);   
$challenge = substr($response, 19, strlen($response) - 20);

$msg=rcon.$challenge.\.$rcon_pass.\.$komut.chr(0);
fputs($fp, $msg, strlen($msg));

while (!feof($fp))
$response .= fgets($fp, 4096);

fclose ($fp);

return $response;
}

?



[2007-11-20 08:44:44] [EMAIL PROTECTED]

That's still just a piece of the script, a proper test script starts
with ?php and ends in ? and can be just copy'pasted and run..



[2007-11-19 17:19:22] mertcan at dpozitif dot com

i gave $tanim in function use:

function rcon_komut($komut, $rcon_pass, $ip, $port)
{
$msg = challenge rcon;
$fp = fsockopen(udp://.$ip,$port, $errno, $errstr);

stream_set_blocking($fp, 0);

fputs($fp, $msg, strlen($msg));
$response = fgets($fp, 1024);   
$challenge = substr($response, 19, strlen($response) - 20);

$msg=rcon.$challenge.\.$rcon_pass.\.$komut.chr(0);
fputs($fp, $msg, strlen($msg));

while (!feof($fp))
$response .= fgets($fp, 32);

fclose ($fp);
$response = substr($response, 6, strlen($response)-6);
return $response;
}



[2007-11-19 16:31:10] [EMAIL PROTECTED]

Well, can you give a script that has some possibility of working
properly? In the give script you have at least one variable which is not
set anywhere: $komut




[2007-11-19 14:56:21] mertcan at dpozitif dot com

It still hangs:

$fp = fsockopen(udp://.$ip,$port, $errno, $errstr);
stream_set_blocking($fp, 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/43325

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


#43136 [Asn-Csd]: possible crash on script execution timeout

2007-11-20 Thread dmitry
 ID:   43136
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Assigned
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: Linux 64bit
 PHP Version:  4.4.7
 Assigned To:  dmitry
 New Comment:

Fixed in CVS HEAD and PHP_5_3.


Previous Comments:


[2007-11-08 12:54:14] [EMAIL PROTECTED]

Probably the crash occurs because of wrong value in EG(opline_ptr).

In zend_do_fcall_common_helper() EG(opline_ptr) is inconsistent after
call to zend_execute() and restoring it by EG(opline_ptr) =
EX(opline);

If the timeout occurs while EG(opline_ptr) is inconsistent, it may
crash php.

EG(active_op_array) has exactly the same problem.




[2007-10-30 08:47:32] [EMAIL PROTECTED]

Assigning to Dmitry at his request.



[2007-10-30 08:45:23] [EMAIL PROTECTED]

Description:

The crash is really rare, but seems to be possible.
According to the core, it happened when script execution timed out and
active_opline pointer was NULL at that moment, so
zend_get_executed_lineno() tried to dereference NULL ptr.
Even though the backtrace mentions Zend Opimizer, it doesn't seem to be
required to reproduce the crash and it is not PHP4 specific.

Reproduce code:
---
.

Expected result:

.

Actual result:
--
(gdb) bt
#0  0x0052d7d1 in zend_get_executed_lineno () at
/shared/misc/standard/php.src/php-4.4.7/Zend/zend_execute_API.c:269
#1  0x00536c4b in zend_error (type=1, format=0x6ce4b8 Maximum
execution time of %d second%s exceeded)
at /shared/misc/standard/php.src/php-4.4.7/Zend/zend.c:760
#2  signal handler called
#3  0x002a97194f2b in zend_optimizer_set_oe_ex () from
/local/Zend/lib/php-4.4.x/ZendOptimizer.so
#4  0x002a97194f16 in zend_optimizer_set_oe_ex () from
/local/Zend/lib/php-4.4.x/ZendOptimizer.so
#5  0x002a97194f16 in zend_optimizer_set_oe_ex () from
/local/Zend/lib/php-4.4.x/ZendOptimizer.so
#6  0x002a97194f16 in zend_optimizer_set_oe_ex () from
/local/Zend/lib/php-4.4.x/ZendOptimizer.so
#7  0x002a97194f16 in zend_optimizer_set_oe_ex () from
/local/Zend/lib/php-4.4.x/ZendOptimizer.so
#8  0x005365bf in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at
/shared/misc/standard/php.src/php-4.4.7/Zend/zend.c:939
#9  0x004fe699 in php_execute_script
(primary_file=0x7fbb20) at
/shared/misc/standard/php.src/php-4.4.7/main/main.c:1784
#10 0x00557bfd in main (argc=5, argv=0x7fbc78) at
/shared/misc/standard/php.src/php-4.4.7/sapi/cgi/cgi_main.c:2236

Further investigation has shown that active_opline is NULL:
(gdb) f 0
#0  0x0052d7d1 in zend_get_executed_lineno () at
/shared/misc/standard/php.src/php-4.4.7/Zend/zend_execute_API.c:269
269
/shared/misc/standard/php.src/php-4.4.7/Zend/zend_execute_API.c: No such
file or directory.
in
/shared/misc/standard/php.src/php-4.4.7/Zend/zend_execute_API.c
(gdb) p executor_globals.opline_ptr
$3 = (zend_op **) 0x7fbfff9510
(gdb) p *executor_globals.opline_ptr
$4 = (zend_op *) 0x0






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


#42841 [NoF-Opn]: oci_new_cursor PHP crash

2007-11-20 Thread pr0head at gmail dot com
 ID:   42841
 User updated by:  pr0head at gmail dot com
 Reported By:  pr0head at gmail dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: OCI8 related
 Operating System: Linux version 2.6.20-gentoo-r8
 PHP Version:  5.2.4
 New Comment:

This script working normally if not reopen cursor.

Bad result:
$sql = BEGIN sp_vadik_1( :cursor ); END;;
$stmt = oci_parse( $connection, $sql );
$cursor = oci_new_cursor( $connection );
oci_bind_by_name( $stmt, :cursor, $cursor, -1, OCI_B_CURSOR );
oci_execute( $stmt, OCI_DEFAULT );
oci_execute( $cursor );
oci_free_statement( $stmt );
oci_free_statement( $cursor );

$sql = BEGIN sp_vadik_1( :cursor ); END;;
$stmt = oci_parse( $connection, $sql );
$cursor = oci_new_cursor( $connection );
oci_bind_by_name( $stmt, :cursor, $cursor, -1, OCI_B_CURSOR );
oci_execute( $stmt, OCI_DEFAULT );
oci_execute( $cursor );
oci_free_statement( $stmt );
oci_free_statement( $cursor );

Good result:
$sql = BEGIN sp_vadik_1( :cursor ); END;;
$stmt = oci_parse( $connection, $sql );
$cursor = oci_new_cursor( $connection );
oci_bind_by_name( $stmt, :cursor, $cursor, -1, OCI_B_CURSOR );
oci_execute( $stmt, OCI_DEFAULT );
oci_execute( $cursor );
oci_free_statement( $stmt );

$sql = BEGIN sp_vadik_1( :cursor ); END;;
$stmt = oci_parse( $connection, $sql );
oci_bind_by_name( $stmt, :cursor, $cursor, -1, OCI_B_CURSOR );
oci_execute( $stmt, OCI_DEFAULT );
oci_execute( $cursor );
oci_free_statement( $stmt );
oci_free_statement( $cursor );


Previous Comments:


[2007-11-20 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-11-12 10:35:02] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.





[2007-10-04 08:38:08] pr0head at gmail dot com

stop work - this crash PHP.
If run this script in command line, i see error segmentation false



[2007-10-04 08:27:01] pr0head at gmail dot com

Sorry, need change lines in EXECUTE 2 (for reproduction errors).
SQL and bind param must be the same for both executions:

$sql = BEGIN sp_vadik_1( :cursor ); END;;
oci_bind_by_name( $stmt, :cursor, $cursor, -1, OCI_B_CURSOR );



[2007-10-04 08:14:28] pr0head at gmail dot com

?php

/**
* ORACLE Storage Procedure
*
* create or replace procedure sp_vadik_1 ( out_1 out sys_refcursor ) is
begin
* open out_1 for select 11 from dual union all select 12 from dual
union all select 13 from dual;
* end sp_vadik_1; 
*/

$params_db = array( 'host' = localhost, 'username' = username,
'password' = password, 'dbname' = db );

putenv( 'ORACLE_SID=' . $params_db['dbname'] );
$conn_string = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=' .
$params_db['host'] . ')(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=' .
$params_db['dbname'] . ')))';

$connection = @oci_connect( $params_db['username'],
$params_db['password'], $conn_string );



// START EXECUTE 1 ---//
$sql = BEGIN sp_vadik_1( :cursor ); END;;
$stmt = oci_parse( $connection, $sql );
$cursor = oci_new_cursor( $connection );
oci_bind_by_name( $stmt, :cursor, $cursor, -1, OCI_B_CURSOR );

oci_execute( $stmt, OCI_DEFAULT );
oci_execute( $cursor );

while( $row = oci_fetch_array( $cursor, OCI_ASSOC + OCI_RETURN_LOBS )
)
{
$data[] = $row;
}

oci_free_statement( $stmt );
oci_free_statement( $cursor );
// STOP EXECUTE 1 ---//



// START EXECUTE 2 ---//
$sql = BEGIN sp_vadik_1( :cursor1 ); END;;
$stmt = oci_parse( $connection, $sql );
$cursor = oci_new_cursor( $connection );
oci_bind_by_name( $stmt, :cursor1, $cursor, -1, OCI_B_CURSOR );

oci_execute( $stmt, OCI_DEFAULT );
oci_execute( $cursor );

while( $row = oci_fetch_array( $cursor, OCI_ASSOC + OCI_RETURN_LOBS )
)
{
$data[] = $row;
}

oci_free_statement( $stmt );
oci_free_statement( $cursor );
var_dump($cur2);
// STOP EXECUTE 2 ---//

oci_close( $connection );


?



The remainder of the comments for this report are 

#43105 [Asn]: PHP seems to fail to close open files.

2007-11-20 Thread jani
 ID:   43105
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ian at onlineloop dot com
 Status:   Assigned
 Bug Type: Apache2 related
 Operating System: Solaris 10
 PHP Version:  5.2.5RC2-dev
 Assigned To:  ab5602
 New Comment:

IIRC, this is actually an Apache bug. PHP is not the only module which
suffers as 3rd party of it..


Previous Comments:


[2007-11-12 20:52:58] ian at onlineloop dot com

Hi,

I don't want to post the attahced file to the bug report as this may 
expose more information that I like about our web server.  It is a 
pfiles output from the apache processes.  I will send the file to you 
directly in an email.

The exact situation is difficult to reproduce, and happened most 
frequently when the server was under load.  We are typically handling 
about 100-120 requests per second, and under PHP 5.1.6 (we are back 
on it now), there was usually between 500 and 1000 open files at any 
one time between the apache processes.  

The symptom of the problem - system error messages, masses of open 
files, not being able to execute ssmtp and not being able to open 
files, also generally exists for just a couple of seconds, then goes 
away again.  The total memory usage of apache climbs constantly, 
usually hitting 6-8Gb within 24 hours of an apache restart, and 
continuing to climb if apache is not restarted.  After about 36 
hours, the ram usage is over 10Gb, at which point I restart the 
server as we need it to be available.  Since running 5.1.6 again (one 
week), the memory usage is constantly around 1.5-2Gb and there are no 
problems from 5.2.5rc-x.  I fear reproducing this will be difficult 
for you.

ssmtp is generally able to send mails, just occasionally it is hit by 
this problem.  Apache also has problems opening other files under 
this condition, apparently mainly for writing.  I have tried on the 
command line to send mails with ssmtp when the error messages start 
coming out, however that worked and the test mails came in.  cating 
files into another file, and things like this also worked.  

The problem of not being able to open files also occurs when not 
trying to send mails, as such my impression the problem is more 
general than just being connected with mail function.  I did put 
sendmail in briefly today to see what happened, the problem still 
occured.  A restart in the middle of the day for the apache process 
is not an option here as the service needs to be available.  I can 
only make changes to the system between 2 and 4am.

I will do what I can to help pinpoint this problem, please however 
understand the restrictions I have as I do this on a productive 
system.



[2007-11-11 19:18:31] [EMAIL PROTECTED]

1) What file(s) are being held open? (lsof/ptree may help).
2) Is 'ssmtp -t' successfully opening, delivering the email and closing
it's own network connections under this condition?  Every open network
connection requires 2 file descriptors.
3) Does this happen without sending mail()?
4) Does this happen with other delivery programs such as 'sendmail -t'?


Thanks,
-Rob



[2007-11-11 19:03:23] [EMAIL PROTECTED]

So, how can we reproduce this?



[2007-11-06 11:19:24] ian at onlineloop dot com

Changing this whole report as I have now more information.

After further examining the problem, it is clear that PHP is sometimes
failing to close the files it opens, and is generally failing to cleanly
exit, if it exits at all.  It is running with Apache 2.0.61.  As time
passes, PHP has more and more files open, the apache child processes do
not exit, the status of the child processes stays on W, writing, for
long periods of time although the network status on the server itsel
clearly shows that all connections to the remote address have closed. 
The memory usage also climbs constantly until the apache child process
dies, if the child process dies at all.  

In the system, this is noticable by the number of open files, in the
last 24 hours, this has changed from 4.2Gb and 30,711 open files to now
6.6Gb and 48,462 open files.  This increase in memory consumption and
the number of open files is continuous.  Additionally, there are more
and more apache child processes that simply do not exit.  It is this
behaviour that is clearly responsible for the problems of opening other
files, and for the failure to be able to execute some system calls, such
as sending mail and writing log files.

The cause for this behaviour is unclear, however it is definately PHP
5.2.x related as under PHP 5.1.6, everything is ok.



[2007-10-25 15:03:26] ian at onlineloop dot com

Description:


#43325 [Fbk-Opn]: feof() hangs on UDP stream

2007-11-20 Thread mertcan at dpozitif dot com
 ID:   43325
 User updated by:  mertcan at dpozitif dot com
 Reported By:  mertcan at dpozitif dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Streams related
 Operating System: Centos 5.0
 PHP Version:  5.2.5
 New Comment:

Here is the full program:

?php

echo rcon_komut(meta list, 123456, 62.68.207.16, 27015);

function rcon_komut($komut, $rcon_pass, $ip, $port)
{
$response = ;
$msg = challenge rcon;
$fp = fsockopen(udp://.$ip,$port, $errno, $errstr);

stream_set_blocking($fp, 0);

fputs($fp, $msg, strlen($msg));
$response = fgets($fp, 1024);   
$challenge = substr($response, 19, strlen($response) - 20);

$msg=rcon.$challenge.\.$rcon_pass.\.$komut.chr(0);
fputs($fp, $msg, strlen($msg));

while (!feof($fp))
$response .= fgets($fp, 4096);

fclose ($fp);

return $response;
}

?


Previous Comments:


[2007-11-20 08:44:44] [EMAIL PROTECTED]

That's still just a piece of the script, a proper test script starts
with ?php and ends in ? and can be just copy'pasted and run..



[2007-11-19 17:19:22] mertcan at dpozitif dot com

i gave $tanim in function use:

function rcon_komut($komut, $rcon_pass, $ip, $port)
{
$msg = challenge rcon;
$fp = fsockopen(udp://.$ip,$port, $errno, $errstr);

stream_set_blocking($fp, 0);

fputs($fp, $msg, strlen($msg));
$response = fgets($fp, 1024);   
$challenge = substr($response, 19, strlen($response) - 20);

$msg=rcon.$challenge.\.$rcon_pass.\.$komut.chr(0);
fputs($fp, $msg, strlen($msg));

while (!feof($fp))
$response .= fgets($fp, 32);

fclose ($fp);
$response = substr($response, 6, strlen($response)-6);
return $response;
}



[2007-11-19 16:31:10] [EMAIL PROTECTED]

Well, can you give a script that has some possibility of working
properly? In the give script you have at least one variable which is not
set anywhere: $komut




[2007-11-19 14:56:21] mertcan at dpozitif dot com

It still hangs:

$fp = fsockopen(udp://.$ip,$port, $errno, $errstr);
stream_set_blocking($fp, 0);



[2007-11-19 13:29:07] [EMAIL PROTECTED]

Shouldn't you make the stream non-blocking? Try adding this after
fsockopen:

stream_set_blocking($fp, false);



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

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


#41489 [Asn]: stream_select does not work on ssl stream_socket_server (works in 5.2.1!) on 64b

2007-11-20 Thread n dot escuder at intra-links dot com
 ID:   41489
 User updated by:  n dot escuder at intra-links dot com
 Reported By:  n dot escuder at intra-links dot com
 Status:   Assigned
 Bug Type: Streams related
 Operating System: Linux 2.6
-PHP Version:  5.2.3
+PHP Version:  5.2.5
 Assigned To:  iliaa
 New Comment:

The same appear in 5.2.5.

It's seem to be a memory corruption problem.

The retval value change in PHP_FUNCTION(stream_select)

just after executing the line :
if (r_array != NULL) stream_array_from_fd_set(r_array, rfds
TSRMLS_CC);

Please tell me how can i help you to solve this problem.

I can't upgrade from PHP 5.2.1.

See You


Previous Comments:


[2007-08-21 15:36:08] n dot escuder at intra-links dot com

no news ???



[2007-07-13 21:29:56] n dot escuder at intra-links dot com

I try without any certificat and the same problem appear.

I try launch server.php with php-5.2-dev and client with php-5.2.1 and
the same problem appear.

So i decide to lookup into the code. A strange result append i try to
explain :

code in ext/standard/streamsfuncs.c :

retval = php_select(max_fd+1, rfds, wfds, efds, tv_p);
printf(%d %d\n, max_fd, retval );
if (retval == -1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, unable to select
[%d]: %s (max_fd=%d),
errno, strerror(errno), max_fd);
RETURN_FALSE;
}
printf(%d\n, retval );
if (r_array != NULL) stream_array_from_fd_set(r_array, rfds
TSRMLS_CC);
if (w_array != NULL) stream_array_from_fd_set(w_array, wfds
TSRMLS_CC);
if (e_array != NULL) stream_array_from_fd_set(e_array, efds
TSRMLS_CC);
printf(%d\n, retval );
RETURN_LONG(retval);


As you can see i had three printf for debug :o)

I add an var_dump to the result of stream_select in server.php
The strange result i have after i launch client.php is :

3 1 - First printf with max_fd and retval
1 - Second printf with retval
0 - Third printf with retval but the value as changed 
int(0) - The var_dump in server.php

So the value change between the second and third printf ;o)

I hope this help



[2007-07-12 20:42:12] [EMAIL PROTECTED]

I just realized that of course I don't have this
cert/www/conf/ssl/server.pem here. But it can't be the cause..can it?




[2007-07-10 14:49:09] n dot escuder at intra-links dot com

I just retry with :

./configure --prefix=/usr --sysconfdir=/etc --disable-all
--enable-sockets --with-openssl --disable-cgi   

and the same append.



[2007-07-10 14:13:34] [EMAIL PROTECTED]

Did you try cutting the configure options to the bare minimum you need
for the test scripts to run and did you use --disable-all? If not, 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/41489

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


#43173 [Opn-Fbk]: FastCGI broken due to invalid descriptor

2007-11-20 Thread jani
 ID:   43173
 Updated by:   [EMAIL PROTECTED]
 Reported By:  davidb at chelsea dot net
-Status:   Open
+Status:   Feedback
 Bug Type: CGI related
 Operating System: Solaris 2.8
 PHP Version:  5.2.4
 Assigned To:  dmitry
 New Comment:

And my point was that this happened (yes, it was needed to fix certain
issues):

File: NEWS
-8--
31 May 2007, PHP 5.2.3
- Changed CGI install target to php-cgi and 'make install' to install
CLI when CGI is selected. (Jani)
-8--

So what you have there called 'php' is actually the CLI binary. The cgi
binary is called 'php-cgi'..



Previous Comments:


[2007-11-19 19:35:59] davidb at chelsea dot net

Greetings.  I don't know how else to convince everyone that I'm using
the right file.  But, here goes:

-  I run the EXACT SAME CONFIGURE SCRIPT for 5.2.0 and 5.2.4.  It looks
like this:

./configure  --prefix=/opt/php/5.2.4 \
--with-zlib=/usr/local \
--with-mysql=/usr/local \
--with-db4=/usr/local \
--with-config-file-path=/usr/local/etc/php \
--enable-gd-native-ttf \
--with-jpeg-dir=/usr/local \
--with-openssl=/usr/local \
--with-gd=/usr/local \
--with-png-dir=/usr/local \
--with-freetype-dir=/usr/local \
--with-mhash=/usr/local \
--with-mm=/usr/local \
--with-xsl=/usr/local \
--with-zend-vm=CALL \
--with-curl=/usr/local \
--with-imap=/usr/local \
--with-imap-ssl=/usr/local \
--with-libxml-dir=/usr/local \
--enable-spl \
--enable-calendar \
--enable-fastcgi \
--enable-force-cgi-redirect \
--enable-sockets \
--enable-mbstring

You'll know the first line allows us to change the directory that we
build in so we can test new versions.

-  /usr/local/bin/php5 is a symlink pointing to the currently active
version on the test machine.  We also sometimes exec
/opt/php/5.2.4/bin/php directly, there's no difference in failure type.
-  5.2.0 works without a problem (as to 5.0.3 and 4.X); 5.2.3 and 5.2.4
do not.
-  Here's the output of ls -l:

-rwxr-xr-x   1 root other39685444 Aug 12 08:34
/opt/php/5.2.0/bin/php*
-rwxr-xr-x   1 root other40515124 Aug  6 10:49
/opt/php/5.2.3/bin/php*
-rwxr-xr-x   1 root other41271848 Nov 13 10:37
/opt/php/5.2.4/bin/php*

We've been doing this with PHP/FastCGI for years now.

Please advise.  If there's anything else you'd like to see, please let
me know and I'll be happy to add it in.  How/where does PHP decide to
launch in FastCGI mode v. CGI mode when it is exec'd by the web server? 
Did the win32 changes in 5.2.2 leak into UNIX somehow?



[2007-11-19 18:59:34] [EMAIL PROTECTED]

And you're sure php5 is the cgi binary and not the CLI binary?
As of some version we changed the binary name to be php-cgi. What was
the configure line you used?



[2007-11-16 13:53:20] davidb at chelsea dot net

PHP under apache uses it's own process manager to spawn children.  I
believe you can disable that so Apache does it itself, but I prefer to
manage it in PHP so we can control the number of PHP works without
editing httpd.conf.

Here's the relevant configuration.  In httpd.conf, I set up the PHP
server as follows:

  AddHandler php-fastcgi .php
  Location /cgi-bin/php
SetHandler fastcgi-script
  /Location
  Action php-fastcgi /cgi-bin/php
  DirectoryIndex index.html index.shtml index.php
  AddType application/x-httpd-php   .php
  FastCgiServer /export/httpd/DOMAINS/fastcgi.com/cgi-bin/php
-processes 1

The FastCgiServer is a shell script that execs the PHP process.  We use
it to set shell variables that we might need:

#!/bin/sh

PHP_FCGI_CHILDREN=2
export PHP_FCGI_CHILDREN
exec /usr/local/bin/php5

All of this has worked fine for PHP 4.X, 5.0.X, 5.1.X, and 5.2.0.  It
broke sometime after 5.2.0.

David.



[2007-11-16 13:23:48] [EMAIL PROTECTED]

What do you mean in Using the php proc manager to control children?
Could you show your configuration files.



[2007-11-15 23:28:25] davidb at chelsea dot net

I am absolutely, 100% certain that I'm using the right binary.  I've
gone back and forth multiple times, and it is reproducible.  Since this
is for http://www.fastcgi.com, I have added incentive to get it figured
out.

How can I help troubleshoot this?  How does php decide if it's running
as a CGI or a FastCGI?  How did that part of the code change?  I'm not a
C coder unfortunately (limited read-only knowledge) but from the truss()
I'm guessing that the check is failing and it's using the cgi interfaces
instead of the fastcgi 

#43342 [NEW]: Add PDO constant MYSQL_ATTR_CLIENT_FOUND_ROWS in order to influence rowCount()

2007-11-20 Thread glideraerobatics at hotmail dot com
From: glideraerobatics at hotmail dot com
Operating system: all
PHP version:  5.2.5
PHP Bug Type: Feature/Change Request
Bug description:  Add PDO constant MYSQL_ATTR_CLIENT_FOUND_ROWS in order to 
influence rowCount()

Description:

PDO is very similar in design to Perl's DBI which does allow you to set
driver specific attributes such as mysql_client_found_rows=1 as part of the
DSN. Setting the attribute mysql_client_found_rows=1 is Perl's DBD::mysql
will make the rows() method (equivalent of PDO's rowCount()) return the
number of rows matched for the update and not just those that were actually
updated.

This is a very useful/efficient feature as it prevents the need for doing
'SELECT COUNT(*)' queries before doing the updates and it prevents the need
for locking too (since 2 statements are no longer atomic).

PDO has a setAttribute() method, but there is as yet no 
MYSQL_ATTR_CLIENT_FOUND_ROWS constant. My request is that this be built
into the PDO mysql driver. The information rowCount() will need can be
retrieved from mysql_info().


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


#43339 [Opn-Bgs]: 2 == true returns true is confusing.

2007-11-20 Thread johannes
 ID:  43339
 Updated by:  [EMAIL PROTECTED]
 Reported By: ken at smallboxsoftware dot net
-Status:  Open
+Status:  Bogus
 Bug Type:Feature/Change Request
 PHP Version: 5.2.5
 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

That's part of PHP's type system. You might want to use === isntead of
==.


Previous Comments:


[2007-11-19 21:46:49] ken at smallboxsoftware dot net

Description:

It is not very intuitive to me that 2 == true returns true. Especially
since echo true displays 1 on the screen.

I would rather see a boolean casted to an integer than an integer
casted to a boolean during comparison, but this would probably cause
compatibility issues. Failing that, perhaps if echoing a boolean value
it should display either true or false instead of 0 or 1? Then you
wouldn't be left thinking that these are integers at their core as they
are in C. 






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


#43343 [NEW]: Variable class name

2007-11-20 Thread felipensp at gmail dot com
From: felipensp at gmail dot com
Operating system: 
PHP version:  5.3CVS-2007-11-20 (snap)
PHP Bug Type: Scripting Engine problem
Bug description:  Variable class name

Description:

See the code below.

Reproduce code:
---
?php

namespace foobar;

class foo { }

//var_dump(namespace::);
// Parse error: syntax error, unexpected ')', expecting T_STRING or
T_VARIABLE or '$'

// Ok!

$foo = 'foo';

var_dump(new namespace::$foo);
// Fatal error: Class 'foobar' not found 

// var_dump(new namespace::foo); # Ok!

Expected result:

var_dump(namespace::);
Parse error: syntax error, unexpected ')', expecting T_STRING

or

Support the variable referencing class name.

Actual result:
--
Fatal error: Class 'foobar' not found 

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


#43344 [NEW]: Wrong error message for namespace::constant

2007-11-20 Thread felipensp at gmail dot com
From: felipensp at gmail dot com
Operating system: 
PHP version:  5.3CVS-2007-11-20 (snap)
PHP Bug Type: Scripting Engine problem
Bug description:  Wrong error message for namespace::constant

Description:

See the error message below.

Reproduce code:
---
?php

namespace foobar;

class foobar {
const bar = 'foobar!';
}

var_dump(namespace::bar); // Fatal error: Class 'foobar' not found

// var_dump(namespace::foobar::bar); # Ok, right


Expected result:

Some like Constant 'bar' not found

Actual result:
--
Fatal error: Class 'foobar' not found

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


#43295 [Com]: php-cgi crash

2007-11-20 Thread dns dot bind9 at gmail dot com
 ID:   43295
 Comment by:   dns dot bind9 at gmail dot com
 Reported By:  pioklo at serveradmin dot pl
 Status:   Open
 Bug Type: CGI related
 Operating System: Debian 4.0 kernel 2.6.23.1
 PHP Version:  5.2.5
 New Comment:

hi,I have same problem on my update php to 5.2.5.

My System is FreeBSD 6.1 + Lighttpd 1.4.18 + php5.2.5 + php-cgi. 

[EMAIL PROTECTED] ~#/usr/local/bin/php-cgi -m
[PHP Modules]
cgi-fcgi
date
gd
iconv
libxml
mbstring
memcache
mysql
pcre
Reflection
session
standard
xml
zlib

[Zend Modules]



In Lighttpd Logs:

2007-11-20 18:25:24: (mod_fastcgi.c.2462) unexpected end-of-file
(perhaps the fastcgi process died): pid: 4823 socket:
unix:/tmp/php-fastcgi.socket-0 
2007-11-20 18:25:24: (mod_fastcgi.c.3269) response already sent out,
but backend returned error on socket: unix:/tmp/php-fastcgi.socket-0 for
/detail.php , terminating connection


Previous Comments:


[2007-11-19 13:57:42] pioklo at serveradmin dot pl

The diff is here :
http://tapsy.pl/phpdiff.txt

Content-Type text/html



[2007-11-19 13:49:12] [EMAIL PROTECTED]

What is the content-type on these pages where it crashes? What is the
diff between your php.ini and the stock php.ini-dist /
php.ini-recommended (depending what you used as base for your php.ini)




[2007-11-19 12:34:05] pioklo at serveradmin dot pl

The problem isnt only with  gry.php  but many other scripts..
I use external sql servers and I'm connection to them through
mysql_pconnect method . Changing method to mysql_connect provides less
amount of crashes but finally when i changed php version to 5.1.6 
segfault was eliminated  at all.

Regards,
Piotr



[2007-11-18 23:41:58] [EMAIL PROTECTED]

Please don't post any backtraces anymore. What exactly does this
gry.php do? Try shorten the script to bare minimum which still causes
the problem.



[2007-11-18 21:42:53] pioklo at serveradmin dot pl

I have installed php 5.1.6 and the problem has passed away.



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

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


#43345 [NEW]: broken mb_encode_mimeheader()

2007-11-20 Thread wiela at centras dot lt
From: wiela at centras dot lt
Operating system: Windows XP HE
PHP version:  5.2.5
PHP Bug Type: mbstring related
Bug description:  broken mb_encode_mimeheader()

Description:

php v5.2.5, mb_encode_mimeheader(), both QP and base64 encoding schemes
incorrectly encodes utf-8 strings.

Reproduce code:
---
// $str1 and $str2 characters are in the Latin-Extended-A plane

// $str1 is 'utf-8' string, its base64_encode is:
// 'xITEjMSYxJbErsWgxbLFqsW9'
$str1 = #260;#268;#280;#278;#302;Š#370;#362;Ž;

// $str2 is 'utf-8' string, its base64_encode is:
// 'xIXEjcSZxJfEr8WhxbPFq8W+'
$str2 = #261;#269;#281;#279;#303;š#371;#363;ž; 

echo mb_encode_mimeheader($str1, 'UTF-8', 'Q');
echo mb_encode_mimeheader($str1, 'UTF-8', 'B');
echo mb_encode_mimeheader($str2, 'UTF-8', 'Q');
echo mb_encode_mimeheader($str2, 'UTF-8', 'B');

Expected result:

for $str1, QP encoding:
=?UTF-8?Q?=C4=84=C4=8C=C4=98=C4=96=C4=AE=C5=A0=C5=B2=C5=AA=C5=BD?=

for $str1, base64 encoding:
=?UTF-8?B?xITEjMSYxJbErsWgxbLFqsW9?=

for $str2, QP encoding:
=?UTF-8?Q?=C4=85=C4=8D=C4=99=C4=97=C4=AF=C5=A1=C5=B3=C5=AB=C5=BE?=

for $str2, base64 encoding:
=?UTF-8?B?xIXEjcSZxJfEr8WhxbPFq8W+?=



Actual result:
--
for $str1, QP encoding:
=?UTF-8?Q?=C3=84=C2=84=C3=84=C2=8C=C3=84=C2=98=C3=84=C2=96=C3=84=C2=AE?=
 =?UTF-8?Q?=C3=85=C2=A0=C3=85=C2=B2=C3=85=C2=AA=C3=85=C2=BD?=

for $str1, base64 encoding:
=?UTF-8?B?w4TChMOEwozDhMKYw4TClsOEwq7DhcKgw4XCssOFwqrDhcK9?=

for $str2, QP encoding:
=?UTF-8?Q?=C3=84=C2=85=C3=84=C2=8D=C3=84=C2=99=C3=84=C2=97=C3=84=C2=AF?=
 =?UTF-8?Q?=C3=85=C2=A1=C3=85=C2=B3=C3=85=C2=AB=C3=85=C2=BE?=

for $str2, base64 encoding:
=?UTF-8?B?w4TChcOEwo3DhMKZw4TCl8OEwq/DhcKhw4XCs8OFwqvDhcK+?=


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


#43173 [Fbk-Csd]: FastCGI broken due to invalid descriptor

2007-11-20 Thread davidb at chelsea dot net
 ID:   43173
 User updated by:  davidb at chelsea dot net
 Reported By:  davidb at chelsea dot net
-Status:   Feedback
+Status:   Closed
 Bug Type: CGI related
 Operating System: Solaris 2.8
 PHP Version:  5.2.4
 Assigned To:  dmitry
 New Comment:

ARGH.  I misunderstood your comment.  In retrospect, I see what you
were trying to say, and yes, that is indeed the problem.  I have closed
the bug.  Thank you for the clarification.


Previous Comments:


[2007-11-20 08:50:52] [EMAIL PROTECTED]

And my point was that this happened (yes, it was needed to fix certain
issues):

File: NEWS
-8--
31 May 2007, PHP 5.2.3
- Changed CGI install target to php-cgi and 'make install' to install
CLI when CGI is selected. (Jani)
-8--

So what you have there called 'php' is actually the CLI binary. The cgi
binary is called 'php-cgi'..




[2007-11-19 19:35:59] davidb at chelsea dot net

Greetings.  I don't know how else to convince everyone that I'm using
the right file.  But, here goes:

-  I run the EXACT SAME CONFIGURE SCRIPT for 5.2.0 and 5.2.4.  It looks
like this:

./configure  --prefix=/opt/php/5.2.4 \
--with-zlib=/usr/local \
--with-mysql=/usr/local \
--with-db4=/usr/local \
--with-config-file-path=/usr/local/etc/php \
--enable-gd-native-ttf \
--with-jpeg-dir=/usr/local \
--with-openssl=/usr/local \
--with-gd=/usr/local \
--with-png-dir=/usr/local \
--with-freetype-dir=/usr/local \
--with-mhash=/usr/local \
--with-mm=/usr/local \
--with-xsl=/usr/local \
--with-zend-vm=CALL \
--with-curl=/usr/local \
--with-imap=/usr/local \
--with-imap-ssl=/usr/local \
--with-libxml-dir=/usr/local \
--enable-spl \
--enable-calendar \
--enable-fastcgi \
--enable-force-cgi-redirect \
--enable-sockets \
--enable-mbstring

You'll know the first line allows us to change the directory that we
build in so we can test new versions.

-  /usr/local/bin/php5 is a symlink pointing to the currently active
version on the test machine.  We also sometimes exec
/opt/php/5.2.4/bin/php directly, there's no difference in failure type.
-  5.2.0 works without a problem (as to 5.0.3 and 4.X); 5.2.3 and 5.2.4
do not.
-  Here's the output of ls -l:

-rwxr-xr-x   1 root other39685444 Aug 12 08:34
/opt/php/5.2.0/bin/php*
-rwxr-xr-x   1 root other40515124 Aug  6 10:49
/opt/php/5.2.3/bin/php*
-rwxr-xr-x   1 root other41271848 Nov 13 10:37
/opt/php/5.2.4/bin/php*

We've been doing this with PHP/FastCGI for years now.

Please advise.  If there's anything else you'd like to see, please let
me know and I'll be happy to add it in.  How/where does PHP decide to
launch in FastCGI mode v. CGI mode when it is exec'd by the web server? 
Did the win32 changes in 5.2.2 leak into UNIX somehow?



[2007-11-19 18:59:34] [EMAIL PROTECTED]

And you're sure php5 is the cgi binary and not the CLI binary?
As of some version we changed the binary name to be php-cgi. What was
the configure line you used?



[2007-11-16 13:53:20] davidb at chelsea dot net

PHP under apache uses it's own process manager to spawn children.  I
believe you can disable that so Apache does it itself, but I prefer to
manage it in PHP so we can control the number of PHP works without
editing httpd.conf.

Here's the relevant configuration.  In httpd.conf, I set up the PHP
server as follows:

  AddHandler php-fastcgi .php
  Location /cgi-bin/php
SetHandler fastcgi-script
  /Location
  Action php-fastcgi /cgi-bin/php
  DirectoryIndex index.html index.shtml index.php
  AddType application/x-httpd-php   .php
  FastCgiServer /export/httpd/DOMAINS/fastcgi.com/cgi-bin/php
-processes 1

The FastCgiServer is a shell script that execs the PHP process.  We use
it to set shell variables that we might need:

#!/bin/sh

PHP_FCGI_CHILDREN=2
export PHP_FCGI_CHILDREN
exec /usr/local/bin/php5

All of this has worked fine for PHP 4.X, 5.0.X, 5.1.X, and 5.2.0.  It
broke sometime after 5.2.0.

David.



[2007-11-16 13:23:48] [EMAIL PROTECTED]

What do you mean in Using the php proc manager to control children?
Could you show your configuration files.



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

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


#43345 [Com]: broken mb_encode_mimeheader()

2007-11-20 Thread carsten_sttgt at gmx dot de
 ID:   43345
 Comment by:   carsten_sttgt at gmx dot de
 Reported By:  wiela at centras dot lt
 Status:   Open
 Bug Type: mbstring related
 Operating System: Windows XP HE
 PHP Version:  5.2.5
 New Comment:

 echo mb_encode_mimeheader($str1, 'UTF-8', 'Q');
With also setting mb_internal_encoding(), your example works:

| $str1  = \xC4\x84\xC4\x8C\xC4\x98\xC4\x96\xC4\xAE
| $str1 .= \xC5\xA0\xC5\xB2\xC5\xAA\xC5\xBD;
|
| mb_internal_encoding('UTF-8');
| echo mb_encode_mimeheader($str1, 'UTF-8', 'Q');


Previous Comments:


[2007-11-20 11:14:48] wiela at centras dot lt

Description:

php v5.2.5, mb_encode_mimeheader(), both QP and base64 encoding schemes
incorrectly encodes utf-8 strings.

Reproduce code:
---
// $str1 and $str2 characters are in the Latin-Extended-A plane

// $str1 is 'utf-8' string, its base64_encode is:
// 'xITEjMSYxJbErsWgxbLFqsW9'
$str1 = #260;#268;#280;#278;#302;Š#370;#362;Ž;

// $str2 is 'utf-8' string, its base64_encode is:
// 'xIXEjcSZxJfEr8WhxbPFq8W+'
$str2 = #261;#269;#281;#279;#303;š#371;#363;ž; 

echo mb_encode_mimeheader($str1, 'UTF-8', 'Q');
echo mb_encode_mimeheader($str1, 'UTF-8', 'B');
echo mb_encode_mimeheader($str2, 'UTF-8', 'Q');
echo mb_encode_mimeheader($str2, 'UTF-8', 'B');

Expected result:

for $str1, QP encoding:
=?UTF-8?Q?=C4=84=C4=8C=C4=98=C4=96=C4=AE=C5=A0=C5=B2=C5=AA=C5=BD?=

for $str1, base64 encoding:
=?UTF-8?B?xITEjMSYxJbErsWgxbLFqsW9?=

for $str2, QP encoding:
=?UTF-8?Q?=C4=85=C4=8D=C4=99=C4=97=C4=AF=C5=A1=C5=B3=C5=AB=C5=BE?=

for $str2, base64 encoding:
=?UTF-8?B?xIXEjcSZxJfEr8WhxbPFq8W+?=



Actual result:
--
for $str1, QP encoding:
=?UTF-8?Q?=C3=84=C2=84=C3=84=C2=8C=C3=84=C2=98=C3=84=C2=96=C3=84=C2=AE?=
 =?UTF-8?Q?=C3=85=C2=A0=C3=85=C2=B2=C3=85=C2=AA=C3=85=C2=BD?=

for $str1, base64 encoding:
=?UTF-8?B?w4TChMOEwozDhMKYw4TClsOEwq7DhcKgw4XCssOFwqrDhcK9?=

for $str2, QP encoding:
=?UTF-8?Q?=C3=84=C2=85=C3=84=C2=8D=C3=84=C2=99=C3=84=C2=97=C3=84=C2=AF?=
 =?UTF-8?Q?=C3=85=C2=A1=C3=85=C2=B3=C3=85=C2=AB=C3=85=C2=BE?=

for $str2, base64 encoding:
=?UTF-8?B?w4TChcOEwo3DhMKZw4TCl8OEwq/DhcKhw4XCs8OFwqvDhcK+?=






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


#43173 [Csd]: FastCGI broken due to invalid descriptor

2007-11-20 Thread jani
 ID:   43173
 Updated by:   [EMAIL PROTECTED]
 Reported By:  davidb at chelsea dot net
 Status:   Closed
 Bug Type: CGI related
 Operating System: Solaris 2.8
 PHP Version:  5.2.4
 Assigned To:  dmitry
 New Comment:

I must apologize as it was my fault. I renamed it to be consistent with
win32 builds + it makes sense to make difference between CLI / CGI this
way and be able to always install both when they're build. Sorry about
the trouble.. :I



Previous Comments:


[2007-11-20 12:27:32] davidb at chelsea dot net

ARGH.  I misunderstood your comment.  In retrospect, I see what you
were trying to say, and yes, that is indeed the problem.  I have closed
the bug.  Thank you for the clarification.



[2007-11-20 08:50:52] [EMAIL PROTECTED]

And my point was that this happened (yes, it was needed to fix certain
issues):

File: NEWS
-8--
31 May 2007, PHP 5.2.3
- Changed CGI install target to php-cgi and 'make install' to install
CLI when CGI is selected. (Jani)
-8--

So what you have there called 'php' is actually the CLI binary. The cgi
binary is called 'php-cgi'..




[2007-11-19 19:35:59] davidb at chelsea dot net

Greetings.  I don't know how else to convince everyone that I'm using
the right file.  But, here goes:

-  I run the EXACT SAME CONFIGURE SCRIPT for 5.2.0 and 5.2.4.  It looks
like this:

./configure  --prefix=/opt/php/5.2.4 \
--with-zlib=/usr/local \
--with-mysql=/usr/local \
--with-db4=/usr/local \
--with-config-file-path=/usr/local/etc/php \
--enable-gd-native-ttf \
--with-jpeg-dir=/usr/local \
--with-openssl=/usr/local \
--with-gd=/usr/local \
--with-png-dir=/usr/local \
--with-freetype-dir=/usr/local \
--with-mhash=/usr/local \
--with-mm=/usr/local \
--with-xsl=/usr/local \
--with-zend-vm=CALL \
--with-curl=/usr/local \
--with-imap=/usr/local \
--with-imap-ssl=/usr/local \
--with-libxml-dir=/usr/local \
--enable-spl \
--enable-calendar \
--enable-fastcgi \
--enable-force-cgi-redirect \
--enable-sockets \
--enable-mbstring

You'll know the first line allows us to change the directory that we
build in so we can test new versions.

-  /usr/local/bin/php5 is a symlink pointing to the currently active
version on the test machine.  We also sometimes exec
/opt/php/5.2.4/bin/php directly, there's no difference in failure type.
-  5.2.0 works without a problem (as to 5.0.3 and 4.X); 5.2.3 and 5.2.4
do not.
-  Here's the output of ls -l:

-rwxr-xr-x   1 root other39685444 Aug 12 08:34
/opt/php/5.2.0/bin/php*
-rwxr-xr-x   1 root other40515124 Aug  6 10:49
/opt/php/5.2.3/bin/php*
-rwxr-xr-x   1 root other41271848 Nov 13 10:37
/opt/php/5.2.4/bin/php*

We've been doing this with PHP/FastCGI for years now.

Please advise.  If there's anything else you'd like to see, please let
me know and I'll be happy to add it in.  How/where does PHP decide to
launch in FastCGI mode v. CGI mode when it is exec'd by the web server? 
Did the win32 changes in 5.2.2 leak into UNIX somehow?



[2007-11-19 18:59:34] [EMAIL PROTECTED]

And you're sure php5 is the cgi binary and not the CLI binary?
As of some version we changed the binary name to be php-cgi. What was
the configure line you used?



[2007-11-16 13:53:20] davidb at chelsea dot net

PHP under apache uses it's own process manager to spawn children.  I
believe you can disable that so Apache does it itself, but I prefer to
manage it in PHP so we can control the number of PHP works without
editing httpd.conf.

Here's the relevant configuration.  In httpd.conf, I set up the PHP
server as follows:

  AddHandler php-fastcgi .php
  Location /cgi-bin/php
SetHandler fastcgi-script
  /Location
  Action php-fastcgi /cgi-bin/php
  DirectoryIndex index.html index.shtml index.php
  AddType application/x-httpd-php   .php
  FastCgiServer /export/httpd/DOMAINS/fastcgi.com/cgi-bin/php
-processes 1

The FastCgiServer is a shell script that execs the PHP process.  We use
it to set shell variables that we might need:

#!/bin/sh

PHP_FCGI_CHILDREN=2
export PHP_FCGI_CHILDREN
exec /usr/local/bin/php5

All of this has worked fine for PHP 4.X, 5.0.X, 5.1.X, and 5.2.0.  It
broke sometime after 5.2.0.

David.



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

-- 
Edit this bug 

#42978 [Opn-Asn]: prepared statement bind mismatch causes zend_mm_heap corruption

2007-11-20 Thread iliaa
 ID:   42978
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ahawthorne at rook dot ca
-Status:   Open
+Status:   Assigned
 Bug Type: PDO related
 Operating System: Fedora 6
 PHP Version:  5.2.4
-Assigned To:  
+Assigned To:  iliaa


Previous Comments:


[2007-10-15 22:21:33] ahawthorne at rook dot ca

I compiled and installed the latest CVS snapshot but the problem still
persists. The Same code returns the same error.



[2007-10-15 19:35:27] [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



[2007-10-15 17:21:25] ahawthorne at rook dot ca

Description:

Having a prepared statement with a given number of parameters (ie. ?,?)
and binding two more parameters than required causes zend_mm_heap
corruption where an error is expected.



Reproduce code:
---
// NOTE: I'm running PostgreSQL 8.2.3

$db = new e4_PDO($db_connect_string);

$item = array(112,113,114);

$sql = SELECT * FROM item_table WHERE item_id IN (?);
$stmt = $db-prepare($sql);

$stmt-bindValue(1,$item[0]);
$stmt-bindValue(2,$item[1]);
$stmt-bindValue(3,$item[2]);

$stmt-execute();



Expected result:

something like:
ERROR:  bind message supplies 3 parameters, but prepared statement
pdo_pgsql_stmt_ requires 1

Actual result:
--
zend_mm_heap corrupted





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


#43340 [Opn-Fbk]: Segmentation fault after executing the same proc twice

2007-11-20 Thread iliaa
 ID:   43340
 Updated by:   [EMAIL PROTECTED]
 Reported By:  marplatense at ubuntu dot com
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: Centos 4 64 bits
 PHP Version:  5.2.5
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.




Previous Comments:


[2007-11-20 03:16:43] marplatense at ubuntu dot com

Description:

Bug related to http://bugs.php.net/bug.php?id=37471 and
http://bugs.php.net/bug.php?id=38173 but with version 5.2.5 (the other
two are closed but we can reproduce the error every time we run 
the test case with the latest stable release)


1- My php configuration:
./configure --prefix=/opt/php/php5.2.5 --exec-prefix=/opt/php/php5.2.5
--with-config-file-path=etc/httpd/conf.d --with-libdir=lib64 --with-gd
--with-zlib=/usr --with-xmlrpc
--with-oci8=/opt/oracle/orase/oracle/product/10.2.0/db_1
--with-apxs2=/usr/sbin/apxs --enable-sigchild --with-ttf=/usr/lib64
--enable-gd-native-ttf --enable-gd-imgstrttf --enable-gd-native-ttf
--with-ttf-dir=/usr/local/lib --with-freetype-dir=/opt/freetype
--with-zlib-dir=/usr/local/lib --with-png-dir=/usr/local/lib
--with-jpeg-dir=/usr/local/lib
--with-imap=/opt/imap-2006d.DEV.SNAP-0611201609/ --with-imap-ssl
--with-mysql=/usr/bin --enable-mbstring --with-iconv --with-zlib
--enable-sockets --disable-cgi --enable-debug

2- My apache version:
# ./apachectl -v
Server version: Apache/2.0.52
Server built:   Jul 14 2007 11:50:35

3- My php version
# ./php -v
PHP 5.2.5 (cli) (built: Nov 19 2007 19:10:59) (DEBUG)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies




Reproduce code:
---
1- The pl/sql script used for this example:
 create or replace procedure test_lookup(p_out out sys_refcursor)
 is
 begin
   open p_out for
select 1,2,3 from dual;
 end;
/
 create or replace procedure test_lookup2(p_out out sys_refcursor)
 is
 begin
   open p_out for
select 1,2,3 from dual;
 end;
/

2- the php script:
?php
oci_internal_debug(true);
$conn=OCILogon(user, password, database);
$out=oci_new_cursor($conn);
$s=oci_parse($conn, begin test_lookup(:b3); end;);
oci_bind_by_name($s, :b3, $out,-1, OCI_B_CURSOR);
oci_execute($s, OCI_DEFAULT);
oci_execute($out);
while (OCIFetchInto($out,$data)) {
   echo $data[0];
}
OCIFreeCursor($out);
OCIFreeStatement($s);

// do it again

$out=oci_new_cursor($conn);
$s=oci_parse($conn, begin test_lookup(:b3); end;);
//running with this test_lookup2 line instead of test_lookup
works perfectly
//$s=oci_parse($conn, begin test_lookup2(:b3); end;);
oci_bind_by_name($s, :b3, $out,-1, OCI_B_CURSOR);
oci_execute($s, OCI_DEFAULT);
oci_execute($out);
while (OCIFetchInto($out,$data)) {
   echo $data[0];
}
OCIFreeCursor($out);
?


Expected result:

We expect the right output from procedure test_lookup.


Actual result:
--
1- We get a segmentation fault in the apache's error log:
[Mon Nov 19 18:50:19 2007] [notice] child pid 29774 exit signal
Segmentation fault (11)

2- this is what we get with oci_internal_debug:
# ./php -c /etc/httpd/conf.d/php.ini test.php 
OCI8 DEBUG: OCINlsEnvironmentVariableGet at
(/opt/downloads/php-5.2.5/ext/oci8/oci8.c:1067) 
OCI8 DEBUG: OCIEnvNlsCreate at
(/opt/downloads/php-5.2.5/ext/oci8/oci8.c:1223) 
OCI8 DEBUG: OCIHandleAlloc at
(/opt/downloads/php-5.2.5/ext/oci8/oci8.c:1252) 
OCI8 DEBUG: OCIServerAttach at
(/opt/downloads/php-5.2.5/ext/oci8/oci8.c:1261) 
OCI8 DEBUG: OCIHandleAlloc at
(/opt/downloads/php-5.2.5/ext/oci8/oci8.c:1271) 
OCI8 DEBUG: OCIHandleAlloc at
(/opt/downloads/php-5.2.5/ext/oci8/oci8.c:1280) 
OCI8 DEBUG: OCIHandleAlloc at
(/opt/downloads/php-5.2.5/ext/oci8/oci8.c:1289) 
OCI8 DEBUG: OCIAttrSet at
(/opt/downloads/php-5.2.5/ext/oci8/oci8.c:1299) 
OCI8 DEBUG: OCIAttrSet at
(/opt/downloads/php-5.2.5/ext/oci8/oci8.c:1310) 
OCI8 DEBUG: OCIAttrSet at
(/opt/downloads/php-5.2.5/ext/oci8/oci8.c:1320) 
OCI8 DEBUG: OCIAttrSet at
(/opt/downloads/php-5.2.5/ext/oci8/oci8.c:1329) 
OCI8 DEBUG: OCISessionBegin at
(/opt/downloads/php-5.2.5/ext/oci8/oci8.c:1360) 
OCI8 DEBUG: OCIAttrSet at
(/opt/downloads/php-5.2.5/ext/oci8/oci8.c:1393) 
OCI8 DEBUG: OCIHandleAlloc at
(/opt/downloads/php-5.2.5/ext/oci8/oci8_statement.c:55) 

#43247 [Fbk-Csd]: PHP_SELF creates double path entry

2007-11-20 Thread yguardmail-php at yahoo dot co dot uk
 ID:   43247
 User updated by:  yguardmail-php at yahoo dot co dot uk
 Reported By:  yguardmail-php at yahoo dot co dot uk
-Status:   Feedback
+Status:   Closed
 Bug Type: CGI related
 Operating System: Windows XP
 PHP Version:  5.2.5
 Assigned To:  dmitry
 New Comment:

Abyss claim to compy with CGI/1.1, as stated here :-

http://www.aprelium.com/data/doc/2/abyssws-win-doc-html/cgivars.html

'Before running a CGI application or interpreter, Abyss Web Server sets
its environment variables in conformity with the CGI/1.1 specification
(as described in http://hoohoo.ncsa.uiuc.edu/cgi) '.

PHP 5.2.3 works OK with the latest version of Abyss, so I can only
assume that some change in PHP 5.2.4 introduced the problem.

Thanks to Dan Voisine who has Emailed me with a solution to this in
Abyss :-

In Scripting Parameters, edit the Interpreter entry and change the Type
field from 'PHP Style' to 'Standard'.


Previous Comments:


[2007-11-14 10:41:40] [EMAIL PROTECTED]

According to http://ru2.php.net/reserved.variables PHP_SELF is the
filename of the currently executing script, relative to the document
root. For instance, $_SERVER['PHP_SELF'] in a script at the address
http://example.com/test.php/foo.bar would be /test.php/foo.bar.

According to http://hoohoo.ncsa.uiuc.edu/cgi/env.html PATH_INFO - is
the extra path information, as given by the client. In other words,
scripts can be accessed by their virtual pathname, followed by extra
information at the end of this path. The extra information is sent as
PATH_INFO. This information should be decoded by the server if it comes
from a URL before it is passed to the CGI script.

However IIS use its own standard. According to
http://msdn2.microsoft.com/en-us/library/ms524602.aspx PATH_INFO - is a
path information, as given by the client, for example,
/vdir/myisapi.dll/zip. If this information comes from a URL, it is
decoded by the server before it is passed to the CGI script or ISAPI
filter. 
If the AllowPathInfoForScriptMappings metabase property is set to true
(to support exclusive CGI functionality), PATH_INFO will only contain
/zip and ISAPI applications such as ASP will break.

However Abyss doesn't follow both standards. It sets PATH_INFO into the
value of SCRIPT_NAME and loses extra path information.

I am not going to fix the bug, while I don't understand what standarad
Abysse uses (It behave differently from Apache and IIS). This time I
suppose it is an Abysse bug, but I am ready for discussion.



[2007-11-14 08:51:17] [EMAIL PROTECTED]

The bug was fixed for IIS (not for Abysse) in 5.2.5.
Do you use older PHP version?



[2007-11-14 01:23:16] jfrancis at connected dot net dot au

I am experiencing the exact same problem under IIS 5.1

Has there been any resolution to this problem?



[2007-11-13 13:47:34] yguardmail-php at yahoo dot co dot uk

I am using the FREE version of Abyss which is available for download
from here :-

http://www.aprelium.com/abyssws/download.php



[2007-11-13 13:33:50] [EMAIL PROTECTED]

Sorry but Abyss version 2.5 is a comercial coftware and I am not able
to downlaod and test it.




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

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


#42978 [Asn-Csd]: prepared statement bind mismatch causes zend_mm_heap corruption

2007-11-20 Thread iliaa
 ID:   42978
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ahawthorne at rook dot ca
-Status:   Assigned
+Status:   Closed
 Bug Type: PDO related
 Operating System: Fedora 6
 PHP Version:  5.2.4
 Assigned To:  iliaa
 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:


[2007-10-15 22:21:33] ahawthorne at rook dot ca

I compiled and installed the latest CVS snapshot but the problem still
persists. The Same code returns the same error.



[2007-10-15 19:35:27] [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



[2007-10-15 17:21:25] ahawthorne at rook dot ca

Description:

Having a prepared statement with a given number of parameters (ie. ?,?)
and binding two more parameters than required causes zend_mm_heap
corruption where an error is expected.



Reproduce code:
---
// NOTE: I'm running PostgreSQL 8.2.3

$db = new e4_PDO($db_connect_string);

$item = array(112,113,114);

$sql = SELECT * FROM item_table WHERE item_id IN (?);
$stmt = $db-prepare($sql);

$stmt-bindValue(1,$item[0]);
$stmt-bindValue(2,$item[1]);
$stmt-bindValue(3,$item[2]);

$stmt-execute();



Expected result:

something like:
ERROR:  bind message supplies 3 parameters, but prepared statement
pdo_pgsql_stmt_ requires 1

Actual result:
--
zend_mm_heap corrupted





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


#43347 [NEW]: xml_parse() function is broken

2007-11-20 Thread pschmandra at hotmail dot com
From: pschmandra at hotmail dot com
Operating system: Red Hat Linux Enterprise 5
PHP version:  5.2.5
PHP Bug Type: XML Reader
Bug description:  xml_parse() function is broken

Description:

After upgrading PHP5 the xml_parse() parser throws 

Warning: xml_parse() [function.xml-parse]: input conversion failed due to
input error, bytes 0xA3 0xEE 0x7D 0x5F

when parsing Chineese Traditional BBC News Feed.

newsrss.bbc.co.uk/rss/chinese/trad/taiwan_hk/rss.xml.

This function works perfectly using PHP4. Googling this error brings ~800
similar results.

Reproduce code:
---
if(!xml_parse($this-feedReader, $BBC_data)){
$this-in_error = true;
$this-error_msg = sprintf(XML 
Error: %s at line %d,
xml_error_string(xml_get_error_code($this-feedReader)),
xml_get_current_line_number($this-feedReader));
}

Expected result:

Expect xml_parse() function to parse feed without crashing ala PHP4.

Actual result:
--
xml_parse() function crashes throwing

Warning: xml_parse() [function.xml-parse]: input conversion failed due to
input error, bytes 0xA3 0xEE 0x7D 0x5F

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


#43349 [NEW]: 500 HTTP respons even on not blank pages

2007-11-20 Thread andrea dot spacca at gmail dot com
From: andrea dot spacca at gmail dot com
Operating system: Gentoo (probably all)
PHP version:  5.2.5
PHP Bug Type: *General Issues
Bug description:  500 HTTP respons even on not blank pages

Description:

When E_NOTICE or E_WARNING happen in eval'd code the script return 500
HTTP respons even on not blank pages

Reproduce code:
---
?php
eval('$pluto = test '.UNDEFINED_CONST.' test;');

echo 'AFTER';
?


Expected result:

Apache Access Log:
192.168.1.1 - - [20/Nov/2007:16:09:23 +0100] GET /testBug.cgi HTTP/1.1
200 25

Actual result:
--
Apache Access Log:
192.168.1.1 - - [20/Nov/2007:16:09:23 +0100] GET /testBug.cgi HTTP/1.1
500 25

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


#43347 [Opn]: Big5 RSS Feed crashes xml_parse() function

2007-11-20 Thread pschmandra at hotmail dot com
 ID:   43347
 User updated by:  pschmandra at hotmail dot com
-Summary:  xml_parse() function is broken
 Reported By:  pschmandra at hotmail dot com
 Status:   Open
 Bug Type: XML Reader
 Operating System: Red Hat Linux Enterprise 5
 PHP Version:  5.2.5
 New Comment:

Changed summary.


Previous Comments:


[2007-11-20 14:58:22] pschmandra at hotmail dot com

Description:

After upgrading PHP5 the xml_parse() parser throws 

Warning: xml_parse() [function.xml-parse]: input conversion failed due
to input error, bytes 0xA3 0xEE 0x7D 0x5F

when parsing Chineese Traditional BBC News Feed.

newsrss.bbc.co.uk/rss/chinese/trad/taiwan_hk/rss.xml.

This function works perfectly using PHP4. Googling this error brings
~800 similar results.

Reproduce code:
---
if(!xml_parse($this-feedReader, $BBC_data)){
$this-in_error = true;
$this-error_msg = sprintf(XML 
Error: %s at line %d,
xml_error_string(xml_get_error_code($this-feedReader)),
xml_get_current_line_number($this-feedReader));
}

Expected result:

Expect xml_parse() function to parse feed without crashing ala PHP4.

Actual result:
--
xml_parse() function crashes throwing

Warning: xml_parse() [function.xml-parse]: input conversion failed due
to input error, bytes 0xA3 0xEE 0x7D 0x5F





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


#17047 [Com]: INFORMIXSERVER not being read

2007-11-20 Thread eduardoquiroz at gmail dot com
 ID:   17047
 Comment by:   eduardoquiroz at gmail dot com
 Reported By:  pedietz at west dot com
 Status:   No Feedback
 Bug Type: Informix related
 Operating System: aix 4.3.3
 PHP Version:  4.2.0
 New Comment:

I have the same problem but in PHP 5.2.1


Previous Comments:


[2002-10-27 19:00:00] [EMAIL PROTECTED]

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





[2002-10-10 22:55:32] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2002-05-06 14:13:03] pedietz at west dot com

Also of note, 

I have register_global = On.

phpinfo() shows:
register_global = On and On
INFORMIXSERVER = ibm65
ifx.default_host = ibm65

Yet it still requires me to do this:
putenv(INFORMIXSERVER=ibm65);



[2002-05-06 13:41:08] pedietz at west dot com

The following php script does not work

  ?php
  // print the value of my INFORMIXSERVER variable
  echo getenv(INFORMIXSERVER);
  $conn_id = ifx_connect ([EMAIL PROTECTED]);
  ?

it prints:
ibm65
Warning: ifx_connect: E [SQLSTATE=IX 000 SQLCODE=-25560] in test.php on
line 14

25560 means that INFORMIXSERVER is not set in the env.
Which is crazy because I getenv it and echo it.

But the following works:
  ?php
  putenv(INFORMIXSERVER=ibm65);
  $conn_id = ifx_connect ([EMAIL PROTECTED]);
  ?

So it seems that the environment variable INFORMIXSERVER is not being
read correctly.

Besides having INFORMIXSERVER set in my env, I also have set the
/usr/local/lib/php.ini ifx.default_host=ibm65.  Yet neither work.

I have to putenv() the value explicitly.





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


#43348 [NEW]: Mail function returns true but no email sent

2007-11-20 Thread RQuadling at GMail dot com
From: RQuadling at GMail dot com
Operating system: Windows XP SP2
PHP version:  5.3CVS-2007-11-20 (snap)
PHP Bug Type: Mail related
Bug description:  Mail function returns true but no email sent

Description:

Same script working on 

PHP 4.4.7-dev (cgi-fcgi) (built: Mar 25 2007 21:02:43)
PHP 5.2.2RC2-dev (cli) (built: Apr 18 2007 08:03:01)

but not on 

PHP 5.3.0-dev (cli) (built: Nov 20 2007 08:19:12)

Using Wireshark to see SMTP activity.

No errors, warnings or notices produced.

Script doesn't crash.

True is returned.

Running via the command line to remove all extensions and relying on
default configuration.

Obviously, you will need to change the SMTP server and email addresses to
see this in operation.


Reproduce code:
---
php -n -r ini_set('SMTP', 'gmail-smtp-in.l.google.com');
var_dump(mail('[EMAIL PROTECTED]', 'Subject', 'Message',
'From:[EMAIL PROTECTED]'));


Expected result:

True AND an email to be received.

Actual result:
--
True but no SMTP activity when monitored using WireShark.

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


#43325 [Fbk-Opn]: feof() hangs on UDP stream

2007-11-20 Thread mertcan at dpozitif dot com
 ID:   43325
 User updated by:  mertcan at dpozitif dot com
 Reported By:  mertcan at dpozitif dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Streams related
 Operating System: Centos 5.0
 PHP Version:  5.2.5
 New Comment:

actually if i set stream_set_blocking for $fp to 1 it gives the result
(which i posted the code below) if i change stream_set_blocking to 0, it
does not give any result. in either ways if i use feof($fp) it hangs..

?php

echo rcon_komut(meta list, 123456, 62.68.207.16, 27015);

function rcon_komut($komut, $rcon_pass, $ip, $port)
{
$response = ;
$msg = challenge rcon;
$fp = fsockopen(udp://.$ip,$port, $errno, $errstr);

stream_set_blocking($fp, 1);

fputs($fp, $msg, strlen($msg));

$response .= fgets($fp, 1024);

fclose ($fp);

return $response;
}

?


Previous Comments:


[2007-11-20 09:29:54] [EMAIL PROTECTED]

Your script doesn't work because you don't get anything in $response in
the first place. So you're passing invalid data around long before
feof() is used and the server just sits there propably waiting for more
data to be input before it gives any back..



[2007-11-20 09:10:45] mertcan at dpozitif dot com

Here is the full program:

?php

echo rcon_komut(meta list, 123456, 62.68.207.16, 27015);

function rcon_komut($komut, $rcon_pass, $ip, $port)
{
$response = ;
$msg = challenge rcon;
$fp = fsockopen(udp://.$ip,$port, $errno, $errstr);

stream_set_blocking($fp, 0);

fputs($fp, $msg, strlen($msg));
$response = fgets($fp, 1024);   
$challenge = substr($response, 19, strlen($response) - 20);

$msg=rcon.$challenge.\.$rcon_pass.\.$komut.chr(0);
fputs($fp, $msg, strlen($msg));

while (!feof($fp))
$response .= fgets($fp, 4096);

fclose ($fp);

return $response;
}

?



[2007-11-20 08:44:44] [EMAIL PROTECTED]

That's still just a piece of the script, a proper test script starts
with ?php and ends in ? and can be just copy'pasted and run..



[2007-11-19 17:19:22] mertcan at dpozitif dot com

i gave $tanim in function use:

function rcon_komut($komut, $rcon_pass, $ip, $port)
{
$msg = challenge rcon;
$fp = fsockopen(udp://.$ip,$port, $errno, $errstr);

stream_set_blocking($fp, 0);

fputs($fp, $msg, strlen($msg));
$response = fgets($fp, 1024);   
$challenge = substr($response, 19, strlen($response) - 20);

$msg=rcon.$challenge.\.$rcon_pass.\.$komut.chr(0);
fputs($fp, $msg, strlen($msg));

while (!feof($fp))
$response .= fgets($fp, 32);

fclose ($fp);
$response = substr($response, 6, strlen($response)-6);
return $response;
}



[2007-11-19 16:31:10] [EMAIL PROTECTED]

Well, can you give a script that has some possibility of working
properly? In the give script you have at least one variable which is not
set anywhere: $komut




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

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


#41350 [Com]: Error in my_thread_global_end()

2007-11-20 Thread dkeller at uh dot edu
 ID:   41350
 Comment by:   dkeller at uh dot edu
 Reported By:  graham at directhostinguk dot com
 Status:   No Feedback
 Bug Type: MySQL related
 Operating System: Windows 2003
 PHP Version:  5.2.3
 New Comment:

I'm using php 5.2.5 through cgi on iis6 and windows 2003 server.

I still get the my_thread_global_end() error.  Turning of mysql 
persistent connections in php.ini had no effect.

Rolled back to libmysql.dll 5.0.22, but that obviously is not the 
answer.  Any ideas what should be done for this?  My superiors are 
starting to get a little antsy about this situation, and php says it's

mysql's fault and vice versa isn't helping.

I'll give any information that can help.

Thanks for all the work.


Previous Comments:


[2007-11-14 18:38:35] jamesvl at trinitylight dot com

I'm experiencing this on PHP 5.2.5-nts on Windows 2003. Web server
doesn't matter since I see the bug just by running php -m on the
command line.

Enabling either php_mysql.dll or php_mysqli.dll in php.ini causes the
bug to appear. Sometimes it takes several runs for php -m before I get
the delay and then the Error in my_thread_global_end(): 1 threads
didn't exit message.

Can't use the fix to downgrade to an earlier version of libmysql.dll
unless a non-threadsafe compile is available somewhere...



[2007-11-13 23:17:25] bobbyb98 at gmail dot com

5.2.5 on Windows 2003 Server having the same problem

Was running 5.1.2 fine, and the upgrade isn't allowing any mysql
connections.  It appears even though everything is set in the PHP.ini
for it to be loaded, it isn't loading.  Not showing up on the phpinfo
page or available to any programs.



[2007-11-02 19:47:31] ccongdon at congdonweb dot com

Just installed 5.2.4

ISAPI with MySQL and MSSQL installed

IIS5 on Windows 2k SP 3

C:\Documents and Settings\Administratord:\php\php -v
PHP 5.2.4 (cli) (built: Aug 30 2007 07:06:31)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
Error in my_thread_global_end(): 1 threads didn't exit



[2007-11-02 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-10-30 10:35:40] chris at crgs dot co dot uk

Scott, am having this issue on both XP and Server 2003.

What spec machine are you testing on? Can you try this on another
machine, or in a virtual machine?



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

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


#43348 [Opn-Fbk]: Mail function returns true but no email sent

2007-11-20 Thread jani
 ID:   43348
 Updated by:   [EMAIL PROTECTED]
 Reported By:  RQuadling at GMail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Mail related
 Operating System: Windows XP SP2
 PHP Version:  5.3CVS-2007-11-20 (snap)
 New Comment:

It's pretty interesting since nothing has changed in this code between
those versions. And using the older one with exactly same line works?


Previous Comments:


[2007-11-20 14:58:47] RQuadling at GMail dot com

Description:

Same script working on 

PHP 4.4.7-dev (cgi-fcgi) (built: Mar 25 2007 21:02:43)
PHP 5.2.2RC2-dev (cli) (built: Apr 18 2007 08:03:01)

but not on 

PHP 5.3.0-dev (cli) (built: Nov 20 2007 08:19:12)

Using Wireshark to see SMTP activity.

No errors, warnings or notices produced.

Script doesn't crash.

True is returned.

Running via the command line to remove all extensions and relying on
default configuration.

Obviously, you will need to change the SMTP server and email addresses
to see this in operation.


Reproduce code:
---
php -n -r ini_set('SMTP', 'gmail-smtp-in.l.google.com');
var_dump(mail('[EMAIL PROTECTED]', 'Subject', 'Message',
'From:[EMAIL PROTECTED]'));


Expected result:

True AND an email to be received.

Actual result:
--
True but no SMTP activity when monitored using WireShark.





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


#43347 [Opn-Fbk]: Big5 RSS Feed crashes xml_parse() function

2007-11-20 Thread jani
 ID:   43347
 Updated by:   [EMAIL PROTECTED]
 Reported By:  pschmandra at hotmail dot com
-Status:   Open
+Status:   Feedback
-Bug Type: XML Reader
+Bug Type: XML related
 Operating System: Red Hat Linux Enterprise 5
 PHP Version:  5.2.5
 New Comment:

What was the full configure line used to configure PHP in this case? 
And I don't see any crash there, just a normal error for passing data
with encoding which isn't supported by the xml library in use..


Previous Comments:


[2007-11-20 14:58:22] pschmandra at hotmail dot com

Description:

After upgrading PHP5 the xml_parse() parser throws 

Warning: xml_parse() [function.xml-parse]: input conversion failed due
to input error, bytes 0xA3 0xEE 0x7D 0x5F

when parsing Chineese Traditional BBC News Feed.

newsrss.bbc.co.uk/rss/chinese/trad/taiwan_hk/rss.xml.

This function works perfectly using PHP4. Googling this error brings
~800 similar results.

Reproduce code:
---
if(!xml_parse($this-feedReader, $BBC_data)){
$this-in_error = true;
$this-error_msg = sprintf(XML 
Error: %s at line %d,
xml_error_string(xml_get_error_code($this-feedReader)),
xml_get_current_line_number($this-feedReader));
}

Expected result:

Expect xml_parse() function to parse feed without crashing ala PHP4.

Actual result:
--
xml_parse() function crashes throwing

Warning: xml_parse() [function.xml-parse]: input conversion failed due
to input error, bytes 0xA3 0xEE 0x7D 0x5F





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


#43348 [Fbk-Opn]: Mail function returns true but no email sent

2007-11-20 Thread RQuadling at GMail dot com
 ID:   43348
 User updated by:  RQuadling at GMail dot com
 Reported By:  RQuadling at GMail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Mail related
 Operating System: Windows XP SP2
 PHP Version:  5.3CVS-2007-11-20 (snap)
 New Comment:

C:\testmail.php
?php
ini_set('SMTP', 'gmail-smtp-in.l.google.com'); // Force GMail to be the
server.
$s_Email = 'RQuadling' . '@' . 'GMail.com';
var_dump(mail($s_Email, PHP_VERSION, 'Your message',
From:$s_Email));
?

and then

C:\PHP4\PHP -n C:\testmail.php
I get 4.4.7-dev message

C:\PHP5\PHP -n C:\testmail.php
I get nothing.

V:\PHP5.2.2RC2-dev\PHP -n C:\testmail.php
I get 5.2.2RC2-dev message

Today, we made a change from McAfee AV to Symantec AV. I am getting
little alerts for PHP4 and the PHP5.2.2 messages going out, but nothing
for PHP5.3.0-dev


Previous Comments:


[2007-11-20 16:46:56] [EMAIL PROTECTED]

It's pretty interesting since nothing has changed in this code between
those versions. And using the older one with exactly same line works?



[2007-11-20 14:58:47] RQuadling at GMail dot com

Description:

Same script working on 

PHP 4.4.7-dev (cgi-fcgi) (built: Mar 25 2007 21:02:43)
PHP 5.2.2RC2-dev (cli) (built: Apr 18 2007 08:03:01)

but not on 

PHP 5.3.0-dev (cli) (built: Nov 20 2007 08:19:12)

Using Wireshark to see SMTP activity.

No errors, warnings or notices produced.

Script doesn't crash.

True is returned.

Running via the command line to remove all extensions and relying on
default configuration.

Obviously, you will need to change the SMTP server and email addresses
to see this in operation.


Reproduce code:
---
php -n -r ini_set('SMTP', 'gmail-smtp-in.l.google.com');
var_dump(mail('[EMAIL PROTECTED]', 'Subject', 'Message',
'From:[EMAIL PROTECTED]'));


Expected result:

True AND an email to be received.

Actual result:
--
True but no SMTP activity when monitored using WireShark.





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


#43349 [Opn-Bgs]: 500 HTTP respons even on not blank pages

2007-11-20 Thread jani
 ID:   43349
 Updated by:   [EMAIL PROTECTED]
 Reported By:  andrea dot spacca at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: Gentoo (probably all)
 PHP Version:  5.2.5
 New Comment:

There's a parse error in your code, of course this happens.


Previous Comments:


[2007-11-20 15:14:24] andrea dot spacca at gmail dot com

Description:

When E_NOTICE or E_WARNING happen in eval'd code the script return 500
HTTP respons even on not blank pages

Reproduce code:
---
?php
eval('$pluto = test '.UNDEFINED_CONST.' test;');

echo 'AFTER';
?


Expected result:

Apache Access Log:
192.168.1.1 - - [20/Nov/2007:16:09:23 +0100] GET /testBug.cgi
HTTP/1.1 200 25

Actual result:
--
Apache Access Log:
192.168.1.1 - - [20/Nov/2007:16:09:23 +0100] GET /testBug.cgi
HTTP/1.1 500 25





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


#43348 [Opn-Asn]: Mail function returns true but no email sent

2007-11-20 Thread rquadling
 ID:   43348
 Updated by:   [EMAIL PROTECTED]
 Reported By:  RQuadling at GMail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Mail related
 Operating System: Windows XP SP2
 PHP Version:  5.3CVS-2007-11-20 (snap)
-Assigned To:  
+Assigned To:  johannes


Previous Comments:


[2007-11-20 17:04:54] RQuadling at GMail dot com

C:\testmail.php
?php
ini_set('SMTP', 'gmail-smtp-in.l.google.com'); // Force GMail to be the
server.
$s_Email = 'RQuadling' . '@' . 'GMail.com';
var_dump(mail($s_Email, PHP_VERSION, 'Your message',
From:$s_Email));
?

and then

C:\PHP4\PHP -n C:\testmail.php
I get 4.4.7-dev message

C:\PHP5\PHP -n C:\testmail.php
I get nothing.

V:\PHP5.2.2RC2-dev\PHP -n C:\testmail.php
I get 5.2.2RC2-dev message

Today, we made a change from McAfee AV to Symantec AV. I am getting
little alerts for PHP4 and the PHP5.2.2 messages going out, but nothing
for PHP5.3.0-dev



[2007-11-20 16:46:56] [EMAIL PROTECTED]

It's pretty interesting since nothing has changed in this code between
those versions. And using the older one with exactly same line works?



[2007-11-20 14:58:47] RQuadling at GMail dot com

Description:

Same script working on 

PHP 4.4.7-dev (cgi-fcgi) (built: Mar 25 2007 21:02:43)
PHP 5.2.2RC2-dev (cli) (built: Apr 18 2007 08:03:01)

but not on 

PHP 5.3.0-dev (cli) (built: Nov 20 2007 08:19:12)

Using Wireshark to see SMTP activity.

No errors, warnings or notices produced.

Script doesn't crash.

True is returned.

Running via the command line to remove all extensions and relying on
default configuration.

Obviously, you will need to change the SMTP server and email addresses
to see this in operation.


Reproduce code:
---
php -n -r ini_set('SMTP', 'gmail-smtp-in.l.google.com');
var_dump(mail('[EMAIL PROTECTED]', 'Subject', 'Message',
'From:[EMAIL PROTECTED]'));


Expected result:

True AND an email to be received.

Actual result:
--
True but no SMTP activity when monitored using WireShark.





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


#43347 [Fbk]: Big5 RSS Feed crashes xml_parse() function

2007-11-20 Thread chregu
 ID:   43347
 Updated by:   [EMAIL PROTECTED]
 Reported By:  pschmandra at hotmail dot com
 Status:   Feedback
 Bug Type: XML related
 Operating System: Red Hat Linux Enterprise 5
 PHP Version:  5.2.5
 New Comment:

Please also read
http://php.net/manual/en/function.xml-parser-create.php
carefully, especially:
***
The optional encoding specifies the character encoding for the 
input/output in PHP 4. Starting from PHP 5, the input encoding is 
automatically detected, so that the encoding parameter specifies only 
the output encoding. In PHP 4, the default output encoding is the same

as the input charset. If empty string is passed, the parser attempts to

identify which encoding the document is encoded in by looking at the 
heading 3 or 4 bytes. In PHP 5.0.0 and 5.0.1, the default output
charset 
is ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported 
encodings are ISO-8859-1, UTF-8 and US-ASCII.
***


Previous Comments:


[2007-11-20 16:49:39] [EMAIL PROTECTED]

What was the full configure line used to configure PHP in this case? 
And I don't see any crash there, just a normal error for passing data
with encoding which isn't supported by the xml library in use..



[2007-11-20 14:58:22] pschmandra at hotmail dot com

Description:

After upgrading PHP5 the xml_parse() parser throws 

Warning: xml_parse() [function.xml-parse]: input conversion failed due
to input error, bytes 0xA3 0xEE 0x7D 0x5F

when parsing Chineese Traditional BBC News Feed.

newsrss.bbc.co.uk/rss/chinese/trad/taiwan_hk/rss.xml.

This function works perfectly using PHP4. Googling this error brings
~800 similar results.

Reproduce code:
---
if(!xml_parse($this-feedReader, $BBC_data)){
$this-in_error = true;
$this-error_msg = sprintf(XML 
Error: %s at line %d,
xml_error_string(xml_get_error_code($this-feedReader)),
xml_get_current_line_number($this-feedReader));
}

Expected result:

Expect xml_parse() function to parse feed without crashing ala PHP4.

Actual result:
--
xml_parse() function crashes throwing

Warning: xml_parse() [function.xml-parse]: input conversion failed due
to input error, bytes 0xA3 0xEE 0x7D 0x5F





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


#43350 [NEW]: 500 HTTP respons even on not blank pages (not bogus)

2007-11-20 Thread andrea dot spacca at gmail dot com
From: andrea dot spacca at gmail dot com
Operating system: Gentoo (probably all)
PHP version:  5.2.5
PHP Bug Type: *General Issues
Bug description:  500 HTTP respons even on not blank pages (not bogus)

Description:

When E_NOTICE or E_WARNING happen in eval'd code the script return 500
HTTP respons even on not blank pages


PS: i'm sorry i have to report this bug twice, but [EMAIL PROTECTED] decided to
change the status to bogus with too much hurry

Reproduce code:
---
?php
eval('$pluto = test .UNDEFINED_CONST. test;');

echo 'AFTER';
?

Expected result:

Apache Access Log:
192.168.1.1 - - [20/Nov/2007:16:09:23 +0100] GET /testBug.cgi HTTP/1.1
200 25

Actual result:
--
Apache Access Log:
192.168.1.1 - - [20/Nov/2007:16:09:23 +0100] GET /testBug.cgi HTTP/1.1
500 25

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


#43277 [Opn-Bgs]: Interfaces behaving too much like classes

2007-11-20 Thread helly
 ID:   43277
 Updated by:   [EMAIL PROTECTED]
 Reported By:  krister dot karlstrom at arcada dot fi
-Status:   Open
+Status:   Bogus
 Bug Type: Class/Object related
 Operating System: Linux/Slackware
 PHP Version:  5.2.5
 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

PHP is class based OOP, not prototype based. Hence in your example
there are two conflicting methods.


Previous Comments:


[2007-11-13 12:19:46] krister dot karlstrom at arcada dot fi

Description:

I found this weird mix-up of the behaviour of interfaces and abstract
classes. I think that you should be able to always implement an
interface, regardless of how and where some of the implemented methods
where declared or defined. The only thing that should matter is that the
declared class defines all the methods that the interface requires.

The error message from PHP says that it can't inherit the method
Test::foo() - an implementation of an interface has nothing to do with
inheritance in classes in the OO-model. It shouldn't even try to
inherit the methods of the interface, just check that the defined
class implements all of the required methods.

Reproduce code:
---
?php

interface Test
{
public function foo();
}

abstract class Bar
{
public abstract function foo();
}

class FooBar extends Bar implements Test 
{
public function foo()
{
echo Hello!;
}
}

?

Expected result:

I expect this to raise no error, because the class FooBar nicely
defines and implements the method foo(), as the interface Test defines.

Actual result:
--
[error] PHP Fatal error:  Can't inherit abstract function Test::foo()
(previously declared abstract in Bar) in
/var/www/asta.arcada.fi/beta/foobar.php on line 13





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


#43340 [Fbk-Opn]: Segmentation fault after executing the same proc twice

2007-11-20 Thread marplatense at ubuntu dot com
 ID:   43340
 User updated by:  marplatense at ubuntu dot com
 Reported By:  marplatense at ubuntu dot com
-Status:   Feedback
+Status:   Open
 Bug Type: OCI8 related
 Operating System: Centos 4 64 bits
 PHP Version:  5.2.5
 New Comment:

Hi, thanks for your quick answer.
Here's what I got after following the traceback's instructions.
Hope there's enough information for you to work on this. Let me know if
you need anything else.

(gdb) bt
#0  0x002a9b609f8b in kpufGetRcvInfo () from
/opt/oracle/orase/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1
#1  0x002a9b82b508 in ttcacr () from
/opt/oracle/orase/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1
#2  0x002a9b8303f4 in ttcdrv () from
/opt/oracle/orase/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1
#3  0x002a9b70b7b8 in nioqwa () from
/opt/oracle/orase/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1
#4  0x002a9b53ca5f in upirtrc () from
/opt/oracle/orase/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1
#5  0x002a9b4a5fa3 in kpurcsc () from
/opt/oracle/orase/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1
#6  0x002a9b4549df in kpuexecv8 () from
/opt/oracle/orase/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1
#7  0x002a9b4525c3 in kpuexec () from
/opt/oracle/orase/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1
#8  0x002a9b500937 in OCIStmtExecute () from
/opt/oracle/orase/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1
#9  0x002a9a1f8d25 in php_oci_statement_execute
(statement=0x2a9cd276f0, mode=0)
at /opt/downloads/php-5.2.5/ext/oci8/oci8_statement.c:442
#10 0x002a9a202f39 in zif_oci_execute (ht=2,
return_value=0x2a9cd26e38, return_value_ptr=0x0, this_ptr=0x0, 
return_value_used=0) at
/opt/downloads/php-5.2.5/ext/oci8/oci8_interface.c:1302
#11 0x002a9a439abc in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fbfffcd40)
at /opt/downloads/php-5.2.5/Zend/zend_vm_execute.h:200
#12 0x002a9a43f769 in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0x7fbfffcd40)
at /opt/downloads/php-5.2.5/Zend/zend_vm_execute.h:1681
#13 0x002a9a439554 in execute (op_array=0x2a9cd26558) at
/opt/downloads/php-5.2.5/Zend/zend_vm_execute.h:92
#14 0x002a9a411690 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /opt/downloads/php-5.2.5/Zend/zend.c:1134
#15 0x002a9a3b70af in php_execute_script
(primary_file=0x7fb280) at
/opt/downloads/php-5.2.5/main/main.c:2004
#16 0x002a9a48c2d4 in php_handler (r=0x552ae5a618) at
/opt/downloads/php-5.2.5/sapi/apache2handler/sapi_apache2.c:631
#17 0x00552aac79f3 in ap_run_handler () from /usr/sbin/httpd
#18 0x00552aac7eb1 in ap_invoke_handler () from /usr/sbin/httpd
#19 0x00552aac4cb8 in ap_process_request () from /usr/sbin/httpd
#20 0x00552aac0089 in _start () from /usr/sbin/httpd
#21 0x00552aad1693 in ap_run_process_connection () from
/usr/sbin/httpd
#22 0x00552aac5b20 in ap_graceful_stop_signalled () from
/usr/sbin/httpd
#23 0x00552aac5dbd in ap_graceful_stop_signalled () from
/usr/sbin/httpd
#24 0x00552aac5ea4 in ap_graceful_stop_signalled () from
/usr/sbin/httpd
#25 0x00552aac65db in ap_mpm_run () from /usr/sbin/httpd
#26 0x00552aacccef in main () from /usr/sbin/httpd


Previous Comments:


[2007-11-20 13:44:28] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.





[2007-11-20 03:16:43] marplatense at ubuntu dot com

Description:

Bug related to http://bugs.php.net/bug.php?id=37471 and
http://bugs.php.net/bug.php?id=38173 but with version 5.2.5 (the other
two are closed but we can reproduce the error every time we run 
the test case with the latest stable release)


1- My php configuration:
./configure --prefix=/opt/php/php5.2.5 --exec-prefix=/opt/php/php5.2.5
--with-config-file-path=etc/httpd/conf.d --with-libdir=lib64 --with-gd
--with-zlib=/usr --with-xmlrpc
--with-oci8=/opt/oracle/orase/oracle/product/10.2.0/db_1
--with-apxs2=/usr/sbin/apxs --enable-sigchild --with-ttf=/usr/lib64
--enable-gd-native-ttf --enable-gd-imgstrttf --enable-gd-native-ttf
--with-ttf-dir=/usr/local/lib --with-freetype-dir=/opt/freetype
--with-zlib-dir=/usr/local/lib --with-png-dir=/usr/local/lib
--with-jpeg-dir=/usr/local/lib
--with-imap=/opt/imap-2006d.DEV.SNAP-0611201609/ --with-imap-ssl
--with-mysql=/usr/bin --enable-mbstring --with-iconv --with-zlib
--enable-sockets --disable-cgi 

#43353 [NEW]: wrong detection of 'data' wrapper causes notice

2007-11-20 Thread gk at gknw dot de
From: gk at gknw dot de
Operating system: NetWare
PHP version:  5.2.5
PHP Bug Type: Streams related
Bug description:  wrong detection of 'data' wrapper causes notice

Description:

On NetWare we have volume names similar to drive letters on Win32;
however the volume names are not just one char, but can be up to 16 chars,
so an valid absolute path can look like:
data1:/myfolder/otherfolder

Now if I use f.e. is_dir(data1:/myfolder/otherfolder) then I get:
Notice: is_file() [function.is-file]: Unable to find the wrapper data1 -
did you forget to enable it when you configured PHP? in
data1:/web/project/tstpaths.php on line 13

It seems to me that the problem is in ./main/streams/streams.c at line
1519; I did modify this line as below, and the issue is then gone:

--- streams.c.orig  Wed Aug 08 08:01:50 2007
+++ streams.c   Tue Nov 20 23:45:45 2007
@@ -1516,7 +1516,7 @@
n++;
}
 
-   if ((*p == ':')  (n  1)  (!strncmp(//, p+1, 2) || !memcmp(data,
path, 4))) {
+   if ((*p == ':')  (n  1)  (!strncmp(//, p+1, 2))) {
protocol = path;
} else if (n == 5  strncasecmp(path, zlib:, 5) == 0) {
/* BC with older php scripts and zlib wrapper */

however I'm not sure if now the 'data' wrapper still works; but formerly
due to the '||' everything beginning with 'data' did match.
I cant see a reason why the test for 'data' has to be handled without
checking for '://', but then I'm not familar with the 'data' wrapper at
all.

Reproduce code:
---
pre
?php
// Test for the 'data' wrapper bug.
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);

$mydir = data:/myfolder/another/folder;
echo is_dir ( $mydir ) =  . (is_dir($mydir) ? true : false) . \n;

$mydir = data1:/myfolder/another/folder;
echo is_dir ( $mydir ) =  . (is_dir($mydir) ? true : false) . \n;

$mydir = data2:/myfolder/another/folder;
echo is_dir ( $mydir ) =  . (is_dir($mydir) ? true : false) . \n;

?
pre


Expected result:

is_dir ( data:/myfolder/another/folder ) = false
is_dir ( data1:/myfolder/another/folder ) = false
is_dir ( data2:/myfolder/another/folder ) = false


Actual result:
--
is_dir ( data:/myfolder/another/folder ) = false
Notice: is_dir() [function.is-dir]: Unable to find the wrapper data1 -
did you forget to enable it when you configured PHP? in
sys:/www/tstphp/temp/wrapper_bug.php on line 10
Notice: is_dir() [function.is-dir]: Unable to find the wrapper data1 -
did you forget to enable it when you configured PHP? in
sys:/www/tstphp/temp/wrapper_bug.php on line 10
is_dir ( data1:/myfolder/another/folder ) = false
Notice: is_dir() [function.is-dir]: Unable to find the wrapper data2 -
did you forget to enable it when you configured PHP? in
sys:/www/tstphp/temp/wrapper_bug.php on line 13
Notice: is_dir() [function.is-dir]: Unable to find the wrapper data2 -
did you forget to enable it when you configured PHP? in
sys:/www/tstphp/temp/wrapper_bug.php on line 13
is_dir ( data2:/myfolder/another/folder ) = false


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


#42866 [Opn-Csd]: str_split() returns extra char when given string size is not mulitple of lenth

2007-11-20 Thread stas
 ID:   42866
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kraghuba at in dot ibm dot com
-Status:   Open
+Status:   Closed
 Bug Type: Strings related
 Operating System: linux,win xp
 PHP Version:  6CVS-2007-10-05 (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.

thanks


Previous Comments:


[2007-11-15 17:43:00] claudiocherubino at gmail dot com

I tried fixing the bug, in my opinion a single line should be changed.
Sorry, I don't know if this is the right place to post the patch.
Here it is:


Index: ext/standard/string.c
===
RCS file: /repository/php-src/ext/standard/string.c,v
retrieving revision 1.655
diff -u -r1.655 string.c
--- ext/standard/string.c   7 Oct 2007 05:15:06 -   1.655
+++ ext/standard/string.c   15 Nov 2007 17:29:00 -
@@ -7802,7 +7802,7 @@
}
 
if (p != (str.s + str_len * charsize)) {
-   add_next_index_zstrl(return_value, str_type, ZSTR(p), (str.s +
str_len * charsize - p), 1);
+   add_next_index_zstrl(return_value, str_type, ZSTR(p), (str.s +
str_len * charsize - p)/charsize, 1);
}
 }
 /* }}} */



[2007-10-05 11:20:59] kraghuba at in dot ibm dot com

Description:

str_split() returns extra charecter when given string is not mulitple
of given length. for example if the given string size is 22 and split
length is 5, then the last element of the returned array contains 5 or
more than 5 chars, which is wrong. The last element of the return array
should only contain 2 chars.

This behavior is only noticed on  PHP6 with UNICODE ON

Reproduce code:
---
?php
$str = 'Testing str_split()';
$split_length = 5;

var_dump( str_split($str, $split_length) );

?

Expected result:

array(4) {
  [0]=
  unicode(5) Testi
  [1]=
  unicode(5) ng st
  [2]=
  unicode(5) r_spl
  [3]=
  unicode(4) it()
}

Actual result:
--
array(4) {
  [0]=
  unicode(5) Testi
  [1]=
  unicode(5) ng st
  [2]=
  unicode(5) r_spl
  [3]=
  unicode(8) it()[EMAIL PROTECTED]@1
}





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


#42831 [Asn-Bgs]: function number_format() seems to return a wrong value

2007-11-20 Thread ab5602
 ID:   42831
 Updated by:   [EMAIL PROTECTED]
 Reported By:  naweokawa at free dot fr
-Status:   Assigned
+Status:   Bogus
 Bug Type: Strings related
 Operating System: Solaris 10
 PHP Version:  5.2.4
 Assigned To:  ab5602
 New Comment:

I have tried under several other 64-bit Solaris systems with similar
specs, but am still unable to reproduce this.


Previous Comments:


[2007-10-13 17:12:51] [EMAIL PROTECTED]


Hi, thanks for the update.  I do have the binary linked against the 64
libs but still no luck reproducing the problem with the current
snapshot.  If I can find some time, I'll try and replicate your setup
better, including your newer OS patch level.

$ ldd ./php
librt.so.1 =/lib/64/librt.so.1
libresolv.so.2 =/lib/64/libresolv.so.2
libm.so.2 = /lib/64/libm.so.2
libnsl.so.1 =   /lib/64/libnsl.so.1
libsocket.so.1 =/lib/64/libsocket.so.1
libc.so.1 = /lib/64/libc.so.1
libaio.so.1 =   /lib/64/libaio.so.1
libmd5.so.1 =   /lib/64/libmd5.so.1
libmp.so.2 =/lib/64/libmp.so.2
libscf.so.1 =   /lib/64/libscf.so.1
libdoor.so.1 =  /lib/64/libdoor.so.1
libuutil.so.1 = /lib/64/libuutil.so.1
$ ./php ./num.php 
123 456,55



[2007-10-11 14:45:04] naweokawa at free dot fr

So, I re-test the code again :

$ cat num.php
?php
$num2=123456.55;
echo number_format($num2 , 2, ',', ' ') .\n;
?

$ /HOME/php5.2-200710111030_gcc_64/bin/php -f ./num.php
12 345 655,00

$ file /HOME/php5.2-200710111030_gcc_64/bin/php
/HOME/php5.2-200710111030_gcc_64/bin/php:   ELF 64-bit LSB
executable AMD64 Version 1 [SSE2 SSE FXSR FPU], dynamically linked, not
stripped

Not really same flags like you : 
$ isainfo -v
64-bit amd64 applications
sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov amd_sysc
cx8 tsc
fpu
32-bit i386 applications
sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov amd_sysc
cx8 tsc
fpu

$ uname -a
SunOS tdb 5.10 Generic_118855-33 i86pc i386 i86pc

$ /HOME/php5.2-200710111030_gcc_64/bin/php -v
PHP 5.2.5-dev (cli) (built: Oct 11 2007 14:51:34)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

$ ldd /HOME/php5.2-200710111030_gcc_64/bin/php
librt.so.1 =/lib/64/librt.so.1
libresolv.so.2 =/lib/64/libresolv.so.2
libm.so.2 = /lib/64/libm.so.2
libnsl.so.1 =   /lib/64/libnsl.so.1
libsocket.so.1 =/lib/64/libsocket.so.1
libz.so.1 = /usr/lib/64/libz.so.1
libxml2.so.2 =  /usr/local/lib/libxml2.so.2
libpthread.so.1 =   /lib/64/libpthread.so.1
libc.so.1 = /lib/64/libc.so.1
libaio.so.1 =   /lib/64/libaio.so.1
libmd5.so.1 =   /lib/64/libmd5.so.1
libmp.so.2 =/lib/64/libmp.so.2
libscf.so.1 =   /lib/64/libscf.so.1
libdoor.so.1 =  /lib/64/libdoor.so.1
libuutil.so.1 = /lib/64/libuutil.so.1

All is OK on 32bits compilation.

That's a zone solaris on Sun Fire v20z (Dual CPU AMD64  Socket940).

Greetings.



[2007-10-11 00:30:23] [EMAIL PROTECTED]


Hi, I cannot reproduce either.

$ uname -a
SunOS opteron 5.10 Generic_118855-14 i86pc i386 i86pc
$ isainfo -v
64-bit amd64 applications
sse3 sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov
amd_sysc cx8 
tsc fpu 
32-bit i386 applications
sse3 sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov
amd_sysc cx8 
tsc fpu 
$ ./php -v 
PHP 5.2.5-dev (cli) (built: Oct 10 2007 19:51:01) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
$ cat ./num.php 
?
$num2=123456.55;
echo number_format($num2 , 2, ',', ' ');
?
$ ./php ./num.php 
123 456,55



[2007-10-03 21:00:15] naweokawa at free dot fr

This issue doesn't seems appear on Solaris 10 x86 32 bits. 
But it persits on Solaris 10 /  AMD64 compiled on full 64bits.



[2007-10-03 10:56:34] [EMAIL PROTECTED]

GCC 3.4.3 is quite old and is known to have problems on SPARC.
Try with something newer (the latest available would be great).



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

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


#43350 [Com]: 500 HTTP respons even on not blank pages (not bogus)

2007-11-20 Thread carsten_sttgt at gmx dot de
 ID:   43350
 Comment by:   carsten_sttgt at gmx dot de
 Reported By:  andrea dot spacca at gmail dot com
 Status:   Open
 Bug Type: *General Issues
 Operating System: Gentoo (probably all)
 PHP Version:  5.2.5
 New Comment:

Hello,

I can't reproduce this behaviour on Windwows/FreeBSD with a normal
PHP script (testBug.php).

BTW:
How have you setup your Apache to recognize *.cgi as a PHP-Script?
Because a normal *.cgi script should have a shebang.


Previous Comments:


[2007-11-20 18:08:46] andrea dot spacca at gmail dot com

Description:

When E_NOTICE or E_WARNING happen in eval'd code the script return 500
HTTP respons even on not blank pages


PS: i'm sorry i have to report this bug twice, but [EMAIL PROTECTED] decided
to change the status to bogus with too much hurry

Reproduce code:
---
?php
eval('$pluto = test .UNDEFINED_CONST. test;');

echo 'AFTER';
?

Expected result:

Apache Access Log:
192.168.1.1 - - [20/Nov/2007:16:09:23 +0100] GET /testBug.cgi
HTTP/1.1 200 25

Actual result:
--
Apache Access Log:
192.168.1.1 - - [20/Nov/2007:16:09:23 +0100] GET /testBug.cgi
HTTP/1.1 500 25





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


#43347 [Opn]: Big5 RSS Feed crashes xml_parse() function

2007-11-20 Thread chregu
 ID:   43347
 Updated by:   [EMAIL PROTECTED]
 Reported By:  pschmandra at hotmail dot com
 Status:   Open
 Bug Type: XML related
 Operating System: Red Hat Linux Enterprise 5
 PHP Version:  5.1.6
 New Comment:

Please show an example of your XML


Previous Comments:


[2007-11-20 18:49:11] pschmandra at hotmail dot com

All supported encodings listed below cause the xml_parse() function to
error out parsing any Chinese Traditional RSS Feeds published by the BBC
using PHP5.1.6 with a UTF-8 default_charset.

xml_parser_create()
xml_parser_create('')
xml_parser_create('UTF-8')
xml_parser_create('ISO-8859-1')
xml_parser_create('US-ASCII')



[2007-11-20 17:56:22] [EMAIL PROTECTED]

Please also read
http://php.net/manual/en/function.xml-parser-create.php
carefully, especially:
***
The optional encoding specifies the character encoding for the 
input/output in PHP 4. Starting from PHP 5, the input encoding is 
automatically detected, so that the encoding parameter specifies only 
the output encoding. In PHP 4, the default output encoding is the same

as the input charset. If empty string is passed, the parser attempts to

identify which encoding the document is encoded in by looking at the 
heading 3 or 4 bytes. In PHP 5.0.0 and 5.0.1, the default output
charset 
is ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported 
encodings are ISO-8859-1, UTF-8 and US-ASCII.
***



[2007-11-20 16:49:39] [EMAIL PROTECTED]

What was the full configure line used to configure PHP in this case? 
And I don't see any crash there, just a normal error for passing data
with encoding which isn't supported by the xml library in use..



[2007-11-20 14:58:22] pschmandra at hotmail dot com

Description:

After upgrading PHP5 the xml_parse() parser throws 

Warning: xml_parse() [function.xml-parse]: input conversion failed due
to input error, bytes 0xA3 0xEE 0x7D 0x5F

when parsing Chineese Traditional BBC News Feed.

newsrss.bbc.co.uk/rss/chinese/trad/taiwan_hk/rss.xml.

This function works perfectly using PHP4. Googling this error brings
~800 similar results.

Reproduce code:
---
if(!xml_parse($this-feedReader, $BBC_data)){
$this-in_error = true;
$this-error_msg = sprintf(XML 
Error: %s at line %d,
xml_error_string(xml_get_error_code($this-feedReader)),
xml_get_current_line_number($this-feedReader));
}

Expected result:

Expect xml_parse() function to parse feed without crashing ala PHP4.

Actual result:
--
xml_parse() function crashes throwing

Warning: xml_parse() [function.xml-parse]: input conversion failed due
to input error, bytes 0xA3 0xEE 0x7D 0x5F





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


#43347 [Opn-Fbk]: Big5 RSS Feed crashes xml_parse() function

2007-11-20 Thread chregu
 ID:   43347
 Updated by:   [EMAIL PROTECTED]
 Reported By:  pschmandra at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: XML related
 Operating System: Red Hat Linux Enterprise 5
 PHP Version:  5.1.6


Previous Comments:


[2007-11-21 06:00:10] [EMAIL PROTECTED]

Please show an example of your XML



[2007-11-20 18:49:11] pschmandra at hotmail dot com

All supported encodings listed below cause the xml_parse() function to
error out parsing any Chinese Traditional RSS Feeds published by the BBC
using PHP5.1.6 with a UTF-8 default_charset.

xml_parser_create()
xml_parser_create('')
xml_parser_create('UTF-8')
xml_parser_create('ISO-8859-1')
xml_parser_create('US-ASCII')



[2007-11-20 17:56:22] [EMAIL PROTECTED]

Please also read
http://php.net/manual/en/function.xml-parser-create.php
carefully, especially:
***
The optional encoding specifies the character encoding for the 
input/output in PHP 4. Starting from PHP 5, the input encoding is 
automatically detected, so that the encoding parameter specifies only 
the output encoding. In PHP 4, the default output encoding is the same

as the input charset. If empty string is passed, the parser attempts to

identify which encoding the document is encoded in by looking at the 
heading 3 or 4 bytes. In PHP 5.0.0 and 5.0.1, the default output
charset 
is ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported 
encodings are ISO-8859-1, UTF-8 and US-ASCII.
***



[2007-11-20 16:49:39] [EMAIL PROTECTED]

What was the full configure line used to configure PHP in this case? 
And I don't see any crash there, just a normal error for passing data
with encoding which isn't supported by the xml library in use..



[2007-11-20 14:58:22] pschmandra at hotmail dot com

Description:

After upgrading PHP5 the xml_parse() parser throws 

Warning: xml_parse() [function.xml-parse]: input conversion failed due
to input error, bytes 0xA3 0xEE 0x7D 0x5F

when parsing Chineese Traditional BBC News Feed.

newsrss.bbc.co.uk/rss/chinese/trad/taiwan_hk/rss.xml.

This function works perfectly using PHP4. Googling this error brings
~800 similar results.

Reproduce code:
---
if(!xml_parse($this-feedReader, $BBC_data)){
$this-in_error = true;
$this-error_msg = sprintf(XML 
Error: %s at line %d,
xml_error_string(xml_get_error_code($this-feedReader)),
xml_get_current_line_number($this-feedReader));
}

Expected result:

Expect xml_parse() function to parse feed without crashing ala PHP4.

Actual result:
--
xml_parse() function crashes throwing

Warning: xml_parse() [function.xml-parse]: input conversion failed due
to input error, bytes 0xA3 0xEE 0x7D 0x5F





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


#43350 [Opn-Fbk]: 500 HTTP respons even on not blank pages (not bogus)

2007-11-20 Thread jani
 ID:   43350
 Updated by:   [EMAIL PROTECTED]
 Reported By:  andrea dot spacca at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: *General Issues
 Operating System: Gentoo (probably all)
 PHP Version:  5.2.5
 New Comment:

What in your script has parse error you didn't understand?


Previous Comments:


[2007-11-21 04:53:22] carsten_sttgt at gmx dot de

Hello,

I can't reproduce this behaviour on Windwows/FreeBSD with a normal
PHP script (testBug.php).

BTW:
How have you setup your Apache to recognize *.cgi as a PHP-Script?
Because a normal *.cgi script should have a shebang.



[2007-11-20 18:08:46] andrea dot spacca at gmail dot com

Description:

When E_NOTICE or E_WARNING happen in eval'd code the script return 500
HTTP respons even on not blank pages


PS: i'm sorry i have to report this bug twice, but [EMAIL PROTECTED] decided
to change the status to bogus with too much hurry

Reproduce code:
---
?php
eval('$pluto = test .UNDEFINED_CONST. test;');

echo 'AFTER';
?

Expected result:

Apache Access Log:
192.168.1.1 - - [20/Nov/2007:16:09:23 +0100] GET /testBug.cgi
HTTP/1.1 200 25

Actual result:
--
Apache Access Log:
192.168.1.1 - - [20/Nov/2007:16:09:23 +0100] GET /testBug.cgi
HTTP/1.1 500 25





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


#43345 [Opn]: broken mb_encode_mimeheader()

2007-11-20 Thread wiela at centras dot lt
 ID:   43345
 User updated by:  wiela at centras dot lt
 Reported By:  wiela at centras dot lt
 Status:   Open
 Bug Type: mbstring related
 Operating System: Windows XP HE
 PHP Version:  5.2.5
 New Comment:

Well, maybe it works, but it isn't supposed to work this way, because
the documentation says *nothing* about this:

(PHP 4 = 4.0.6, PHP 5)

mb_encode_mimeheader -- Encode string for MIME header
Description
string mb_encode_mimeheader ( string str [, string charset [, string
transfer_encoding [, string linefeed [, string indent )


mb_encode_mimeheader() encodes a given string str by the MIME header
encoding scheme. Returns a converted version of the string represented
in ASCII. 

charset specifies the name of the character set in which str is
represented in. The default value is determined by the current NLS
setting (mbstring.language). 

transfer_encoding specifies the scheme of MIME encoding. It should be
either B (Base64) or Q (Quoted-Printable). Falls back to B if not
given. 

linefeed specifies the EOL (end-of-line) marker with which
mb_encode_mimeheader() performs line-folding (a RFC term, the act of
breaking a line longer than a certain length into multiple lines. The
length is currently hard-coded to 74 characters). Falls back to \r\n
(CRLF) if not given.


Previous Comments:


[2007-11-20 12:41:59] carsten_sttgt at gmx dot de

 echo mb_encode_mimeheader($str1, 'UTF-8', 'Q');
With also setting mb_internal_encoding(), your example works:

| $str1  = \xC4\x84\xC4\x8C\xC4\x98\xC4\x96\xC4\xAE
| $str1 .= \xC5\xA0\xC5\xB2\xC5\xAA\xC5\xBD;
|
| mb_internal_encoding('UTF-8');
| echo mb_encode_mimeheader($str1, 'UTF-8', 'Q');



[2007-11-20 11:14:48] wiela at centras dot lt

Description:

php v5.2.5, mb_encode_mimeheader(), both QP and base64 encoding schemes
incorrectly encodes utf-8 strings.

Reproduce code:
---
// $str1 and $str2 characters are in the Latin-Extended-A plane

// $str1 is 'utf-8' string, its base64_encode is:
// 'xITEjMSYxJbErsWgxbLFqsW9'
$str1 = #260;#268;#280;#278;#302;Š#370;#362;Ž;

// $str2 is 'utf-8' string, its base64_encode is:
// 'xIXEjcSZxJfEr8WhxbPFq8W+'
$str2 = #261;#269;#281;#279;#303;š#371;#363;ž; 

echo mb_encode_mimeheader($str1, 'UTF-8', 'Q');
echo mb_encode_mimeheader($str1, 'UTF-8', 'B');
echo mb_encode_mimeheader($str2, 'UTF-8', 'Q');
echo mb_encode_mimeheader($str2, 'UTF-8', 'B');

Expected result:

for $str1, QP encoding:
=?UTF-8?Q?=C4=84=C4=8C=C4=98=C4=96=C4=AE=C5=A0=C5=B2=C5=AA=C5=BD?=

for $str1, base64 encoding:
=?UTF-8?B?xITEjMSYxJbErsWgxbLFqsW9?=

for $str2, QP encoding:
=?UTF-8?Q?=C4=85=C4=8D=C4=99=C4=97=C4=AF=C5=A1=C5=B3=C5=AB=C5=BE?=

for $str2, base64 encoding:
=?UTF-8?B?xIXEjcSZxJfEr8WhxbPFq8W+?=



Actual result:
--
for $str1, QP encoding:
=?UTF-8?Q?=C3=84=C2=84=C3=84=C2=8C=C3=84=C2=98=C3=84=C2=96=C3=84=C2=AE?=
 =?UTF-8?Q?=C3=85=C2=A0=C3=85=C2=B2=C3=85=C2=AA=C3=85=C2=BD?=

for $str1, base64 encoding:
=?UTF-8?B?w4TChMOEwozDhMKYw4TClsOEwq7DhcKgw4XCssOFwqrDhcK9?=

for $str2, QP encoding:
=?UTF-8?Q?=C3=84=C2=85=C3=84=C2=8D=C3=84=C2=99=C3=84=C2=97=C3=84=C2=AF?=
 =?UTF-8?Q?=C3=85=C2=A1=C3=85=C2=B3=C3=85=C2=AB=C3=85=C2=BE?=

for $str2, base64 encoding:
=?UTF-8?B?w4TChcOEwo3DhMKZw4TCl8OEwq/DhcKhw4XCs8OFwqvDhcK+?=






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


#43325 [Opn-Bgs]: feof() hangs on UDP stream

2007-11-20 Thread jani
 ID:   43325
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mertcan at dpozitif dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Streams related
 Operating System: Centos 5.0
 PHP Version:  5.2.5
 New Comment:

Your script was buggy, this works:

?php

echo rcon_komut(meta list, 123456, 62.68.207.16, 27015);

function rcon_komut($komut, $rcon_pass, $ip, $port)
{
  $fp = fsockopen(udp://.$ip,$port, $errno, $errstr);
  socket_set_timeout($fp, 3);

  $prefix = \xff\xff\xff\xff;
  $msg = {$prefix}challenge rcon\n;
  fputs($fp, $msg, strlen($msg));

  $response = fgets($fp, 1024);
  $challenge = substr($response, 19, strlen($response) - 20);

  $msg = \xff\xff\xff\xffrcon $challenge \$rcon_pass\ $komut\n;
  fputs($fp, $msg, strlen($msg));

  $status = socket_get_status($fp);

  while($status['unread_bytes']) {
$response .= fgets($fp, 2048);
$status = socket_get_status($fp);
  }
  fclose ($fp);
  return $response;
}
?

Using feof() makes no sense with udp streams..



Previous Comments:


[2007-11-20 15:34:44] mertcan at dpozitif dot com

actually if i set stream_set_blocking for $fp to 1 it gives the result
(which i posted the code below) if i change stream_set_blocking to 0, it
does not give any result. in either ways if i use feof($fp) it hangs..

?php

echo rcon_komut(meta list, 123456, 62.68.207.16, 27015);

function rcon_komut($komut, $rcon_pass, $ip, $port)
{
$response = ;
$msg = challenge rcon;
$fp = fsockopen(udp://.$ip,$port, $errno, $errstr);

stream_set_blocking($fp, 1);

fputs($fp, $msg, strlen($msg));

$response .= fgets($fp, 1024);

fclose ($fp);

return $response;
}

?



[2007-11-20 09:29:54] [EMAIL PROTECTED]

Your script doesn't work because you don't get anything in $response in
the first place. So you're passing invalid data around long before
feof() is used and the server just sits there propably waiting for more
data to be input before it gives any back..



[2007-11-20 09:10:45] mertcan at dpozitif dot com

Here is the full program:

?php

echo rcon_komut(meta list, 123456, 62.68.207.16, 27015);

function rcon_komut($komut, $rcon_pass, $ip, $port)
{
$response = ;
$msg = challenge rcon;
$fp = fsockopen(udp://.$ip,$port, $errno, $errstr);

stream_set_blocking($fp, 0);

fputs($fp, $msg, strlen($msg));
$response = fgets($fp, 1024);   
$challenge = substr($response, 19, strlen($response) - 20);

$msg=rcon.$challenge.\.$rcon_pass.\.$komut.chr(0);
fputs($fp, $msg, strlen($msg));

while (!feof($fp))
$response .= fgets($fp, 4096);

fclose ($fp);

return $response;
}

?



[2007-11-20 08:44:44] [EMAIL PROTECTED]

That's still just a piece of the script, a proper test script starts
with ?php and ends in ? and can be just copy'pasted and run..



[2007-11-19 17:19:22] mertcan at dpozitif dot com

i gave $tanim in function use:

function rcon_komut($komut, $rcon_pass, $ip, $port)
{
$msg = challenge rcon;
$fp = fsockopen(udp://.$ip,$port, $errno, $errstr);

stream_set_blocking($fp, 0);

fputs($fp, $msg, strlen($msg));
$response = fgets($fp, 1024);   
$challenge = substr($response, 19, strlen($response) - 20);

$msg=rcon.$challenge.\.$rcon_pass.\.$komut.chr(0);
fputs($fp, $msg, strlen($msg));

while (!feof($fp))
$response .= fgets($fp, 32);

fclose ($fp);
$response = substr($response, 6, strlen($response)-6);
return $response;
}



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

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


#43035 [Opn-Asn]: Tests affected by system php.ini file

2007-11-20 Thread jani
 ID:   43035
 Updated by:   [EMAIL PROTECTED]
 Reported By:  chad at herballure dot com
-Status:   Open
+Status:   Assigned
 Bug Type: *General Issues
 Operating System: Linux
 PHP Version:  5.2.5RC1
-Assigned To:  
+Assigned To:  jani
 New Comment:

This zts/debug issue shall be solved by introducing the
#if..#else..#endif construct in php.ini but it's another issue. 
I'm checking these specific settings now.


Previous Comments:


[2007-11-19 18:38:10] hoffie at gentoo dot org

While it might be really useful to test PHP in a lot of different
environments, there is at least one case where using a global php.ini
does not make any sense: If you have a global PHP installed (no-zts,
no-debug) and have any extensions (and load them in the global php.ini
file) but you are building php with zts and/or debug, tests will fail
because PHP is unable to load the extensions which were built for
no-debug-no-zts (obviously).
We are using ./run-tests.php -n and are patching any tests which call
their own interpreter (if you want the patches, just tell me and I'll
send them). However, I don't think this is a good solution...

(I already mentioned this issue on IRC and that was the reason for me
to create patches for that...)



[2007-11-07 13:25:48] chad at herballure dot com

; Differences from php.ini-dist
output_buffering = 4096
allow_call_time_pass_reference = Off
safe_mode_protected_env_vars = LD_LIBRARY_PATH,LD_DEBUG,LD_PRELOAD
expose_php = Off
memory_limit = 24M
error_reporting = E_ALL
display_startup_errors = On
log_errors = On
; this is a troublesome one:
ignore_repeated_errors = On
html_errors = Off
register_argc_argv = Off
post_max_size = 200M
default_charset = iso-8859-1
include_path = .:/local/data/php/include:/local/pkgs/php/lib/php
upload_max_filesize = 200M
allow_url_fopen = Off
mysql.max_persistent = 10
mysql.max_links = 15
; sessions saved on tmpfs
session.save_path = /local/data/php/session
session.use_only_cookies = 1
session.name = SessionKey
session.gc_maxlifetime = 3600
session.bug_compat_42 = 0
session.hash_bits_per_character = 6



[2007-10-30 22:14:14] [EMAIL PROTECTED]

It's intentional to use system php.ini to find possible issues with
different settings being something else than default. To help us fix the
 tests or some bug in PHP you need to come up with a diff against the
stock php.ini-dist / php.ini-recommended (depending what you used as
base for your php.ini).



[2007-10-19 14:04:59] [EMAIL PROTECTED]

The tests are still broken, but not because of the reason that you
mention. All tests should run under *any* environment - although some of
the settings we force to avoid some of the things you mention.



[2007-10-19 12:37:43] chad at herballure dot com

Description:

ignore_repeated_errors, error_reporting, and display_errors in the
system php.ini file can interfere with testing, causing bogus failure
reports. Tests should run in a known-good environment, not under the
system's /usr/local/lib/php.ini settings.

388 additional failures can be provoked in 5.2.5RC1 this way. This
wastes the time of both PHP-QA (who get bogus reports) and users (who
have to hide the system php.ini by hand and replace it after running
tests--if they remember).






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