#42585 [NEW]: die() in event handler => PHP hangs

2007-09-07 Thread csaba at alum dot mit dot edu
From: csaba at alum dot mit dot edu
Operating system: Win XP Pro
PHP version:  5.2.4
PHP Bug Type: COM related
Bug description:  die() in event handler => PHP hangs

Description:

If I have a COM object call into PHP (via com_event_sink or IE's
window.setTimeout) with a die() within the called code, then PHP hangs.

In the example below, IE comes up and waits around for 4 seconds, after
which an $ie->quit() is issued.  In the event handler (function OnQuit()) a
die() is issued.  While IE does shut down, PHP does not return me the
command prompt.  This is from PHP CLI, of course.

Csaba Gabor from Vienna

Reproduce code:
---
terminated = true; 
  } } 

$ie = new COM("InternetExplorer.Application"); 
$ie->Visible = true; 
$sink = new IESink; 
com_event_sink($ie, $sink, "DWebBrowserEvents2"); 
$ie->Navigate("http://www.php.net/";); 

$start = time();
$quitted = false;

while (!$sink->terminated) { 
  com_message_pump(200); 
  if (time()-$start>4 && !$quitted) {
$quitted=true;
$ie->quit(); } } 
print "Finished!\n"; 
?>

Expected result:

I expect to be shown the following three lines, ie to go away, AND for PHP
to terminate:
title has changed: PHP: Hypertext Preprocessor
title has changed: PHP: Hypertext Preprocessor
Quitting

Actual result:
--
The above 3 lines are shown, IE goes away, BUT php does not terminate.

Also, note that if I manually shut IE down, instead of waiting the 4
seconds, then I get the following additional line (and PHP still hangs the
cmd prompt):
Fatal error: Call to undefined method com::quit() in Unknown on line 0

It seems to me that the while loop stays active, since that's the only
place that $ie->quit() is issued.

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


#35875 [Opn->Asn]: IE event failure upon scheduling script

2007-09-07 Thread jani
 ID:   35875
 Updated by:   [EMAIL PROTECTED]
 Reported By:  csaba at alum dot mit dot edu
-Status:   Open
+Status:   Assigned
 Bug Type: COM related
 Operating System: WinXP Pro
 PHP Version:  5.2.4
 Assigned To:  wharmby


Previous Comments:


[2007-09-07 01:18:04] csaba at alum dot mit dot edu

Hi Andy, this is still happening in the same way as I originally
reported.  This is with PHP 5.2.4.
Since we both have XP, I thought it might be my Norton Antivirus, but
turning off the protection did not help.
It also happens when I place event handlers on IE (com_event_sink).

My php.ini settings for COM are as follows:
com.allow_dcom = true
com.autoregister_typelib = true
com.autoregister_casesensitive = false
com.autoregister_verbose = true



[2007-06-06 22:24:27] [EMAIL PROTECTED]

So, it's 7th of June, what about the tests? :)



[2007-04-11 21:00:21] csaba at alum dot mit dot edu

Hi Andy,

  First, in case I haven't yet expressed appreciation for your
examining the series of COM bugs I reported, a big THANK YOU to you.  I
appreciate it very much.

  I am currently traveling and not in a position to do the testing that
you asked.  Once I arrive back on about April 24, I will attend to
carrying out the tests.

  Thanks,
  Csaba



[2007-04-11 14:59:12] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

Hi Csaba,
Is this still an issue for you with the latest level of PHP ? 

I have taken your supplied testcase and corrected the  typo:

popup ("In the catch")==> mypopup ("In the catch")

to get it to run from command line and it runs as you describe; 2
pop-ups before IE is terminated and 2 after. 

Next I scheduled it to run with AT command and again all was OK. I ran
it as both: 

AT 13:18 %comspec% "/K php "

and 

AT 13:18 /interactive %comspec% "/K php "

and both ran fine at the specified time; I just had to use Windows 
Task Manager in the first case to dispose of IE and so prompt the 3rd 
and 4th popups.

Next I scheduled it using schtasks. On my Windows XP system I do have a
user-id & password and I scheduled the task in 2 ways:

schtasks /Create /SC once /TN schTest /TR "php.exe "

/ST 14:12:00 /RU "\"
  (and supplied password when promoted) 

and 

schtasks /Create /SC once /TN schTest /TR "php.exe "

/ST 14:15:00 /RU "System"

and again both times the script ran at the specified time with all 4
pop-ups. 

Can you please re-try with latest PHP snapshot on your system and let
me know the result.

Regards
Andy 



[2006-01-03 11:55:03] csaba at alum dot mit dot edu

I have some additional information on this problem.  If I schedule the
php task using SchTasks as "Gabor", shown below, then the php script
runs fine.  In order to be able to do this on my single user, no
password system I must first allow Scheduled Tasks to be run without
password as described here:
http://groups.google.com/group/microsoft.public.windowsxp.general/browse_frm/thread/c1b603be72394ee2/

Then, at the command window I type (on one wrapped line):
C:\phpApps>schtasks /Create /SC once /TN schTest /TR "php.exe
c:\phpApps\schTest.php" /ST 11:23:00 /RU "Gabor"


Just to repeat the original problem:  There is a discrepancy when
scheduling (as SYSTEM - the default for AT) the php task vs. the
vbscript task to do essentially the same thing.  The php task errors
when its created IE attempts to run code within the task while the
vbscript task runs fine.  Both scripts run fine when run directly from
the command window.

Csaba

PS.  The problem is also exhibited if I ask IE to call into PHP
directly (via a PHP class) instead of directing it into a ScriptControl.
 I illustrated the method shown above because it is the direct analogue
of the standard VBScript approach, but I can also provide a "pure" PHP
way.  However, in that case, when the script is scheduled as SYSTEM (via
the AT command) the error is: Permission denied



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

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


#42490 [Opn->Fbk]: PHP will not compile with BIND 9 installed

2007-09-07 Thread jani
 ID:   42490
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jerry at scene-naturally dot dyndns dot org
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: OS X 10.4.10
 PHP Version:  5.2.4
 New Comment:

We don't really need much from the resolv OR bind library (whichever is
found) in ext/standard/dns.c so I don't think you really _need_ BIND 9
to get all the goodies out of PHP. 

Anyway, I think this is more of a header issue anyway, conflict between
installed resolv.h and bind 9 header files.

Can you sent me the config.log file you get after configure?


Previous Comments:


[2007-09-06 14:46:22] jerry at scene-naturally dot dyndns dot org

No, there is only the one libbind file installed from the Bind 9 
Installation (9.4.1-p1), This is an update to the older files provided

by Apple.

It was compiled using the --enable-libbind option for apps such as 
Postfix that need this library. This option places the libbind into 
/usr/local/lib.

This is the only libbind file on the entire system.

The older Apple setup is done differently using 
/usr/lib/libresolv.9.dylib and /usr/lib/libresolv.dylib for the 
library files.

As I have mentioned, if you remove (safely -- by shutting down all 
apps that depend on the bind libraries and then move the libbind fiel 
out of the search path or not safely by just removing the libbind 
library file out of the search path) and then running configure for 
PHP, this will allow you to build PHP. But you do not get all of the 
benefits provided by the BIND files -- as far as I can tell, the 
configure app is not not really checking the older Apple resolv 
libraries for very much.



[2007-09-06 10:56:27] [EMAIL PROTECTED]

So you have multiple libbind.* around? AFAIK, this Macosx version comes
with bind 9, so why do you have to install bind 8??? (I'm very confused 
now..)

Are you able to try this with a clean system without any bind 8 libs
installed and without modifying anything, using PHP 5.2.4 from fresh
sources?




[2007-09-05 14:29:28] jerry at scene-naturally dot dyndns dot org

Hello Jani and thank you for taking a further look at this problem.

I tried the suggestion, but it did not work, running into a problem 
with dns. I have attached the output from running the make command.

/temp/php-5.2.4/ext/standard/dns.c: In function 'zif_dns_get_record':
/temp/php-5.2.4-copy/ext/standard/dns.c:673: error: 'HEADER' 
undeclared (first use in this function)
/temp/php-5.2.4/ext/standard/dns.c:673: error: 'hp' undeclared (first 
use in this function)
/temp/php-5.2.4/ext/standard/dns.c:674: error: parse error before 
'buf'
/temp/php-5.2.4/ext/standard/dns.c:778: error: 'QUERY' undeclared 
(first use in this function)
/temp/php-5.2.4/ext/standard/dns.c:778: error: 'C_IN' undeclared 
(first use in this function)
/temp/php-5.2.4/ext/standard/dns.c:778: error: 'buf' undeclared (first

use in this function)
/temp/php-5.2.4/ext/standard/dns.c:786: error: 'answer' undeclared 
(first use in this function)
/temp/php-5.2.4/ext/standard/dns.c:797: error: parse error before ')' 
token
/temp/php-5.2.4/ext/standard/dns.c: In function 'zif_dns_get_mx':
/temp/php-5.2.4/ext/standard/dns.c:865: error: 'HEADER' undeclared 
(first use in this function)
/temp/php-5.2.4/ext/standard/dns.c:865: error: 'hp' undeclared (first 
use in this function)
/temp/php-5.2.4/ext/standard/dns.c:894: error: 'C_IN' undeclared 
(first use in this function)
/temp/php-5.2.4/ext/standard/dns.c:901: error: parse error before ')' 
token
make: *** [ext/standard/dns.lo] Error 1

There is an un-safe method to get this to work. Before running 
Configure, just move the libbind.a library out of /usr/local/lib and 
then run configure, which will then not put any of the dependent bind 
stuff into the various makefiles, etc.

Jerry



[2007-09-05 10:31:18] [EMAIL PROTECTED]

Reopening, see bug #25955 

I think this must be the reason it fails on Macosx with bind 9.
Try delete the line with BIND_8_COMPAT in it from main/php_config.h
after running configure and before 'make'.




[2007-09-03 09:18:08] [EMAIL PROTECTED]

When you start messing around with your system, the results are
unexpected. This is not PHP bug per se.



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

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


#41561 [Csd]: Values set with php_admin_* in httpd.conf can be overwritten with ini_set()

2007-09-07 Thread jani
 ID:   41561
 Updated by:   [EMAIL PROTECTED]
 Reported By:  samy-delux at gmx dot de
 Status:   Closed
 Bug Type: PHP options/info functions
 Operating System: Ubuntu Linux
 PHP Version:  5.2.3
 Assigned To:  tony2001
 New Comment:

To [EMAIL PROTECTED]: This is now fixed in CVS. (there was no thread
issue at all, AFAICT..)


Previous Comments:


[2007-08-31 07:55:01] [EMAIL PROTECTED]

Patch re-applied, it's not the one causing above problems.
thetaphi: Open separate report about this.



[2007-08-03 13:28:57] [EMAIL PROTECTED]

I suppose there is something special with error reporting that corrupts
it. It seems that it does not like it to be changed to ZEND_INI_SYSTEM
because the @operator tries to change the value (e.g. in
zend_vm_execute.h), which fails silently:

static int ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);

Z_LVAL(EX_T(opline->result.u.var).tmp_var) = EG(error_reporting);
Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG;  /* shouldn't be
necessary */
if (EX(old_error_reporting) == NULL) {
EX(old_error_reporting) = &EX_T(opline->result.u.var).tmp_var;
}

if (EG(error_reporting)) {
zend_alter_ini_entry("error_reporting", 
sizeof("error_reporting"),
"0", 1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
}
ZEND_VM_NEXT_OPCODE();
}

=> When error_reporting was overwritten with ADMIN privileges it cannot
be changed anymore by the @ operator :)

For my first idea where this bug comes from: You should move 
if (stage == ZEND_INI_STAGE_ACTIVATE && modify_type == ZEND_INI_SYSTEM)
{
ini_entry->modifiable = ZEND_INI_SYSTEM;
}
Behind the if-clause: "if (!modified) {..." to only modify the thread
local ini-entry!



[2007-08-03 12:53:16] [EMAIL PROTECTED]

The patch corrupts overwriting of ini entries in multithreaded
webserver SJSWS (formerly iplanet/SunONE).

It seems that the INI entry is modified in a way that corrupts its
further usage. I would suggest to change this patch that the modify_type
in ini_entry->modifiable = ZEND_INI_SYSTEM should only be set in the
replicated "modified" ini entry that is only available to the current
request. Changing it in the global ini table corrupts it and stops
further threads from modifying it (where no php_admin value is used and
it should be overwriteable!)...

see discussion on [EMAIL PROTECTED]



[2007-06-08 14:48:41] [EMAIL PROTECTED]

This bug has been fixed in CVS.

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





[2007-06-05 15:02:22] genetiq at gmail dot com

can reproduce this bug on my machine (Mac OS X 10.4.9, Apache2, PHP 
5.2.3)



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

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


#42586 [NEW]: HTML format can't run !

2007-09-07 Thread catchybread at hotmail dot com
From: catchybread at hotmail dot com
Operating system: WINDOWS XP PRO
PHP version:  5.2.4
PHP Bug Type: Scripting Engine problem
Bug description:  HTML format can't run !

Description:


  WEB SERVER 
  Bug with the directory 
  CLICK 


save as name.php --> Won't work
   but work for
save as name.html




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


#41562 [Asn]: Segmentation fault

2007-09-07 Thread tony2001
 ID:   41562
 Updated by:   [EMAIL PROTECTED]
 Reported By:  christian dot kaps at imaxx21 dot com
 Status:   Assigned
 Bug Type: SimpleXML related
 Operating System: Ubuntu 7.04 (Feisty)
 PHP Version:  5.2.3
-Assigned To:  tony2001
+Assigned To:  helly
 New Comment:

Yes, I still can reproduce it:
==23397== Invalid read of size 8
==23397==at 0x43F714: php_libxml_node_decrement_resource
(libxml.c:1036)
==23397==by 0x4FC4DD: sxe_object_free_storage (simplexml.c:1934)
==23397==by 0x642746: zend_objects_store_del_ref_by_handle
(zend_objects_API.c:206)
==23397==by 0x64259E: zend_objects_store_del_ref
(zend_objects_API.c:168)

etc..


Previous Comments:


[2007-09-07 13:03:58] [EMAIL PROTECTED]

Antony, can you check this? (I can't reproduce it..)



[2007-09-07 11:57:13] christian dot kaps at imaxx21 dot com

I can`t test it. Currently we use the dom extension to fix this issue
in our sytem and i could only reproduce it there. With the single code
snippet I couldn`t reproduce the error.

Perhaps tony2001 can test it? He could reproduce it with the snippet.



[2007-09-07 09:46:52] [EMAIL PROTECTED]

Does this still happen with PHP 5.2.4?



[2007-06-08 01:15:59] [EMAIL PROTECTED]

FWIW, works for me on Linux Fedora 6, 5.2 CVS. Libxml is 2.6.28



[2007-06-07 12:19:18] [EMAIL PROTECTED]

It's assigned to the the maintainer.



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

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


#42576 [Opn->Fbk]: stack smashing attack in function php_pcre_compile2

2007-09-07 Thread nlopess
 ID:   42576
 Updated by:   [EMAIL PROTECTED]
 Reported By:  nivedg at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Linux 2.4.32
 PHP Version:  4.4.7
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

without further info there's little we can do about this.
anyway I would say this is a typical pcre out-of-stack recursion.
#this reminds me I have to upgrade pcre in the php 4 branch..


Previous Comments:


[2007-09-06 12:49:26] nivedg at gmail dot com

Description:

I keep getting this error message in /var/log/httpd/error_log : 

httpd: stack smashing attack in function php_pcre_compile2[Thu Sep 06
04:26:53 2007] [notice] child pid 20857 exit signal A
borted (6)
httpd: stack smashing attack in function php_pcre_compile2[Thu Sep 06
04:26:56 2007] [notice] child pid 20799 exit signal A
borted (6)

Apache version: 2.0.59
Php version: 4.4.7
Extensions used: gd and mysql

I'm using Mambo CMS on this server. Don't know what is causing this
error. 
 







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


#41562 [Fbk->Opn]: Segmentation fault

2007-09-07 Thread christian dot kaps at imaxx21 dot com
 ID:   41562
 User updated by:  christian dot kaps at imaxx21 dot com
 Reported By:  christian dot kaps at imaxx21 dot com
-Status:   Feedback
+Status:   Open
 Bug Type: SimpleXML related
 Operating System: Ubuntu 7.04 (Feisty)
 PHP Version:  5.2.3
 Assigned To:  helly
 New Comment:

I can`t test it. Currently we use the dom extension to fix this issue
in our sytem and i could only reproduce it there. With the single code
snippet I couldn`t reproduce the error.

Perhaps tony2001 can test it? He could reproduce it with the snippet.


Previous Comments:


[2007-09-07 09:46:52] [EMAIL PROTECTED]

Does this still happen with PHP 5.2.4?



[2007-06-08 01:15:59] [EMAIL PROTECTED]

FWIW, works for me on Linux Fedora 6, 5.2 CVS. Libxml is 2.6.28



[2007-06-07 12:19:18] [EMAIL PROTECTED]

It's assigned to the the maintainer.



[2007-06-07 12:14:29] christian dot kaps at imaxx21 dot com

>>A downgrade to version 5.2.2. fix this issue.
A downgrade to version 5.2.2. fix this issue.
I can reproduce it with 5.2.2, 5.2.1 and 5.2.0, so you seem to be wrong
here.
Assigned to the extension maintainer (has nothing to do with the
engine).



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

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


#42584 [Fbk->Opn]: mssql_functions trigger errors twice

2007-09-07 Thread miracle dot rpz at gmail dot com
 ID:   42584
 User updated by:  miracle dot rpz at gmail dot com
 Reported By:  miracle dot rpz at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: MSSQL related
 Operating System: Any
-PHP Version:  5.2.4
+PHP Version:  4.4.7 & 5.2.4
 New Comment:

Yes, this actual result from cli. Throw mod_php this code output
"hello" three times, but fopen('nonexisten.file','r'); #trigger error
handler only once.



after output 'Hello world' - program hung-up (mod_php & cli)


Previous Comments:


[2007-09-07 11:05:54] [EMAIL PROTECTED]

Are you running the script on command line? (as there it's perfectly
normal to get all errors twice..)



[2007-09-07 08:17:04] miracle dot rpz at gmail dot com

Description:

mssql_functions trigger errors twice.
It causes program hang-up if error_handler contains exit-functions



Reproduce code:
---





Expected result:

Hello World

Actual result:
--
Hello World
Hello World





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


#42585 [Opn->Asn]: die() in event handler => PHP hangs

2007-09-07 Thread jani
 ID:   42585
 Updated by:   [EMAIL PROTECTED]
 Reported By:  csaba at alum dot mit dot edu
-Status:   Open
+Status:   Assigned
 Bug Type: COM related
 Operating System: Win XP Pro
 PHP Version:  5.2.4
-Assigned To:  
+Assigned To:  wharmby
 New Comment:

Assigned to the COM maintainer.


Previous Comments:


[2007-09-07 09:49:16] csaba at alum dot mit dot edu

Description:

If I have a COM object call into PHP (via com_event_sink or IE's
window.setTimeout) with a die() within the called code, then PHP hangs.

In the example below, IE comes up and waits around for 4 seconds, after
which an $ie->quit() is issued.  In the event handler (function
OnQuit()) a die() is issued.  While IE does shut down, PHP does not
return me the command prompt.  This is from PHP CLI, of course.

Csaba Gabor from Vienna

Reproduce code:
---
terminated = true; 
  } } 

$ie = new COM("InternetExplorer.Application"); 
$ie->Visible = true; 
$sink = new IESink; 
com_event_sink($ie, $sink, "DWebBrowserEvents2"); 
$ie->Navigate("http://www.php.net/";); 

$start = time();
$quitted = false;

while (!$sink->terminated) { 
  com_message_pump(200); 
  if (time()-$start>4 && !$quitted) {
$quitted=true;
$ie->quit(); } } 
print "Finished!\n"; 
?>

Expected result:

I expect to be shown the following three lines, ie to go away, AND for
PHP to terminate:
title has changed: PHP: Hypertext Preprocessor
title has changed: PHP: Hypertext Preprocessor
Quitting

Actual result:
--
The above 3 lines are shown, IE goes away, BUT php does not terminate.

Also, note that if I manually shut IE down, instead of waiting the 4
seconds, then I get the following additional line (and PHP still hangs
the cmd prompt):
Fatal error: Call to undefined method com::quit() in Unknown on line 0

It seems to me that the while loop stays active, since that's the only
place that $ie->quit() is issued.





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


#42491 [Fbk->Opn]: Segmentation fault during install-pear-installer

2007-09-07 Thread bernard dot prevosto at ifremer dot fr
 ID:   42491
 User updated by:  bernard dot prevosto at ifremer dot fr
 Reported By:  bernard dot prevosto at ifremer dot fr
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: solaris 5.8
 PHP Version:  5.2.4
 New Comment:

with gdb 6.6:

gdb --arg sapi/cli/php -n -dshort_open_tag=0 -dsafe_mode=0
-dopen_basedir= -derror_reporting=E_ALL -dmemory_limit=-1
-ddetect_unicode=0 pear/install-pear-nozlib.phar
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "sparc-sun-solaris2.8"...
(gdb) run
Starting program:
/home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/sapi/cli/php -n
-dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= -derror_reporting=E_ALL
-dmemory_limit=-1 -ddetect_unicode=0 pear/install-pear-nozlib.phar
[New LWP 1]
[New LWP 2]
[New LWP 3]
[New LWP 4]

Program received signal SIGSEGV, Segmentation fault.
0x002723a0 in _zval_ptr_dtor (zval_ptr=0xffbedb4c)
at
/home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/Zend/zend_execute_API.c:412
412 (*zval_ptr)->refcount--;
(gdb) bt
#0  0x002723a0 in _zval_ptr_dtor (zval_ptr=0xffbedb4c)
at
/home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/Zend/zend_execute_API.c:412
#1  0x0029eb5c in zend_do_fcall_common_helper_SPEC
(execute_data=0xffbee8a0)
at
/home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/Zend/zend_execute.h:155
#2  0x0029cc60 in execute (op_array=0x5d2c80) at
/home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/Zend/zend_vm_execute.h:92
#3  0x00281010 in zend_execute_scripts (type=8, retval=, file_count=3)
at
/home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/Zend/zend.c:1134
#4  0x002411ec in php_execute_script (primary_file=0xffbeefcc)
at
/home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/main/main.c:1982
#5  0x003152cc in main (argc=9, argv=0xffbef07c) at
/home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/sapi/cli/php_cli.c:1140
(gdb)


Previous Comments:


[2007-09-07 08:55:16] [EMAIL PROTECTED]

That means your installed GDB version is too old (and buggy) so you
need to update it.



[2007-09-06 11:49:43] bernard dot prevosto at ifremer dot fr

I've a bus error before typing "bt"



louet>98% wget http://pear.php.net/install-pear-nozlib.phar -nd -P
pear/
--13:37:56--  http://pear.php.net/install-pear-nozlib.phar
   => `pear/install-pear-nozlib.phar'
Resolving pear.php.net... 216.92.131.66
Connecting to pear.php.net|216.92.131.66|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3,621,515 (3.5M) [text/plain]

100%[>]
3,621,515202.46K/sETA 00:00

13:38:16 (177.55 KB/s) - `pear/install-pear-nozlib.phar' saved
[3621515/3621515]

louet>99% gdb --arg sapi/cli/php \
-n -dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= \
-derror_reporting=E_ALL -dmemory_limit=-1 -ddetect_unicode=0 \
pear/install-pear-nozlib.phar
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "sparc-sun-solaris2.5"...
(gdb) run
Starting program:
/home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/sapi/cli/php -n
-dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= -derror_reporting=E_ALL
-dmemory_limit=-1 -ddetect_unicode=0 pear/install-pear-nozlib.phar
[New LWP 1]
[New LWP 2]
[New LWP 3]
[New LWP 4]
Bus Error
louet>100%



[2007-09-06 10:49:46] [EMAIL PROTECTED]

The same way you get it with it:

# wget http://pear.php.net/install-pear-nozlib.phar -nd -P pear/
# gdb --arg sapi/cli/php \
-n -dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= \
-derror_reporting=E_ALL -dmemory_limit=-1 -ddetect_unicode=0 \
pear/install-pear-nozlib.phar
(gdb) run

(gdb) bt




[2007-09-06 07:08:45] bernard dot prevosto at ifremer dot fr

without --enable-debug I've:

louet>45% make install
Installing PHP SAPI module:   cgi
Installing PHP CGI binary:
/home/services/logiciels/compilateurs/php-5.2.4/bin/
Installing PHP CLI binary:   
/home/services/logiciels/compilateurs/php-5.2.4/bin/
Installing PHP CLI man page: 
/home/services/logiciels/compilateurs/php-5.2.4/man/

#42586 [Opn->Bgs]: HTML format can't run !

2007-09-07 Thread nlopess
 ID:   42586
 Updated by:   [EMAIL PROTECTED]
 Reported By:  catchybread at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: WINDOWS XP PRO
 PHP Version:  5.2.4
 New Comment:

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

Thank you for your interest in PHP.




Previous Comments:


[2007-09-07 13:20:47] catchybread at hotmail dot com

Description:


  WEB SERVER 
  Bug with the directory 
  CLICK 


save as name.php --> Won't work
   but work for
save as name.html








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


#42532 [Opn->Bgs]: strncmp() output differs with and without Unicode

2007-09-07 Thread mahesh dot vemula at in dot ibm dot com
 ID:   42532
 User updated by:  mahesh dot vemula at in dot ibm dot com
 Reported By:  mahesh dot vemula at in dot ibm dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Performance problem
 Operating System: RHEL4
 PHP Version:  6CVS-2007-09-03 (CVS)
 New Comment:

The output is valid and expected.


Previous Comments:


[2007-09-03 13:24:56] mahesh dot vemula at in dot ibm dot com

Description:

strncmp() of a regular string(as first argument) with an empty string,
returns an integer value of difference in their length when Unicode is
OFF, and returns int(+1) when the Unicode is ON.  
 
Is this the expected behavior according to documentation, which says
strncmp() returns >0 or <0 when two strings are not equal. Or Could
output be consistent with and without Unicode?




Reproduce code:
---
--TEST--
--FILE--

--EXPECTF--









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


#42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)

2007-09-07 Thread ando at sys-net dot it
 ID:   42060
 Comment by:   ando at sys-net dot it
 Reported By:  iarenuno at eteo dot mondragon dot edu
 Status:   No Feedback
 Bug Type: LDAP related
 Operating System: Any
 PHP Version:  5.2.3
 Assigned To:  jani
 New Comment:

Yes, so many functions are needed to support generic stuff + dozens of
well-known, RFC/I.D. based LDAP controls and extended operations,
without code duplication.  Any developer would agree.


Previous Comments:


[2007-09-07 14:57:40] ando at sys-net dot it

Be serious: the patch applies back up to PHP 4 (the last time an update
occurred to LDAP support).



[2007-08-04 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-07-27 05:06:27] [EMAIL PROTECTED]

Ok, but let's keep this in "Feedback" status until that then.



[2007-07-26 13:47:12] iarenuno at eteo dot mondragon dot edu

I'll have a look at the issues you mention and will be back in a couple
of days.

Saludos. Iñaki.



[2007-07-24 15:02:00] [EMAIL PROTECTED]

Some comments about the patch:

1) you need to make the patch apply to latest PHP _5_2 checkout instead
of 5.2.3 sources. (I made some changes in there before I saw this
report)

2) Do you really need to add so many functions for this stuff? And the
naming of those functions isn't very intuitive either.

3) Separate the fixes from the new features. (first fix stuff then add
new..)




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

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


#42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)

2007-09-07 Thread ando at sys-net dot it
 ID:   42060
 Comment by:   ando at sys-net dot it
 Reported By:  iarenuno at eteo dot mondragon dot edu
 Status:   No Feedback
 Bug Type: LDAP related
 Operating System: Any
 PHP Version:  5.2.3
 Assigned To:  jani
 New Comment:

Be serious: the patch applies back up to PHP 4 (the last time an update
occurred to LDAP support).


Previous Comments:


[2007-08-04 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-07-27 05:06:27] [EMAIL PROTECTED]

Ok, but let's keep this in "Feedback" status until that then.



[2007-07-26 13:47:12] iarenuno at eteo dot mondragon dot edu

I'll have a look at the issues you mention and will be back in a couple
of days.

Saludos. Iñaki.



[2007-07-24 15:02:00] [EMAIL PROTECTED]

Some comments about the patch:

1) you need to make the patch apply to latest PHP _5_2 checkout instead
of 5.2.3 sources. (I made some changes in there before I saw this
report)

2) Do you really need to add so many functions for this stuff? And the
naming of those functions isn't very intuitive either.

3) Separate the fixes from the new features. (first fix stuff then add
new..)




[2007-07-21 16:08:17] [EMAIL PROTECTED]

New features are not added in bugfix releases so this'll have to wait
til we start the 5.3 branch.



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

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


#42548 [Fbk->Opn]: PROCEDURE xxx can't return a result set in the given context

2007-09-07 Thread garethjo at usc dot edu
 ID:   42548
 User updated by:  garethjo at usc dot edu
 Reported By:  garethjo at usc dot edu
-Status:   Feedback
+Status:   Open
 Bug Type: MySQLi related
 Operating System: Windows XP, Windows 2003
 PHP Version:  5.2.4
 New Comment:

Yes I have seen those bugs and they are not what I am experiencing. Any
stored procedure that would normally return a resultset whether it be
the first or not produces the "PROCEDURE procedure.Name can't return a
result set in the given context" error not a lost connection.  In my
example code, the first query is just used to create the database table
and stored procedure. So even if it is separated out and ran separately
so that the bug test is in a separate file and runs by itself after the
database tables and proc are created, it will still produce the same
result even though it is the first proc that was run.


Previous Comments:


[2007-09-06 22:31:42] [EMAIL PROTECTED]

Have you seen bug #32882 and bug #35203 ??




[2007-09-05 00:10:23] garethjo at usc dot edu

real_connect('localhost', 'root', 'root_pass', 'test');
if (mysqli_connect_errno()) 
{
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$strDatabaseCreation = 'CREATE DATABASE IF NOT EXISTS test;
USE test;
DROP TABLE IF EXISTS `products`;
CREATE TABLE `products` (
  `intProductId` int(10) unsigned NOT NULL auto_increment,
  `strProductName` varchar(45) NOT NULL,
  `douProductPrice` double NOT NULL,
  `intQuantity` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`intProductId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `products`
(`intProductId`,`strProductName`,`douProductPrice`,`intQuantity`)
VALUES
 (1,\'Mugs\',10,5),
 (2,\'Boots\',75,12);

CREATE PROCEDURE `test`.`spGetProducts`()
BEGIN
  SELECT * FROM Products;
END
';
printf ("Connection: %s\r\n.", $mysqli->host_info);
if($mysqli->multi_query ($strDatabaseCreation))
{
print "Databse created successfully\r\n";
}
else
{
print "failed to create database\r\n".$mysqli->error;
$mysqli->close();
die;
}
$mysqli->close();

// BUG TEST START  --
$mysqli = mysqli_init();
$mysqli->real_connect('localhost', 'root', 'root_pass', 'test');
if (mysqli_connect_errno())
{
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
if($mysqli->real_query ("CALL spGetProducts();"))
{
if($objResult = $mysqli->store_result())
{
while($row = $objResult->fetch_assoc())
{
print $row["strProductName"]." 
".$row["strProductName"]."\r\n";
}
$objResult->free_result();
}
else
{
print "no results found";
}
}
else
{   
print $mysqli->error;
}
$mysqli->close();
?>



[2007-09-04 19:24:08] garethjo at usc dot edu

Description:

All stored procedure call which would return a result set (and did in
the past) produces the error 

"PROCEDURE procedure.Name can't return a result set in the given
context"

However the expected results are returned via command line and other
mysql clients.

Reproduce code:
---
test code can be found at:

http://128.125.64.37/bug.zip

Expected result:

resultset returned

Actual result:
--
PROCEDURE procedure.Name can't return a result set in the given context





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


#42568 [Fbk->Opn]: Compile fails when using --with-gmp option

2007-09-07 Thread jerry at scene-naturally dot dyndns dot org
 ID:   42568
 User updated by:  jerry at scene-naturally dot dyndns dot org
 Reported By:  jerry at scene-naturally dot dyndns dot org
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: OS X 10.4.10
 PHP Version:  5.2.4
 New Comment:

Actually that is the default for PHP -- to build with out shared 
libraries on OS X

checking whether the gcc linker (/usr/bin/ld) supports shared 
libraries... yes
checking dynamic linker characteristics... darwin8.10.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes

But I will try explicitly building using the --disable-shared option
and 
see if that makes a difference.


Previous Comments:


[2007-09-07 08:52:02] [EMAIL PROTECTED]

My question is: Does it work? :D
You could try building PHP as well with --disable-shared..



[2007-09-07 02:30:57] jerry at scene-naturally dot dyndns dot org

In order to be complete, I did check as you asked

compiling gmp via:

./configure \
--prefix=/usr/local \
--enable-cxx \
ABI=mode32

and using the resulting library to compile PHP via:
./configure \
--with-gmp=/usr/local

PHP did configure and compile.

This leads to a conundrum though, Comparing the two libraries 
(libgmp.a built via the developers specs to libgmp.a built via your 
request) leads to 242 differences between the two static libraries.

This kind of throws cold waters on the hope of the idea of using the 
static library built the second way and tossing out the shared 
libraries (which come from not using the --disable-shared option).



[2007-09-07 01:26:41] jerry at scene-naturally dot dyndns dot org

There are serious problems with doing that. Libtool will switch to
using 
CC instead of GCC to build the resulting shared library, which means 
most things that would in use the gmp library break because they need 
the GCC version, which is why the folks at GMP say to use the --
disabled-shared option for OS X.



[2007-09-06 22:27:55] [EMAIL PROTECTED]

What if you compile GMP without --disable-shared ??



[2007-09-06 14:51:11] jerry at scene-naturally dot dyndns dot org

I tried this three different ways; (all crashed).

First way: a usual full list.

Second way:

./configure \
--prefix=/usr/local/apache2/php \
--with-config-file-path=/usr/local/apache2/php/lib \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-gmp=/usr/local

This crashed as well, as did

./configure \
--with-gmp=/usr/local

All done with fresh versions of PHP.



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

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


#42204 [Opn->Csd]: Persistent connections

2007-09-07 Thread jcuello at sitrack dot com
 ID:   42204
 User updated by:  jcuello at sitrack dot com
 Reported By:  jcuello at sitrack dot com
-Status:   Open
+Status:   Closed
 Bug Type: Informix related
 Operating System: Linux, Windows XP
 PHP Version:  4.4.7
 New Comment:

The script opens a new connection because de it uses a new apache
server process. The problem about a new connection is not concerned to
php, instead of that it depends on how apache manage each child process.
The gap about 20 seconds refer to the KeepAliveTimeout varible in the
httpd.conf apache config file.


Previous Comments:


[2007-08-05 14:32:28] jcuello at sitrack dot com

On Linux too.



[2007-08-03 20:04:00] jcuello at sitrack dot com

Description:

Every call to ifx_pconnect() opens a connection to the database server
instead of using the connection previously created. This situation take
place when the gap between each call is about 20 seconds or more. We
monitor the connections to the database server with the informix command
'onstat -g ses'. The connections remains open until the apache server is
stopped.


Reproduce code:
---


Expected result:

I expect the script doesn't open a new connection to the database
server if it find a connection already established. I expect it uses the
connection already open.

Actual result:
--
The script open a new connection to the server if the gap between each
call to the script is about 20 seconds or more. The connections remains
open until de apache server is stopped.





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


#41917 [Csd]: oci_field_scale returns expected value multiplied by 256

2007-09-07 Thread nobleclem+phpbugs at gmail dot com
 ID:   41917
 User updated by:  nobleclem+phpbugs at gmail dot com
 Reported By:  nobleclem+phpbugs at gmail dot com
 Status:   Closed
 Bug Type: OCI8 related
 Operating System: Solaris
 PHP Version:  5.2.3
 Assigned To:  tony2001
 New Comment:

Tested 5.2.4 and the ub# to sb# has resolved the problem and
oci_field_precision() is not returning the correct value.

Thank You for your hard work!


Previous Comments:


[2007-07-09 19:02:54] [EMAIL PROTECTED]

This bug has been fixed in CVS.

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





[2007-07-06 23:35:47] [EMAIL PROTECTED]

A new test has been merged and old tests updated.  They will cause
diffs until Tony merges the code change.

The suggested fix is:
--- php_oci8_int.h  29 Mar 2007 02:33:03 -0700  1.11.2.6.2.18
+++ php_oci8_int.h  06 Jul 2007 15:53:44 -0700  
@@ -215,8 +215,8 @@
php_oci_define *define; /* define handle */
int piecewise;  /* column is fetched 
piece-by-piece */
ub4 cb_retlen;  /* */
-   ub2 scale;  /* column scale 
*/
-   ub2 precision;  /* column precision */
+   sb1 scale;  /* column scale 
*/
+   sb2 precision;  /* column precision */
ub1 charset_form;   /* charset form, 
required for NCLOBs */
ub2 charset_id; /* charset ID */
 } php_oci_out_column; /* }}} */




[2007-07-06 22:12:51] [EMAIL PROTECTED]

Although I can't reproduce the given testcase on Linux there is a bug
here that stops other testcases working for me, and may cause a port
specific difference in behavior for nobleclem's testcase.

The datatypes of the scale and precision fields in php_oci_out_column
(php_oci8_int.h) should be sb1 and s2 respectively. At the moment they
are both ub2.  This, for example, prevents the scale for a FLOAT column
being displayed as -127.  

See table 6.8 in Oracle's OCI manual:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14250/oci06des.htm#sthref949

@nobleclem, the scale and precision values returned by the OCI8
extension and Oracle's OCI library are the programmatic definitions of
scale and precision, which are different to the user-level values given
in the all_tab_columns table.

@tony2001, I will commit a new testcase to PHP5 and 6, but will let you
evaluate and merge the datatype fix.



[2007-07-06 18:53:11] [EMAIL PROTECTED]

PHP/OCI8 returns exactly what it got from OCIAttrGet(..,
OCI_DTYPE_PARAM, .., .., OCI_ATTR_SCALE, ).
If Oracle Client returns wrong information, we can't change or fix
that.



[2007-07-06 18:40:17] nobleclem+phpbugs at gmail dot com

Description:

When using oci_field_scale to obtain the value stored in
all_tab_columns.data_scale in oracle for a field the value returned is
that in all_tab_columns.data_scale multiplied by 256.

Reproduce code:
---
Assumptions:
- field #2 is of type NUMBER(12,2)
- all_tab_columns.data_precision is 12
- all_tab_columns.data_scale value is 2

Code:
$conn = oci_connect('username', 'password');
$stmt = oci_parse($conn, "SELECT * FROM fees");
oci_execute($stmt);
$field_number = 2;

$scale = oci_field_scale( $stmt, $field_number );

Expected result:

$scale should be assigned the value of 2.

Actual result:
--
$scale is assigned the value of 512.





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


#42568 [Opn]: Compile fails when using --with-gmp option

2007-09-07 Thread jerry at scene-naturally dot dyndns dot org
 ID:   42568
 User updated by:  jerry at scene-naturally dot dyndns dot org
 Reported By:  jerry at scene-naturally dot dyndns dot org
 Status:   Open
 Bug Type: Compile Failure
 Operating System: OS X 10.4.10
 PHP Version:  5.2.4
 New Comment:

I had a chance to try the following;

GMP build via:

./configure \
--prefix=/usr/local \
--enable-cxx \
--disable-shared \
ABI=mode32


PHP configure:

./configure \
--with-gmp=/usr/local \
--disable-shared

as requested, but running make for this configuration still crashes 
with the error

/usr/bin/ld: /usr/local/lib/libgmp.a(popcount.o) has local relocation 
entries in non-writable section (__TEXT,__text)


Previous Comments:


[2007-09-07 14:42:07] jerry at scene-naturally dot dyndns dot org

Actually that is the default for PHP -- to build with out shared 
libraries on OS X

checking whether the gcc linker (/usr/bin/ld) supports shared 
libraries... yes
checking dynamic linker characteristics... darwin8.10.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes

But I will try explicitly building using the --disable-shared option
and 
see if that makes a difference.



[2007-09-07 08:52:02] [EMAIL PROTECTED]

My question is: Does it work? :D
You could try building PHP as well with --disable-shared..



[2007-09-07 02:30:57] jerry at scene-naturally dot dyndns dot org

In order to be complete, I did check as you asked

compiling gmp via:

./configure \
--prefix=/usr/local \
--enable-cxx \
ABI=mode32

and using the resulting library to compile PHP via:
./configure \
--with-gmp=/usr/local

PHP did configure and compile.

This leads to a conundrum though, Comparing the two libraries 
(libgmp.a built via the developers specs to libgmp.a built via your 
request) leads to 242 differences between the two static libraries.

This kind of throws cold waters on the hope of the idea of using the 
static library built the second way and tossing out the shared 
libraries (which come from not using the --disable-shared option).



[2007-09-07 01:26:41] jerry at scene-naturally dot dyndns dot org

There are serious problems with doing that. Libtool will switch to
using 
CC instead of GCC to build the resulting shared library, which means 
most things that would in use the gmp library break because they need 
the GCC version, which is why the folks at GMP say to use the --
disabled-shared option for OS X.



[2007-09-06 22:27:55] [EMAIL PROTECTED]

What if you compile GMP without --disable-shared ??



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

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


#42590 [NEW]: ucwords doesn't work correctly, when a word is preceded by verticaltab/formfeed

2007-09-07 Thread kraghuba at in dot ibm dot com
From: kraghuba at in dot ibm dot com
Operating system: linux, windows
PHP version:  5CVS-2007-09-07 (snap)
PHP Bug Type: Strings related
Bug description:  ucwords doesn't work correctly, when a word is preceded by 
verticaltab/formfeed

Description:

ucwords() fails to change the first char of a word to uppercase when word
is preceded by vertical tab(\v) or formfeed(\f). As per the documentation
at http://in.php.net/manual/en/function.ucwords.php it should change the
first char to uppercase. 

This is applicable to php5 as well as php6

Reproduce code:
---


Expected result:

char preceded with \v and \f should be changed to uppercase.

Actual result:
--
string(31) "Testing \vucw\ford \vfunc\vtion"

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


#42589 [NEW]: getColumnMeta() should also return table name

2007-09-07 Thread fabrizio dot balliano at crealabs dot it
From: fabrizio dot balliano at crealabs dot it
Operating system: all
PHP version:  5.2.4
PHP Bug Type: PDO related
Bug description:  getColumnMeta() should also return table name

Description:

if you do 
"select * from table1 join table2 on (table1.id=table2.id)

how can you understand which fields are coming from table1 and which from
table2?

the only way is that getcolumnmeta() also returns the table name of every
column


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


#42588 [NEW]: PDO LOB Insert Loses Bytes

2007-09-07 Thread dhall at wustl dot edu
From: dhall at wustl dot edu
Operating system: 
PHP version:  5CVS-2007-09-07 (snap)
PHP Bug Type: PDO related
Bug description:  PDO LOB Insert Loses Bytes

Description:

See Ubuntu Bug 137960
I have duplicated this compiling on Mac OS X with the latest CVS snapshot,
so I think its not a Debian/Ubuntu packaging bug.

Reproduce code:
---
'SET CHARACTER SET
utf8;', PDO::MYSQL_ATTR_MAX_BUFFER_SIZE=>4194304 ) );
$prepared = $db->prepare('INSERT INTO `files` (`type`,`data`) VALUES
(:type, :data)');
$prepared->bindParam(':type',$imagesize['mime'], PDO::PARAM_STR, 50);
$prepared->bindParam(':data', $fp, PDO::PARAM_LOB);
$prepared->execute();

$id = $db->lastInsertId();

$prepared = $db->prepare('SELECT `type`, `data` FROM `files` WHERE
`fileid` = :fileid');
$prepared->bindParam(':fileid',$id, PDO::PARAM_INT);
$prepared->execute();
$prepared->bindColumn(1, $type, PDO::PARAM_STR, 256);
$prepared->bindColumn(2, $lob, PDO::PARAM_LOB);
$prepared->fetch(PDO::FETCH_BOUND);
header("Content-Type: $type");
echo $lob;
?>

Expected result:

properly output image as on
http://cowsandmilk.homeip.net/pdolob/pdolobtest.php

Actual result:
--
image missing bytes as on http://cowsandmilk.net/pdolob/pdolobtest.php
(goes from 8262 bytes to 7966 bytes)

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


#42587 [NEW]: behaviour change regarding symlinked .php files

2007-09-07 Thread christian at hoffie dot info
From: christian at hoffie dot info
Operating system: Linux 2.6
PHP version:  5CVS-2007-09-07 (snap)
PHP Bug Type: CGI related
Bug description:  behaviour change regarding symlinked .php files

Description:

php-5.2.4 changed the behaviour for the current working directory (cwd)
which php scripts see when the requested php file is a symlink which points
to a php file in another directory.
It is still reproducible with php5.2-200709071230 (snapshot). php-5.2.3
worked fine. Reverting this commit [1] solves the problem.
I'm using the tarballs from php.net, no patches.

This change breaks certain Typo3 setups.

[1]
http://cvs.php.net/viewcvs.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.42&r2=1.267.2.15.2.43&pathrev=PHP_5_2
(Fixed bug #40419 (Trailing Slash in CGI request don't work))

Reproduce code:
---
(a web server, lighttpd in this case, is set up at 127.0.0.1:8000;
foo.php5.2.3 is handled by php5.2.3, foo.php5.2.5dev by
php5.2-200709071230; both binaries have the -n option passed; docroot is
/var/tmp/php)

[EMAIL PROTECTED] /var/tmp/php $ mkdir foo
[EMAIL PROTECTED] /var/tmp/php $ echo '' >
foo/bar.php
[EMAIL PROTECTED] /var/tmp/php $ ln -s foo/bar.php bar.php5.2.3
[EMAIL PROTECTED] /var/tmp/php $ ln -s foo/bar.php bar.php5.2.5dev
[EMAIL PROTECTED] /var/tmp/php $ curl http://localhost:8000/bar.php5.2.5dev
/var/tmp/php/foo
[EMAIL PROTECTED] /var/tmp/php $ curl http://localhost:8000/bar.php5.2.3
/var/tmp/php

Expected result:

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


#42584 [Opn->Fbk]: mssql_functions trigger errors twice

2007-09-07 Thread jani
 ID:   42584
 Updated by:   [EMAIL PROTECTED]
 Reported By:  miracle dot rpz at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: MSSQL related
 Operating System: Any
 PHP Version:  5.2.4
 New Comment:

Are you running the script on command line? (as there it's perfectly
normal to get all errors twice..)


Previous Comments:


[2007-09-07 08:17:04] miracle dot rpz at gmail dot com

Description:

mssql_functions trigger errors twice.
It causes program hang-up if error_handler contains exit-functions



Reproduce code:
---





Expected result:

Hello World

Actual result:
--
Hello World
Hello World





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


#42588 [Opn]: PDO LOB Insert Loses Bytes

2007-09-07 Thread dhall at wustl dot edu
 ID:  42588
 User updated by: dhall at wustl dot edu
 Reported By: dhall at wustl dot edu
 Status:  Open
 Bug Type:PDO related
 PHP Version: 5CVS-2007-09-07 (snap)
 New Comment:

PS.
If you remove the SET CHARACTER SET UTF-8 stuff, it works.  I don't see
why that should screw up pdo sending in lobs though.


Previous Comments:


[2007-09-07 15:29:46] dhall at wustl dot edu

Description:

See Ubuntu Bug 137960
I have duplicated this compiling on Mac OS X with the latest CVS
snapshot, so I think its not a Debian/Ubuntu packaging bug.

Reproduce code:
---
'SET CHARACTER SET
utf8;', PDO::MYSQL_ATTR_MAX_BUFFER_SIZE=>4194304 ) );
$prepared = $db->prepare('INSERT INTO `files` (`type`,`data`) VALUES
(:type, :data)');
$prepared->bindParam(':type',$imagesize['mime'], PDO::PARAM_STR, 50);
$prepared->bindParam(':data', $fp, PDO::PARAM_LOB);
$prepared->execute();

$id = $db->lastInsertId();

$prepared = $db->prepare('SELECT `type`, `data` FROM `files` WHERE
`fileid` = :fileid');
$prepared->bindParam(':fileid',$id, PDO::PARAM_INT);
$prepared->execute();
$prepared->bindColumn(1, $type, PDO::PARAM_STR, 256);
$prepared->bindColumn(2, $lob, PDO::PARAM_LOB);
$prepared->fetch(PDO::FETCH_BOUND);
header("Content-Type: $type");
echo $lob;
?>

Expected result:

properly output image as on
http://cowsandmilk.homeip.net/pdolob/pdolobtest.php

Actual result:
--
image missing bytes as on http://cowsandmilk.net/pdolob/pdolobtest.php
(goes from 8262 bytes to 7966 bytes)





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


#42591 [NEW]: wordwrap doesn't generate warning message when width is given as -ne or 0 value

2007-09-07 Thread kraghuba at in dot ibm dot com
From: kraghuba at in dot ibm dot com
Operating system: linux, windows
PHP version:  5CVS-2007-09-07 (snap)
PHP Bug Type: Strings related
Bug description:  wordwrap doesn't generate warning message when width is given 
as -ne or 0 value

Description:

wordwrap() doesn't generate warning message when width argument is given 
as a negative or zero value. 

this is applicable to php5 and php6.

Reproduce code:
---
\n") );
 var_dump( wordwrap($text, -1 , "\n") );

 var_dump( wordwrap($text, 0) );
 var_dump( wordwrap($text, -1) );
?>

Expected result:

warning messages should be generated

Actual result:
--
string(85) "The
quick
brown
fox
jumped
over
the
lazy
dog."
string(93) "The
quick
brown
fox
jumped
over
the
lazy
dog."
string(45) "The
quick
brown
fox
jumped
over
the
lazy
dog."
string(45) "The
quick
brown
fox
jumped
over
the
lazy
dog."

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


#41917 [Csd]: oci_field_scale returns expected value multiplied by 256

2007-09-07 Thread nobleclem+phpbugs at gmail dot com
 ID:   41917
 User updated by:  nobleclem+phpbugs at gmail dot com
 Reported By:  nobleclem+phpbugs at gmail dot com
 Status:   Closed
 Bug Type: OCI8 related
 Operating System: Solaris
 PHP Version:  5.2.3
 Assigned To:  tony2001
 New Comment:

Typo in previous comment it should read:

Tested 5.2.4 and the ub# to sb# has resolved the problem and
oci_field_precision() is NOW returning the correct value.

Thank You for your hard work!


Previous Comments:


[2007-09-07 15:05:26] nobleclem+phpbugs at gmail dot com

Tested 5.2.4 and the ub# to sb# has resolved the problem and
oci_field_precision() is not returning the correct value.

Thank You for your hard work!



[2007-07-09 19:02:54] [EMAIL PROTECTED]

This bug has been fixed in CVS.

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





[2007-07-06 23:35:47] [EMAIL PROTECTED]

A new test has been merged and old tests updated.  They will cause
diffs until Tony merges the code change.

The suggested fix is:
--- php_oci8_int.h  29 Mar 2007 02:33:03 -0700  1.11.2.6.2.18
+++ php_oci8_int.h  06 Jul 2007 15:53:44 -0700  
@@ -215,8 +215,8 @@
php_oci_define *define; /* define handle */
int piecewise;  /* column is fetched 
piece-by-piece */
ub4 cb_retlen;  /* */
-   ub2 scale;  /* column scale 
*/
-   ub2 precision;  /* column precision */
+   sb1 scale;  /* column scale 
*/
+   sb2 precision;  /* column precision */
ub1 charset_form;   /* charset form, 
required for NCLOBs */
ub2 charset_id; /* charset ID */
 } php_oci_out_column; /* }}} */




[2007-07-06 22:12:51] [EMAIL PROTECTED]

Although I can't reproduce the given testcase on Linux there is a bug
here that stops other testcases working for me, and may cause a port
specific difference in behavior for nobleclem's testcase.

The datatypes of the scale and precision fields in php_oci_out_column
(php_oci8_int.h) should be sb1 and s2 respectively. At the moment they
are both ub2.  This, for example, prevents the scale for a FLOAT column
being displayed as -127.  

See table 6.8 in Oracle's OCI manual:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14250/oci06des.htm#sthref949

@nobleclem, the scale and precision values returned by the OCI8
extension and Oracle's OCI library are the programmatic definitions of
scale and precision, which are different to the user-level values given
in the all_tab_columns table.

@tony2001, I will commit a new testcase to PHP5 and 6, but will let you
evaluate and merge the datatype fix.



[2007-07-06 18:53:11] [EMAIL PROTECTED]

PHP/OCI8 returns exactly what it got from OCIAttrGet(..,
OCI_DTYPE_PARAM, .., .., OCI_ATTR_SCALE, ).
If Oracle Client returns wrong information, we can't change or fix
that.



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

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


#41562 [Asn->Fbk]: Segmentation fault

2007-09-07 Thread jani
 ID:   41562
 Updated by:   [EMAIL PROTECTED]
 Reported By:  christian dot kaps at imaxx21 dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: SimpleXML related
 Operating System: Ubuntu 7.04 (Feisty)
 PHP Version:  5.2.3
 Assigned To:  helly
 New Comment:

Does this still happen with PHP 5.2.4?


Previous Comments:


[2007-06-08 01:15:59] [EMAIL PROTECTED]

FWIW, works for me on Linux Fedora 6, 5.2 CVS. Libxml is 2.6.28



[2007-06-07 12:19:18] [EMAIL PROTECTED]

It's assigned to the the maintainer.



[2007-06-07 12:14:29] christian dot kaps at imaxx21 dot com

>>A downgrade to version 5.2.2. fix this issue.
A downgrade to version 5.2.2. fix this issue.
I can reproduce it with 5.2.2, 5.2.1 and 5.2.0, so you seem to be wrong
here.
Assigned to the extension maintainer (has nothing to do with the
engine).



[2007-06-05 07:47:53] christian dot kaps at imaxx21 dot com

Sorry for my poor englisch.

I think this script is the trigger for this problem. But it is not the
only one. I can`t say what the other is!?

xpath('parent::*', 0);

return $parent;
}

public function removeChild(Config_SimpleXML $child)
{
$cnt = 0;
$childXml = $child->asXml();
$this->rewind();
while ($this->valid()) {
if ($childXml === $this->current()->asXml()) {
if (isset($this->{$this->key()}->{$cnt})) {
unset($this->{$this->key()}->{$cnt});
} else {
unset($this->{$this->key()});
}

break;
}
$cnt++;
$this->next();
}
$this->rewind();
}
}

$xml = 'text';
$xml = simplexml_load_string($xml, 'Config_SimpleXML');

$element = $xml->xpath('.//child', 0);
$element->parent()->removeChild($element);

?>

I use this to remove a node from an xml document. When i use the dom
object to remove the node, the error doesn`t occur.

What I can say is that the error occurs not ever when i call the
removeChild method. I have a script which has 2 calls of this method.
The first call is ok the second throws this error. Whereat not the call
himself is the segfault trigger, but in our environment where i can
reproduce the error it is a exit statement that throws the segfault
error.

A downgrade to version 5.2.2. fix this issue. I can remember that in
version 5.1.6 the error occurs too.



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

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


#42491 [Opn->Fbk]: Segmentation fault during install-pear-installer

2007-09-07 Thread jani
 ID:   42491
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bernard dot prevosto at ifremer dot fr
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: solaris 5.8
 PHP Version:  5.2.4
 New Comment:

That means your installed GDB version is too old (and buggy) so you
need to update it.


Previous Comments:


[2007-09-06 11:49:43] bernard dot prevosto at ifremer dot fr

I've a bus error before typing "bt"



louet>98% wget http://pear.php.net/install-pear-nozlib.phar -nd -P
pear/
--13:37:56--  http://pear.php.net/install-pear-nozlib.phar
   => `pear/install-pear-nozlib.phar'
Resolving pear.php.net... 216.92.131.66
Connecting to pear.php.net|216.92.131.66|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3,621,515 (3.5M) [text/plain]

100%[>]
3,621,515202.46K/sETA 00:00

13:38:16 (177.55 KB/s) - `pear/install-pear-nozlib.phar' saved
[3621515/3621515]

louet>99% gdb --arg sapi/cli/php \
-n -dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= \
-derror_reporting=E_ALL -dmemory_limit=-1 -ddetect_unicode=0 \
pear/install-pear-nozlib.phar
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "sparc-sun-solaris2.5"...
(gdb) run
Starting program:
/home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/sapi/cli/php -n
-dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= -derror_reporting=E_ALL
-dmemory_limit=-1 -ddetect_unicode=0 pear/install-pear-nozlib.phar
[New LWP 1]
[New LWP 2]
[New LWP 3]
[New LWP 4]
Bus Error
louet>100%



[2007-09-06 10:49:46] [EMAIL PROTECTED]

The same way you get it with it:

# wget http://pear.php.net/install-pear-nozlib.phar -nd -P pear/
# gdb --arg sapi/cli/php \
-n -dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= \
-derror_reporting=E_ALL -dmemory_limit=-1 -ddetect_unicode=0 \
pear/install-pear-nozlib.phar
(gdb) run

(gdb) bt




[2007-09-06 07:08:45] bernard dot prevosto at ifremer dot fr

without --enable-debug I've:

louet>45% make install
Installing PHP SAPI module:   cgi
Installing PHP CGI binary:
/home/services/logiciels/compilateurs/php-5.2.4/bin/
Installing PHP CLI binary:   
/home/services/logiciels/compilateurs/php-5.2.4/bin/
Installing PHP CLI man page: 
/home/services/logiciels/compilateurs/php-5.2.4/man/man1/
Installing build environment:
/home/services/logiciels/compilateurs/php-5.2.4/lib/php/build/
Installing header files: 
/home/services/logiciels/compilateurs/php-5.2.4/include/php/
Installing helper programs:  
/home/services/logiciels/compilateurs/php-5.2.4/bin/
  program: phpize
  program: php-config
Installing man pages:
/home/services/logiciels/compilateurs/php-5.2.4/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment: 
/home/services/logiciels/compilateurs/php-5.2.4/lib/php/
Segmentation Fault
gmake[1]: *** [install-pear-installer] Error 139
gmake: *** [install-pear] Error 2
louet>46% 


or, also :

louet>46% sapi/cli/php pear/install-pear-nozlib.phar
Segmentation Fault
louet>47% 

how can I get you backtrace without using --enable-debug ?



[2007-09-05 13:46:04] [EMAIL PROTECTED]

Then can you try getting some kind of backtrace without using
--enable-debug ? That's better than nothing.



[2007-09-05 13:31:38] [EMAIL PROTECTED]

I can not reproduce this on linux (32bit).



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

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


#42568 [Opn->Fbk]: Compile fails when using --with-gmp option

2007-09-07 Thread jani
 ID:   42568
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jerry at scene-naturally dot dyndns dot org
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: OS X 10.4.10
 PHP Version:  5.2.4
 New Comment:

My question is: Does it work? :D
You could try building PHP as well with --disable-shared..


Previous Comments:


[2007-09-07 02:30:57] jerry at scene-naturally dot dyndns dot org

In order to be complete, I did check as you asked

compiling gmp via:

./configure \
--prefix=/usr/local \
--enable-cxx \
ABI=mode32

and using the resulting library to compile PHP via:
./configure \
--with-gmp=/usr/local

PHP did configure and compile.

This leads to a conundrum though, Comparing the two libraries 
(libgmp.a built via the developers specs to libgmp.a built via your 
request) leads to 242 differences between the two static libraries.

This kind of throws cold waters on the hope of the idea of using the 
static library built the second way and tossing out the shared 
libraries (which come from not using the --disable-shared option).



[2007-09-07 01:26:41] jerry at scene-naturally dot dyndns dot org

There are serious problems with doing that. Libtool will switch to
using 
CC instead of GCC to build the resulting shared library, which means 
most things that would in use the gmp library break because they need 
the GCC version, which is why the folks at GMP say to use the --
disabled-shared option for OS X.



[2007-09-06 22:27:55] [EMAIL PROTECTED]

What if you compile GMP without --disable-shared ??



[2007-09-06 14:51:11] jerry at scene-naturally dot dyndns dot org

I tried this three different ways; (all crashed).

First way: a usual full list.

Second way:

./configure \
--prefix=/usr/local/apache2/php \
--with-config-file-path=/usr/local/apache2/php/lib \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-gmp=/usr/local

This crashed as well, as did

./configure \
--with-gmp=/usr/local

All done with fresh versions of PHP.



[2007-09-06 11:06:29] [EMAIL PROTECTED]

What was the full configure line for PHP?



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

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


#42584 [NEW]: mssql_functions trigger errors twice

2007-09-07 Thread miracle dot rpz at gmail dot com
From: miracle dot rpz at gmail dot com
Operating system: Any
PHP version:  5.2.4
PHP Bug Type: MSSQL related
Bug description:  mssql_functions trigger errors twice

Description:

mssql_functions trigger errors twice.
It causes program hang-up if error_handler contains exit-functions



Reproduce code:
---





Expected result:

Hello World

Actual result:
--
Hello World
Hello World

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


#42579 [Fbk->Opn]: apache_reset_timeout() does not exist.

2007-09-07 Thread thomas dot hebinck at digionline dot de
 ID:   42579
 User updated by:  thomas dot hebinck at digionline dot de
 Reported By:  thomas dot hebinck at digionline dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Apache related
 Operating System: Linux
 PHP Version:  5.2.4
 New Comment:

The function is defined in: 
php-5.2.4/sapi/apache/php_apache.c


Previous Comments:


[2007-09-06 22:25:43] [EMAIL PROTECTED]

In what directory is that file you patched? (there are 3 such files in
sources, iirc)



[2007-09-06 15:08:26] thomas dot hebinck at digionline dot de

... it works with soap (after patching the source) ;-)



[2007-09-06 14:15:15] thomas dot hebinck at digionline dot de

This will help:

diff -urw php_apache.c.original php_apache.c
--- php_apache.c.original   Sat Feb 24 03:17:28 2007
+++ php_apache.cThu Sep  6 15:58:12 2007
@@ -66,6 +66,7 @@
PHP_FE(apache_response_headers,
NULL)
PHP_FE(apache_get_version, 
NULL)
PHP_FE(apache_get_modules, 
NULL)
+   PHP_FE(apache_reset_timeout,   
NULL)
PHP_FALIAS(getallheaders, apache_request_headers, NULL)
{NULL, NULL, NULL}
 };

... but I don't know, if the function is really finished. 
At least doesn't seem to work with soap.



[2007-09-06 14:12:36] thomas dot hebinck at digionline dot de

Description:

The documented function apache_reset_timeout() does not exist.

Reproduce code:
---


Expected result:

nothing visible

Actual result:
--
PHP Fatal error:  Call to undefined function apache_reset_timeout()





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


#42582 [Opn->Bgs]: get_defined_vars does not show _SERVER

2007-09-07 Thread jani
 ID:   42582
 Updated by:   [EMAIL PROTECTED]
 Reported By:  thegreatall at gmail dot com
-Status:   Open
+Status:   Bogus
-Bug Type: Unknown/Other Function
+Bug Type: *General Issues
 Operating System: Windows XP Pro
 PHP Version:  5.2.4
 New Comment:

This is called "JIT". (look for auto_globals_jit in php.ini-dist for
example..)


Previous Comments:


[2007-09-07 02:46:16] thegreatall at gmail dot com

Sorry I forgot to say that I had this problem while running it under
IIS5 (ISAPI), I am not sure if it will reproduce the same in Apache; but
it doesn't happen in the command line.



[2007-09-07 02:41:51] thegreatall at gmail dot com

Description:

If I have code that does a simple print_r() on get_defined_vars() it
should echo out all the variables defined including _SERVER, however it
acts as if _SERVER does not even exist. If you put "$_SERVER;" anywhere
in the script it will act correct.

I have also found this problem exists very similer to _ENV also.

Reproduce code:
---


Expected result:

it should also show the _SERVER and _ENV vars, but it doesnt

Actual result:
--
does not display the _SERVER or _ENV vars.





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


#42592 [Opn->Csd]: wordwrap warning message contains and extra . in it

2007-09-07 Thread pajoye
 ID:   42592
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kraghuba at in dot ibm dot com
-Status:   Open
+Status:   Closed
 Bug Type: Strings related
 Operating System: linux, windows
 PHP Version:  5CVS-2007-09-07 (snap)
-Assigned To:  
+Assigned To:  pajoye
 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-09-07 16:46:20] kraghuba at in dot ibm dot com

Description:

warning message generated by wordwrap contains a extra . char when cut
= true and width = 0

applicable to php5 and php6

Reproduce code:
---
\n", true) );
?>

Expected result:

Warning: wordwrap(): Can't force cut when width is zero in %s on line
2
bool(false)


Actual result:
--
Warning: wordwrap(): Can't force cut when width is zero. in %s on line
2
bool(false)





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


#41562 [Opn->Asn]: Segmentation fault

2007-09-07 Thread jani
 ID:   41562
 Updated by:   [EMAIL PROTECTED]
 Reported By:  christian dot kaps at imaxx21 dot com
-Status:   Open
+Status:   Assigned
 Bug Type: SimpleXML related
 Operating System: Ubuntu 7.04 (Feisty)
 PHP Version:  5.2.3
-Assigned To:  helly
+Assigned To:  tony2001
 New Comment:

Antony, can you check this? (I can't reproduce it..)


Previous Comments:


[2007-09-07 11:57:13] christian dot kaps at imaxx21 dot com

I can`t test it. Currently we use the dom extension to fix this issue
in our sytem and i could only reproduce it there. With the single code
snippet I couldn`t reproduce the error.

Perhaps tony2001 can test it? He could reproduce it with the snippet.



[2007-09-07 09:46:52] [EMAIL PROTECTED]

Does this still happen with PHP 5.2.4?



[2007-06-08 01:15:59] [EMAIL PROTECTED]

FWIW, works for me on Linux Fedora 6, 5.2 CVS. Libxml is 2.6.28



[2007-06-07 12:19:18] [EMAIL PROTECTED]

It's assigned to the the maintainer.



[2007-06-07 12:14:29] christian dot kaps at imaxx21 dot com

>>A downgrade to version 5.2.2. fix this issue.
http://bugs.php.net/41562

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


#42548 [Com]: PROCEDURE xxx can't return a result set in the given context

2007-09-07 Thread al dot smith at aeschi dot ch dot eu dot org
 ID:   42548
 Comment by:   al dot smith at aeschi dot ch dot eu dot org
 Reported By:  garethjo at usc dot edu
 Status:   Open
 Bug Type: MySQLi related
 Operating System: Windows XP, Windows 2003
 PHP Version:  5.2.4
 New Comment:

I'm seeing this exact bug as well. Rolling back to 5.2.3 fixes the
problem.

For me, executing the CALL() statement within a mysql> client session
works just fine...


Previous Comments:


[2007-09-07 14:50:18] garethjo at usc dot edu

Yes I have seen those bugs and they are not what I am experiencing. Any
stored procedure that would normally return a resultset whether it be
the first or not produces the "PROCEDURE procedure.Name can't return a
result set in the given context" error not a lost connection.  In my
example code, the first query is just used to create the database table
and stored procedure. So even if it is separated out and ran separately
so that the bug test is in a separate file and runs by itself after the
database tables and proc are created, it will still produce the same
result even though it is the first proc that was run.



[2007-09-06 22:31:42] [EMAIL PROTECTED]

Have you seen bug #32882 and bug #35203 ??




[2007-09-05 00:10:23] garethjo at usc dot edu

real_connect('localhost', 'root', 'root_pass', 'test');
if (mysqli_connect_errno()) 
{
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$strDatabaseCreation = 'CREATE DATABASE IF NOT EXISTS test;
USE test;
DROP TABLE IF EXISTS `products`;
CREATE TABLE `products` (
  `intProductId` int(10) unsigned NOT NULL auto_increment,
  `strProductName` varchar(45) NOT NULL,
  `douProductPrice` double NOT NULL,
  `intQuantity` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`intProductId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `products`
(`intProductId`,`strProductName`,`douProductPrice`,`intQuantity`)
VALUES
 (1,\'Mugs\',10,5),
 (2,\'Boots\',75,12);

CREATE PROCEDURE `test`.`spGetProducts`()
BEGIN
  SELECT * FROM Products;
END
';
printf ("Connection: %s\r\n.", $mysqli->host_info);
if($mysqli->multi_query ($strDatabaseCreation))
{
print "Databse created successfully\r\n";
}
else
{
print "failed to create database\r\n".$mysqli->error;
$mysqli->close();
die;
}
$mysqli->close();

// BUG TEST START  --
$mysqli = mysqli_init();
$mysqli->real_connect('localhost', 'root', 'root_pass', 'test');
if (mysqli_connect_errno())
{
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
if($mysqli->real_query ("CALL spGetProducts();"))
{
if($objResult = $mysqli->store_result())
{
while($row = $objResult->fetch_assoc())
{
print $row["strProductName"]." 
".$row["strProductName"]."\r\n";
}
$objResult->free_result();
}
else
{
print "no results found";
}
}
else
{   
print $mysqli->error;
}
$mysqli->close();
?>



[2007-09-04 19:24:08] garethjo at usc dot edu

Description:

All stored procedure call which would return a result set (and did in
the past) produces the error 

"PROCEDURE procedure.Name can't return a result set in the given
context"

However the expected results are returned via command line and other
mysql clients.

Reproduce code:
---
test code can be found at:

http://128.125.64.37/bug.zip

Expected result:

resultset returned

Actual result:
--
PROCEDURE procedure.Name can't return a result set in the given context





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


#42490 [Fbk->Opn]: PHP will not compile with BIND 9 installed

2007-09-07 Thread jerry at scene-naturally dot dyndns dot org
 ID:   42490
 User updated by:  jerry at scene-naturally dot dyndns dot org
 Reported By:  jerry at scene-naturally dot dyndns dot org
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: OS X 10.4.10
 PHP Version:  5.2.4
 New Comment:

The log file is on its way.


Previous Comments:


[2007-09-07 09:44:51] [EMAIL PROTECTED]

We don't really need much from the resolv OR bind library (whichever is
found) in ext/standard/dns.c so I don't think you really _need_ BIND 9
to get all the goodies out of PHP. 

Anyway, I think this is more of a header issue anyway, conflict between
installed resolv.h and bind 9 header files.

Can you sent me the config.log file you get after configure?



[2007-09-06 14:46:22] jerry at scene-naturally dot dyndns dot org

No, there is only the one libbind file installed from the Bind 9 
Installation (9.4.1-p1), This is an update to the older files provided

by Apple.

It was compiled using the --enable-libbind option for apps such as 
Postfix that need this library. This option places the libbind into 
/usr/local/lib.

This is the only libbind file on the entire system.

The older Apple setup is done differently using 
/usr/lib/libresolv.9.dylib and /usr/lib/libresolv.dylib for the 
library files.

As I have mentioned, if you remove (safely -- by shutting down all 
apps that depend on the bind libraries and then move the libbind fiel 
out of the search path or not safely by just removing the libbind 
library file out of the search path) and then running configure for 
PHP, this will allow you to build PHP. But you do not get all of the 
benefits provided by the BIND files -- as far as I can tell, the 
configure app is not not really checking the older Apple resolv 
libraries for very much.



[2007-09-06 10:56:27] [EMAIL PROTECTED]

So you have multiple libbind.* around? AFAIK, this Macosx version comes
with bind 9, so why do you have to install bind 8??? (I'm very confused 
now..)

Are you able to try this with a clean system without any bind 8 libs
installed and without modifying anything, using PHP 5.2.4 from fresh
sources?




[2007-09-05 14:29:28] jerry at scene-naturally dot dyndns dot org

Hello Jani and thank you for taking a further look at this problem.

I tried the suggestion, but it did not work, running into a problem 
with dns. I have attached the output from running the make command.

/temp/php-5.2.4/ext/standard/dns.c: In function 'zif_dns_get_record':
/temp/php-5.2.4-copy/ext/standard/dns.c:673: error: 'HEADER' 
undeclared (first use in this function)
/temp/php-5.2.4/ext/standard/dns.c:673: error: 'hp' undeclared (first 
use in this function)
/temp/php-5.2.4/ext/standard/dns.c:674: error: parse error before 
'buf'
/temp/php-5.2.4/ext/standard/dns.c:778: error: 'QUERY' undeclared 
(first use in this function)
/temp/php-5.2.4/ext/standard/dns.c:778: error: 'C_IN' undeclared 
(first use in this function)
/temp/php-5.2.4/ext/standard/dns.c:778: error: 'buf' undeclared (first

use in this function)
/temp/php-5.2.4/ext/standard/dns.c:786: error: 'answer' undeclared 
(first use in this function)
/temp/php-5.2.4/ext/standard/dns.c:797: error: parse error before ')' 
token
/temp/php-5.2.4/ext/standard/dns.c: In function 'zif_dns_get_mx':
/temp/php-5.2.4/ext/standard/dns.c:865: error: 'HEADER' undeclared 
(first use in this function)
/temp/php-5.2.4/ext/standard/dns.c:865: error: 'hp' undeclared (first 
use in this function)
/temp/php-5.2.4/ext/standard/dns.c:894: error: 'C_IN' undeclared 
(first use in this function)
/temp/php-5.2.4/ext/standard/dns.c:901: error: parse error before ')' 
token
make: *** [ext/standard/dns.lo] Error 1

There is an un-safe method to get this to work. Before running 
Configure, just move the libbind.a library out of /usr/local/lib and 
then run configure, which will then not put any of the dependent bind 
stuff into the various makefiles, etc.

Jerry



[2007-09-05 10:31:18] [EMAIL PROTECTED]

Reopening, see bug #25955 

I think this must be the reason it fails on Macosx with bind 9.
Try delete the line with BIND_8_COMPAT in it from main/php_config.h
after running configure and before 'make'.




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

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


#42579 [Opn->Csd]: apache_reset_timeout() does not exist.

2007-09-07 Thread jani
 ID:   42579
 Updated by:   [EMAIL PROTECTED]
 Reported By:  thomas dot hebinck at digionline dot de
-Status:   Open
+Status:   Closed
 Bug Type: Apache related
 Operating System: Linux
 PHP Version:  5.2.4
 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-09-07 07:07:22] thomas dot hebinck at digionline dot de

The function is defined in: 
php-5.2.4/sapi/apache/php_apache.c



[2007-09-06 22:25:43] [EMAIL PROTECTED]

In what directory is that file you patched? (there are 3 such files in
sources, iirc)



[2007-09-06 15:08:26] thomas dot hebinck at digionline dot de

... it works with soap (after patching the source) ;-)



[2007-09-06 14:15:15] thomas dot hebinck at digionline dot de

This will help:

diff -urw php_apache.c.original php_apache.c
--- php_apache.c.original   Sat Feb 24 03:17:28 2007
+++ php_apache.cThu Sep  6 15:58:12 2007
@@ -66,6 +66,7 @@
PHP_FE(apache_response_headers,
NULL)
PHP_FE(apache_get_version, 
NULL)
PHP_FE(apache_get_modules, 
NULL)
+   PHP_FE(apache_reset_timeout,   
NULL)
PHP_FALIAS(getallheaders, apache_request_headers, NULL)
{NULL, NULL, NULL}
 };

... but I don't know, if the function is really finished. 
At least doesn't seem to work with soap.



[2007-09-06 14:12:36] thomas dot hebinck at digionline dot de

Description:

The documented function apache_reset_timeout() does not exist.

Reproduce code:
---


Expected result:

nothing visible

Actual result:
--
PHP Fatal error:  Call to undefined function apache_reset_timeout()





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


#42593 [NEW]: PHP's url_rewriter url encoding and html escaping behavior seems wrong

2007-09-07 Thread mickoz at parodius dot com
From: mickoz at parodius dot com
Operating system: All (PHP Behavior)
PHP version:  5.2.4
PHP Bug Type: Output Control
Bug description:  PHP's url_rewriter url encoding and html escaping behavior 
seems wrong

Description:

When using PHP's url_rewriter (with output_add_rewrite_var) I have noticed
it does this:
- It will urlencode() the value when rewriting an URL
- It will not urlencode() the name when rewriting an URL
- If we set it to write to form:
  - It will create input hidden field after the form tag.
  - It will urlencode() the value when writing the value in a form input
tag
  - It will not urlencode() the name when writing the name in a form input
tag
- On top of that, while writing this, I found it won't htmlspecialchars()
what it write (in no case) // which is probably why we need to change the
arg_separator.output like this "ini_set('arg_separator.output', '&');"

Someone using a name, value pair that don't contain any html or url
special characters won't notice anything.  However, if we use special
characters in any of these, that can cause some problems.

For now it looks like we should avoid special character in name or value
and maybe there is reason for this behavior beyond what I am thinking right
now.  But I believe it should be fixed right.

Also unfortunately doing an htmlspecialchars "smart" encoding might get
problematic, since a lot of people probably use the "arg_separator.output =
&" hack for XHTML compliance... it won't be a smart idea to
automaticelly make it looks like & (after html escaping it). (if my
ideas get implemented, then there will need to be a way to guide this
behavior while staying backward compatible...)


Exemple #1:



linkname






will output this:


linkname






while I would expect:


linkname






Exemple #2: (with html special characters)



linkname






will output this:


linkname






while I would expect:


linkname






Resume of the behavior I would expect (written in notes+pseudo/php code)


- When rewriting an URL, append to the original url (that one should have
been espaced properly by the user):
  - "?" if not defined (already doing this)
  -
htmlspecialchars(urlencode($name1).'='.urlencode($value1).'&'.urlencode($name2).'='.urlencode($value2)).'&'...)
where '&' is the argument separator (and if doing so, we won't need to
put html in an arg separator value!!! which at first did not make sense,
even thought there is maybe reason, especially now that people rely on
it...).
- urlencode the name and the value
- html escape what we output (since they are always in html value
zone)

- When adding input type=hidden fields
  - 
  - no url escaping, should not be done here!
- html escape the name and value as it should be

// there is maybe details that I forgot, but that is a good start and I
can always help think further (and validate the logic) if someone handle
this case


Notes:


- The problem I got when submitting this bug is that I was using
urlrewriter to write a value like "N/A".  It did add input hidden field in
my forms and one of my form has method="get".  When submitting a form in
method=get, it does escape the form's input value... and since it was
already escaped... the value was escaped twice (which make it impossible to
use that kind of value in that context, unless we add hack around it...)
  example:
  output_add_rewrite_var("var", "N/A");
  become:
  
  then become in URL after submitting the form:
  N%252FA
  (because % get escaped to %25)

- A solution is to never use special characters for name and value when
using php urlrewriter, but still it doesn't feel logical (unless it can
apply to other usage that I am not aware of)

- Another solution might be to write my own output handler

- I believe these kind of thing is at the origin of other related problem
(or "hack" to fix it in PHP) and that fixing it there will avoid need like
needing to change the arg separator with html in it (again there is
probably stuff I don't know which render this impossible, but maybe not)

Hope that help and that will improve thing (or that I will simply
understand why all these behaviors)


-- 
Edit bug report at http://bugs.php.net/?id=42593&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42593&r=trysnapshot44
Try a CVS snapshot (PHP 5.

#22475 [Com]: Include() not limited in safe mode

2007-09-07 Thread ltworf at galileo dot dmi dot unict dot it
 ID:   22475
 Comment by:   ltworf at galileo dot dmi dot unict dot it
 Reported By:  oliver at summertime dot net
 Status:   No Feedback
 Bug Type: Filesystem function related
 Operating System: Linux
 PHP Version:  4.3.0
 New Comment:

I am using PHP Version 4.4.4-8+etch4 and i am experiencing a similar 
problem.
When i open a file with readfile(), safe mode doesn't allow me to 
open the file only if it is contained in a directory with a 
different UID.
If the script and the file to open are owned by different users but 
are located in the same directory, or the file to open is located in 
a directory owned by the same user of the script, i'll be able to 
read the file.


Previous Comments:


[2003-03-09 19:19:40] [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.





[2003-02-28 11:00:46] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

Unable to replicate with latest CVS.



[2003-02-28 07:17:12] oliver at summertime dot net

Hi,

in PHP 4.2.2 I get the following error when I want to include
'/etc/passwd':

Warning: SAFE MODE Restriction in effect. The script whose uid is 500
is not allowed to access /etc/passwd owned by uid 0 in
/home/httpd/htdocs/i.php on line 4

Warning: Failed opening '/etc/passwd' for inclusion
(include_path='.:/usr/local/lib/php') in /home/httpd/htdocs/i.php on
line 4

I just upgraded to PHP 4.3.0 and the file will be included without any
error message!

readfile() performs right:

Warning: readfile() [function.readfile]: SAFE MODE Restriction in
effect. The script whose uid is 500 is not allowed to access /etc/passwd
owned by uid 0 in /home/httpd/htdocs/i.php on line 4

Warning: readfile(/etc/passwd) [function.readfile]: failed to create
stream: Inappropriate ioctl for device in /home/httpd/htdocs/i.php on
line 4




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


#42528 [Opn]: Out of "char"(8-bit) range value doesn't roll back, with uni-code ON.

2007-09-07 Thread mahesh dot vemula at in dot ibm dot com
 ID:   42528
 User updated by:  mahesh dot vemula at in dot ibm dot com
 Reported By:  mahesh dot vemula at in dot ibm dot com
 Status:   Open
 Bug Type: Performance problem
 Operating System: RHEL4
 PHP Version:  6CVS-2007-09-03 (CVS)
 New Comment:

Samething is happening for strncasecmp() function also.


Previous Comments:


[2007-09-03 11:53:31] mahesh dot vemula at in dot ibm dot com

Description:

The character(8-bit) range of value does not roll back to the
corresponding minimum value, once the value reaches beyond the range of
a char(8-bit) that it can hold, when Unicode is ON.


Reproduce code:
---
--TEST--
--FILE--

--EXPECTF--


Expected result:

unicode(8) ""
unicode(1) "0"
unicode(1) "1"

Actual result:
--
unicode(8) ""
unicode(9) "1"
unicode(9) "10001"





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


#42592 [NEW]: wordwrap warning message contains and extra . in it

2007-09-07 Thread kraghuba at in dot ibm dot com
From: kraghuba at in dot ibm dot com
Operating system: linux, windows
PHP version:  5CVS-2007-09-07 (snap)
PHP Bug Type: Strings related
Bug description:  wordwrap warning message contains and extra . in it

Description:

warning message generated by wordwrap contains a extra . char when cut =
true and width = 0

applicable to php5 and php6

Reproduce code:
---
\n", true) );
?>

Expected result:

Warning: wordwrap(): Can't force cut when width is zero in %s on line 2
bool(false)


Actual result:
--
Warning: wordwrap(): Can't force cut when width is zero. in %s on line 2
bool(false)

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


#42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)

2007-09-07 Thread ando at sys-net dot it
 ID:   42060
 Comment by:   ando at sys-net dot it
 Reported By:  iarenuno at eteo dot mondragon dot edu
 Status:   No Feedback
 Bug Type: LDAP related
 Operating System: Any
 PHP Version:  5.2.3
 Assigned To:  jani
 New Comment:

A working patch with test examples lined up to HEAD as of 5 minutes ago
is available here



I'm the original developer, and I'm willing to cooperate in integrating
it, if needed.  So you can re-open the bug now.

p.


Previous Comments:


[2007-09-07 14:59:29] ando at sys-net dot it

Yes, so many functions are needed to support generic stuff + dozens of
well-known, RFC/I.D. based LDAP controls and extended operations,
without code duplication.  Any developer would agree.



[2007-09-07 14:57:40] ando at sys-net dot it

Be serious: the patch applies back up to PHP 4 (the last time an update
occurred to LDAP support).



[2007-08-04 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-07-27 05:06:27] [EMAIL PROTECTED]

Ok, but let's keep this in "Feedback" status until that then.



[2007-07-26 13:47:12] iarenuno at eteo dot mondragon dot edu

I'll have a look at the issues you mention and will be back in a couple
of days.

Saludos. Iñaki.



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

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


#40694 [Fbk]: __call() does not allow passing args by reference

2007-09-07 Thread tony2001
 ID:  40694
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
 Status:  Feedback
-Bug Type:Scripting Engine problem
+Bug Type:Feature/Change Request
 PHP Version: 5CVS-2007-03-02 (CVS)
 New Comment:

I don't see how it is possible without forcing the reference OR having
a method like __callByRef(), which makes little sense to me.


Previous Comments:


[2007-09-04 19:59:54] [EMAIL PROTECTED]

You're forcing a call-time reference. How is this going to help when
call-time reference stuff is deprecated?



[2007-08-31 12:13:24] [EMAIL PROTECTED]

test(&$v); //NB 2 

var_dump($v);
?>

This code results in:
str
5
int(5)

So I believe this report can be closed.



[2007-03-02 17:51:47] [EMAIL PROTECTED]

Summary from IRC:

This should be fixable by selectively populating arg_info in
zend_std_get_method() with a structure that turns on the pass rest by
ref flag.   That'll tell the macros in zend_vm_def.h to send the
arguments by reference.  From there, you might need to modify
zend_std_call_user_call() a little bit where it's building the args
array... (Havn't looked close enough to be sure)

While addressing this, you should look at the return value as well,
again this should be a minor matter of checking the __call
implementation and flipping the return type in zend_std_get_method()...



[2007-03-02 17:27:59] [EMAIL PROTECTED]

Description:

__call() method does not allow specifying the arguments array by
reference. Essentially this means that there is no way to return
modified arguments when using overloading.

Reproduce code:
---
class Foo {
function __call($method, &$args)
{
print $args[0]."\n";
$args[0] = 5;
print $args[0]."\n";
return true;
}
}

$v = 'str';

$o = new Foo();
$o->test($v);

var_dump($v);


Expected result:

str
5
int(5)


Actual result:
--
str
5
string(3) "str"






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


#42591 [Com]: wordwrap doesn't generate warning message when width is given as -ne or 0 value

2007-09-07 Thread crrodriguez at suse dot de
 ID:   42591
 Comment by:   crrodriguez at suse dot de
 Reported By:  kraghuba at in dot ibm dot com
 Status:   Open
 Bug Type: Strings related
 Operating System: linux, windows
 PHP Version:  5CVS-2007-09-07 (snap)
 New Comment:

In case this is considered a bug ( IMHO it should emit such warning)

fix:

http://www.kissofjudas.net/patches/wordwrap.patch


Previous Comments:


[2007-09-07 16:30:30] kraghuba at in dot ibm dot com

Description:

wordwrap() doesn't generate warning message when width argument is
given  as a negative or zero value. 

this is applicable to php5 and php6.

Reproduce code:
---
\n") );
 var_dump( wordwrap($text, -1 , "\n") );

 var_dump( wordwrap($text, 0) );
 var_dump( wordwrap($text, -1) );
?>

Expected result:

warning messages should be generated

Actual result:
--
string(85) "The
quick
brown
fox
jumped
over
the
lazy
dog."
string(93) "The
quick
brown
fox
jumped
over
the
lazy
dog."
string(45) "The
quick
brown
fox
jumped
over
the
lazy
dog."
string(45) "The
quick
brown
fox
jumped
over
the
lazy
dog."





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


#42595 [NEW]: Static call of non static function inherets class

2007-09-07 Thread agideonse at planet dot nl
From: agideonse at planet dot nl
Operating system: Irrelevant
PHP version:  5.2.4
PHP Bug Type: Class/Object related
Bug description:  Static call of non static function inherets class

Description:

When a function in a class is not declared static it can still be called
as a static method (no problem). When this is done from another class the
function seems to know the values from the class that it was called from.
It is not clarified in the manual why this should be the case ($this is
bound to class A, not class B) if this isn't a bug.

Reproduce code:
---
class A
{
   function __construct()
   {
  $this->name = "Class A";
   }

   function doeIets()
   {
  B::doeIetsAnders();
   }
}

class B
{
   function doeIetsAnders()
   {
  print_r($this);
   }
} 

Expected result:

In strict mode, there should be a warning that $this does not have a
value.

Actual result:
--
$this has te values of class A. 

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


#40479 [Com]: zend_mm_heap corrupted

2007-09-07 Thread danny at dannysplace dot net
 ID:   40479
 Comment by:   danny at dannysplace dot net
 Reported By:  rrossi at maggioli dot it
 Status:   No Feedback
 Bug Type: Reproducible crash
 Operating System: Suse Linux 9.0
 PHP Version:  5.2.1
 New Comment:

I have the same problem when trying to run a fresh version of Horde
with Kronolith module.

Php v5.2.3 on FreeBSD 6.2 nad apache 2.0.59.


Previous Comments:


[2007-08-16 08:03:54] rz at lightwerk dot com

I have the same error message in my apache logs with PHP 5.2.3
zend_mm_heap corupted. I tried to track it down to a specific code but
it seems to be a problem with included files (classes) which exceeds a
specific size. No matter which lines I delete in my script as long as
they don´t excess about 700 lines they work. As soon as the overall
lines exceed about 700 lines the error occurs again. Hope this will help
you to fix the problem.



[2007-07-03 23:32:55] giampaolo at tomassoni dot biz

I'm experiencing the very same problem reported by rocker_pr.

It seems to me that this problem is triggered by using PHP5 classes,
but I can't provide a small testcase: no small code seems affected.



[2007-04-26 14:11:47] christian dot kaps at imaxx21 dot com

Hi
 
I get the same message in my logs. I can reproduce the error in our
system, but it is impossible to locate it. Sometimes I can reproduce the
error by editing a comment. I add a character and the error occurs. I
remove the character and the script runs perfectly. Each time I try to
isolate the error I can reproduce it with an other action.

That what i could isolate is:
-load xml file with simplexml
-add a node
-clone the object
-process xpath query
-print the object with print_r
-serialize the object
-include a file (the error occurs)

When I edit the included file. E.g. remove methods or properties the
script runs without errors. That is funny(o;

Version: 5.2.1
Os: ubuntu



[2007-04-17 14:04:58] [EMAIL PROTECTED]

We still don't have zero info on how to reproduce it.



[2007-04-17 13:48:09] mrfree at infinito dot it

Same problem here.

I'm trying to use horde-imp but "zend_mm_heap corrupted" problem occurs
when I open admin/setup/config.php?app=imp to configure the app and the
browser offers to download config.php file.

Please devs give us a working patch :)



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

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


#42594 [NEW]: fopen doesn't work with ocfs2 cdsl

2007-09-07 Thread i dot dastolfo at smart dot it
From: i dot dastolfo at smart dot it
Operating system: Linux
PHP version:  5.2.4
PHP Bug Type: *Directory/Filesystem functions
Bug description:  fopen doesn't work with ocfs2 cdsl

Description:

The fopen function (and maybe other filesystem related functions) can't
handle CDSL files/directories.
CDSL stands for context dependent symbolic link and it's a feature of
Oracle Cluster FileSystem 2 (OCFS2).
While fopen works fine with regular files and directory inside an OCFS2 
filesystem, gives "failed to open stream: No such file or directory" for 
CDSL files. 

Reproduce code:
---
make a OCFS2 filesystem (you can setup it even with 1 node).
Create a regular file (touch test)
Transform it in a cdsl file (ocfs2cdsl -t hostname -c test)
fopen("test","w"); => Warning: fopen(test) [function.fopen]: failed to
open stream: No such file or directory in ...


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


#42596 [NEW]: session.save_path MODE option will not set "write" bit for group or world

2007-09-07 Thread randy at rcs-comp dot com
From: randy at rcs-comp dot com
Operating system: Linux
PHP version:  5.2.4
PHP Bug Type: Session related
Bug description:  session.save_path MODE option will not set "write" bit for 
group or world

Description:

When using the mode parameter in session_save_path (or presumably
session.save_path) it will not set the "write" bit correctly for anyone but
the owner of the file.  Read and execute bits are set correctly.

This is important b/c I would like to setguid on the session directory so
that a non-priveleged user (the website reseller) can clean it out.  That
way, all I have to do is add apache to the user's group, and no more
problems with clearing out sessions.

Reproduce code:
---


// delete the session file just created



// delete the session file just created





Expected result:

[EMAIL PROTECTED] sessions]# ls -l
total 0
-rw---  1 apache apache 0 Sep  7 23:30 sess_b1fb...

[EMAIL PROTECTED] sessions]# ls -l
total 0
-rw-rw  1 apache apache 0 Sep  7 23:31 sess_b1fb...

[EMAIL PROTECTED] sessions]# ls -l
total 0
-rwxrwxrwx  1 apache apache 0 Sep  7 23:40 sess_b1fb...

Actual result:
--
[EMAIL PROTECTED] sessions]# ls -l
total 0
-rw---  1 apache apache 0 Sep  7 23:30 sess_b1fb...

[EMAIL PROTECTED] sessions]# ls -l
total 0
-rw-r-  1 apache apache 0 Sep  7 23:31 sess_b1fb...
^^ <  Permission does not have write bit

[EMAIL PROTECTED] sessions]# ls -l
total 0
-rwxr-xr-x  1 apache apache 0 Sep  7 23:40 sess_b1fb...
^^ <  Permission does not have write bits

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