#47238 [NEW]: function fails to run on IIS6.0

2009-01-29 Thread helga79 at rediffmail dot com
From: helga79 at rediffmail dot com
Operating system: Windows 2003
PHP version:  5.2.8
PHP Bug Type: IIS related
Bug description:  function fails to run on IIS6.0

Description:

The below php script when run from command prompt runs successfully gives
the output returned by perl script.
But when run on browser IIS6.0 php (CGI/Fast CGI) I get error.
I have pasted the test.php script. the perl script returns a numeric
value.

Reproduce code:
---


Expected result:

Success and $sid some numeric value which is returnes by the perl script

Actual result:
--
Warning: popen(perl uploadpost.pl,r): No error in D:\WFM_vDev_Tk\test.php
on line 25 pipe value. Warning: fgets(): supplied argument is not a valid
stream resource in D:\WFM_vDev_Tk\test.php on line 27 Warning: pclose():
supplied argument is not a valid stream resource in D:\WFM_vDev_Tk\test.php
on line 30 .


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



#39312 [Com]: Cannot install PDO_OCI

2009-01-29 Thread michael-ring at t-online dot de
 ID:   39312
 Comment by:   michael-ring at t-online dot de
 Reported By:  andrew dot nagy at villanova dot edu
 Status:   Assigned
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.2.4
 Assigned To:  sixd
 New Comment:

I've found a problem under MacOSX, the extension'.so' is hardcoded in
the library detection for pdo_oci. This breaks under MacOSX because
libclntsh has '.dylib' extension instead of '.so'.

To solve this problem the following patch has to be applied. Shall I
open a new bug in order to get this included in upcomming php-Versions?

--- ext/pdo_oci/config.m4.orig  2009-01-28 23:31:07.0
+0100
+++ ext/pdo_oci/config.m4   2009-01-28 23:34:39.0 +0100
@@ -97,11 +97,11 @@
 else
   AC_MSG_ERROR([I'm too dumb to figure out where the include dir
is in your Instant Client install])
 fi
-if test -f
"$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib/libclntsh.so"
; then
+if test -f
"$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib/libclntsh.$SHLIB_SUFFIX_NAME"
; then
  
PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib"
-elif test -f "$PDO_OCI_IC_PREFIX/client/lib/libclntsh.so" ; then
+elif test -f
"$PDO_OCI_IC_PREFIX/client/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; then
   PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/client/lib"
-elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.so" ; then
+elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.$SHLIB_SUFFIX_NAME" ;
then
   PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX"
 else
   AC_MSG_ERROR([I'm too dumb to figure out where the libraries are
in your Instant Client install])


Previous Comments:


[2009-01-20 11:42:00] fernando dot wendt at gmail dot com

More info about the lastest Oracle Instant Client under Linux: i'm
configuring a web server with Apache2.2.11, PHP5.2.8, and OIC11.1, and
PDO compile only works with this syntax:

./configure --with-oci8=shared,instantclient,/usr/lib/oracle
--with-pdo-oci=instantclient,/usr/lib/oracle,11.1

Presuming /usr/lib/oracle is your Instant Client base directory. The
great stuff is pass the version number at the command line, just as
Andrew point us.

Thanks a lot, and i do suggest you to put this detail on the online
documentation website, at installing PDO Oracle.

Best regards.



[2007-09-27 09:56:50] j...@php.net

Chris, can you check this out please?



[2007-09-25 22:08:48] tony2...@php.net

Yeah, but I never maintained PDO_OCI.



[2007-09-25 09:53:13] j...@php.net

Tony, I wasn't sure to whom to assign this but you're one of the oci8
maintainers AFAIK. :)



[2007-09-24 21:20:56] andrew dot nagy at villanova dot edu

I just did an install of php 5.2.4 on a brand new RHEL server.  The
only way I could get this to work is by using the zip files provided by
Oracle, not the RPMs.  Both the Basic and SDK are need (well I am
assuming the Basic is needed).  Once I unzip the files, I needed to
create 2 symbolic links -- both libclntsh.so and libocci.so.

Could this be fixed in the configure script to look for the original
files instead of the renamed files?

For now - I have created a patch that makes the language a bit more
intuitive if this helps at all.  It is diff'ed against the 5.2.4
release.

1305,1306c1305,1306
< Use
--with-pdo-oci=instantclient,/path/to/instantclient,version
< for an Oracle Instant Client SDK
install.
---
> Use
--with-pdo-oci=instantclient,prefix,version
> for an Oracle Instant Client SDK.
73096c73096
<   { echo "configure: error: I'm too dumb to figure out where the
include dir is in your Instant Client install" 1>&2; exit 1; }
---
>   { echo "configure: error: Cannot find the Instant Client SDK in
your Instant Client install" 1>&2; exit 1; }
73105c73105
<   { echo "configure: error: I'm too dumb to figure out where the
libraries are in your Instant Client install" 1>&2; exit 1; }
---
>   { echo "configure: error: Cannot find the libclntsh.so file. 
Try making a symbolic link in your Instant Client SDK install" 1>&2;
exit 1; }



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

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



#47232 [Bgs]: str_replace() factors previous replacements into process

2009-01-29 Thread michael dot moussa at gmail dot com
 ID:   47232
 User updated by:  michael dot moussa at gmail dot com
 Reported By:  michael dot moussa at gmail dot com
 Status:   Bogus
 Bug Type: Strings related
 Operating System: *
 PHP Version:  5.2.8
 New Comment:

BTW: I've reposted my comment to the manual as you requested.  I hope
it survives this time. :)


Previous Comments:


[2009-01-29 04:43:18] michael dot moussa at gmail dot com

Jani,

The documentation says "This function returns a string or an array 
with all occurrences of search in subject replaced with the given 
replace value."

Refer to the following example:

$subject = 'A';

echo str_replace( array('A','B','C','D'), array('B','C','D','E'), 
$subject);

The result is 'E'.  If str_replace() is replacing occurrences in 
*$subject*, then how do we end up with 'E' if 'D' doesn't exist in 
$subject?  The result SHOULD be 'B'.  $subject is 'A', so the first 
replacement replaces 'A' with 'B'.  The second replacement, as the 
documentation states, should check for occurrences of 'B' within 
$subject, *NOT* within str_replace('A', 'B', $subject) - and so on.

If this result is not a bug, then the documentation should be updated 
to indicate that subsequent replacements are done on the result of 
the previous replacement operation.

Thanks



[2009-01-28 22:50:33] j...@php.net

I mistakenly _deleted_ your comment in the manual when I was supposed 
to edit it and add a note about preg_replace() there as well. Sorry 
for the inconvenience, but can you readd it? (that stupid comment 
moderator thing should ask "are you sure" before actually deleting 
stuff..)




[2009-01-28 22:47:05] j...@php.net

Maybe this is a bit confusing but I do understand it exactly like 
that:
"If search or replace are arrays, their elements are processed first 
to last."

So in: 
a b c d e 
b c d e f

1st pass: b b c d e
2nd pass: c c c d e
3rd pass: d d d d e
4th pass: e e e e e
5th pass: f f f f f

If it did not work like it does, it would not do what it's expected 
to do. Use preg_replace() instead with proper regexps. str_replace() 
is the quick'n' dirty method..




[2009-01-28 18:56:10] michael dot moussa at gmail dot com

Description:

When $search and $replace are arrays, str_replace factors previous
replacements into the process and produces unexpected input.

Reproduce code:
---


Expected result:

Each letter in the string 'ABCDE' should be replaced by the letter that
follows it in the alphabet, that is, A should be replaced with B, B
should be replaced with C, etc...

The expected result is 'BCDEF'

Actual result:
--
The actual result is 'F'.  The documentation does not indicate that
$subject is continuously updated as the process moves along.

A more practical example:

echo str_replace(
array(" ", "&"),
array(" ", "&"),
"Hello & goodbye!"
);

This should replace "Hello & goodbye!" with
"Hello & goodbye!" but it actually results in
"Hello & goodbye!", as the original replacement of "
" with " " introduced an additional ampersand.





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



#47241 [NEW]: minor editorial fix for php.ini comments

2009-01-29 Thread mohler at graceland dot edu
From: mohler at graceland dot edu
Operating system: Windows Server 2008
PHP version:  5.2.8
PHP Bug Type: PHP options/info functions
Bug description:  minor editorial fix for php.ini comments

Description:

The documentation for the "cgi.fix_pathinfo" setting includes "cause PHP
CGI to fix it's paths".  This should be "... fix its paths".


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



#44942 [Com]: exec() hangs apache

2009-01-29 Thread rolinger1 at hotmail dot com
 ID:   44942
 Comment by:   rolinger1 at hotmail dot com
 Reported By:  inqualab1985 at gmail dot com
 Status:   No Feedback
 Bug Type: Program Execution
 Operating System: Windows 2000 SP4
 PHP Version:  5.2.5
 New Comment:

I came across this article searching for a similar problem. I am using
Perl 5.10 though but am having the same issue with Apache 2.2.  That
being said, I believe the issues are the same and that the problem is
with Apache and not php or perl.

With Perl I do a backtick call and Apache's CGI hangs.  The windows
system processes shows 1 cmd running and 1 perl app running for each
time I click on the called web script.  

Perl call:
@files = `dir ../configs /0:D /A:-D` ;

Somehow, apache uses the backtick command to launch a "cmd" console
process which in turn executes the system call "dir..."

I say the Apache CGI hangs because other PHP scripts (that don't do
system calls) all still seem to work.  But after the first CGI hang, all
other Perl calls hang - even scripts that don't have system calls in
them.  Scripts with system calls load another pair of cmd/perl processes
and return no data, scripts without system calls loads another perl
process but does return data.  

After the initial hang though, all related processes (cmd or perl)
remain in memory and eventually Apache just hangs altogether.  And when
that happens we are forced to do a system reboot - simply doing a
service restart has won't work.


Previous Comments:


[2009-01-15 16:54:54] bill at sammer dot com

session_write_close fixes it for me too.  Thanks vlabella!



[2008-12-04 04:35:44] dominic dot manley at det dot wa dot edu dot au

Big thanks to vlabella who led us to a work-around. This is one VERY
frustrating bug to track down!

We have an Apache/PHP 5.2.3/Win2003 setup and concurrent calls to a
script that exec()-ed the same command-line .exe caused the process to
get caught up on the server. Apache wouldn't let go of it and the only
way to kill the process and get the site/sometimes whole server back was
to restart Apache.

I never would have suspected sessions causing this issue... none of our
investigations led us close to that direction. However, vlabella got it
spot on...

Calling session_write_close() before an exec() (or simply never
initiating session support to start with using session_start()) works
around the issue.



[2008-10-21 09:26:44] neododge at free dot fr

The same problem happens for me on PHP 5.2.6 / Apache 2.2.9, Apache
won't run any PHP after I try an exec/passthru/`` -no matter what
command I try. Only way to get PHP back seems to be closing all browser
windows that point to my server and waiting for a while before trying to
use a PHP page again.



[2008-09-15 17:01:02] vlabella at uamail dot albany dot edu

We have been having the same issue for a long time on win2003 with php
version 5.2.X and apache 5.2.x calling both perl scripts and .exe with
the exec fuinction.  We found that it mostly happens when php runs exec
concurrently on the same process.  For example we would have ajax call
do an exec on the server to read some data and feed it back to the user
every 5 seconds.  In addition the user could do an ajax call to do
something as well on this page.  if the user call came at the same time
as the schdeduled call then php would hang and we would have to restart
apache.  We found it also happens on pages where there are multiple
exec() calls.  We find that all the scripts and programs we call run
fine its just that php hangs when they finish for some reason.  We have
our max_execution_time set to 30 minutes so its not a timeout issue.

We found that calling
session_write_close();
before each exec call seemed to resolve this issue.  But we are not
really sure why and what other effects session_write_close(); may have
on other processes.

Hope this helps resolve this issue.  it is a major headache for us for
the past 2 years!!



[2008-08-08 18:55:29] jumpbackhack at gmail dot com

this is still a bug. this is not an apache issue as I have tested
various versions ranging from 2.0.x to 2.2.x

I have tested php v5.2.6 and even a late development version.  This
happens on linux OS as well even with shell_exec()

would there be a backtrace on a hang?

it appears that the hang happens after a successful script executes,
the following time the script runs there is the hang.  usually lasts 2-5
minutes before it allows apache to run any php again.

note that apache will serve static/html files without issue while any
php files are not called.

even a restart of apache does not resolve.

-

#47243 [NEW]: oci_fetch_assoc() causes Apache 2.2.11 crashed and restarted (SQL CURSOR)

2009-01-29 Thread pcdinh at gmail dot com
From: pcdinh at gmail dot com
Operating system: Windows XP SP3
PHP version:  5.3.0beta1
PHP Bug Type: OCI8 related
Bug description:  oci_fetch_assoc() causes Apache 2.2.11 crashed and restarted 
(SQL CURSOR)  

Description:

I wrote code to retrieve data that was returned from a query with Oracle
cursor. However oci_fetch_assoc() causes Apache 2.2.11 being crashed and
restarted. I am not sure if it is a Oracle client native library or OCI8
issue.

Reproduce code:
---



Expected result:

Those code is a slightly modified version taken from PHP Manual
http://vn2.php.net/oci_new_cursor

It should be executed without any crash and data can be retrieved normally
(as guided by PHP Manual)

Actual result:
--
Apache crashes and restarts

Type of Analysis Performed   Crash Analysis 
Machine Name   HOME-4F44218659 
Operating System   Windows XP Service Pack 3 
Number Of Processors   2 
Process ID   2200 
Process Image   C:\server\Apache2.2\bin\httpd.exe 
System Up-Time   10:12:12 
Process Up-Time   00:01:07 


Thread 169 - System ID 2128
Entry point   msvcrt!endthreadex+3a 
Create time   1/30/2009 1:57:53 AM 
Time spent in user mode   0 Days 0:0:0.15 
Time spent in kernel mode   0 Days 0:0:0.93 






Function Arg 1 Arg 2 Arg 3   Source 
OraClient10!kpufhndl0+33 4e5f544e 0002 
OraClient10!kpufhndl+10 4e5f544e 0002 049ff9e8
OraClient10!OCIHandleFree+1a 4e5f544e 0002 0084eef0
oci!OCIHandleFree+1d 4e5f544e 0002 01b8a9d8
php_oci8!php_oci_statement_free+121 05ecf448 01b8a9d8 0083aa23
   
php_oci8!php_oci_statement_list_dtor+11 05ed09b8 01b8a9d8
01be5278
php5ts!list_entry_destructor+43 05ed09b8 01b8a9d8 05ed0988   

php5ts!zend_hash_apply_deleter+97 01be5278 05ed0988 01b8a9d8  
 
php5ts!zend_hash_apply_with_argument+5a 01be5278 01976a90
0022
php_oci8!zm_deactivate_oci+8a 0001 0029 01b8a9d8
php5ts!module_registry_cleanup+1c 00fd4ec8 01b8a9d8 01b8a9d8  
 
php5ts!zend_hash_apply+40 00cd7340 007882c0 01b8a9d8
php5ts!zend_deactivate_modules+62 049fffa4  56433230  
 
php5ts!zend_deactivate_modules+48 01b82a01  05ecc7c0  
 
php5ts!php_end_ob_buffers+26 01b8a9d8 0073a040 01b8a9d8
php5ts!php_request_shutdown+247  00622fb6 01b82a18   

php5apache2_2!php_apache_request_dtor+8 01b82a18 01b8a9d8
0005
php5apache2_2!php_handler+646 01b82a18 0073a040 01b82a18
libhttpd!ap_run_handler+21 01b82a18 01b82a18 01b82a18
libhttpd!ap_invoke_handler+ae  01b7d9c0 049fff38
libhttpd!ap_die+29e 01b82a18  007447a8
libhttpd!ap_get_request_note+1c9c 01b7d9c0 01b7d9c0 01b7d9c0  
 
libhttpd!ap_run_process_connection+21 01b7d9c0 007121e8
049fff80
libhttpd!ap_process_connection+33 01b7d9c0 01b76990 00e4  
 
libhttpd!ap_regkey_value_remove+c7c 01b7d9b8 00e4 00e8
   
msvcrt!endthreadex+a9 01b73958 00e4 00e8
kernel32!GetModuleFileNameA+1b4 77c3a341 01b73958    





ORACLIENT10!KPUFHNDL0+33WARNING - DebugDiag was not able to locate debug
symbols for OraClient10.Dll, so the information below may be incomplete.



In
httpd__PID__2200__Date__01_30_2009__Time_01_59_00AM__328__Second_Chance_Exception_C005.dmp
the assembly instruction at OraClient10!kpufhndl0+33 in
C:\oraclexe\app\oracle\product\10.2.0\server\BIN\OraClient10.Dll from
Oracle Corporation has caused an access violation exception (0xC005)
when trying to read from memory location 0x4e5f544e on thread 169

Module Information 
Image Name:
C:\oraclexe\app\oracle\product\10.2.0\server\BIN\OraClient10.Dll   Symbol
Type:  Export 
Base address: 0x61c2   Time Stamp:  Wed Feb 01 04:19:50 2006  
Checksum: 0x00251a65   Comments:   
COM DLL: False   Company Name:  Oracle Corporation 
ISAPIExtension: False   File Description:  Oracle RDBMS Client Library 
ISAPIFilter: False   File Version:  10.2.0.1.0 Production 
Managed DLL: False   Internal Name:   
VB DLL: False   Legal Copyright:  Copyright Oracle 1979, 2004. All rights
reserved. 
Loaded Image Name:  OraClient10.Dll   Legal Trademarks:   
Mapped Image Name: Original filename:  oraclient10.dll 
Module name:  OraClient10   Private Build:   
Single Threaded:  False   Product Name:   
Module Size:  2.32 MBytes   Product Version:   
Symbol File Name:  OraClient10.Dll   Special Build:  & 


-- 
Edit bug report at http://bugs.php.net/?id=47243&edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47243&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47243&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.

#47244 [NEW]: serialize() of a string with a line break (\r) broken.

2009-01-29 Thread nir at winpdb dot org
From: nir at winpdb dot org
Operating system: Ubuntu Intrepid
PHP version:  5.2.8
PHP Bug Type: *General Issues
Bug description:  serialize() of a string with a line break (\r) broken.

Description:

Isn't this a bug?

php > print serialize("hi\rho");
ho";"hi
php > print unserialize(serialize("hi\rho"));
ho

I stumbled on this while working on a Drupal system. Can this possibly
have security consequences as well? if a \r on a web form breaks the
internal data structures of a system?

Am I missing anything?

PS: I am actually using PHP 5.2.6 on Ubuntu Intrepid.

Cheers,
Nir

Reproduce code:
---
print serialize("hi\rho");

Expected result:

s:5:"hi
ho";

Actual result:
--
ho";"hi

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



#47245 [NEW]: crash following mb_detect_encoding

2009-01-29 Thread j at korni dot net
From: j at korni dot net
Operating system: Linux64
PHP version:  5.2.8
PHP Bug Type: mbstring related
Bug description:  crash following mb_detect_encoding

Description:

mb_detect_encoding issues warning "Illegal argument", then things go
bezerk. Maybe some heap corruption.

Reproduce code:
---


Actual result:
--
Warning: mb_detect_encoding(): Illegal argument in ...
detect detec*** note the corrupted string
Segmentation fault

#0  _zend_mm_alloc_int (heap=0xbbf2b0, size=6) at
/home/me/src/php-5.2.8/Zend/zend_alloc.c:1780
#1  0x0063f3e0 in _estrndup (s=0xd37e38 "UTF-8", length=6)
at /home/me/src/php-5.2.8/Zend/zend_alloc.c:2435
#2  0x004ed164 in php_mb_parse_encoding_list (value=0xbbf2b0
"\001", value_length=6, 
return_list=0x7fffdec7a400, return_size=0x7fffdec7a40c, persistent=0)
at /home/me/src/php-5.2.8/ext/mbstring/mbstring.c:367
#3  0x004ee602 in php_mb_convert_encoding (input=, 
length=, _to_encoding=,
_from_encodings=0xd37e38 "UTF-8", 
output_len=0x7fffdec7a468) at
/home/me/src/php-5.2.8/ext/mbstring/mbstring.c:2443
#4  0x004eeb44 in zif_mb_convert_encoding (ht=, return_value=0xd37dc0, 
return_value_ptr=, this_ptr=, 
return_value_used=) at
/home/me/src/php-5.2.8/ext/mbstring/mbstring.c:2553
#5  0x0068608b in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fffdec7a6b0)
at /home/me/src/php-5.2.8/Zend/zend_vm_execute.h:200
#6  0x006763f3 in execute (op_array=0xd37268)
at /home/me/src/php-5.2.8/Zend/zend_vm_execute.h:92
#7  0x00658203 in zend_execute_scripts (type=8, retval=0x4,
file_count=3)
at /home/me/src/php-5.2.8/Zend/zend.c:1134
#8  0x006184cb in php_execute_script
(primary_file=0x7fffdec7cd20)
at /home/me/src/php-5.2.8/main/main.c:2023
#9  0x006d5a8c in main (argc=2, argv=0x7fffdec7cf18)
at /home/me/src/php-5.2.8/sapi/cli/php_cli.c:1133




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



#47246 [NEW]: xor,~ bitwise operations are not 32 bit

2009-01-29 Thread helpmepro1 at gmail dot com
From: helpmepro1 at gmail dot com
Operating system: linux
PHP version:  5.2.8
PHP Bug Type: Scripting Engine problem
Bug description:  xor,~  bitwise operations are not 32 bit 

Description:

the problem is doing bitwise operations with large numbers like larger
then 28 bit.

when i do 
negative bitwise operation "~" to 4738698913
in binary
1101001110010110011101011{29bit}
the number becomes binary
1000{32bit} 

expected:
1110010110001101001100010100



Reproduce code:
---




Expected result:

gxor(-5799680607,167160) = -5799843495
 as expected -5799843495 
 -5799680607^167160  = -2147316488
 wrong result 

var_dump(-4738698913) = float(-4738698913)
so this number is float

A decbin  43814   SIMPLE   = 1010101100100110

B decbin-4738698913   NOT WORKING  =
1000

C decbin 4738698913   SIMPLE   =
1101001110010110011101011

D decbin abs-4738698913   WORKING  =
1101001110010110011101011

E decbin ~abs   -4738698913   NOT WORKING  =
111

F decbin ~abs   -1738698913   WORKING  =
10011101110110000100

G decbin ~  -4738698913   64bit expected result:
11101110010110001101001100010100
H the 64bit bitwise not is from windows calc.exe

from the B and G example i can deduce that php takes the left side of 64
bit integer instead of the right and returns it as 32 bit (just a guess)


Actual result:
--
php version 5.1.6
Linux version 2.6.18-92.1.18.el5PAE (mockbu...@builder16.centos.org) (gcc
version 4.1.2 20071124 (Red Hat 4.1.2-42)) #1 SMP Wed Nov 12 10:02:30 EST
2008

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 23
model name  : Intel(R) Xeon(R) CPU   E5405  @ 2.00GHz
stepping: 6
cpu MHz : 1995.120
cache size  : 6144 KB
physical id : 0
siblings: 4
core id : 0
cpu cores   : 4
fdiv_bug: no
hlt_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 10
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc
pni monitor ds_cpl vmx tm2 cx16 xtpr lahf_lm
bogomips: 3992.34

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



#47227 [Bgs]: children forked with pcntl_fork release flock()s created by parent

2009-01-29 Thread bfrance
 ID:   47227
 Updated by:   bfra...@php.net
 Reported By:  murphyk at yahoo-inc dot com
 Status:   Bogus
 Bug Type: PCNTL related
 Operating System: RHEL 4.4
 PHP Version:  5.2.8
 New Comment:

So the problem is the new beefed up streams in 5.x that keeps the lock
state for a stream, where it didn't in 4.x.

5.x will unlock it when it cleans up the stream resource if it is
locked, look for php_stdiop_close in main/streams/plain_wrapper.c.

4.x would not unlock it and just clean up the handle by closing it,
which would leave it locked until the parent closed it or unlocked it.

While this is a bug, I don't think there is any real fix for it that
can happen


Previous Comments:


[2009-01-28 15:13:05] murphyk at yahoo-inc dot com

I have RTFM, thanks.

>From the man 2 flock:

"Locks  created by flock() are associated with a file, or, more
precisely, an open file table entry.  This means that duplicate file
descriptors (created by, for  example,  fork(2) or  dup(2)) refer to the
same lock, and this lock may be modified or released using any of
these descriptors.  Furthermore, the lock is released either by an
explicit LOCK_UN operation on any of these duplicate descriptors, or
when all such descriptors have been closed."

"by an explicit LOCK_UN" - my child process did NOT call flock() in my
user code.

"or when all such descriptors have been closed" - my parent process
still has an open copy of the the filehandle.

To be clear, the "expected result" output is what happens in php4 - the
child closes the filehandle, but doesn't unlock the flock().

php5 appears to be explicitly unlocking all held flocks() during
shutdown. If this is intentional, fine, but it's not documented, and
it's a change in behavior between php4 and php5 which breaks previously
running code.



[2009-01-28 08:44:50] j...@php.net

RTFM:

man 2 flock
man 2 fork

The behaviour is exactly how it should be and is.




[2009-01-27 22:07:47] murphyk at yahoo-inc dot com

Description:

The behavior of flock()ed files across forks appears to have changed
between php 4.4.8 and php 5.2.8.

Previously, children would inherit filehandles from their parent, and
would close() their copies of the filehandles on exit, but this would
not clear flock()s on the files locked in the parent.

Now, it appears that if any child exits(), this will clear flock()s on
any filehandles inherited from the parent.

Reproduce code:
---



Expected result:

$ php flock.php &
[1] 22054
$ Got lock.
$ php flock.php 
Couldn't lock the file.


Actual result:
--
$php flock.php &
[1] 31085
$Got lock.
$php flock.php 
Got lock.






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



#47246 [Com]: xor,~ bitwise operations are not 32 bit

2009-01-29 Thread helpmepro1 at gmail dot com
 ID:   47246
 Comment by:   helpmepro1 at gmail dot com
 Reported By:  helpmepro1 at gmail dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: linux
 PHP Version:  5.2.8
 New Comment:

on windows it works like this:

var_dump(-4738698913) = float(-4738698913)
so this number is float

A decbin  43814   SIMPLE   = 1010101100100110

B decbin-4738698913   NOT WORKING  =
1110010110001101001100010101

C decbin 4738698913   SIMPLE   =
1101001110010110011101011

D decbin abs-4738698913   WORKING  =
1101001110010110011101011

E decbin ~abs   -4738698913   NOT WORKING  =
1110010110001101001100010100

F decbin ~abs   -1738698913   WORKING  =
10011101110110000100

php version 4.4.4


Previous Comments:


[2009-01-29 21:17:04] helpmepro1 at gmail dot com

Description:

the problem is doing bitwise operations with large numbers like larger
then 28 bit.

when i do 
negative bitwise operation "~" to 4738698913
in binary
1101001110010110011101011{29bit}
the number becomes binary
1000{32bit} 

expected:
1110010110001101001100010100



Reproduce code:
---




Expected result:

gxor(-5799680607,167160) = -5799843495
 as expected -5799843495 
 -5799680607^167160  = -2147316488
 wrong result 

var_dump(-4738698913) = float(-4738698913)
so this number is float

A decbin  43814   SIMPLE   = 1010101100100110

B decbin-4738698913   NOT WORKING  =
1000

C decbin 4738698913   SIMPLE   =
1101001110010110011101011

D decbin abs-4738698913   WORKING  =
1101001110010110011101011

E decbin ~abs   -4738698913   NOT WORKING  =
111

F decbin ~abs   -1738698913   WORKING  =
10011101110110000100

G decbin ~  -4738698913   64bit expected result:
11101110010110001101001100010100
H the 64bit bitwise not is from windows calc.exe

from the B and G example i can deduce that php takes the left side of
64 bit integer instead of the right and returns it as 32 bit (just a
guess)


Actual result:
--
php version 5.1.6
Linux version 2.6.18-92.1.18.el5PAE (mockbu...@builder16.centos.org)
(gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)) #1 SMP Wed Nov 12
10:02:30 EST 2008

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 23
model name  : Intel(R) Xeon(R) CPU   E5405  @ 2.00GHz
stepping: 6
cpu MHz : 1995.120
cache size  : 6144 KB
physical id : 0
siblings: 4
core id : 0
cpu cores   : 4
fdiv_bug: no
hlt_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 10
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm
constant_tsc pni monitor ds_cpl vmx tm2 cx16 xtpr lahf_lm
bogomips: 3992.34





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



#47246 [Com]: xor,~ bitwise operations are not 32 bit

2009-01-29 Thread helpmepro1 at gmail dot com
 ID:   47246
 Comment by:   helpmepro1 at gmail dot com
 Reported By:  helpmepro1 at gmail dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: linux
 PHP Version:  5.2.8
 New Comment:

on windows it works OK maybe there is a different cpu i dont know


Previous Comments:


[2009-01-29 21:37:38] helpmepro1 at gmail dot com

on windows it works like this:

var_dump(-4738698913) = float(-4738698913)
so this number is float

A decbin  43814   SIMPLE   = 1010101100100110

B decbin-4738698913   NOT WORKING  =
1110010110001101001100010101

C decbin 4738698913   SIMPLE   =
1101001110010110011101011

D decbin abs-4738698913   WORKING  =
1101001110010110011101011

E decbin ~abs   -4738698913   NOT WORKING  =
1110010110001101001100010100

F decbin ~abs   -1738698913   WORKING  =
10011101110110000100

php version 4.4.4



[2009-01-29 21:17:04] helpmepro1 at gmail dot com

Description:

the problem is doing bitwise operations with large numbers like larger
then 28 bit.

when i do 
negative bitwise operation "~" to 4738698913
in binary
1101001110010110011101011{29bit}
the number becomes binary
1000{32bit} 

expected:
1110010110001101001100010100



Reproduce code:
---




Expected result:

gxor(-5799680607,167160) = -5799843495
 as expected -5799843495 
 -5799680607^167160  = -2147316488
 wrong result 

var_dump(-4738698913) = float(-4738698913)
so this number is float

A decbin  43814   SIMPLE   = 1010101100100110

B decbin-4738698913   NOT WORKING  =
1000

C decbin 4738698913   SIMPLE   =
1101001110010110011101011

D decbin abs-4738698913   WORKING  =
1101001110010110011101011

E decbin ~abs   -4738698913   NOT WORKING  =
111

F decbin ~abs   -1738698913   WORKING  =
10011101110110000100

G decbin ~  -4738698913   64bit expected result:
11101110010110001101001100010100
H the 64bit bitwise not is from windows calc.exe

from the B and G example i can deduce that php takes the left side of
64 bit integer instead of the right and returns it as 32 bit (just a
guess)


Actual result:
--
php version 5.1.6
Linux version 2.6.18-92.1.18.el5PAE (mockbu...@builder16.centos.org)
(gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)) #1 SMP Wed Nov 12
10:02:30 EST 2008

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 23
model name  : Intel(R) Xeon(R) CPU   E5405  @ 2.00GHz
stepping: 6
cpu MHz : 1995.120
cache size  : 6144 KB
physical id : 0
siblings: 4
core id : 0
cpu cores   : 4
fdiv_bug: no
hlt_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 10
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm
constant_tsc pni monitor ds_cpl vmx tm2 cx16 xtpr lahf_lm
bogomips: 3992.34





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



#47245 [Opn]: crash following mb_detect_encoding

2009-01-29 Thread j at korni dot net
 ID:   47245
 User updated by:  j at korni dot net
 Reported By:  j at korni dot net
 Status:   Open
 Bug Type: mbstring related
 Operating System: Linux64
 PHP Version:  5.2.8
 New Comment:

Found the bug. list is freed twice if not zeroed.

In 5.2.8, mbstring.c, add line 2678.   (line 3199 in 5.3).

2673 default:
2674 convert_to_string_ex(arg_list);
2675 if (!php_mb_parse_encoding_list(Z_STRVAL_PP(arg_list),
Z_STRLEN_PP(arg_list), &list, & size, 0 TSRMLS_CC)) {
2676 if (list) {
2677 efree(list);
2678 list = 0;   **
2679 size = 0;
2680 }
2681 }


Previous Comments:


[2009-01-29 21:09:39] j at korni dot net

Description:

mb_detect_encoding issues warning "Illegal argument", then things go
bezerk. Maybe some heap corruption.

Reproduce code:
---


Actual result:
--
Warning: mb_detect_encoding(): Illegal argument in ...
detect detec*** note the corrupted string
Segmentation fault

#0  _zend_mm_alloc_int (heap=0xbbf2b0, size=6) at
/home/me/src/php-5.2.8/Zend/zend_alloc.c:1780
#1  0x0063f3e0 in _estrndup (s=0xd37e38 "UTF-8", length=6)
at /home/me/src/php-5.2.8/Zend/zend_alloc.c:2435
#2  0x004ed164 in php_mb_parse_encoding_list (value=0xbbf2b0
"\001", value_length=6, 
return_list=0x7fffdec7a400, return_size=0x7fffdec7a40c,
persistent=0)
at /home/me/src/php-5.2.8/ext/mbstring/mbstring.c:367
#3  0x004ee602 in php_mb_convert_encoding (input=, 
length=, _to_encoding=,
_from_encodings=0xd37e38 "UTF-8", 
output_len=0x7fffdec7a468) at
/home/me/src/php-5.2.8/ext/mbstring/mbstring.c:2443
#4  0x004eeb44 in zif_mb_convert_encoding (ht=, return_value=0xd37dc0, 
return_value_ptr=, this_ptr=, 
return_value_used=) at
/home/me/src/php-5.2.8/ext/mbstring/mbstring.c:2553
#5  0x0068608b in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fffdec7a6b0)
at /home/me/src/php-5.2.8/Zend/zend_vm_execute.h:200
#6  0x006763f3 in execute (op_array=0xd37268)
at /home/me/src/php-5.2.8/Zend/zend_vm_execute.h:92
#7  0x00658203 in zend_execute_scripts (type=8, retval=0x4,
file_count=3)
at /home/me/src/php-5.2.8/Zend/zend.c:1134
#8  0x006184cb in php_execute_script
(primary_file=0x7fffdec7cd20)
at /home/me/src/php-5.2.8/main/main.c:2023
#9  0x006d5a8c in main (argc=2, argv=0x7fffdec7cf18)
at /home/me/src/php-5.2.8/sapi/cli/php_cli.c:1133








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



#42928 [Com]: PHP crashes silently when CURLOPT_MAXCONNECTS is set

2009-01-29 Thread webmaster at tubo-world dot de
 ID:   42928
 Comment by:   webmaster at tubo-world dot de
 Reported By:  telsbern at uga dot edu
 Status:   No Feedback
 Bug Type: cURL related
 Operating System: Windows 2003 server sp2
 PHP Version:  5.2.4
 New Comment:

This bug is still there in PHP 5.2.6 on Windows XP.
Calling 
curl_setopt($this->ch, CURLOPT_MAXCONNECTS, 10); 
will crash PHP silently. So no errors are returned which makes it very
hard to indentify the bug.

There is no problem with this on a Linux machine.


Previous Comments:


[2008-08-24 15:08:40] pttmail at gmail dot com

$this->curl = curl_init();

curl_setopt($this->curl, CURLOPT_HEADER, $header);
curl_setopt($this->curl, CURLOPT_VERBOSE, 0);
curl_setopt($this->curl, CURLOPT_HTTPGET, 1);
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER,0);
curl_setopt($this->curl, CURLOPT_VERBOSE,0);
curl_setopt($this->curl, CURLOPT_CLOSEPOLICY,
CURLCLOSEPOLICY_OLDEST);
curl_setopt($this->curl, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($this->curl, CURLOPT_MAXCONNECTS, 10);
//curl_setopt($this->curl, CURLOPT_COOKIE, 
$this->session);
curl_setopt($this->curl, CURLOPT_URL, $this->url);



[2007-10-28 14:00:01] webmaster at intobikes dot co dot uk

I have exactly the same problem on a server running Centos 5 with
WHM/cPanel-11.  It's a brand new machine and is being readied for
service with the latest stable versions of everything it needs. PHP is
version 5.2.4

All error warnings are on, even notice and strict ones. CURL works fine
with the "curl_setopt($ch, CURLOPT_MAXCONNECTS, someIntegerHere);" line
removed, but otherwise fails silently. And you know how long they take
to find!



[2007-10-19 01:00:02] 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-11 18:16:40] il...@php.net

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

Works fine for me on Linux, could be an issue with an old libcurl or 
something win32 specific. A backtrace would be super-useful in this 
case.



[2007-10-11 14:19:31] telsbern at uga dot edu

Those options were both already what you suggested. I just verified
them.



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

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



#42928 [NoF->Fbk]: PHP crashes silently when CURLOPT_MAXCONNECTS is set

2009-01-29 Thread pajoye
 ID:   42928
 Updated by:   paj...@php.net
 Reported By:  telsbern at uga dot edu
-Status:   No Feedback
+Status:   Feedback
 Bug Type: cURL related
 Operating System: Windows 2003 server sp2
 PHP Version:  5.2.4
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




Previous Comments:


[2009-01-29 22:21:35] webmaster at tubo-world dot de

This bug is still there in PHP 5.2.6 on Windows XP.
Calling 
curl_setopt($this->ch, CURLOPT_MAXCONNECTS, 10); 
will crash PHP silently. So no errors are returned which makes it very
hard to indentify the bug.

There is no problem with this on a Linux machine.



[2008-08-24 15:08:40] pttmail at gmail dot com

$this->curl = curl_init();

curl_setopt($this->curl, CURLOPT_HEADER, $header);
curl_setopt($this->curl, CURLOPT_VERBOSE, 0);
curl_setopt($this->curl, CURLOPT_HTTPGET, 1);
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER,0);
curl_setopt($this->curl, CURLOPT_VERBOSE,0);
curl_setopt($this->curl, CURLOPT_CLOSEPOLICY,
CURLCLOSEPOLICY_OLDEST);
curl_setopt($this->curl, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($this->curl, CURLOPT_MAXCONNECTS, 10);
//curl_setopt($this->curl, CURLOPT_COOKIE, 
$this->session);
curl_setopt($this->curl, CURLOPT_URL, $this->url);



[2007-10-28 14:00:01] webmaster at intobikes dot co dot uk

I have exactly the same problem on a server running Centos 5 with
WHM/cPanel-11.  It's a brand new machine and is being readied for
service with the latest stable versions of everything it needs. PHP is
version 5.2.4

All error warnings are on, even notice and strict ones. CURL works fine
with the "curl_setopt($ch, CURLOPT_MAXCONNECTS, someIntegerHere);" line
removed, but otherwise fails silently. And you know how long they take
to find!



[2007-10-19 01:00:02] 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-11 18:16:40] il...@php.net

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

Works fine for me on Linux, could be an issue with an old libcurl or 
something win32 specific. A backtrace would be super-useful in this 
case.



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

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



#46048 [Com]: SimpleXML top-level @attributes not part of iterator (PHP_5_3 and above only!)

2009-01-29 Thread php at isnoop dot net
 ID:   46048
 Comment by:   php at isnoop dot net
 Reported By:  php at isnoop dot net
 Status:   Open
 Bug Type: SimpleXML related
 Operating System: Ubuntu 8.04 server
 PHP Version:  5.3.0alpha3
 New Comment:

Bug confirmed still be present in 5.3.0beta1.


Previous Comments:


[2009-01-16 20:16:08] php at zjs dot name

I am experiencing the same problem on 5.3. The code used is the same
used above.

sheph...@ursa-minor:~/php5/sapi/cli$ ./php -v; ./php
~/code/scrap/php/bugs/46048.php
PHP 5.3.0alpha4-dev (cli) (built: Jan 15 2009 17:22:45) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
Array
(
[key] => value
)



[2008-12-09 01:51:33] php at isnoop dot net

I have tested this with the two new PHP releases on yet another
server:

5.3.0alpha3 Fails:
[] [...@ianm:~/src/php-5.3.0alpha3/sapi/cli] ./php -v;./php
~/sandbox/bug46048.php 
PHP 5.3.0alpha3 (cli) (built: Dec  4 2008 17:18:52) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies
Array
(
[key] => value
)



5.2.8 Passes:
[] [...@ianm:~/src/php-5.2.8/sapi/cli] ./php -v;./php
~/sandbox/bug46048.php 
PHP 5.2.8 (cli) (built: Dec  8 2008 17:34:28) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
Array
(
[...@attributes] => Array
(
[id] => 1
)
[key] => value
)



[2008-11-17 21:27:47] php at isnoop dot net

It appears that you're testing against 5.2.7 which I've verified
doesn't exhibit this error.  This problem only appears with the 5.3.0
releases.

Both the 5.2.* releases and 5.3.* use libxml 2.6.31 on my primary test
machine.  It is possible that libxml is part of the problem, but it
still stands that the problem does not manifest prior to 5.3.



[2008-11-17 09:49:46] j...@php.net

$ php t.php
Array
(
[...@attributes] => Array
(
[id] => 1
)

[key] => value
)
[j...@localhost ~]$ php -v
PHP 5.2.7-dev (cli) (built: Oct  9 2008 16:54:00) (DEBUG)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

So still no bug. If you experience this even with proper XML, I guess
it's your libxml that is a buggy version. (my PHP is build with libxml
2.7.2)



[2008-11-11 21:51:58] php at isnoop dot net

Thank you for that.  Reproduce code should be as follows:
$xml = '

value

';
$obj = simplexml_load_string($xml);
print_r(get_object_vars($obj));



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

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



#47245 [Opn->Csd]: crash following mb_detect_encoding

2009-01-29 Thread scottmac
 ID:   47245
 Updated by:   scott...@php.net
 Reported By:  j at korni dot net
-Status:   Open
+Status:   Closed
 Bug Type: mbstring related
 Operating System: Linux64
 PHP Version:  5.2.8
 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:


[2009-01-29 22:05:10] j at korni dot net

Found the bug. list is freed twice if not zeroed.

In 5.2.8, mbstring.c, add line 2678.   (line 3199 in 5.3).

2673 default:
2674 convert_to_string_ex(arg_list);
2675 if (!php_mb_parse_encoding_list(Z_STRVAL_PP(arg_list),
Z_STRLEN_PP(arg_list), &list, & size, 0 TSRMLS_CC)) {
2676 if (list) {
2677 efree(list);
2678 list = 0;   **
2679 size = 0;
2680 }
2681 }



[2009-01-29 21:09:39] j at korni dot net

Description:

mb_detect_encoding issues warning "Illegal argument", then things go
bezerk. Maybe some heap corruption.

Reproduce code:
---


Actual result:
--
Warning: mb_detect_encoding(): Illegal argument in ...
detect detec*** note the corrupted string
Segmentation fault

#0  _zend_mm_alloc_int (heap=0xbbf2b0, size=6) at
/home/me/src/php-5.2.8/Zend/zend_alloc.c:1780
#1  0x0063f3e0 in _estrndup (s=0xd37e38 "UTF-8", length=6)
at /home/me/src/php-5.2.8/Zend/zend_alloc.c:2435
#2  0x004ed164 in php_mb_parse_encoding_list (value=0xbbf2b0
"\001", value_length=6, 
return_list=0x7fffdec7a400, return_size=0x7fffdec7a40c,
persistent=0)
at /home/me/src/php-5.2.8/ext/mbstring/mbstring.c:367
#3  0x004ee602 in php_mb_convert_encoding (input=, 
length=, _to_encoding=,
_from_encodings=0xd37e38 "UTF-8", 
output_len=0x7fffdec7a468) at
/home/me/src/php-5.2.8/ext/mbstring/mbstring.c:2443
#4  0x004eeb44 in zif_mb_convert_encoding (ht=, return_value=0xd37dc0, 
return_value_ptr=, this_ptr=, 
return_value_used=) at
/home/me/src/php-5.2.8/ext/mbstring/mbstring.c:2553
#5  0x0068608b in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fffdec7a6b0)
at /home/me/src/php-5.2.8/Zend/zend_vm_execute.h:200
#6  0x006763f3 in execute (op_array=0xd37268)
at /home/me/src/php-5.2.8/Zend/zend_vm_execute.h:92
#7  0x00658203 in zend_execute_scripts (type=8, retval=0x4,
file_count=3)
at /home/me/src/php-5.2.8/Zend/zend.c:1134
#8  0x006184cb in php_execute_script
(primary_file=0x7fffdec7cd20)
at /home/me/src/php-5.2.8/main/main.c:2023
#9  0x006d5a8c in main (argc=2, argv=0x7fffdec7cf18)
at /home/me/src/php-5.2.8/sapi/cli/php_cli.c:1133








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



#47244 [Opn->Bgs]: serialize() of a string with a line break (\r) broken.

2009-01-29 Thread iliaa
 ID:   47244
 Updated by:   il...@php.net
 Reported By:  nir at winpdb dot org
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: Ubuntu Intrepid
 PHP Version:  5.2.8
 New Comment:

It works fine in CVS, its possible that the \r char when output is 
causing formatting error that hides other chars.


Previous Comments:


[2009-01-29 20:32:57] nir at winpdb dot org

Description:

Isn't this a bug?

php > print serialize("hi\rho");
ho";"hi
php > print unserialize(serialize("hi\rho"));
ho

I stumbled on this while working on a Drupal system. Can this possibly
have security consequences as well? if a \r on a web form breaks the
internal data structures of a system?

Am I missing anything?

PS: I am actually using PHP 5.2.6 on Ubuntu Intrepid.

Cheers,
Nir

Reproduce code:
---
print serialize("hi\rho");

Expected result:

s:5:"hi
ho";

Actual result:
--
ho";"hi





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



#47248 [NEW]: Make PHP more secure: Simple Fix

2009-01-29 Thread tim987 at email dot com
From: tim987 at email dot com
Operating system: Windows/Linux
PHP version:  5.3.0beta1
PHP Bug Type: Feature/Change Request
Bug description:  Make PHP more secure: Simple Fix

Description:

PHP shouldn't allow a cookie that doesn't expire when a web browser is
closed. 
 Alot of PHP sites are very insecure because they use cookies that don't
expire at all. For example, YouTube,which uses PHP, doesn't expire cookies
at all so if you sign into your YouTube account, close your browser,shut
down your computer, then go back to YouTube, your account will still be
logged in which is scary for people using public computers.
 So this is why this and all future versions of PHP should not allow
cookies that do not expire when a web browser is closed.



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



#47248 [Opn->Bgs]: Make PHP more secure: Simple Fix

2009-01-29 Thread scottmac
 ID:   47248
 Updated by:   scott...@php.net
 Reported By:  tim987 at email dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Windows/Linux
 PHP Version:  5.3.0beta1
 New Comment:

Non permanent cookies would infuriate people who don't use public
computers if they needed to login every time.

This is a stupid suggestion and is up to the application developers.


Previous Comments:


[2009-01-30 02:12:11] tim987 at email dot com

Description:

PHP shouldn't allow a cookie that doesn't expire when a web browser is
closed. 
 Alot of PHP sites are very insecure because they use cookies that
don't expire at all. For example, YouTube,which uses PHP, doesn't expire
cookies at all so if you sign into your YouTube account, close your
browser,shut down your computer, then go back to YouTube, your account
will still be logged in which is scary for people using public
computers.
 So this is why this and all future versions of PHP should not allow
cookies that do not expire when a web browser is closed.







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



#47243 [Com]: oci_fetch_assoc() causes Apache 2.2.11 crashed and restarted (SQL CURSOR)

2009-01-29 Thread kureikain at gmail dot com
 ID:   47243
 Comment by:   kureikain at gmail dot com
 Reported By:  pcdinh at gmail dot com
 Status:   Open
 Bug Type: OCI8 related
 Operating System: Windows XP SP3
 PHP Version:  5.3.0beta1
 Assigned To:  sixd
 New Comment:

I don't think that is a bug!I have ever had same problem(MySQL)!Because
i used wrong version of libmysql.dll!I copied frm XAMPP to System32!
&when i install PHP from zip package,i forget to overwrite libmysql.dll
in system32!Apache keep crashing whenever PHP execs query


Previous Comments:


[2009-01-29 19:19:15] pcdinh at gmail dot com

Description:

I wrote code to retrieve data that was returned from a query with
Oracle cursor. However oci_fetch_assoc() causes Apache 2.2.11 being
crashed and restarted. I am not sure if it is a Oracle client native
library or OCI8 issue.

Reproduce code:
---



Expected result:

Those code is a slightly modified version taken from PHP Manual
http://vn2.php.net/oci_new_cursor

It should be executed without any crash and data can be retrieved
normally (as guided by PHP Manual)

Actual result:
--
Apache crashes and restarts

Type of Analysis Performed   Crash Analysis 
Machine Name   HOME-4F44218659 
Operating System   Windows XP Service Pack 3 
Number Of Processors   2 
Process ID   2200 
Process Image   C:\server\Apache2.2\bin\httpd.exe 
System Up-Time   10:12:12 
Process Up-Time   00:01:07 


Thread 169 - System ID 2128
Entry point   msvcrt!endthreadex+3a 
Create time   1/30/2009 1:57:53 AM 
Time spent in user mode   0 Days 0:0:0.15 
Time spent in kernel mode   0 Days 0:0:0.93 






Function Arg 1 Arg 2 Arg 3   Source 
OraClient10!kpufhndl0+33 4e5f544e 0002 
OraClient10!kpufhndl+10 4e5f544e 0002 049ff9e8
OraClient10!OCIHandleFree+1a 4e5f544e 0002 0084eef0   

oci!OCIHandleFree+1d 4e5f544e 0002 01b8a9d8
php_oci8!php_oci_statement_free+121 05ecf448 01b8a9d8
0083aa23
php_oci8!php_oci_statement_list_dtor+11 05ed09b8 01b8a9d8
01be5278
php5ts!list_entry_destructor+43 05ed09b8 01b8a9d8 05ed0988 
  
php5ts!zend_hash_apply_deleter+97 01be5278 05ed0988
01b8a9d8
php5ts!zend_hash_apply_with_argument+5a 01be5278 01976a90
0022
php_oci8!zm_deactivate_oci+8a 0001 0029 01b8a9d8   

php5ts!module_registry_cleanup+1c 00fd4ec8 01b8a9d8
01b8a9d8
php5ts!zend_hash_apply+40 00cd7340 007882c0 01b8a9d8
php5ts!zend_deactivate_modules+62 049fffa4 
56433230
php5ts!zend_deactivate_modules+48 01b82a01 
05ecc7c0
php5ts!php_end_ob_buffers+26 01b8a9d8 0073a040 01b8a9d8   

php5ts!php_request_shutdown+247  00622fb6 01b82a18 
  
php5apache2_2!php_apache_request_dtor+8 01b82a18 01b8a9d8
0005
php5apache2_2!php_handler+646 01b82a18 0073a040 01b82a18   

libhttpd!ap_run_handler+21 01b82a18 01b82a18 01b82a18
libhttpd!ap_invoke_handler+ae  01b7d9c0 049fff38   

libhttpd!ap_die+29e 01b82a18  007447a8
libhttpd!ap_get_request_note+1c9c 01b7d9c0 01b7d9c0
01b7d9c0
libhttpd!ap_run_process_connection+21 01b7d9c0 007121e8
049fff80
libhttpd!ap_process_connection+33 01b7d9c0 01b76990
00e4
libhttpd!ap_regkey_value_remove+c7c 01b7d9b8 00e4
00e8
msvcrt!endthreadex+a9 01b73958 00e4 00e8
kernel32!GetModuleFileNameA+1b4 77c3a341 01b73958  
  




ORACLIENT10!KPUFHNDL0+33WARNING - DebugDiag was not able to locate
debug symbols for OraClient10.Dll, so the information below may be
incomplete.



In
httpd__PID__2200__Date__01_30_2009__Time_01_59_00AM__328__Second_Chance_Exception_C005.dmp
the assembly instruction at OraClient10!kpufhndl0+33 in
C:\oraclexe\app\oracle\product\10.2.0\server\BIN\OraClient10.Dll from
Oracle Corporation has caused an access violation exception (0xC005)
when trying to read from memory location 0x4e5f544e on thread 169

Module Information 
Image Name:
C:\oraclexe\app\oracle\product\10.2.0\server\BIN\OraClient10.Dll  
Symbol Type:  Export 
Base address: 0x61c2   Time Stamp:  Wed Feb 01 04:19:50 2006  
Checksum: 0x00251a65   Comments:   
COM DLL: False   Company Name:  Oracle Corporation 
ISAPIExtension: False   File Description:  Oracle RDBMS Client Library

ISAPIFilter: False   File Version:  10.2.0.1.0 Production 
Managed DLL: False   Internal Name:   
VB DLL: False   Legal Copyright:  Copyright Oracle 1979, 2004. All
rights reserved. 
Loaded Image Name:  OraClient10.Dll   Legal Trademarks:   
Mapped Image Name: Original filename:  oraclient10.dll 
Module name:  OraClient10   Private Buil

#29479 [Sus->Csd]: changing current process name

2009-01-29 Thread magicaltux
 ID:   29479
 Updated by:   magical...@php.net
 Reported By:  black at scene-si dot org
-Status:   Suspended
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: linux
 PHP Version:  6CVS
 New Comment:

This feature is now covered by the proctitle pecl extension, which is
based on code written by the different

http://pecl.php.net/proctitle

I believe this bug can now be closed.


Previous Comments:


[2009-01-21 22:35:47] paj...@php.net

hi!

I would suggest to simply propose it to pecl-dev. That's the place to
discussion proposals for PECL.

cheers,



[2009-01-21 20:56:48] magical...@php.net

Just for info since a lot of people seems to be looking for this kind
of solution (I'm one of them), I've hosted the proctitle extension on a
SVN repository, updated and fixed.

Available at:

http://ookoo.org/svn/proctitle/

Please let me know if you want to add things to this extension. I
tested it with PHP 5.2.8 and PHP 5.3.0alpha3, without problems.



[2008-06-09 22:52:55] lindsay dot snider at gmail dot com

Here is a shorter version based off of xdecock's code which has been
working well.  I see value in having this available when using PHP in
CLI mode.

---
#include 
#include 
#include 
#include 

static char *argv0 = NULL;
#define MAX_TITLE_LENGTH128

void setproctitle(char *title)
{
charbuffer[MAX_TITLE_LENGTH];
int tlen = strlen(title);

memset(buffer, 0x20, MAX_TITLE_LENGTH);
buffer[MAX_TITLE_LENGTH-1] = '\0';

if( tlen < (MAX_TITLE_LENGTH-1) )
memcpy(buffer, title, tlen);

if( argv0 )
snprintf(argv0, MAX_TITLE_LENGTH, "%s", buffer);
}

void set_proctitle_init()
{
sapi_module_struct *symbol = NULL;

symbol = (sapi_module_struct *)dlsym(NULL, "sapi_module");
if( symbol )
argv0 = symbol->executable_location;
}

PHP_FUNCTION(setproctitle)
{
char*title;
longtlen;

if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",&title,
&tlen) == FAILURE)
RETURN_FALSE;

setproctitle(title);
}



[2007-06-06 12:54:17] xdecock at gmail dot com

I've tried to make a port of the apache thing used for wikipedia to a
more generic one.

If it can be usefull for anyone (only tested it on cli, as i search the
way of doing this for cli primary)

Not sure how good is this method, at first seen, it works

proctitle.h & config.m4 are almost the same (except for MREQUEST_INIT &
MREQUEST_SHUTDOWN), but it is not usefull for CLI

the url for those files:
http://wikipedia.svn.sourceforge.net/viewvc/wikipedia/trunk/extensions/pecl-proctitle/php_proctitle.h?revision=9174&view=markup


#proctitle.c
/*
 
+--+
  | PHP Version 4  
 |
 
+--+
  | Copyright (c) 1997-2003 The PHP Group  
 |
 
+--+
  | This source file is subject to version 2.02 of the PHP license,
 |
  | that is bundled with this package in the file LICENSE, and is  
 |
  | available at through the world-wide-web at 
 |
  | http://www.php.net/license/2_02.txt.   
 |
  | If you did not receive a copy of the PHP license and are unable to 
 |
  | obtain it through the world-wide-web, please send a note to
 |
  | lice...@php.net so we can mail you a copy immediately. 
 |
 
+--+
  | Author:
 |
 
+--+

  $Id$ 
*/

#define MAXTITLE 1024

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include 


#include "php.h"
#include "php_ini.h"
#include "SAPI.h"
#include "ext/standard/info.h"
#include "php_proctitle.h"
#include 

/* If you declare any globals in php_proctitle.h uncomment this:
ZEND_DECLARE_MODULE_GLOBALS(proctitle)
*/

/* True global resources - no need for thread safety here */
static int le_proctitle;
static char *proctitle_argv=NULL;
static char process_base_name[MAXTITLE+1];
#ifndef HAVE_PROCTITLE
void setproctitle(char *title) {
if (proctitle_argv){
sprintf(proctitle_argv,process_base_name,title);
}

}
#endif

/* {{{ proctitle_functions[]
 *
 * Every user visible function must have an entry in
proctitle_funct