#46952 [Com]: mysqlnd compile failure with suncc

2009-07-02 Thread dg at artegic dot de
 ID:   46952
 Comment by:   dg at artegic dot de
 Reported By:  dg at artegic dot de
 Status:   No Feedback
 Bug Type: MySQL related
 Operating System: Solaris 10
 PHP Version:  5.3CVS-2008-12-27 (snap)
 Assigned To:  mysql
 New Comment:

Same error with php 5.3.0, suncc:

ext/mysqlnd/mysqlnd_ps_codec.c -o ext/mysqlnd/mysqlnd_ps_codec.lo 
"xxx/php-5.3.0/ext/mysqlnd/mysqlnd.h", line 381: warning: syntax 
error:  empty declaration
"xxx/php-5.3.0/ext/mysqlnd/mysqlnd_ps_codec.c", line 82: undefined 
symbol: MYSQLND_LLU_SPEC
"xxx/php-5.3.0/ext/mysqlnd/mysqlnd_ps_codec.c", line 82: warning: 
improper pointer/integer combination: arg #2
"xxx/php-5.3.0/ext/mysqlnd/mysqlnd_ps_codec.c", line 90: undefined 
symbol: MYSQLND_LLU_SPEC
"xxx/php-5.3.0/ext/mysqlnd/mysqlnd_ps_codec.c", line 90: warning: 
improper pointer/integer combination: arg #2
"xxx/php-5.3.0/ext/mysqlnd/mysqlnd_ps_codec.c", line 111: undefined 
symbol: MYSQLND_LL_SPEC
"xxx/php-5.3.0/ext/mysqlnd/mysqlnd_ps_codec.c", line 111: warning: 
improper pointer/integer combination: arg #2
cc: acomp failed for /home/remote/compile/php-
5.3.0/ext/mysqlnd/mysqlnd_ps_codec.c
*** Error code 1
make: Fatal error: Command failed for target 
`ext/mysqlnd/mysqlnd_ps_codec.lo'


Previous Comments:


[2009-06-29 01:00:01] php-bugs at lists dot php dot net

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



[2009-06-22 00:22:50] d...@php.net

Please try using this CVS snapshot:

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

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





[2008-12-27 11:40:01] dg at artegic dot de

Description:

Using Sun Studio 12 C Compiler including latest bugfixes with Solaris 
10/x86 on a Sun Fire X2200 M2 (2 Dual Core AMD Opteron).

Configure script runs with no failures/warnings. If (and only if) 
using --with-mysql=mysqlnd compiling fails:

/bin/sh .../libtool --silent --preserve-dup-deps --mode=compile cc  -
Iext/mysqlnd/ -I.../ext/mysqlnd/ -DPHP_ATOM_INC -I.../include -
I.../main -I... -I.../ext/ereg/regex -I/opt/csw/include/libxml2 -
I/opt/csw/include -I.../ext/date/lib -I/opt/csw/include/freetype2 -
I.../ext/mbstring/oniguruma -I.../ext/mbstring/libmbfl -
I.../ext/mbstring/libmbfl/mbfl -I/usr/include/libxml2 -I.../TSRM -
I.../Zend  -D_POSIX_PTHREAD_SEMANTICS  -I/opt/csw/include -fsimple=2 -
xnorunpath -xO4 -xalias_level=basic -xipo=1 -xlibmopt -
xprefetch_level=1 -xprefetch=auto -xstrconst -xtarget=native -
zlazyload -DZTS   -c .../ext/mysqlnd/mysqlnd_ps_codec.c -o 
ext/mysqlnd/mysqlnd_ps_codec.lo 
".../ext/mysqlnd/mysqlnd.h", line 372: warning: syntax error:  empty 
declaration
".../ext/mysqlnd/mysqlnd_ps_codec.c", line 82: undefined symbol: 
MYSQLND_LLU_SPEC
".../ext/mysqlnd/mysqlnd_ps_codec.c", line 82: warning: improper 
pointer/integer combination: arg #2
".../ext/mysqlnd/mysqlnd_ps_codec.c", line 90: undefined symbol: 
MYSQLND_LLU_SPEC
".../ext/mysqlnd/mysqlnd_ps_codec.c", line 90: warning: improper 
pointer/integer combination: arg #2
".../ext/mysqlnd/mysqlnd_ps_codec.c", line 111: undefined symbol: 
MYSQLND_LL_SPEC
".../ext/mysqlnd/mysqlnd_ps_codec.c", line 111: warning: improper 
pointer/integer combination: arg #2
cc: acomp failed for .../ext/mysqlnd/mysqlnd_ps_codec.c
*** Error code 1
make: Fatal error: Command failed for target 
`ext/mysqlnd/mysqlnd_ps_codec.lo'







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



#48763 [Opn]: ZipArchive produces corrupt OpenOffice.org files

2009-07-02 Thread dani dot church at gmail dot com
 ID:   48763
 User updated by:  dani dot church at gmail dot com
 Reported By:  dani dot church at gmail dot com
 Status:   Open
 Bug Type: Zip Related
 Operating System: CentOS 5
 PHP Version:  5.2CVS-2009-07-01 (snap)
 New Comment:

You're absolutely right, that's the file with the bug.  Both PHP 5.2.6
and 5.2.8+ produce malformed ZIP files, in slightly different ways,
though only when UPDATING (not creating from scratch) ZIP files.  The
zip library does not write optional data descriptors, even if the input
file has them.  In 5.2.6, the "data descriptor exists" flag is set, even
though there is no data descriptor.  In 5.2.8+, the flag is (properly)
cleared in the local file header, but not in the central directory. 
OpenOffice.org tolerates the bug in 5.2.6 but not the one in 5.2.8+.  A
patch to fix this bug (and another minor bug I found in the same area)
follows:

--- ext/zip/lib/zip_close.c.orig2009-07-02 21:40:03.0
-0400
+++ ext/zip/lib/zip_close.c 2009-07-02 22:24:54.0 -0400
@@ -175,6 +175,7 @@
de.filename = strdup("-");
de.filename_len = 1;
cd->entry[j].filename = "-";
+   cd->entry[j].filename_len = 1;
}
else {
de.filename = strdup(za->cdir->entry[i].filename);
@@ -195,13 +196,14 @@
error = 1;
break;
}
+   memcpy(cd->entry+j, za->cdir->entry+i,
sizeof(cd->entry[j]));
if (de.bitflags & ZIP_GPBF_DATA_DESCRIPTOR) {
de.crc = za->cdir->entry[i].crc;
de.comp_size = za->cdir->entry[i].comp_size;
de.uncomp_size = za->cdir->entry[i].uncomp_size;
de.bitflags &= ~ZIP_GPBF_DATA_DESCRIPTOR;
+   cd->entry[j].bitflags &= ~ZIP_GPBF_DATA_DESCRIPTOR;
}
-   memcpy(cd->entry+j, za->cdir->entry+i,
sizeof(cd->entry[j]));
}
 
if (za->entry[i].ch_filename) {


Previous Comments:


[2009-07-02 22:52:00] ras...@php.net

I don't know this code at all, but just poking around in CVS I would
say the most likely change that is able to cause those differences is
this one:

http://cvs.php.net/viewvc.cgi/php-src/ext/zip/lib/zip_close.c?r1=1.1.2.9&r2=1.1.2.12&sortby=date







[2009-07-02 22:35:22] dani dot church at gmail dot com

Here's a binary diff of the two zip files.  Summary: 5 places where an
0x08 byte changed to 0x00, and two places where an 0x06 byte changed to
0x44.  Given the values of comp_method in the stat calls, my wild guess
is that comp_method somehow does not get stored properly in 5.2.8+.  I
don't know the code, though.

If necessary, I can host the original files on my server for download.

--- empty-5.2.6.xxd 2009-07-02 18:27:28.0 -0400
+++ empty-5.2CVS2009-07-01.xxd  2009-07-02 18:27:28.0 -0400
@@ -7,7 +7,7 @@
 060: e23a       1a00  .:..
 070:  436f 6e66 6967 7572 6174 696f 6e73  ..Configurations
 080: 322f 7374 6174 7573 6261 722f 504b 0304  2/statusbar/PK..
-090: 1400 0808 0800 00b3 e23a   0200  .:..
+090: 1400 0008 0800 00b3 e23a   0200  .:..
 0a0:    2700  436f 6e66 6967  ..'...Config
 0b0: 7572 6174 696f 6e73 322f 6163 6365 6c65  urations2/accele
 0c0: 7261 746f 722f 6375 7272 656e 742e 786d  rator/current.xm
@@ -32,7 +32,7 @@
 1f0:  b3e2 3a00       :...
 200: 001f  0043 6f6e 6669 6775 7261 7469  .Configurati
 210: 6f6e 7332 2f69 6d61 6765 732f 4269 746d  ons2/images/Bitm
-220: 6170 732f 504b 0304 1400 0808 0800 00b3  aps/PK..
+220: 6170 732f 504b 0304 1400 0008 0800 00b3  aps/PK..
 230: e23a 8d6c f030 aa05  3619  0a00  .:.l.06.
 240:  7374 796c 6573 2e78 6d6c dd59 6d6f  ..styles.xml.Ymo
 250: db36 10fe be5f 2128 43b1 0293 253b 6913  .6..._!(C...%;i.
@@ -171,7 +171,7 @@
 aa0: 6765 6e65 7261 746f 723e 3c2f 6f66 6669  generator>P
-ad0: 4b03 0414 0008 0808  b3e2 3a70 6c4c  K...:plL
+ad0: 4b03 0414  0808  b3e2 3a70 6c4c  K...:plL
 ae0: 647b  00f8 0200 0018  0054 6875  d{...Thu
 af0: 6d62 6e61 696c 732f 7468 756d 626e 6169  mbnails/thumbnai
 b00: 6c2e 706e 67eb 0cf0 73e7 e592 e262 6060  l.png...sb``
@@ -182,7 +182,7 @@
 b50: c112 c939 26cd 93d3 0a2e f1f8 cd3a e869  ...9&:.i
 b60: 6c91 392a 382a 38e0 82b7 582f 7e64 fb77  l.9*8*8...X/~d.w
 b70: 4d82 b51b 94a2 3d5d fd5c d639 2534 0100  M.=].\.9%4..
-b80: 504b 0304 1400 0808 0800 00b3 e23a 2124  PK...:!$
+b80: 504b 0304 1400 0008 0800 00b3 e23a 2124  PK...:!$
 b90: 3734 8e0

#48768 [Opn]: parse_ini_file() crash with INI_SCANNER_RAW

2009-07-02 Thread scottmac
 ID:   48768
 Updated by:   scott...@php.net
 Reported By:  ahar...@php.net
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux x86
 PHP Version:  5.3CVS-2009-07-02 (CVS)
 New Comment:

I can reproduce this though I'm curious why re2c isn't picking this
up.

We have
{RAW_VALUE_CHARS}+ {

And RAW_VALUE_CHARS is
RAW_VALUE_CHARS [^=\n\r;]

So that code shouldn't even be executing, i'll need to look at it some
more.


Previous Comments:


[2009-07-02 21:57:39] j...@php.net

Thanks for not reporting this before release..



[2009-07-02 07:04:35] ahar...@php.net

Description:

parse_ini_file() crashes in INI_SCANNER_RAW mode if a configuration
item consists solely of an equals sign.

Reproduce code:
---
INI file contents:

equal = "="


PHP script:

$ini = parse_ini_file('equals.ini', false, INI_SCANNER_NORMAL);
var_dump($ini);

$ini = parse_ini_file('equals.ini', false, INI_SCANNER_RAW);
var_dump($ini);


Expected result:

array(1) {
  ["equal"]=>
  string(1) "="
}
array(1) {
  ["equal"]=>
  string(1) "="
}

Actual result:
--
array(1) {
  ["equal"]=>
  string(1) "="
}
Segmentation fault (core dumped)


gdb backtrace:

#0  0xb75f58b1 in memcpy () from /lib/tls/i686/cmov/libc.so.6
#1  0x083d5e5b in zend_strndup (s=0xb7f14009 , length=3086171320) at /usr/include/bits/string3.h:52
#2  0x083d1b21 in ini_lex (ini_lval=0xbf9321d8) at
Zend/zend_ini_scanner.l:343
#3  0x083cf9fe in ini_parse () at
/h/aharvey/trees/php5/Zend/zend_ini_parser.c:1557
#4  0x083cfe91 in zend_parse_ini_file (fh=0xbf9322d0,
unbuffered_errors=0 '\0', scanner_mode=1, ini_parser_cb=0x8320f20
, arg=0xa29d148) at
/h/aharvey/trees/php5/Zend/zend_ini_parser.y:206
#5  0x0831f829 in zif_parse_ini_file (ht=3, return_value=0xa29d148,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at
/h/aharvey/trees/php5/ext/standard/basic_functions.c:5937
#6  0x08412a12 in execute_internal (execute_data_ptr=0xa2cddd8,
return_value_used=1) at /h/aharvey/trees/php5/Zend/zend_execute.c:1256
#7  0xb728dab0 in xdebug_execute_internal
(current_execute_data=0xa2cddd8, return_value_used=1) at
/tmp/pear/temp/xdebug/xdebug.c:1630
#8  0x0843c9af in zend_do_fcall_common_helper_SPEC
(execute_data=0xa2cddd8) at
/h/aharvey/trees/php5/Zend/zend_vm_execute.h:315
#9  0x0841a08e in execute (op_array=0xa29c554) at
/h/aharvey/trees/php5/Zend/zend_vm_execute.h:104
#10 0xb728d734 in xdebug_execute (op_array=0xa29c554) at
/tmp/pear/temp/xdebug/xdebug.c:1561
#11 0x083f12f6 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /h/aharvey/trees/php5/Zend/zend.c:1188
#12 0x0839f610 in php_execute_script (primary_file=0xbf9348f4) at
/h/aharvey/trees/php5/main/main.c:2196
#13 0x08476002 in main (argc=2, argv=0xbf934a54) at
/h/aharvey/trees/php5/sapi/cli/php_cli.c:1188





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



#38915 [Opn->Ana]: Apache: system() (and similar) don't cleanup opened handles of Apache

2009-07-02 Thread rasmus
 ID:   38915
 Updated by:   ras...@php.net
 Reported By:  dimmoborgir at gmail dot com
-Status:   Open
+Status:   Analyzed
 Bug Type: Feature/Change Request
 Operating System: UNIX
 PHP Version:  5.2.2, 4.4.7
 New Comment:

This is finally fixed in Apache now.

https://issues.apache.org/bugzilla/show_bug.cgi?id=46425

It really is the responsibility of initiator of an fd to set the
O_CLOEXEC flag on it.  Going back and trying to do it after the fact is
really messy because we don't have direct access to these fds.  Since I
can't think of a portable way to get a list of all open fds, we would
have to pick some arbitrary number and loop through and set FD_CLOEXEC
on the first N fds.

Something like this:

Index: ext/standard/exec.c
===
RCS file: /repository/php-src/ext/standard/exec.c,v
retrieving revision 1.113.2.3.2.13
diff -u -r1.113.2.3.2.13 exec.c
--- ext/standard/exec.c 30 Apr 2009 15:25:05 -  1.113.2.3.2.13
+++ ext/standard/exec.c 3 Jul 2009 00:35:25 -
@@ -101,6 +101,17 @@
sig_handler = signal (SIGCHLD, SIG_DFL);
 #endif
 
+#if defined(F_SETFD) && defined(FD_CLOEXEC)
+   {
+   int i, oldflags;
+   for(i=0; i<10; i++) {
+   oldflags = fcntl(i, F_GETFD, 0);
+   oldflags |= FD_CLOEXEC;
+   fcntl(i, F_SETFD, oldflags);
+   }
+   }
+#endif
+
 #ifdef PHP_WIN32
fp = VCWD_POPEN(cmd_p, "rb");
 #else

and something similar would have to be done in the other places we
fork, like in mail().  This is extremely ugly, as far as I am concerned,
and likely doesn't catch everything anyway.

If someone sees a clean way of fixing this that I have missed, please
let us know.  Otherwise I would encourage you to upgrade your Apache or
lean on whatever web server you are using that is passing dirty fds to
us.



Previous Comments:


[2009-06-25 16:07:50] virus at tgu dot ru

OMG...
It's still didn't fixed... :(



[2008-08-26 13:08:53] anomie at users dot sf dot net

It seems that it could easily be fixed by having mod_php use the
Apache-provided functions which are intended to solve exactly this
problem, but the PHP developers seem to have decided to ignore this bug
instead.

Rather than a cron script, use a trampoline program like the one posted
by jeroen at unfix dot org; we have something similar here, although
ours doesn't impose an arbitrary run time limit.



[2008-08-20 13:28:45] peterspoon at abv dot bg

SO, can this problem be fixed within PHP/Apache or it cannot?
Do you think using funny scripts started by cron is a solution?



[2008-05-27 15:12:09] jeroen at unfix dot org

My solution to this very annoying issue (especially when Apache is
reloaded and the from PHP spawned app is still running and your
webserver thus simply dies off as the apache processes are gone, but the
spawned app keeps port 80 etc open for you, thus making Apache never
start again...

http://unfix.org/~jeroen/archive/closedexec.c

Compile: cc -o /usr/bin/closedexec closedexec.c

Just call it like: system("/usr/bin/closedexec /path/to/exe arg arg
arg") or whatever call you where using in PHP.

It first closes all sockets !1|!2 (stdout/stderr), setsid()'s, forks,
and then execv's the args given, doing a waitpid() in the other thread
and killing the process when it runs longer than 5 minutes.



[2008-04-30 00:06:18] support at ppnhosting dot com

5.2.3
also experiencing this 'bug' to the point of having to manually kill
Exim to just Apache restarted.. the mail() function is suffering from
the same problem. It is very annoying to see Apache failing to 
restart, because the MTA (exim via sendmail in our case) is already 
listening on port *:80



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

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



#48770 [Opn->Ver]: call_user_func_array fails to call parent from inheriting class

2009-07-02 Thread kalle
 ID:   48770
 Updated by:   ka...@php.net
 Reported By:  lumeet at yahoo dot com
-Status:   Open
+Status:   Verified
 Bug Type: Reproducible crash
-Operating System: Windows XP SP3
+Operating System: *
 PHP Version:  5.3CVS-2009-07-02 (snap)


Previous Comments:


[2009-07-02 07:38:03] sjoerd-php at linuxonly dot nl

Thank you for your bug report. I could reproduce it and added some more
data:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7d03b80 (LWP 6726)]
0x082dee15 in zend_is_callable_ex (callable=0x9e3cdc0, object_ptr=0x0,

check_flags=0, callable_name=0x0, callable_name_len=0x0,
fcc=0xbf49d190, 
error=0xbf49d0e8) at
/home/sjoerd/dev/php/trunk/php5/Zend/zend_API.c:2624
2624{
#0  0x082dee15 in zend_is_callable_ex (callable=0x9e3cdc0,
object_ptr=0x0, 
check_flags=0, callable_name=0x0, callable_name_len=0x0,
fcc=0xbf49d190, 
error=0xbf49d0e8) at
/home/sjoerd/dev/php/trunk/php5/Zend/zend_API.c:2624
#1  0x082df489 in zend_fcall_info_init (callable=0x9e3cdc0,
check_flags=0, 
fci=0xbf49d16c, fcc=0xbf49d190, callable_name=0x0,
error=0xbf49d0e8)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_API.c:2858
#2  0x082e35a2 in zend_parse_va_args (num_args=2, type_spec=0x85b0091
"a/", 
va=0xbf49d13c, flags=0)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_API.c:592
#3  0x082e3d12 in zend_parse_parameters (num_args=2,
type_spec=0xbf49d0e8 "")
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_API.c:870
#4  0x08220dd1 in zif_call_user_func_array (ht=2,
return_value=0x9e3ce7c, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
at
/home/sjoerd/dev/php/trunk/php5/ext/standard/basic_functions.c:4748
#5  0x083259b9 in zend_do_fcall_common_helper_SPEC
(execute_data=0x9de07bc)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:313
#6  0x08302dbe in execute (op_array=0x9448e90)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:104
#7  0x082d0c77 in zend_call_function (fci=0xbf49d37c,
fci_cache=0xbf49d3a0)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_execute_API.c:936
#8  0x08220df7 in zif_call_user_func_array (ht=2,
return_value=0x9e3ccb0, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
at
/home/sjoerd/dev/php/trunk/php5/ext/standard/basic_functions.c:4755
#9  0x083259b9 in zend_do_fcall_common_helper_SPEC
(execute_data=0x9de06fc)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:313
#10 0x08302dbe in execute (op_array=0x9448e90)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:104
#11 0x082d0c77 in zend_call_function (fci=0xbf49d58c,
fci_cache=0xbf49d5b0)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_execute_API.c:936
#12 0x08220df7 in zif_call_user_func_array (ht=2,
return_value=0x9e3cae4, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
at
/home/sjoerd/dev/php/trunk/php5/ext/standard/basic_functions.c:4755

...

#11213 0x083259b9 in zend_do_fcall_common_helper_SPEC
(execute_data=0x9c1d004)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:313
#11214 0x08302dbe in execute (op_array=0x9448e90)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:104
#11215 0x082d0c77 in zend_call_function (fci=0xbf60669c,
fci_cache=0xbf6066c0)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_execute_API.c:936
#11216 0x08220df7 in zif_call_user_func_array (ht=2,
return_value=0x9c822d4, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
at
/home/sjoerd/dev/php/trunk/php5/ext/standard/basic_functions.c:4755
#11217 0x083259b9 in zend_do_fcall_common_helper_SPEC
(execute_data=0x9c1cf44)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:313
#11218 0x08302dbe in execute (op_array=0x9448e90)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:104
etc. etc.



[2009-07-02 07:28:31] lumeet at yahoo dot com

Description:

When class C extends B, which extends A, calls from B to its parent 
methods fail when using call_user_func_array(). Using parent::func()
works just fine.

Reproduce code:
---
class A {
  function func( $str ) {
echo $str;
  }
}

class B extends A {
  public function func( $str ) {
call_user_func_array( array( $this, 'parent::func' ), array( $str )
);
  }
}

class C extends B {
  public function func( $str ) {
parent::func( $str );
  }
}

$c = new C;
$c->func( 'This should work!' );

Expected result:

The code should output "This should work!".

Actual result:
--
PHP crashes with backtrace (yes, only one line):

Function Arg 1 Arg 2 Arg 3   Source 
php5ts!zend_is_callable_ex+61e 011f0780 0006 003228e0  
 





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

#48506 [Ver->Asn]: upcoming apr closes descriptors by default

2009-07-02 Thread scottmac
 ID:  48506
 Updated by:  scott...@php.net
 Reported By: arekm at maven dot pl
-Status:  Verified
+Status:  Assigned
 Bug Type:Feature/Change Request
 PHP Version: 5.2.9
 Assigned To: scottmac


Previous Comments:


[2009-06-09 14:09:23] scott...@php.net

The details are here
https://issues.apache.org/bugzilla/show_bug.cgi?id=46425



[2009-06-09 13:47:52] arekm at maven dot pl

Description:

Upcoming apr 2.0.0 (or 1.3 with backported patch) uses O_CLOEXEC for
own descriptors by default.

This means that when using shell_exec() the run script/binary has no
stdin/stdout/stderr due to O_CLOEXEC. This also means that if any output
is produced then script ends with EPIPE.

Tested with apache + apr 1.3 with backported patch.

http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?r1=747357&r2=748988



Reproduce code:
---


Run from apache + php + apr 1.3 + backported O_CLOEXEC patch like this
one
http://cvs.pld-linux.org/cgi-bin/cvsweb/packages/apr/apr-bug-46425.patch?rev=1.8

Expected result:

run "ls -l" and produce some output about file not existing

Actual result:
--
30120 lstat("/notexistingfile", 0x18f55f0) = -1 ENOENT (No such file or
directory)
30120 write(2, "ls: ", 4)   = -1 EBADF (Bad file
descriptor)
30120 write(2, "cannot access /notexistingfile", 30) = -1 EBADF (Bad
file descriptor)
30120 write(2, ": No such file or directory", 27) = -1 EBADF (Bad file
descriptor)
30120 write(2, "\n", 1) = -1 EBADF (Bad file
descriptor)
30120 close(1)  = 0
30120 close(2)  = -1 EBADF (Bad file
descriptor)
30120 exit_group(2)

As you can see there is no file descriptor 2 and this means that ls
output is lost.


Probably the best for php is to always provide own descriptors without
relying on apache provided one.   





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



#48783 [NEW]: make install will fail saying phar file exists

2009-07-02 Thread dmda at yandex dot ru
From: dmda at yandex dot ru
Operating system: solaris 8/sparc
PHP version:  5.3.0
PHP Bug Type: Compile Failure
Bug description:  make install will fail saying phar file exists

Description:

make install fails with following result

ln: cannot create /export/home/jvlad/php64/install/bin/phar: File exists
make: *** [install-pharcmd] Error 2

It's something brand-new :)
All previous versions of php installed everything and even if anything
existed or remained from previous version, they did never fail

Expected result:

warning about existing files is okay,
make install failure is not.


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



#48057 [Opn]: Only the date fields of the first row are fetched, others are empty

2009-07-02 Thread info at programmiernutte dot net
 ID:   48057
 User updated by:  info at programmiernutte dot net
 Reported By:  info at programmiernutte dot net
 Status:   Open
 Bug Type: PDO related
 Operating System: *
-PHP Version:  5.3.0RC1
+PHP Version:  5.3.0
 New Comment:

I dug out my rusty C skills and looked into this myself. It came down 
to the following patch which works for me although I don't quite see 
why this minor change would cause different behaviour. Maybe someone 
would enlighten me.

This is my patch against PHP 5.3.0:

--- php-5.3.0/ext/pdo_firebird/firebird_statement.c 2009-02-09 
13:07:23.0 +0100
+++ php-5.3.0patched/ext/pdo_firebird/firebird_statement.c  2009-
07-03 01:41:24.0 +0200
@@ -363,7 +363,9 @@ static int firebird_stmt_get_col(pdo_stm
fmt = S->H-
>timestamp_format ? S->H->timestamp_format : PDO_FB_DEF_TIMESTAMP_FMT;
}
/* convert the timestamp into 
a string */
-   *ptr = FETCH_BUF(S-
>fetch_buf[colno], char, *len = 80, NULL);
+
+   *len = 80;
+   *ptr = FETCH_BUF(S-
>fetch_buf[colno], char, *len, NULL);
*len = strftime(*ptr, *len, 
fmt, &t);
break;
case SQL_BLOB:


Previous Comments:


[2009-05-01 08:29:03] info at programmiernutte dot net

Worse, the only row that would be complete is nulled because of an 
older bug:
array(4) {
  ["ID"]=>
  NULL
  [0]=>
  NULL
  ["BAR"]=>
  NULL
  [1]=>
  NULL
}
array(4) {
  ["ID"]=>
  string(1) "2"
  [0]=>
  string(1) "2"
  ["BAR"]=>
  string(0) ""
  [1]=>
  string(0) ""
}
array(4) {
  ["ID"]=>
  string(1) "3"
  [0]=>
  string(1) "3"
  ["BAR"]=>
  string(0) ""
  [1]=>
  string(0) ""
}



[2009-04-27 17:05:30] j...@php.net

Does this happen with PHP 5.2.9 ?



[2009-04-23 07:26:14] info at programmiernutte dot net

Description:

PDO::fetch() only returns date fields on the first call. 
subsequent calls return empty strings instead of dates. 

Configure Command =>  './configure'  '--
prefix=/usr/local/php' '--with-apxs2' '--without-pdo-sqlite' 
'--without-mysql'

php.ini-settings don't seem to matter, I only have these:
date.timezone = "Europe/Berlin"
include_path = "/Library/WebServer/php-includes/"
allow_call_time_pass_reference = Off
expose_php = Off
magic_quotes_gpc = Off
register_argc_argv = Off
output_buffering = On
plus settings for xdebug, apc and memcache, I already tried 
disabling them, no difference.

PDO_FIREBIRD is loaded as an 
extension:extension=pdo_firebird.so






Reproduce code:
---
isql:
SQL> create database 'test.fdb';
SQL> CREATE TABLE FOO (ID INTEGER, BAR DATE);
SQL> INSERT INTO FOO (ID, BAR) VALUES ('1', '11.04.2009');
SQL> INSERT INTO FOO (ID, BAR) VALUES ('2', '12.04.2009');
SQL> INSERT INTO FOO (ID, BAR) VALUES ('3', '13.04.2009');

php:
 true,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ
)
);


$oStmt = $oPDO->query('select id, bar from foo');


foreach($oStmt as $oRow)
{
var_dump($oRow);
}
?>



Expected result:

object(stdClass)#3 (2) {
  ["ID"]=>
  string(1) "1"
  ["BAR"]=>
  string(10) "2009-04-11"
}
object(stdClass)#4 (2) {
  ["ID"]=>
  string(1) "2"
  ["BAR"]=>
  string(10) "2009-04-12"
}
object(stdClass)#3 (2) {
  ["ID"]=>
  string(1) "3"
  ["BAR"]=>
  string(10) "2009-04-13"
}






Actual result:
--
object(stdClass)#3 (2) {
  ["ID"]=>
  string(1) "1"
  ["BAR"]=>
  string(10) "2009-04-11"
}
object(stdClass)#4 (2) {
  ["ID"]=>
  string(1) "2"
  ["BAR"]=>
  string(0) ""
}
object(stdClass)#3 (2) {
  ["ID"]=>
  string(1) "3"
  ["BAR"]=>
  string(0) ""
}










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



#48782 [NEW]: configure kills CFLAGS passed to it

2009-07-02 Thread dmda at yandex dot ru
From: dmda at yandex dot ru
Operating system: solaris 8/sparc
PHP version:  5.3.0
PHP Bug Type: Compile Failure
Bug description:  configure kills CFLAGS passed to it

Description:

see configure line 3468
it's where configure cleans up CFLAGS and does never restore it.
So, if you want to pass for example -m64 to compile 64bit binaries, it
will fail.

I believe this code

case $host_cpu in
  alpha*)
if test "$GCC" = "yes"; then
  CFLAGS="$CFLAGS -mieee"
else
  CFLAGS="$CFLAGS -ieee"
fi
;;
  sparc*)
if test "$SUNCC" = "yes"; then
  CFLAGS="$CFLAGS -xmemalign=8i"
else
  CFLAGS=""
fi
;;
esac

should be changed to 

case $host_cpu in
  alpha*)
if test "$GCC" = "yes"; then
  CFLAGS="$CFLAGS -mieee"
else
  CFLAGS="$CFLAGS -ieee"
fi
;;
  sparc*)
if test "$SUNCC" = "yes"; then
  CFLAGS="$CFLAGS -xmemalign=8i"
fi
;;
esac


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



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

2009-07-02 Thread kalle
 ID:   48761
 Updated by:   ka...@php.net
 Reported By:  aheckmann at m-s dot de
 Status:   Assigned
 Bug Type: Reproducible crash
 Operating System: win32 only - Windows 2000 SP4
 PHP Version:  5.3.0
 Assigned To:  pajoye
 New Comment:

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

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


Previous Comments:


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

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


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



[2009-07-02 10:18:42] johan...@php.net

Win 2000 is the required minimum version, or should be, while I don't
know about required service packs and other patches. Pierre?



[2009-07-01 22:23:39] aheckmann at m-s dot de

In my opinion this document from microsoft describes the solution to
fix the problem for older windows versions
that don't have the getaddrinfo function with an inline function:
http://msdn.microsoft.com/en-us/library/ms738520%28VS.85%29.aspx

Support for getaddrinfo on older versions of Windows

The getaddrinfo function was added to the Ws2_32.dll on Windows XP and
later. 
To execute an application that uses this function on earlier versions
of Windows, then you need to include the Ws2tcpip.h and Wspiapi.h files.

When the Wspiapi.h include file is added, the getaddrinfo function is
defined to the WspiapiGetAddrInfo inline function in the Wspiapi.h file.

At runtime, the WspiapiGetAddrInfo function is implemented in such a
way that if the Ws2_32.dll or the Wship6.dll 
(the file containing getaddrinfo in the IPv6 Technology Preview for
Windows 2000) does not include getaddrinfo, 
then a version of getaddrinfo is implemented inline based on code in
the Wspiapi.h header file. 
This inline code will be used on older Windows platforms that do not
natively support the getaddrinfo function.

Will this be fixed, or is Win2k support dropped for php 5.3.x?

The windows release notes for 5.3 only mentioned that pre-windows 2000
support is dropped.

Thanks



[2009-07-01 22:19:11] aheckmann at m-s dot de

Description:

Tested with VC6 and VC9 (+vcredist_x86.exe) Version of PHP 5.3.0

PHP does not start an produces the following error message:

php.exe - Entry Point Not Found : 
The procedure entry point getaddrinfo could not be located in the
dynamic link library WS2_32.dll


Reproduce code:
---
php.exe -v

Expected result:

php shows version info

Actual result:
--
Php does not start an shows the following error:

php.exe - Entry Point Not Found : 
The procedure entry point getaddrinfo could not be located in the
dynamic link library WS2_32.dll





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



#48763 [Opn]: ZipArchive produces corrupt OpenOffice.org files

2009-07-02 Thread rasmus
 ID:   48763
 Updated by:   ras...@php.net
 Reported By:  dani dot church at gmail dot com
 Status:   Open
 Bug Type: Zip Related
 Operating System: CentOS 5
 PHP Version:  5.2CVS-2009-07-01 (snap)
 New Comment:

I don't know this code at all, but just poking around in CVS I would
say the most likely change that is able to cause those differences is
this one:

http://cvs.php.net/viewvc.cgi/php-src/ext/zip/lib/zip_close.c?r1=1.1.2.9&r2=1.1.2.12&sortby=date






Previous Comments:


[2009-07-02 22:35:22] dani dot church at gmail dot com

Here's a binary diff of the two zip files.  Summary: 5 places where an
0x08 byte changed to 0x00, and two places where an 0x06 byte changed to
0x44.  Given the values of comp_method in the stat calls, my wild guess
is that comp_method somehow does not get stored properly in 5.2.8+.  I
don't know the code, though.

If necessary, I can host the original files on my server for download.

--- empty-5.2.6.xxd 2009-07-02 18:27:28.0 -0400
+++ empty-5.2CVS2009-07-01.xxd  2009-07-02 18:27:28.0 -0400
@@ -7,7 +7,7 @@
 060: e23a       1a00  .:..
 070:  436f 6e66 6967 7572 6174 696f 6e73  ..Configurations
 080: 322f 7374 6174 7573 6261 722f 504b 0304  2/statusbar/PK..
-090: 1400 0808 0800 00b3 e23a   0200  .:..
+090: 1400 0008 0800 00b3 e23a   0200  .:..
 0a0:    2700  436f 6e66 6967  ..'...Config
 0b0: 7572 6174 696f 6e73 322f 6163 6365 6c65  urations2/accele
 0c0: 7261 746f 722f 6375 7272 656e 742e 786d  rator/current.xm
@@ -32,7 +32,7 @@
 1f0:  b3e2 3a00       :...
 200: 001f  0043 6f6e 6669 6775 7261 7469  .Configurati
 210: 6f6e 7332 2f69 6d61 6765 732f 4269 746d  ons2/images/Bitm
-220: 6170 732f 504b 0304 1400 0808 0800 00b3  aps/PK..
+220: 6170 732f 504b 0304 1400 0008 0800 00b3  aps/PK..
 230: e23a 8d6c f030 aa05  3619  0a00  .:.l.06.
 240:  7374 796c 6573 2e78 6d6c dd59 6d6f  ..styles.xml.Ymo
 250: db36 10fe be5f 2128 43b1 0293 253b 6913  .6..._!(C...%;i.
@@ -171,7 +171,7 @@
 aa0: 6765 6e65 7261 746f 723e 3c2f 6f66 6669  generator>P
-ad0: 4b03 0414 0008 0808  b3e2 3a70 6c4c  K...:plL
+ad0: 4b03 0414  0808  b3e2 3a70 6c4c  K...:plL
 ae0: 647b  00f8 0200 0018  0054 6875  d{...Thu
 af0: 6d62 6e61 696c 732f 7468 756d 626e 6169  mbnails/thumbnai
 b00: 6c2e 706e 67eb 0cf0 73e7 e592 e262 6060  l.png...sb``
@@ -182,7 +182,7 @@
 b50: c112 c939 26cd 93d3 0a2e f1f8 cd3a e869  ...9&:.i
 b60: 6c91 392a 382a 38e0 82b7 582f 7e64 fb77  l.9*8*8...X/~d.w
 b70: 4d82 b51b 94a2 3d5d fd5c d639 2534 0100  M.=].\.9%4..
-b80: 504b 0304 1400 0808 0800 00b3 e23a 2124  PK...:!$
+b80: 504b 0304 1400 0008 0800 00b3 e23a 2124  PK...:!$
 b90: 3734 8e03  e01b  0c00  7365  74se
 ba0: 7474 696e 6773 2e78 6d6c ed99 5153 e230  ttings.xml..QS.0
 bb0: 10c7 dfef 5330 7dc7 0272 dcd9 111c c4f1  S0}..r..
@@ -241,7 +241,7 @@
 f00: 5f4d 10f6 19d3 c536 8aa2 9f38 1910 ee00  _M.6...8
 f10: aba0 e022 7147 ba1a 2267 cb0a fc34 9467  ..."qG.."g...4.g
 f20: ab0f 51b6 0eb2 e24c f086 89c2 d3a5 f9ea  ..QL
-f30: 2394 59f4 79ae f71f 504b 0304 1400 0808  #.Y.y...PK..
+f30: 2394 59f4 79ae f71f 504b 0304 1400 0008  #.Y.y...PK..
 f40: 0800 00b3 e23a 4154 fb43 4901  6807  .:AT.CI...h.
 f50:  1500  4d45 5441 2d49 4e46 2f6d  ..META-INF/m
 f60: 616e 6966 6573 742e 786d 6cb5 9541 6ec3  anifest.xml..An.
@@ -265,7 +265,7 @@
 0001080: 7bf5 2e3c f9f9 7fcd fc3b 97f8 6490 66c7  {..<.;..d.f.
 0001090: 0ec8 30db c1b3 ddc7 6167 411b 927c 1956  ..0.agA..|.V
 00010a0: def6 73c3 e72d 2c32 a7eb f25a da95 fc71  ..s..-,2...Z...q
-00010b0: 5bae 3f01 504b 0304 1400  0800 0693  [.?.PK..
+00010b0: 5bae 3f01 504b 0304 1400  0800 4493  [.?.PKD.
 00010c0: e23a 75e5 4403 7003  6f0e  0b00  .:u.D.p...o.
 00010d0:  636f 6e74 656e 742e 786d 6ce5 574d  ..content.xml.WM
 00010e0: 8fdb 3610 bde7 5718 2ad0 1bcd b5b7 4176  ..6...W.*.Av
@@ -382,7 +382,7 @@
 00017d0: 54fb 4349 0100 0068 0700 0015    T.CI...h
 00017e0:     0038 0f00 004d 4554  .8...MET
 00017f0: 412d 494e 462f 6d61 6e69 6665 7374 2e78  A-INF/manifest.x
-0001800: 6d6c 504b 0102  1400  0800 0693  mlPK
+0001800: 6d6c 504b 0102  1400  0800 4493  mlPK..D.
 0001810: e23a 75e5 4403 7003  6f0e  0b00  .:u.D.p...o.
 0001820:       b410   
 0001830: 636f 6e74 656e 742e 786d 6c50 4b05 0600  content.xmlPK...

--

#48763 [Fbk->Opn]: ZipArchive produces corrupt OpenOffice.org files

2009-07-02 Thread dani dot church at gmail dot com
 ID:   48763
 User updated by:  dani dot church at gmail dot com
 Reported By:  dani dot church at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Zip Related
 Operating System: CentOS 5
 PHP Version:  5.2CVS-2009-07-01 (snap)
 New Comment:

Here's a binary diff of the two zip files.  Summary: 5 places where an
0x08 byte changed to 0x00, and two places where an 0x06 byte changed to
0x44.  Given the values of comp_method in the stat calls, my wild guess
is that comp_method somehow does not get stored properly in 5.2.8+.  I
don't know the code, though.

If necessary, I can host the original files on my server for download.

--- empty-5.2.6.xxd 2009-07-02 18:27:28.0 -0400
+++ empty-5.2CVS2009-07-01.xxd  2009-07-02 18:27:28.0 -0400
@@ -7,7 +7,7 @@
 060: e23a       1a00  .:..
 070:  436f 6e66 6967 7572 6174 696f 6e73  ..Configurations
 080: 322f 7374 6174 7573 6261 722f 504b 0304  2/statusbar/PK..
-090: 1400 0808 0800 00b3 e23a   0200  .:..
+090: 1400 0008 0800 00b3 e23a   0200  .:..
 0a0:    2700  436f 6e66 6967  ..'...Config
 0b0: 7572 6174 696f 6e73 322f 6163 6365 6c65  urations2/accele
 0c0: 7261 746f 722f 6375 7272 656e 742e 786d  rator/current.xm
@@ -32,7 +32,7 @@
 1f0:  b3e2 3a00       :...
 200: 001f  0043 6f6e 6669 6775 7261 7469  .Configurati
 210: 6f6e 7332 2f69 6d61 6765 732f 4269 746d  ons2/images/Bitm
-220: 6170 732f 504b 0304 1400 0808 0800 00b3  aps/PK..
+220: 6170 732f 504b 0304 1400 0008 0800 00b3  aps/PK..
 230: e23a 8d6c f030 aa05  3619  0a00  .:.l.06.
 240:  7374 796c 6573 2e78 6d6c dd59 6d6f  ..styles.xml.Ymo
 250: db36 10fe be5f 2128 43b1 0293 253b 6913  .6..._!(C...%;i.
@@ -171,7 +171,7 @@
 aa0: 6765 6e65 7261 746f 723e 3c2f 6f66 6669  generator>P
-ad0: 4b03 0414 0008 0808  b3e2 3a70 6c4c  K...:plL
+ad0: 4b03 0414  0808  b3e2 3a70 6c4c  K...:plL
 ae0: 647b  00f8 0200 0018  0054 6875  d{...Thu
 af0: 6d62 6e61 696c 732f 7468 756d 626e 6169  mbnails/thumbnai
 b00: 6c2e 706e 67eb 0cf0 73e7 e592 e262 6060  l.png...sb``
@@ -182,7 +182,7 @@
 b50: c112 c939 26cd 93d3 0a2e f1f8 cd3a e869  ...9&:.i
 b60: 6c91 392a 382a 38e0 82b7 582f 7e64 fb77  l.9*8*8...X/~d.w
 b70: 4d82 b51b 94a2 3d5d fd5c d639 2534 0100  M.=].\.9%4..
-b80: 504b 0304 1400 0808 0800 00b3 e23a 2124  PK...:!$
+b80: 504b 0304 1400 0008 0800 00b3 e23a 2124  PK...:!$
 b90: 3734 8e03  e01b  0c00  7365  74se
 ba0: 7474 696e 6773 2e78 6d6c ed99 5153 e230  ttings.xml..QS.0
 bb0: 10c7 dfef 5330 7dc7 0272 dcd9 111c c4f1  S0}..r..
@@ -241,7 +241,7 @@
 f00: 5f4d 10f6 19d3 c536 8aa2 9f38 1910 ee00  _M.6...8
 f10: aba0 e022 7147 ba1a 2267 cb0a fc34 9467  ..."qG.."g...4.g
 f20: ab0f 51b6 0eb2 e24c f086 89c2 d3a5 f9ea  ..QL
-f30: 2394 59f4 79ae f71f 504b 0304 1400 0808  #.Y.y...PK..
+f30: 2394 59f4 79ae f71f 504b 0304 1400 0008  #.Y.y...PK..
 f40: 0800 00b3 e23a 4154 fb43 4901  6807  .:AT.CI...h.
 f50:  1500  4d45 5441 2d49 4e46 2f6d  ..META-INF/m
 f60: 616e 6966 6573 742e 786d 6cb5 9541 6ec3  anifest.xml..An.
@@ -265,7 +265,7 @@
 0001080: 7bf5 2e3c f9f9 7fcd fc3b 97f8 6490 66c7  {..<.;..d.f.
 0001090: 0ec8 30db c1b3 ddc7 6167 411b 927c 1956  ..0.agA..|.V
 00010a0: def6 73c3 e72d 2c32 a7eb f25a da95 fc71  ..s..-,2...Z...q
-00010b0: 5bae 3f01 504b 0304 1400  0800 0693  [.?.PK..
+00010b0: 5bae 3f01 504b 0304 1400  0800 4493  [.?.PKD.
 00010c0: e23a 75e5 4403 7003  6f0e  0b00  .:u.D.p...o.
 00010d0:  636f 6e74 656e 742e 786d 6ce5 574d  ..content.xml.WM
 00010e0: 8fdb 3610 bde7 5718 2ad0 1bcd b5b7 4176  ..6...W.*.Av
@@ -382,7 +382,7 @@
 00017d0: 54fb 4349 0100 0068 0700 0015    T.CI...h
 00017e0:     0038 0f00 004d 4554  .8...MET
 00017f0: 412d 494e 462f 6d61 6e69 6665 7374 2e78  A-INF/manifest.x
-0001800: 6d6c 504b 0102  1400  0800 0693  mlPK
+0001800: 6d6c 504b 0102  1400  0800 4493  mlPK..D.
 0001810: e23a 75e5 4403 7003  6f0e  0b00  .:u.D.p...o.
 0001820:       b410   
 0001830: 636f 6e74 656e 742e 786d 6c50 4b05 0600  content.xmlPK...


Previous Comments:


[2009-07-02 22:02:15] j...@php.net

Can you try finding out what the difference is between the packages 
produced by 5.2.6 and latest release?



[2009-07-02 00:13:01] dani dot church at gmail dot com

I sampled the 

#46889 [Asn->Csd]: Memory leak in strtotime()

2009-07-02 Thread jani
 ID:   46889
 Updated by:   j...@php.net
 Reported By:  tim at digicol dot de
-Status:   Assigned
+Status:   Closed
 Bug Type: Date/time related
 Operating System: *
 PHP Version:  5.2.8
 Assigned To:  derick


Previous Comments:


[2009-06-26 08:14:21] strucken at web dot de

Without using the second parameter of strtotime the memory leak is
fixed. But memory usage is still increasing when I execute the following
under windows (reproduces with 5.2.8, 5.2.9 and 5.2.10 under windows xp
and windows server 2003) until I reach the 2 GB limit of my windows
32bit:

for( $i = 1; ; $i++ )
strtotime( '+1 week', $i );



[2008-12-19 14:11:36] tim at digicol dot de

I have verified that this bug is fixed in the PHP snapshot  php5.2-
200812191130.tar.bz2. Thanks a lot!



[2008-12-18 14:57:03] der...@php.net

This bug has been fixed in CVS.

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





[2008-12-18 11:12:33] martin at 925 dot dk

Reproduced here.

OS:
FreeBSD 7.0-RELEASE-p4 FreeBSD 7.0-RELEASE-p4

PHP:
PHP 5.2.8 (cli) (built: Dec  8 2008 19:11:49) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies



[2008-12-17 15:11:48] tim at digicol dot de

Description:

With PHP 5.2.8, strtotime() on my Linux box leaks memory; we've 
noticed it because we're using long-running scripts with the PHP CLI. 
In our case, the PHP processes grew to hundreds of MB RAM usage within

minutes. This is not the case with PHP 5.2.6.

The funny thing is that neither memory_get_usage(false) nor 
memory_get_usage(true) report the actual memory usage; here's a line 
from top:

22728 digicol   25   0  258m 218m 6928 R 75.4 43.4   0:42.91 php

... while the PHP functions report at the same time:

memory_get_usage(false): 1738020
memory_get_usage(true):  1835008

What's also funny is that the default "memory_limit = 128M" setting 
doesn't help: PHP doesn't notice that this much RAM is being 
used and so doesn't kill the script. (But I can trigger the memory 
limit as usual with other PHP scripts, so PHP's memory limit isn't 
entirely broken.)

I tested with an unchanged copy of php.ini-recommended.

My configure string:

'./configure'  '--with-apxs2=/usr/bin/apxs2' '--enable-exif' '--
enable-ftp' '--enable-mbregex' '--enable-mbstring=all' '--enable-
pcntl' '--enable-soap' '--enable-zip' '--with-zlib' '--with-curl' '--
with-freetype-dir=/usr' '--with-gd' '--with-jpeg-dir=/usr' '--with-
ldap' '--with-mysqli' '--with-
oci8=instantclient,/usr/local/lib/instantclient' '--enable-sigchild' 
'--with-png-dir=/usr' '--with-xsl' '--with-mcrypt'

This is Debian Linux 4.0, running in VMware Fusion on an Intel Mac.

Thanks a lot for looking into this, and for the great work on PHP!

Reproduce code:
---



Expected result:

No increase in memory usage.

Actual result:
--
Memory usage is increasing dramatically - on my box, the process is 
growing by 100 MB per second...





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



#46889 [Opn->Asn]: Memory leak in strtotime()

2009-07-02 Thread jani
 ID:   46889
 Updated by:   j...@php.net
 Reported By:  tim at digicol dot de
-Status:   Open
+Status:   Assigned
 Bug Type: Date/time related
 Operating System: *
 PHP Version:  5.2.8
 Assigned To:  derick


Previous Comments:


[2009-06-26 08:14:21] strucken at web dot de

Without using the second parameter of strtotime the memory leak is
fixed. But memory usage is still increasing when I execute the following
under windows (reproduces with 5.2.8, 5.2.9 and 5.2.10 under windows xp
and windows server 2003) until I reach the 2 GB limit of my windows
32bit:

for( $i = 1; ; $i++ )
strtotime( '+1 week', $i );



[2008-12-19 14:11:36] tim at digicol dot de

I have verified that this bug is fixed in the PHP snapshot  php5.2-
200812191130.tar.bz2. Thanks a lot!



[2008-12-18 14:57:03] der...@php.net

This bug has been fixed in CVS.

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





[2008-12-18 11:12:33] martin at 925 dot dk

Reproduced here.

OS:
FreeBSD 7.0-RELEASE-p4 FreeBSD 7.0-RELEASE-p4

PHP:
PHP 5.2.8 (cli) (built: Dec  8 2008 19:11:49) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies



[2008-12-17 15:11:48] tim at digicol dot de

Description:

With PHP 5.2.8, strtotime() on my Linux box leaks memory; we've 
noticed it because we're using long-running scripts with the PHP CLI. 
In our case, the PHP processes grew to hundreds of MB RAM usage within

minutes. This is not the case with PHP 5.2.6.

The funny thing is that neither memory_get_usage(false) nor 
memory_get_usage(true) report the actual memory usage; here's a line 
from top:

22728 digicol   25   0  258m 218m 6928 R 75.4 43.4   0:42.91 php

... while the PHP functions report at the same time:

memory_get_usage(false): 1738020
memory_get_usage(true):  1835008

What's also funny is that the default "memory_limit = 128M" setting 
doesn't help: PHP doesn't notice that this much RAM is being 
used and so doesn't kill the script. (But I can trigger the memory 
limit as usual with other PHP scripts, so PHP's memory limit isn't 
entirely broken.)

I tested with an unchanged copy of php.ini-recommended.

My configure string:

'./configure'  '--with-apxs2=/usr/bin/apxs2' '--enable-exif' '--
enable-ftp' '--enable-mbregex' '--enable-mbstring=all' '--enable-
pcntl' '--enable-soap' '--enable-zip' '--with-zlib' '--with-curl' '--
with-freetype-dir=/usr' '--with-gd' '--with-jpeg-dir=/usr' '--with-
ldap' '--with-mysqli' '--with-
oci8=instantclient,/usr/local/lib/instantclient' '--enable-sigchild' 
'--with-png-dir=/usr' '--with-xsl' '--with-mcrypt'

This is Debian Linux 4.0, running in VMware Fusion on an Intel Mac.

Thanks a lot for looking into this, and for the great work on PHP!

Reproduce code:
---



Expected result:

No increase in memory usage.

Actual result:
--
Memory usage is increasing dramatically - on my box, the process is 
growing by 100 MB per second...





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



#48249 [Opn->Fbk]: socket_read() not returning on no more data to read

2009-07-02 Thread jani
 ID:   48249
 Updated by:   j...@php.net
 Reported By:  z4ns4tsu at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: Windows XP
 PHP Version:  5.2.9
 New Comment:

Please provide a complete but short example script. I can not reproduce

this with proper script and using Linux.


Previous Comments:


[2009-05-18 19:30:37] z4ns4tsu at gmail dot com

string(133) "250-nameofdomain.com [192.168.10.100], this server offers
4 extensions
250-AUTH LOGIN
250-SIZE 30485760
250-HELP
250 AUTH=LOGIN
"

And then it hangs.



[2009-05-14 21:58:20] j...@php.net

What DOES it return? Put 'var_dump($out);' inside the loop.



[2009-05-12 19:54:08] z4ns4tsu at gmail dot com

Description:

I am initiating a socket to an SMTP server to send a message. After
transmitting the EHLO, I need to wait for a variable number of lines to
be returned, so I am using a do{..}while() loop to check if there is
nothing more to be read from the socket before sending the next command.
 The program, however, falls into an endless wait because socket_read()
is never returning an empty string (like the documentation says it will)
or FALSE (like some other bug reports say it will).

I have tried with both the PHP_BINARY_READ and PHP_NORMAL_READ flags
set as well as with no flags set at all.

Reproduce code:
---
foreach($mail_head as $in) {
  $output = "";
  $in .= "\r\n";
  echo $in;
  @socket_write($socket, $in, strlen($in)) or die("Error writing to
socket: " . socket_strerror(socket_last_error()));
  do {
$out = false;
$out = socket_read($socket, 1024);
$output .= $out;
  } while($out !== false && $out !== '');
  if(!preg_match('/^[23]/', $output)) {
die("Error: Mail server did not return the expected response.");
  }
}

Expected result:

EHLO fake.domain
250-this server offers 4 extensions
250-AUTH LOGIN
250-SIZE 30485760
250-HELP
250 AUTH=LOGIN
MAIL FROM:
250 Requested mail action okay, completed
...

Actual result:
--
EHLO fake.domain






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



#48763 [Opn->Fbk]: ZipArchive produces corrupt OpenOffice.org files

2009-07-02 Thread jani
 ID:   48763
 Updated by:   j...@php.net
 Reported By:  dani dot church at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Zip Related
 Operating System: CentOS 5
 PHP Version:  5.2CVS-2009-07-01 (snap)
 New Comment:

Can you try finding out what the difference is between the packages 
produced by 5.2.6 and latest release?


Previous Comments:


[2009-07-02 00:13:01] dani dot church at gmail dot com

I sampled the compressed file using statName() three times: once before
updating it, once after the addFromString() call, and once after closing
the ZIP and reopening it from another object.  The results:

Original file: Array
(
[name] => content.xml
[index] => 11
[crc] => 2790848447
[size] => 16096
[mtime] => 1246486396
[comp_size] => 2379
[comp_method] => 8
)
Compressed, not saved: Array
(
[name] => content.xml
[index] => 20
[crc] => 0
[size] => 16096
[mtime] => 1246493476
[comp_size] => -1
[comp_method] => 0
)
Compressed and reopened: Array
(
[name] => content.xml
[index] => 19
[crc] => 2790848447
[size] => 16096
[mtime] => 1246493476
[comp_size] => 2355
[comp_method] => 8
)

Notably, the compression method is the same, which means that PHP is
not trying to use a compression method that OpenOffice.org does not
support.



[2009-07-01 23:48:05] dani dot church at gmail dot com

Description:

When PHP writes a .od* file using ZipArchive, the resulting archive
cannot be opened by OpenOffice.org.  The error it gives is "The file
'filename' is corrupt and therefore cannot be opened.  Should
OpenOffice.org repair the file?"

Repairing the file in OO.o does not work.  However, unzipping the file
from the command line (using unzip in OSX) works without error, and
unzip -t (test integrity) reports no errors.  Furthermore, the extracted
files are byte-correct, and zipping the extracted files into a new .od*
file results in a valid OpenOffice.org file.

This bug is a regression since 5.2.6.  Using zip.so from 5.2.6 results
in a valid file.  Using zip.so from 5.2CVS-2009-07-01 results in a
corrupt file.

Reproduce code:
---
open($odfile);
  $xml = $zip->getFromName('content.xml');
  $zip->addFromString('content.xml', $xml);
  $zip->close();
  header('content-type:
application/vnd.oasis.opendocument.spreadsheet');
  header('content-disposition: attachment;filename=test.ods');
  readfile($odfile);
  unlink($odfile);
  return;
}
?>




Expected result:

Using the above testbed (for ODS spreadsheets) to update content.xml
with its own data should result in a valid ODS spreadsheet.

Actual result:
--
The resulting spreadsheet is corrupt and cannot be opened.





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



#48765 [Opn->Fbk]: When I use for MYSQLi "load data local infile" Apache 2.2.11 gives out ERROR!

2009-07-02 Thread jani
 ID:   48765
 Updated by:   j...@php.net
 Reported By:  mypost100 at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: MySQLi related
 Operating System: Windows XP sp3
 PHP Version:  5.3.0
 New Comment:

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

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

Provide the backtrace, NOTHING else.


Previous Comments:


[2009-07-02 19:53:58] mypost100 at gmail dot com

File has been loaded completely!
But at once after this, execution of php script is stoped
and "The Apache program has caused an error and will be closed".

Explanation:
Apache and PHP (both) continues normal work (not crashed).

Sending in Microsoft.

Signature of error:
szAppName: httpd.exe  szAppVer: 2.2.11.0  szModName: php5ts.dll 
szModVer: 5.3.0.0  offset: c309

2 files:
httpd.exe.mdmp
appcompat.txt

Content of appcompat.txt:




















http://www.openssl.org/"; PRODUCT_NAME="The OpenSSL Toolkit"
FILE_VERSION="0.9.8i" ORIGINAL_FILENAME="libeay32.dll"
INTERNAL_NAME="libeay32" LEGAL_COPYRIGHT="Copyright © 1998-2005 The
OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All
rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0"
VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="0.9.8.9"
UPTO_BIN_PRODUCT_VERSION="0.9.8.9" LINK_DATE="10/10/2008 04:49:40"
UPTO_LINK_DATE="10/10/2008 04:49:40" VER_LANGUAGE="Àíãëèéñêèé (ÑØÀ)
[0x409]" />




http://www.openssl.org/"; PRODUCT_NAME="The OpenSSL Toolkit"
FILE_VERSION="0.9.8i" ORIGINAL_FILENAME="ssleay32.dll"
INTERNAL_NAME="ssleay32" LEGAL_COPYRIGHT="Copyright © 1998-2005 The
OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All
rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0"
VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="0.9.8.9"
UPTO_BIN_PRODUCT_VERSION="0.9.8.9" LINK_DATE="10/10/2008 05:06:13"
UPTO_LINK_DATE="10/10/2008 05:06:13" VER_LANGUAGE="Àíãëèéñêèé (ÑØÀ)
[0x409]" />










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

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



#48768 [Opn]: parse_ini_file() crash with INI_SCANNER_RAW

2009-07-02 Thread jani
 ID:   48768
 Updated by:   j...@php.net
 Reported By:  ahar...@php.net
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux x86
 PHP Version:  5.3CVS-2009-07-02 (CVS)
 New Comment:

Thanks for not reporting this before release..


Previous Comments:


[2009-07-02 07:04:35] ahar...@php.net

Description:

parse_ini_file() crashes in INI_SCANNER_RAW mode if a configuration
item consists solely of an equals sign.

Reproduce code:
---
INI file contents:

equal = "="


PHP script:

$ini = parse_ini_file('equals.ini', false, INI_SCANNER_NORMAL);
var_dump($ini);

$ini = parse_ini_file('equals.ini', false, INI_SCANNER_RAW);
var_dump($ini);


Expected result:

array(1) {
  ["equal"]=>
  string(1) "="
}
array(1) {
  ["equal"]=>
  string(1) "="
}

Actual result:
--
array(1) {
  ["equal"]=>
  string(1) "="
}
Segmentation fault (core dumped)


gdb backtrace:

#0  0xb75f58b1 in memcpy () from /lib/tls/i686/cmov/libc.so.6
#1  0x083d5e5b in zend_strndup (s=0xb7f14009 , length=3086171320) at /usr/include/bits/string3.h:52
#2  0x083d1b21 in ini_lex (ini_lval=0xbf9321d8) at
Zend/zend_ini_scanner.l:343
#3  0x083cf9fe in ini_parse () at
/h/aharvey/trees/php5/Zend/zend_ini_parser.c:1557
#4  0x083cfe91 in zend_parse_ini_file (fh=0xbf9322d0,
unbuffered_errors=0 '\0', scanner_mode=1, ini_parser_cb=0x8320f20
, arg=0xa29d148) at
/h/aharvey/trees/php5/Zend/zend_ini_parser.y:206
#5  0x0831f829 in zif_parse_ini_file (ht=3, return_value=0xa29d148,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at
/h/aharvey/trees/php5/ext/standard/basic_functions.c:5937
#6  0x08412a12 in execute_internal (execute_data_ptr=0xa2cddd8,
return_value_used=1) at /h/aharvey/trees/php5/Zend/zend_execute.c:1256
#7  0xb728dab0 in xdebug_execute_internal
(current_execute_data=0xa2cddd8, return_value_used=1) at
/tmp/pear/temp/xdebug/xdebug.c:1630
#8  0x0843c9af in zend_do_fcall_common_helper_SPEC
(execute_data=0xa2cddd8) at
/h/aharvey/trees/php5/Zend/zend_vm_execute.h:315
#9  0x0841a08e in execute (op_array=0xa29c554) at
/h/aharvey/trees/php5/Zend/zend_vm_execute.h:104
#10 0xb728d734 in xdebug_execute (op_array=0xa29c554) at
/tmp/pear/temp/xdebug/xdebug.c:1561
#11 0x083f12f6 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /h/aharvey/trees/php5/Zend/zend.c:1188
#12 0x0839f610 in php_execute_script (primary_file=0xbf9348f4) at
/h/aharvey/trees/php5/main/main.c:2196
#13 0x08476002 in main (argc=2, argv=0xbf934a54) at
/h/aharvey/trees/php5/sapi/cli/php_cli.c:1188





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



#48779 [Opn->Fbk]: Use of HOST section cause 500 error

2009-07-02 Thread jani
 ID:   48779
 Updated by:   j...@php.net
 Reported By:  keithdavis at pridedallas dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Windows Vista Business x86
 PHP Version:  5.3.0
 New Comment:

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

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




Previous Comments:


[2009-07-02 21:55:37] keithdavis at pridedallas dot com

Ok, well, it's a 500 error and there's nothing in any error log. Call
it what you like. :)



[2009-07-02 21:53:47] j...@php.net

Does it actually _crash_ ? 500 internal error isn't necessarily sign of

a crash..



[2009-07-02 19:37:44] keithdavis at pridedallas dot com

Ok, I figured out the error_log thing. I cleared the log. Enable the
HOST section, restarted IIS and loaded a page. IIS crashed with the 500
error. Nothing written to the log.



[2009-07-02 16:35:09] keithdavis at pridedallas dot com

I am unfamiliar with the error_log. I found it in the php.ini file, but
enabling it and setting the file name to php_errors.log, did not seem to
do anything. Even when I disable the HOSTS section, still not error_log
created. Where is this supposed to reside? 

Nothing in the IIS logs during this crash.



[2009-07-02 16:26:03] sjoerd-php at linuxonly dot nl

Thank you for your bug report.

Is there additional information in the IIS or PHP error log?



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

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



#48779 [Fbk->Opn]: Use of HOST section cause 500 error

2009-07-02 Thread keithdavis at pridedallas dot com
 ID:   48779
 User updated by:  keithdavis at pridedallas dot com
 Reported By:  keithdavis at pridedallas dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Windows Vista Business x86
 PHP Version:  5.3.0
 New Comment:

Ok, well, it's a 500 error and there's nothing in any error log. Call
it what you like. :)


Previous Comments:


[2009-07-02 21:53:47] j...@php.net

Does it actually _crash_ ? 500 internal error isn't necessarily sign of

a crash..



[2009-07-02 19:37:44] keithdavis at pridedallas dot com

Ok, I figured out the error_log thing. I cleared the log. Enable the
HOST section, restarted IIS and loaded a page. IIS crashed with the 500
error. Nothing written to the log.



[2009-07-02 16:35:09] keithdavis at pridedallas dot com

I am unfamiliar with the error_log. I found it in the php.ini file, but
enabling it and setting the file name to php_errors.log, did not seem to
do anything. Even when I disable the HOSTS section, still not error_log
created. Where is this supposed to reside? 

Nothing in the IIS logs during this crash.



[2009-07-02 16:26:03] sjoerd-php at linuxonly dot nl

Thank you for your bug report.

Is there additional information in the IIS or PHP error log?



[2009-07-02 15:28:24] keithdavis at pridedallas dot com

Description:

I am running PHP on IIS7 and when I try to use the HOST section, I get
a 500 Internal Server error every time. Here is the section
implementations that I have tried:



Reproduce code:
---
---
>From manual page: ini.sections
---
[HOST=intranet.pridedallas.com]
track_errors = Off
html_errors = Off
session.bug_compat_42 = Off

AND

[HOST=intranet]
track_errors = Off
html_errors = Off
session.bug_compat_42 = Off

Actual result:
--
HTTP Error 500.0 - Internal Server Error
C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly





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



#48779 [Opn->Fbk]: Use of HOST section cause 500 error

2009-07-02 Thread jani
 ID:   48779
 Updated by:   j...@php.net
 Reported By:  keithdavis at pridedallas dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Windows Vista Business x86
 PHP Version:  5.3.0
 New Comment:

Does it actually _crash_ ? 500 internal error isn't necessarily sign of

a crash..


Previous Comments:


[2009-07-02 19:37:44] keithdavis at pridedallas dot com

Ok, I figured out the error_log thing. I cleared the log. Enable the
HOST section, restarted IIS and loaded a page. IIS crashed with the 500
error. Nothing written to the log.



[2009-07-02 16:35:09] keithdavis at pridedallas dot com

I am unfamiliar with the error_log. I found it in the php.ini file, but
enabling it and setting the file name to php_errors.log, did not seem to
do anything. Even when I disable the HOSTS section, still not error_log
created. Where is this supposed to reside? 

Nothing in the IIS logs during this crash.



[2009-07-02 16:26:03] sjoerd-php at linuxonly dot nl

Thank you for your bug report.

Is there additional information in the IIS or PHP error log?



[2009-07-02 15:28:24] keithdavis at pridedallas dot com

Description:

I am running PHP on IIS7 and when I try to use the HOST section, I get
a 500 Internal Server error every time. Here is the section
implementations that I have tried:



Reproduce code:
---
---
>From manual page: ini.sections
---
[HOST=intranet.pridedallas.com]
track_errors = Off
html_errors = Off
session.bug_compat_42 = Off

AND

[HOST=intranet]
track_errors = Off
html_errors = Off
session.bug_compat_42 = Off

Actual result:
--
HTTP Error 500.0 - Internal Server Error
C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly





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



#47472 [Com]: Namespaces importing and usage

2009-07-02 Thread qwerty763jd at php dot org
 ID:   47472
 Comment by:   qwerty763jd at php dot org
 Reported By:  belliash at gmail dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Gentoo Linux
 PHP Version:  5.3.0beta1
 New Comment:

Huh, You released 5.3 and even does not check this bug report. You FAIL


Previous Comments:


[2009-02-22 11:07:28] belliash at gmail dot com

Description:

It is impossible to import namespace (to both global scope and to any
other namespace).

It is only possible to alias namespaces...

Reproduce code:
---
/* utils_left.php */
 

/* utils_right.php */
 

/* index.php */


Expected result:

I'm using my left hand!I'm using my right hand!I'm using my left
hand!I'm using my right hand!

Actual result:
--
I'm using my left hand!I'm using my right hand!
Fatal error: Call to undefined function whichHand() in
/home/Belliash/HtDocs/test/index.php on line 9





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



#48765 [Fbk->Opn]: When I use for MYSQLi "load data local infile" Apache 2.2.11 gives out ERROR!

2009-07-02 Thread mypost100 at gmail dot com
 ID:   48765
 User updated by:  mypost100 at gmail dot com
 Reported By:  mypost100 at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: MySQLi related
 Operating System: Windows XP sp3
 PHP Version:  5.3.0
 New Comment:

File has been loaded completely!
But at once after this, execution of php script is stoped
and "The Apache program has caused an error and will be closed".

Explanation:
Apache and PHP (both) continues normal work (not crashed).

Sending in Microsoft.

Signature of error:
szAppName: httpd.exe  szAppVer: 2.2.11.0  szModName: php5ts.dll 
szModVer: 5.3.0.0  offset: c309

2 files:
httpd.exe.mdmp
appcompat.txt

Content of appcompat.txt:




















http://www.openssl.org/"; PRODUCT_NAME="The OpenSSL Toolkit"
FILE_VERSION="0.9.8i" ORIGINAL_FILENAME="libeay32.dll"
INTERNAL_NAME="libeay32" LEGAL_COPYRIGHT="Copyright © 1998-2005 The
OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All
rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0"
VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="0.9.8.9"
UPTO_BIN_PRODUCT_VERSION="0.9.8.9" LINK_DATE="10/10/2008 04:49:40"
UPTO_LINK_DATE="10/10/2008 04:49:40" VER_LANGUAGE="Àíãëèéñêèé (ÑØÀ)
[0x409]" />




http://www.openssl.org/"; PRODUCT_NAME="The OpenSSL Toolkit"
FILE_VERSION="0.9.8i" ORIGINAL_FILENAME="ssleay32.dll"
INTERNAL_NAME="ssleay32" LEGAL_COPYRIGHT="Copyright © 1998-2005 The
OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All
rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0"
VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="0.9.8.9"
UPTO_BIN_PRODUCT_VERSION="0.9.8.9" LINK_DATE="10/10/2008 05:06:13"
UPTO_LINK_DATE="10/10/2008 05:06:13" VER_LANGUAGE="Àíãëèéñêèé (ÑØÀ)
[0x409]" />









Previous Comments:


[2009-07-02 16:13:26] ka...@php.net

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

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





[2009-07-02 11:56:30] mypost100 at gmail dot com

Apache: apache_2.2.11-win32-x86-openssl-0.9.8i.msi
PHP: php-5.3.0-Win32-VC6-x86.zip
MySql: mysql-5.1.34-win32.msi (5.1.34-community)

Start PHP without errors.
max_execution_time = 180
max_input_time = 180

I use HTTPS(SSL) - I can't use simple HTTP.

table1 dump (9 fields):
CREATE TABLE IF NOT EXISTS `table1` (
  `partnum` varchar(20) NOT NULL DEFAULT '0',
  `partnumre` varchar(20) NOT NULL DEFAULT '0',
  `partname` varchar(50) NOT NULL DEFAULT '0',
  `qumin` varchar(5) NOT NULL DEFAULT '0',
  `weight` varchar(10) NOT NULL DEFAULT '0',
  `rg` varchar(5) NOT NULL DEFAULT '0',
  `price` varchar(10) NOT NULL DEFAULT '0',
  `pfand` varchar(10) NOT NULL DEFAULT '0',
  `suppid` int(5) unsigned NOT NULL DEFAULT '1',
  KEY `partnum` (`partnum`(7))
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;

Code:
$qu1="ALTER TABLE table1 ALTER COLUMN suppid SET DEFAULT \"1\"";
$setdefault=mysqli_query($MYSQLI_CONPR,$qu1);

$qu2="ALTER TABLE table1 DISABLE KEYS";
$indexoff=mysqli_query($MYSQLI_CONPR,$qu2);

I use for loading 7 fields
$qu3="LOAD DATA LOCAL INFILE 'D:/file.txt' INTO TABLE table1 FIELDS
TERMINATED BY ';' LINES TERMINATED BY '\r\n'
(partnum,partnumre,partname,weight,rg,price,pfand)";
$res_load=mysqli_query($MYSQLI_CONPR,$qu3);

Later 3-4 sec after run script
Apache gives out window with error
"The program has caused an error and will be closed"

(but dont close and works causing same error)

PHP 5.2.10 takes for this operation too 3-4 sec, but without any errors
and all OK!



[2009-07-02 10:15:34] johan...@php.net

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


What kind of error are you getting? What does your code look like? What
MySQL version? What does the table and statement look like?



[2009-07-02 03:03:22] mypost100 at gmail dot com

Description:

Hello.
When I use for MYSQLi "load data local infile"
(file.txt = 110

#48779 [Opn]: Use of HOST section cause 500 error

2009-07-02 Thread keithdavis at pridedallas dot com
 ID:   48779
 User updated by:  keithdavis at pridedallas dot com
 Reported By:  keithdavis at pridedallas dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Windows Vista Business x86
 PHP Version:  5.3.0
 New Comment:

Ok, I figured out the error_log thing. I cleared the log. Enable the
HOST section, restarted IIS and loaded a page. IIS crashed with the 500
error. Nothing written to the log.


Previous Comments:


[2009-07-02 16:35:09] keithdavis at pridedallas dot com

I am unfamiliar with the error_log. I found it in the php.ini file, but
enabling it and setting the file name to php_errors.log, did not seem to
do anything. Even when I disable the HOSTS section, still not error_log
created. Where is this supposed to reside? 

Nothing in the IIS logs during this crash.



[2009-07-02 16:26:03] sjoerd-php at linuxonly dot nl

Thank you for your bug report.

Is there additional information in the IIS or PHP error log?



[2009-07-02 15:28:24] keithdavis at pridedallas dot com

Description:

I am running PHP on IIS7 and when I try to use the HOST section, I get
a 500 Internal Server error every time. Here is the section
implementations that I have tried:



Reproduce code:
---
---
>From manual page: ini.sections
---
[HOST=intranet.pridedallas.com]
track_errors = Off
html_errors = Off
session.bug_compat_42 = Off

AND

[HOST=intranet]
track_errors = Off
html_errors = Off
session.bug_compat_42 = Off

Actual result:
--
HTTP Error 500.0 - Internal Server Error
C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly





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



#48603 [Com]: Installing PHP with PEAR support causes installation error

2009-07-02 Thread tremclem at yahoo dot com
 ID:   48603
 Comment by:   tremclem at yahoo dot com
 Reported By:  manuel dot schmitt at manitu dot de
 Status:   Open
 Bug Type: PHAR related
 Operating System: Linux 2.4
 PHP Version:  5.2.10
 New Comment:

My compilation of PHP 5.2.10 on Solaris 10 crashed with this same
issue. Unfortunately, my customers require the Pear functionality.


Previous Comments:


[2009-06-29 18:26:46] no at email dot pl

The same errors on FreeBSD 7.2 stable amd64



[2009-06-27 01:24:50] jd at cpanel dot net

Seems to be caused by the changes to curl to avoid serving file:// urls
when open_basedir or safe_mode are enabled combined with the
"--with-curlwrappers" option.  Disabling curlwrappers gets around the
"cannot open phar" problem.  You could also just force the
php_register_url_stream_wrapper() loop in ext/curl/interface.c to skip
the file protocol.

The "Cannot use a scalar value as an array" error seems to be an
unrelated problem with the PEAR bundle included with 5.2.10.



[2009-06-22 23:57:40] mlavi at sgi dot com

Appears to be a duplicate of bugs: 48625 and 48650.
http://bugs.php.net/bug.php?id=48625
http://bugs.php.net/bug.php?id=48650



[2009-06-22 23:49:53] mlavi at sgi dot com

Oddly, when I rebuilt PHP without any extensions: ./configure
--prefix=/data/temp, I do get PEAR installed with warnings:

Installing PEAR environment:  /data/temp/lib/php/

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1391

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1396

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1400

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1391

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1396

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1400

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1391

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1396

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1400

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1391

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1396

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1400

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1391

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1396

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1400

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1391

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1396

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1400

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1391

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1396

Warning: Cannot use a scalar value as an array in
phar://install-pear-nozlib.phar/PEAR/ChannelFile.php on line 1400



[2009-06-22 23:30:23] mlavi at sgi dot com

Reproduced error on: SLES 10.1 = SUSE Linux Enterprise Server 10
(x86_64)



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

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



#48781 [NEW]: Cyclical garbage collector memory leak

2009-07-02 Thread nate at frickenate dot com
From: nate at frickenate dot com
Operating system: Debian 5.0 kernel 2.6.24-23-xen
PHP version:  5.3.0
PHP Bug Type: Performance problem
Bug description:  Cyclical garbage collector memory leak

Description:

The new cyclical garbage collector isn't collecting everything it should
be - somewhere there is a memory leak. The issue I am bringing up is not
about delayed collection - this is a true memory leak with memory that is
never reclaimed.

When a variable (in this example, $user) contains an object with a
cyclical reference, there is a small amount of memory that is leaked/not
reclaimed when you set $user to another object (of any class). If you set
$user to an int/string/boolean/null before setting $user to another object,
all memory is collected properly.

I came to the conclusion that this must be a problem with the garbage
collector, since if you replace the "$this->user = $user;" with
"$this->user = new StdClass;" (thus preventing the creation of a cyclical
reference), the leak goes away.

So basically right now:



Reproduce code:
---
profile = new UserProfile($this);
}
}

class UserProfile {
private
$user;

public function __construct ($user) {
$this->user = $user;
}
}

for ($userid = 1; ; $userid++) {
$user = new User;

if ($userid % 10 == 0)
printf("memory usage after %s users: %s MB.\n",
number_format($userid), number_format(memory_get_usage() / 1024 / 1024,
2));

// TEST 1 - do nothing before we set the
// new User on next iteration of the loop).
// RESULT: leaks memory (see "Actual result" section)
continue;

// TEST 2 - set $user to an empty object, before
// we set the new User on next iteration
// RESULT: leaks memory (see "Actual result" section)
//$user = new StdClass; continue;

// TEST 3 - set $user to anything other than an object,
// before we set the new User on next iteration.
// RESULT: does NOT leak memory (see "Expected result" section)
//$user = 'not an object'; continue;
}

?>


Expected result:

memory usage after 100,000 users: 1.54 MB.
memory usage after 200,000 users: 1.54 MB.
memory usage after 300,000 users: 1.54 MB.
memory usage after 400,000 users: 1.54 MB.
memory usage after 500,000 users: 1.54 MB.
memory usage after 600,000 users: 1.54 MB.
memory usage after 700,000 users: 1.54 MB.
memory usage after 800,000 users: 1.54 MB.
memory usage after 900,000 users: 1.54 MB.
memory usage after 1,000,000 users: 1.54 MB.

[snip]

memory usage after 99,000,000 users: 1.54 MB.
memory usage after 99,100,000 users: 1.54 MB.
memory usage after 99,200,000 users: 1.54 MB.
memory usage after 99,300,000 users: 1.54 MB.
memory usage after 99,400,000 users: 1.54 MB.
memory usage after 99,500,000 users: 1.54 MB.
memory usage after 99,600,000 users: 1.54 MB.
memory usage after 99,700,000 users: 1.54 MB.
memory usage after 99,800,000 users: 1.54 MB.
memory usage after 99,900,000 users: 1.54 MB.
memory usage after 100,000,000 users: 1.54 MB.

Actual result:
--
memory usage after 100,000 users: 1.55 MB.
memory usage after 200,000 users: 1.57 MB.
memory usage after 300,000 users: 1.58 MB.
memory usage after 400,000 users: 1.59 MB.
memory usage after 500,000 users: 1.61 MB.
memory usage after 600,000 users: 1.62 MB.
memory usage after 700,000 users: 1.64 MB.
memory usage after 800,000 users: 1.65 MB.
memory usage after 900,000 users: 1.66 MB.
memory usage after 1,000,000 users: 1.68 MB.

[snip]

memory usage after 99,000,000 users: 18.43 MB.
memory usage after 99,100,000 users: 18.44 MB.
memory usage after 99,200,000 users: 18.46 MB.
memory usage after 99,300,000 users: 18.47 MB.
memory usage after 99,400,000 users: 18.48 MB.
memory usage after 99,500,000 users: 18.50 MB.
memory usage after 99,600,000 users: 18.51 MB.
memory usage after 99,700,000 users: 18.53 MB.
memory usage after 99,800,000 users: 18.54 MB.
memory usage after 99,900,000 users: 18.55 MB.
memory usage after 100,000,000 users: 18.57 MB.

-- 
Edit bug report at http://bugs.php.net/?id=48781&edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48781&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48781&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=48781&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=48781&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48781&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=48781&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=48781&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=48781&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=48781&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=48781&r=

#48780 [NEW]: mysqlnd compile failure

2009-07-02 Thread lneve at mail dot nih dot gov
From: lneve at mail dot nih dot gov
Operating system: Solaris 10 (sparc)
PHP version:  5.3.0
PHP Bug Type: Compile Failure
Bug description:  mysqlnd compile failure

Description:

PHP build fails when compiling file mysqlnd_ps_codec.c. The error is 
"`MYSQLND_LLU_SPEC' undeclared".

Reproduce code:
---
/bin/sh /opt/php-5.3.0/libtool --silent --preserve-dup-deps --mode=compile
gcc  -Iext/mysqlnd/ -I/opt/php-5.3.0/ext/mysqlnd/ -DPHP_ATOM_INC
-I/opt/php-5.3.0/include -I/opt/php-5.3.0/main -I/opt/php-5.3.0
-I/opt/php-5.3.0/ext/date/lib -I/opt/php-5.3.0/ext/ereg/regex
-I/usr/local/include/libxml2 -I/usr/local/ssl/include -I/usr/sfw/include
-I/usr/sfw/include/freetype2 -I/usr/local/include
-I/usr/local/imap-2007d/include -I/opt/php-5.3.0/ext/mbstring/oniguruma
-I/opt/php-5.3.0/ext/mbstring/libmbfl
-I/opt/php-5.3.0/ext/mbstring/libmbfl/mbfl
-I/opt/postgres/8.3-community/include
-I/opt/php-5.3.0/ext/sqlite3/libsqlite -I/opt/php-5.3.0/TSRM
-I/opt/php-5.3.0/Zend  -D_POSIX_PTHREAD_SEMANTICS  -I/usr/local/include  
-c /opt/php-5.3.0/ext/mysqlnd/mysqlnd_ps_codec.c -o
ext/mysqlnd/mysqlnd_ps_codec.lo 
In file included from /opt/php-5.3.0/ext/mysqlnd/mysqlnd.h:59,
 from /opt/php-5.3.0/ext/mysqlnd/mysqlnd_ps_codec.c:23:
/opt/php-5.3.0/ext/mysqlnd/mysqlnd_portability.h:471:1: warning:
"float8get" redefined
/opt/php-5.3.0/ext/mysqlnd/mysqlnd_portability.h:423:1: warning: this is
the location of the previous definition
/opt/php-5.3.0/ext/mysqlnd/mysqlnd_portability.h:472:1: warning:
"float8store" redefined
/opt/php-5.3.0/ext/mysqlnd/mysqlnd_portability.h:413:1: warning: this is
the location of the previous definition
/opt/php-5.3.0/ext/mysqlnd/mysqlnd_ps_codec.c: In function
`ps_fetch_from_1_to_8_bytes':
/opt/php-5.3.0/ext/mysqlnd/mysqlnd_ps_codec.c:82: error:
`MYSQLND_LLU_SPEC' undeclared (first use in this function)
/opt/php-5.3.0/ext/mysqlnd/mysqlnd_ps_codec.c:82: error: (Each undeclared
identifier is reported only once
/opt/php-5.3.0/ext/mysqlnd/mysqlnd_ps_codec.c:82: error: for each function
it appears in.)
/opt/php-5.3.0/ext/mysqlnd/mysqlnd_ps_codec.c:111: error:
`MYSQLND_LL_SPEC' undeclared (first use in this function)
gmake: *** [ext/mysqlnd/mysqlnd_ps_codec.lo] Error 1



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



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

2009-07-02 Thread jon dot harrell at gmail dot com
 ID:   48761
 Comment by:   jon dot harrell at gmail dot com
 Reported By:  aheckmann at m-s dot de
 Status:   Assigned
 Bug Type: Reproducible crash
 Operating System: win32 only - Windows 2000 SP4
 PHP Version:  5.3.0
 Assigned To:  pajoye
 New Comment:

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


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


Previous Comments:


[2009-07-02 10:18:42] johan...@php.net

Win 2000 is the required minimum version, or should be, while I don't
know about required service packs and other patches. Pierre?



[2009-07-01 22:23:39] aheckmann at m-s dot de

In my opinion this document from microsoft describes the solution to
fix the problem for older windows versions
that don't have the getaddrinfo function with an inline function:
http://msdn.microsoft.com/en-us/library/ms738520%28VS.85%29.aspx

Support for getaddrinfo on older versions of Windows

The getaddrinfo function was added to the Ws2_32.dll on Windows XP and
later. 
To execute an application that uses this function on earlier versions
of Windows, then you need to include the Ws2tcpip.h and Wspiapi.h files.

When the Wspiapi.h include file is added, the getaddrinfo function is
defined to the WspiapiGetAddrInfo inline function in the Wspiapi.h file.

At runtime, the WspiapiGetAddrInfo function is implemented in such a
way that if the Ws2_32.dll or the Wship6.dll 
(the file containing getaddrinfo in the IPv6 Technology Preview for
Windows 2000) does not include getaddrinfo, 
then a version of getaddrinfo is implemented inline based on code in
the Wspiapi.h header file. 
This inline code will be used on older Windows platforms that do not
natively support the getaddrinfo function.

Will this be fixed, or is Win2k support dropped for php 5.3.x?

The windows release notes for 5.3 only mentioned that pre-windows 2000
support is dropped.

Thanks



[2009-07-01 22:19:11] aheckmann at m-s dot de

Description:

Tested with VC6 and VC9 (+vcredist_x86.exe) Version of PHP 5.3.0

PHP does not start an produces the following error message:

php.exe - Entry Point Not Found : 
The procedure entry point getaddrinfo could not be located in the
dynamic link library WS2_32.dll


Reproduce code:
---
php.exe -v

Expected result:

php shows version info

Actual result:
--
Php does not start an shows the following error:

php.exe - Entry Point Not Found : 
The procedure entry point getaddrinfo could not be located in the
dynamic link library WS2_32.dll





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



#48754 [Ver]: mysql_close() crash php when no handle specified

2009-07-02 Thread uw
 ID:   48754
 Updated by:   u...@php.net
 Reported By:  busia at tiscali dot it
 Status:   Verified
 Bug Type: MySQL related
 Operating System: *
-PHP Version:  5.3.0
+PHP Version:  5.3.0 (as of 21-07-2008)
 Assigned To:  mysql
 New Comment:

Really a great one.

The bug exists since 21-07-2008. That is 11 months and 1 week ago.
Sometimes I which users would try non-GA versions just in case test
suites don't catch issues...

This is when the bug was introduced:
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.213.2.6.2.16.2.22&r2=1.213.2.6.2.16.2.23&;

mysql_link points to NULL and that's causing a crash. 

Possible workaround (as suggested by Johannes):

nixn...@linux-en61:~/src/login/php5> cvs diff ext/mysql/tests/
cvs diff: Diffing .
cvs diff: Diffing ext
cvs diff: Diffing ext/mysql
cvs diff: Diffing ext/mysql/tests
nixn...@linux-en61:~/src/login/php5> cvs diff ext/mysql/
cvs diff: Diffing ext/mysql
Index: ext/mysql/php_mysql.c
===
RCS file: /repository/php-src/ext/mysql/php_mysql.c,v
retrieving revision 1.213.2.6.2.16.2.37
diff -r1.213.2.6.2.16.2.37 php_mysql.c
372a373,376
> #ifdef MYSQL_USE_MYSQLND
>   mysqlnd_end_psession(link->conn);
> #endif
>
987,995c991
< #ifdef MYSQL_USE_MYSQLND
<   {
<   int tmp;
<   if ((mysql = zend_list_find(Z_RESVAL_P(mysql_link),
&tmp)) && tmp == le_plink) {
<   mysqlnd_end_psession(mysql->conn);
<   }
<   }
< #endif
<   if (mysql_link) { /* explicit resource number */
---
>   if (mysql_link) {
cvs diff: Diffing ext/mysql/tests


Someone may want to review that.


Previous Comments:


[2009-07-02 13:05:17] u...@php.net

This one is funny. It may have existed since more than one year now and
nobody has ever found it.



[2009-07-01 21:59:31] busia at tiscali dot it

1) The sleep function is not needed
2) The connection is successfull

An other information: if I save in $a the mysql_connect return value
and pass it to mysql_close php doesn't crash. In othe words this script
works well:


This instead crashes php:




[2009-07-01 18:04:17] sjoerd-php at linuxonly dot nl

Thank you for your bug report.

I have a couple of questions regarding your bug report:
1. Is the sleep(2) needed to reproduce the bug?
2. Does the database connection succeed? (i.e. what is the return value
of mysql_connect?)



[2009-07-01 12:30:54] busia at tiscali dot it

Description:

This simple code crash php.

This is the Debug diagnostic tool output:

In
php__PID__5128__Date__07_01_2009__Time_02_22_25PM__909__Second_Chance_Exception_C005.dmp
the assembly instruction at php_mysql!zif_mysql_close+92 in C:\Program
Files\PHP\ext\php_mysql.dll from The PHP Group has caused an access
violation exception (0xC005) when trying to read from memory
location 0x on thread 0


Report for
php__PID__5128__Date__07_01_2009__Time_02_22_25PM__909__Second_Chance_Exception_C005.dmp
Type of Analysis Performed   Crash Analysis 
Machine Name   PC-UTENTE 
Operating System   Windows Vista Service Pack 1 
Number Of Processors   2 
Process ID   5128 
Process Image   C:\Program Files\PHP\php.exe 
System Up-Time   00:13:11 
Process Up-Time   00:00:02 


Thread 0 - System ID 5132
Entry point   php!mainCRTStartup 
Create time   01/07/2009 14.22.23 
Time spent in user mode   0 Days 0:0:0.31 
Time spent in kernel mode   0 Days 0:0:0.62 






Function Arg 1 Arg 2 Arg 3   Source 
php_mysql!zif_mysql_close+92  02a0d350    

php5ts!zend_do_fcall_common_helper_SPEC+946  02a40070  
  00052fd0
php5ts!ZEND_DO_FCALL_SPEC_CONST_HANDLER+130 00c0fbd4 00052fd0  
  00c0fe70
php5ts!execute+29e 02a40070 00052f00 
php5ts!zend_execute_scripts+f6 0008 00052fd0   
 
php5ts!php_execute_script+22d 00c0fe70 00052fd0    

php!main+bf1 0002 00052f68 00051888
php!mainCRTStartup+e3 7ffdb000 00c0ffd4 77bee4b6
kernel32!BaseThreadInitThunk+e 7ffdb000 770bbeaf   
 
ntdll!__RtlUserThreadStart+23 00402d78 7ffdb000    

ntdll!_RtlUserThreadStart+1b 00402d78 7ffdb000    





PHP_MYSQL!ZIF_MYSQL_CLOSE+92In
php__PID__5128__Date__07_01_2009__Time_02_22_25PM__909__Second_Chance_Exception_C005.dmp
the assembly instruction at php_mysql!zif_mysql_close+92 in C:\Program
Files\PHP\ext\php_mysql.dll from The PHP Group has caused an access
violation exception (0xC005) when trying to read from memory
location 0x on t

#46260 [Com]: __FILE__ should not resolve symlink paths

2009-07-02 Thread raphael dot roulet at univ-st-etienne dot fr
 ID:   46260
 Comment by:   raphael dot roulet at univ-st-etienne dot fr
 Reported By:  bugs dot php dot net at callum-macdonald dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

If there is no security issue, Why don't PHP make life easier ?


Previous Comments:


[2009-01-31 23:12:49] bugs dot php dot net at callum-macdonald dot com

$_SERVER['PHP_SELF'] only relates to the main script, not the currently
included file. It's useful, but a completely separate issue.

There is, as far as I can see, no way to get the non symlink resolved
path of the currently included file.



[2009-01-31 22:54:44] luke_phpbugs at dashjr dot org

$_SERVER["PHP_SELF"] helps a little.



[2008-10-09 01:32:07] bugs dot php dot net at callum-macdonald dot com

Description:

See these bugs:
http://bugs.php.net/bug.php?id=38790
http://bugs.php.net/bug.php?id=42516
http://bugs.php.net/bug.php?id=37603

The __FILE__ constant should not, in my opinion, resolve symbolic links
on *nix operating systems. At the very least, there should be an option
to control this behaviour.

Because __FILE__ returns only the symlink resolved path, there is no
way to get the symlink path of the currently included file. If __FILE__
returned the symlinkpath, the resolved path could be retrieved with
realpath(__FILE__).

The opposite is not true. There is no way to go from the resolved path
to the original link path. I realise this is a feature not a bug, but I
believe it is a serious shortcoming and limits the ability of PHP in
symlinked situations.

Reproduce code:
---
See http://bugs.php.net/bug.php?id=37603

Expected result:

__FILE__ should return the symlink path

Actual result:
--
__FILE__ returns the resolved path





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



#48779 [Opn]: Use of HOST section cause 500 error

2009-07-02 Thread keithdavis at pridedallas dot com
 ID:   48779
 User updated by:  keithdavis at pridedallas dot com
 Reported By:  keithdavis at pridedallas dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Windows Vista Business x86
 PHP Version:  5.3.0
 New Comment:

I am unfamiliar with the error_log. I found it in the php.ini file, but
enabling it and setting the file name to php_errors.log, did not seem to
do anything. Even when I disable the HOSTS section, still not error_log
created. Where is this supposed to reside? 

Nothing in the IIS logs during this crash.


Previous Comments:


[2009-07-02 16:26:03] sjoerd-php at linuxonly dot nl

Thank you for your bug report.

Is there additional information in the IIS or PHP error log?



[2009-07-02 15:28:24] keithdavis at pridedallas dot com

Description:

I am running PHP on IIS7 and when I try to use the HOST section, I get
a 500 Internal Server error every time. Here is the section
implementations that I have tried:



Reproduce code:
---
---
>From manual page: ini.sections
---
[HOST=intranet.pridedallas.com]
track_errors = Off
html_errors = Off
session.bug_compat_42 = Off

AND

[HOST=intranet]
track_errors = Off
html_errors = Off
session.bug_compat_42 = Off

Actual result:
--
HTTP Error 500.0 - Internal Server Error
C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly





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



#48779 [Com]: Use of HOST section cause 500 error

2009-07-02 Thread sjoerd-php at linuxonly dot nl
 ID:   48779
 Comment by:   sjoerd-php at linuxonly dot nl
 Reported By:  keithdavis at pridedallas dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Windows Vista Business x86
 PHP Version:  5.3.0
 New Comment:

Thank you for your bug report.

Is there additional information in the IIS or PHP error log?


Previous Comments:


[2009-07-02 15:28:24] keithdavis at pridedallas dot com

Description:

I am running PHP on IIS7 and when I try to use the HOST section, I get
a 500 Internal Server error every time. Here is the section
implementations that I have tried:



Reproduce code:
---
---
>From manual page: ini.sections
---
[HOST=intranet.pridedallas.com]
track_errors = Off
html_errors = Off
session.bug_compat_42 = Off

AND

[HOST=intranet]
track_errors = Off
html_errors = Off
session.bug_compat_42 = Off

Actual result:
--
HTTP Error 500.0 - Internal Server Error
C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly





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



#48765 [Opn->Fbk]: When I use for MYSQLi "load data local infile" Apache 2.2.11 gives out ERROR!

2009-07-02 Thread kalle
 ID:   48765
 Updated by:   ka...@php.net
 Reported By:  mypost100 at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: MySQLi related
 Operating System: Windows XP sp3
 PHP Version:  5.3.0
 New Comment:

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

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




Previous Comments:


[2009-07-02 11:56:30] mypost100 at gmail dot com

Apache: apache_2.2.11-win32-x86-openssl-0.9.8i.msi
PHP: php-5.3.0-Win32-VC6-x86.zip
MySql: mysql-5.1.34-win32.msi (5.1.34-community)

Start PHP without errors.
max_execution_time = 180
max_input_time = 180

I use HTTPS(SSL) - I can't use simple HTTP.

table1 dump (9 fields):
CREATE TABLE IF NOT EXISTS `table1` (
  `partnum` varchar(20) NOT NULL DEFAULT '0',
  `partnumre` varchar(20) NOT NULL DEFAULT '0',
  `partname` varchar(50) NOT NULL DEFAULT '0',
  `qumin` varchar(5) NOT NULL DEFAULT '0',
  `weight` varchar(10) NOT NULL DEFAULT '0',
  `rg` varchar(5) NOT NULL DEFAULT '0',
  `price` varchar(10) NOT NULL DEFAULT '0',
  `pfand` varchar(10) NOT NULL DEFAULT '0',
  `suppid` int(5) unsigned NOT NULL DEFAULT '1',
  KEY `partnum` (`partnum`(7))
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;

Code:
$qu1="ALTER TABLE table1 ALTER COLUMN suppid SET DEFAULT \"1\"";
$setdefault=mysqli_query($MYSQLI_CONPR,$qu1);

$qu2="ALTER TABLE table1 DISABLE KEYS";
$indexoff=mysqli_query($MYSQLI_CONPR,$qu2);

I use for loading 7 fields
$qu3="LOAD DATA LOCAL INFILE 'D:/file.txt' INTO TABLE table1 FIELDS
TERMINATED BY ';' LINES TERMINATED BY '\r\n'
(partnum,partnumre,partname,weight,rg,price,pfand)";
$res_load=mysqli_query($MYSQLI_CONPR,$qu3);

Later 3-4 sec after run script
Apache gives out window with error
"The program has caused an error and will be closed"

(but dont close and works causing same error)

PHP 5.2.10 takes for this operation too 3-4 sec, but without any errors
and all OK!



[2009-07-02 10:15:34] johan...@php.net

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


What kind of error are you getting? What does your code look like? What
MySQL version? What does the table and statement look like?



[2009-07-02 03:03:22] mypost100 at gmail dot com

Description:

Hello.
When I use for MYSQLi "load data local infile"
(file.txt = 110 rows)
divider of columns - [ ; ]
Apache 2.2.11 gives out ERROR!
Loaded rows = 62 and stop of execution file php.






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



#48535 [Opn->Fbk]: file_exists returns false if the file path is a symlink

2009-07-02 Thread pajoye
 ID:   48535
 Updated by:   paj...@php.net
 Reported By:  tobias dot burger at rolmail dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: win32 only - Windows Server 2008
 PHP Version:  5.3.0RC3
 Assigned To:  pajoye
 New Comment:

symlink are not junctions!

use mklink to create symbolic or hard links.


Previous Comments:


[2009-07-02 15:09:44] patrick at procurios dot nl

We have the same problem on our Windows Vista developer machines. Links
were made with the tool junction.exe (because the links need to work on
both Windows XP and Windows Vista).

The problem was fixed in Vista when the old links were replaced by new
mklink links.

We haven't tried PHP 5.3 on XP yet.



[2009-06-18 08:16:04] tobias dot burger at rolmail dot net

I have a deep folder structure. For example i made a symlink (mklink
/d) from a folder located on drive d: to a folder on drive c:

D:\root\web\wwwtypo35 -> C:\inetpub\wwwtypo35

If I call now realpath() for
"C:\inetpub\wwwtypo35\Packages\Global\FLOW3\Classes\Package\Package.php"
it returns false on the latest snapshot version of PHP. If I try the RC3
release it works and the function returns the full path.

Maybe the bug exists because I made a symlink to a path on another
drive?



[2009-06-17 21:18:35] paj...@php.net

realpath works here (all tests machine) with symlink. Do you have an
example (path used, dir or files?, etc.)



[2009-06-16 06:59:38] tobias dot burger at rolmail dot net

Now it works!

But realpath doesn't work for symlinked pathes anymore (it returns
false).
Tried the RC3 realease again and there it works.
Has it something to do with the actual fix or should I open a new bug
submission?



[2009-06-15 17:02:37] paj...@php.net

Please try using this CVS snapshot:

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

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

A fix has been applied to 5.3, please try it



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

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



#41631 [Com]: default_socket_timeout does not work with SSL

2009-07-02 Thread karl dot debisschop at pearson dot com
 ID:   41631
 Comment by:   karl dot debisschop at pearson dot com
 Reported By:  david at acz dot org
 Status:   Assigned
 Bug Type: OpenSSL related
 Operating System: *
 PHP Version:  5.2.6
 Assigned To:  pajoye
 New Comment:

Just to keep information flowing, I have also tested with windows 5.3.0
and the issue is still present.


Previous Comments:


[2009-06-24 15:58:08] paj...@php.net

stupid auto no feedback, re assigned.



[2009-06-24 15:55:15] karl dot debisschop at pearson dot com

Downloaded PHP-2.x-win latest (5.2.11-dev) and confirmed that the issue
is still present.



[2008-12-02 23:09:26] nvora at yahoo-inc dot com

we are running into the same issue. where can i take a look at the
patch? is the fix already checked in to cvs?



[2008-11-10 01:00:03] 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".



[2008-11-02 12:46:00] j...@php.net

Please try using this CVS snapshot:

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

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





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

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



#48779 [NEW]: Use of HOST section cause 500 error

2009-07-02 Thread keithdavis at pridedallas dot com
From: keithdavis at pridedallas dot com
Operating system: Windows Vista Business x86
PHP version:  5.3.0
PHP Bug Type: Reproducible crash
Bug description:  Use of HOST section cause 500 error

Description:

I am running PHP on IIS7 and when I try to use the HOST section, I get a
500 Internal Server error every time. Here is the section implementations
that I have tried:



Reproduce code:
---
---
>From manual page: ini.sections
---
[HOST=intranet.pridedallas.com]
track_errors = Off
html_errors = Off
session.bug_compat_42 = Off

AND

[HOST=intranet]
track_errors = Off
html_errors = Off
session.bug_compat_42 = Off

Actual result:
--
HTTP Error 500.0 - Internal Server Error
C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

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



#48778 [NEW]: Files on NTFS Mounted Volumes (Junctions) inaccessible

2009-07-02 Thread cs at koch-aplsystems dot de
From: cs at koch-aplsystems dot de
Operating system: XP SP3
PHP version:  5.3.0
PHP Bug Type: *General Issues
Bug description:  Files on NTFS Mounted Volumes (Junctions) inaccessible

Description:

Apache 2.2 DocumentRoot is on a NTFS drive with a Mounted Volume (NTFS
Junction) Partition. All files the seem inaccessible to PHP 5.3.x (5.2.x
version do not show this problem)

Changing Apache DocumentRoot to a "real" directory on c: works around the
problem.


Reproduce code:
---
not needed

Expected result:

php script loading

Actual result:
--
Fatal error: Unknown: Failed opening required
'C:/Web/apache-root/my_file.php' (include_path='.') in Unknown on line 0

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



#48775 [Opn->Fbk]: php-5.2.10 treats include_path as url/hostname

2009-07-02 Thread jani
 ID:   48775
 Updated by:   j...@php.net
 Reported By:  alexander at sulfrian dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Streams related
 Operating System: Linux
 PHP Version:  5.2.10
 New Comment:

What scripts..? When you install PHP from sources, any existing ini
files ARE NOT TOUCHED. Did you use some RPM or what?


Previous Comments:


[2009-07-02 13:22:13] alexander at sulfrian dot net

Description:

Hi,
I updated recently to php-5.2.10 and some scripts are not working
anymore. The scripts added some elements to the include_path. While
including some files from the include_path php echos the error that it
cannot resolve the host name. I think that this error is caused by the
change, that stream wrappers could be used in the include path and the
PATH_SEPERATOR and the stream wrappers collidate.

Downgrading to php-5.2.9-r2 solves the problem again.

Actual result:
--
[02-Jul-2009 13:21:47] PHP Warning:  require() [function.require]: Couldn't resolve host
name in  on line 
[02-Jul-2009 13:21:47] PHP Warning:  require(rcube_user.php) [function.require]: failed to open stream:
operation failed in  on line 





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



#48535 [Com]: file_exists returns false if the file path is a symlink

2009-07-02 Thread patrick at procurios dot nl
 ID:   48535
 Comment by:   patrick at procurios dot nl
 Reported By:  tobias dot burger at rolmail dot net
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: win32 only - Windows Server 2008
 PHP Version:  5.3.0RC3
 Assigned To:  pajoye
 New Comment:

We have the same problem on our Windows Vista developer machines. Links
were made with the tool junction.exe (because the links need to work on
both Windows XP and Windows Vista).

The problem was fixed in Vista when the old links were replaced by new
mklink links.

We haven't tried PHP 5.3 on XP yet.


Previous Comments:


[2009-06-18 08:16:04] tobias dot burger at rolmail dot net

I have a deep folder structure. For example i made a symlink (mklink
/d) from a folder located on drive d: to a folder on drive c:

D:\root\web\wwwtypo35 -> C:\inetpub\wwwtypo35

If I call now realpath() for
"C:\inetpub\wwwtypo35\Packages\Global\FLOW3\Classes\Package\Package.php"
it returns false on the latest snapshot version of PHP. If I try the RC3
release it works and the function returns the full path.

Maybe the bug exists because I made a symlink to a path on another
drive?



[2009-06-17 21:18:35] paj...@php.net

realpath works here (all tests machine) with symlink. Do you have an
example (path used, dir or files?, etc.)



[2009-06-16 06:59:38] tobias dot burger at rolmail dot net

Now it works!

But realpath doesn't work for symlinked pathes anymore (it returns
false).
Tried the RC3 realease again and there it works.
Has it something to do with the actual fix or should I open a new bug
submission?



[2009-06-15 17:02:37] paj...@php.net

Please try using this CVS snapshot:

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

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

A fix has been applied to 5.3, please try it



[2009-06-12 10:17:12] paj...@php.net

thanks for the update, I have to figure out what's wrong.



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

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



#48695 [Opn]: PHP_SELF / SCRIPT_NAME issues not bogus - bugfix in 5.2.9 still causing trouble

2009-07-02 Thread allerlei+bugs dot php dot net at sihw dot nl
 ID:   48695
 User updated by:  allerlei+bugs dot php dot net at sihw dot nl
 Reported By:  allerlei+bugs dot php dot net at sihw dot nl
 Status:   Open
 Bug Type: CGI related
 Operating System: Centos 4/5
 PHP Version:  5.2.10
 New Comment:

Probably not easy to reproduce without a wrapper like cgiwrap. I did
not get suexec to work, but if you have an install with suexec handling
php-cgi succesfully, that might work.

Here are the $_SERVER values on my test system with apache. This uses
/spinwebstartscript/startscript/php/USERNAME as a handler for php files.
So the file test.php will be called through the handler
/spinwebstartscript/startscript/php/USERNAME/test.php.

Weird thing is that phpinfo() reports the SCRIPT_NAME environment var
differently. Propably this is after some transformation in the php
process, because the only thing different in the two configurations is
the php version.

The interesting value is SCRIPT_NAME.

This is $_SERVER on 5.2.8:
[REDIRECT_SCRIPT_URL] => /test.php
[REDIRECT_SCRIPT_URI] => http://wensweb/test.php
[REDIRECT_HANDLER] => startscript_php
[REDIRECT_STATUS] => 200
[SCRIPT_URL] => /test.php
[SCRIPT_URI] => http://wensweb/test.php
[HTTP_HOST] => wensweb
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 6.0; nl;
rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)
[HTTP_ACCEPT] =>
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[HTTP_ACCEPT_LANGUAGE] => nl-nl,en;q=0.7,fr;q=0.3
[HTTP_ACCEPT_ENCODING] => gzip,deflate
[HTTP_ACCEPT_CHARSET] => UTF-8,*
[HTTP_KEEP_ALIVE] => 300
[HTTP_CONNECTION] => keep-alive
[HTTP_CACHE_CONTROL] => max-age=0
[PATH] => /sbin:/usr/sbin:/bin:/usr/bin
[SERVER_SIGNATURE] => 
[SERVER_SOFTWARE] => Apache
[SERVER_NAME] => wensweb
[SERVER_ADDR] => 192.168.0.10
[SERVER_PORT] => 80
[REMOTE_ADDR] => 192.168.0.3
[DOCUMENT_ROOT] => /home/pakket/wensweb/web
[SERVER_ADMIN] => webmas...@wensweb.spinvis
[SCRIPT_FILENAME] => /home/pakket/wensweb/web/test.php
[REMOTE_PORT] => 55426
[REDIRECT_URL] => /test.php
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => GET
[QUERY_STRING] => 
[REQUEST_URI] => /test.php
[SCRIPT_NAME] => /test.php
[ORIG_PATH_INFO] => 
[ORIG_PATH_TRANSLATED] => /home/pakket/wensweb/web/test.php
[ORIG_SCRIPT_NAME] =>
/spinwebstartscript/startscript/wensweb/php/test.php
[PHP_SELF] => /test.php
[REQUEST_TIME] => 1246544056

And this is $SERVER on 5.2.10:
[REDIRECT_SCRIPT_URL] => /test.php
[REDIRECT_SCRIPT_URI] => http://wensweb/test.php
[REDIRECT_HANDLER] => startscript_php
[REDIRECT_STATUS] => 200
[SCRIPT_URL] => /test.php
[SCRIPT_URI] => http://wensweb/test.php
[HTTP_HOST] => wensweb
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 6.0; nl;
rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)
[HTTP_ACCEPT] =>
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[HTTP_ACCEPT_LANGUAGE] => nl-nl,en;q=0.7,fr;q=0.3
[HTTP_ACCEPT_ENCODING] => gzip,deflate
[HTTP_ACCEPT_CHARSET] => UTF-8,*
[HTTP_KEEP_ALIVE] => 300
[HTTP_CONNECTION] => keep-alive
[HTTP_CACHE_CONTROL] => max-age=0
[PATH] => /sbin:/usr/sbin:/bin:/usr/bin
[SERVER_SIGNATURE] => 
[SERVER_SOFTWARE] => Apache
[SERVER_NAME] => wensweb
[SERVER_ADDR] => 192.168.0.10
[SERVER_PORT] => 80
[REMOTE_ADDR] => 192.168.0.3
[DOCUMENT_ROOT] => /home/pakket/wensweb/web
[SERVER_ADMIN] => webmas...@wensweb.spinvis
[SCRIPT_FILENAME] => /home/pakket/wensweb/web/test.php
[REMOTE_PORT] => 55464
[REDIRECT_URL] => /test.php
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => GET
[QUERY_STRING] => 
[REQUEST_URI] => /test.php
[SCRIPT_NAME] =>
/spinwebstartscript/startscript/wensweb/php/test.php
[ORIG_PATH_INFO] => 
[ORIG_PATH_TRANSLATED] => /home/pakket/wensweb/web/test.php
[PHP_SELF] => /spinwebstartscript/startscript/wensweb/php/test.php
[REQUEST_TIME] => 1246544340


Thanks, Jelmer


Previous Comments:


[2009-07-02 13:33:12] sriram dot natarajan at gmail dot com

what configuration do i need to set in apache to reproduce this ?



[2009-07-02 07:42:01] allerlei+bugs dot php dot net at sihw dot nl

Yes. This is what happened in 5.2.10. PHP_SELF and SCRIPT_FILENAME
changed in respect to 5.2.8. (Sorry, I skipped 5.2.9). I installed
5.2.10 but had to rebuild 5.2.8 because of the PHP_SELF troubles.

This happens when some process (in my case an external handler
executable that starts php under the UID of the virtual web site, but if
would take a look at suexec as well) juggles with SCRIPT_NAME,
ORIG_SCRIPTNAME etcetera.

By th

#48777 [NEW]: Option to control SoapFault HTTP Status return (Reopen of #43507)

2009-07-02 Thread jeff_dafoe at harte-hanks dot com
From: jeff_dafoe at harte-hanks dot com
Operating system: Linux 
PHP version:  5.2.10
PHP Bug Type: SOAP related
Bug description:  Option to control SoapFault HTTP Status return (Reopen of 
#43507)

Description:

Bug #43507 describes an issue with Adobe Flex / Flash / Air where the host
browser does not pass the HTTP response body down to the Flash player when
the browser receives a HTTP status code of 500.  The bug suggests that the
ability to set the HTTP status code be allowed.  The fix that was decided
on instead was to look for the user agent string "Shockwave Flash".

The issue with this solution is that the player's requests either never
did, only do on some platforms, or no longer contain this user agent
string.  The player's requests contain the user agent string associated
with the host browser.  AIR requests (a platform where the host browser is
integrated into the Flash plugin, essentially) contain the Webkit UA
string.  

To work around this we have patched soap.c's soap_server_fault_ex to set
use_http_error_status to 0.  Ideally, this setting could be exposed in the
SoapServer constructor's "options" or "features".  Since this is a
workaround for a limitation in web browser's NAPI and not a problem with
the SOAP library itself, making the use_http_error_status available as an
option seems like an acceptable compromise.


Reproduce code:
---
throw new SoapFault('Client', $_SERVER['HTTP_USER_AGENT']);

Expected result:

HTTP/1.1 200 OK


Actual result:
--
HTTP/1.1 500 Internal Service Error

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



#48775 [NEW]: php-5.2.10 treats include_path as url/hostname

2009-07-02 Thread alexander at sulfrian dot net
From: alexander at sulfrian dot net
Operating system: Linux
PHP version:  5.2.10
PHP Bug Type: Streams related
Bug description:  php-5.2.10 treats include_path as url/hostname

Description:

Hi,
I updated recently to php-5.2.10 and some scripts are not working anymore.
The scripts added some elements to the include_path. While including some
files from the include_path php echos the error that it cannot resolve the
host name. I think that this error is caused by the change, that stream
wrappers could be used in the include path and the PATH_SEPERATOR and the
stream wrappers collidate.

Downgrading to php-5.2.9-r2 solves the problem again.

Actual result:
--
[02-Jul-2009 13:21:47] PHP Warning:  require() [function.require]: Couldn't resolve host name
in  on line 
[02-Jul-2009 13:21:47] PHP Warning:  require(rcube_user.php) [function.require]: failed to open stream:
operation failed in  on line 

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



#48774 [NEW]: SIGSEGVs when using curl_copy_handle()

2009-07-02 Thread fel...@php.net
From: fel...@php.net
Operating system: Linux
PHP version:  5.3CVS-2009-07-02 (CVS)
PHP Bug Type: cURL related
Bug description:  SIGSEGVs when using curl_copy_handle()

Description:

See below.

Reproduce code:
---
1º
http://localhost/";;
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, array("Hello" => "World"));
curl_setopt($ch, CURLOPT_URL, $url);
$copy = curl_copy_handle($ch);
curl_close($ch);

2º
http://localhost/";;
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, array("Hello" => "World"));
curl_setopt($ch, CURLOPT_URL, $url);
$copy = curl_copy_handle($ch);
curl_close($ch);
curl_exec($copy);
curl_close($copy);

Expected result:

No SIGSEGV.

Actual result:
--
1º
*** glibc detected *** sapi/cli/php: double free or corruption (fasttop):
0x0a663260 ***
=== Backtrace: =
/lib/i686/cmov/libc.so.6[0xb65a81d4]
/lib/i686/cmov/libc.so.6(cfree+0x96)[0xb65aa186]
/usr/local/lib/libcurl.so.4(curl_formfree+0x8a)[0xb74533ca]
sapi/cli/php[0x819c1af]
sapi/cli/php(zend_llist_destroy+0x33)[0x8612f05]
sapi/cli/php(zend_llist_clean+0x11)[0x8612f71]
sapi/cli/php[0x81a0a40]
sapi/cli/php[0x81a0d81]
sapi/cli/php[0x86321e4]
sapi/cli/php(zend_hash_del_key_or_index+0x192)[0x862f5d9]
sapi/cli/php(_zend_list_delete+0xa0)[0x8631df4]
sapi/cli/php(_zval_dtor_func+0x198)[0x861cb28]
sapi/cli/php[0x860cfcc]
sapi/cli/php(_zval_ptr_dtor+0xb8)[0x860d3b1]
sapi/cli/php(_zval_ptr_dtor_wrapper+0x21)[0x861cf08]
sapi/cli/php[0x862fa96]
sapi/cli/php(zend_hash_graceful_reverse_destroy+0x3e)[0x862fc1a]
sapi/cli/php[0x860c5bb]
sapi/cli/php[0x861f79a]
sapi/cli/php(php_request_shutdown+0x682)[0x8590ac0]
sapi/cli/php[0x87035c7]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb654f775]
sapi/cli/php[0x8078a91]


2º
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb631a6f0 (LWP 4050)]
0xb74ef368 in curl_formfree () from /usr/local/lib/libcurl.so.4
Current language:  auto; currently asm
(gdb) bt
#0  0xb74ef368 in curl_formfree () from /usr/local/lib/libcurl.so.4
#1  0xb74ef37c in curl_formfree () from /usr/local/lib/libcurl.so.4
#2  0x0819c1af in curl_free_post (post=0xaa1741c) at
/home/felipe/dev/php5/ext/curl/interface.c:1246
#3  0x08612f05 in zend_llist_destroy (l=0xaa17230) at
/home/felipe/dev/php5/Zend/zend_llist.c:114
#4  0x08612f71 in zend_llist_clean (l=0xaa17230) at
/home/felipe/dev/php5/Zend/zend_llist.c:126
#5  0x081a0a40 in _php_curl_close_ex (ch=0xaa17128, tsrm_ls=0xa7aa4b8) at
/home/felipe/dev/php5/ext/curl/interface.c:2302
#6  0x081a0d81 in _php_curl_close (rsrc=0xaa174d8, tsrm_ls=0xa7aa4b8) at
/home/felipe/dev/php5/ext/curl/interface.c:2343
#7  0x086321e4 in list_entry_destructor (ptr=0xaa174d8) at
/home/felipe/dev/php5/Zend/zend_list.c:184
#8  0x0862f5d9 in zend_hash_del_key_or_index (ht=0xa7ac7d4, arKey=0x0,
nKeyLength=0, h=5, flag=1) at /home/felipe/dev/php5/Zend/zend_hash.c:497
#9  0x08631df4 in _zend_list_delete (id=5, tsrm_ls=0xa7aa4b8) at
/home/felipe/dev/php5/Zend/zend_list.c:58
#10 0x081a09b5 in zif_curl_close (ht=1, return_value=0xaa16fe8,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=0,
tsrm_ls=0xa7aa4b8)
at /home/felipe/dev/php5/ext/curl/interface.c:2279


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

#48733 [Asn->Csd]: CURLOPT_WRITEHEADER warns "the provided file handle is not writable"

2009-07-02 Thread iliaa
 ID:   48733
 Updated by:   il...@php.net
 Reported By:  sta at netimage dot dk
-Status:   Assigned
+Status:   Closed
 Bug Type: cURL related
 Operating System: FreeBSD 7.1
 PHP Version:  5.2.10
 Assigned To:  iliaa
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2009-06-30 10:05:30] sta at netimage dot dk

Description:

I have a script that temporarily stores the headers in a file created
by $fp_header = tmpfile().
It worked perfectly until upgrading from 5.2.9.
Now curl_setopt($ch, CURLOPT_WRITEHEADER, $fp_header)
triggers a warning:
  Warning: curl_setopt(): the provided file handle is not writable in
/curl.php on line x



Reproduce code:
---
http://dk.php.net/');
if ( ! ($fp_header = tmpfile())) { die('File not created'); }
curl_setopt($ch, CURLOPT_WRITEHEADER,   $fp_header);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); echo "HTTP
$http_code\n";
curl_close($ch);
echo "Headers ===>\n";
rewind($fp_header); echo stream_get_contents($fp_header);
echo "<=== Headers\n";
rewind($fp_header); ftruncate($fp_header, 0);
fwrite($fp_header, "The file is writeable\n");
echo "My test ===>\n";
rewind($fp_header); echo stream_get_contents($fp_header);
echo "<=== My test\n";
fclose($fp_header);

Expected result:

Output from PHP 5.2.9 (run from command line):
HTTP 200
Headers ===>
HTTP/1.1 200 OK
Date: Tue, 30 Jun 2009 09:51:08 GMT
Server: Apache/2.2.9 (FreeBSD) DAV/2 PHP/5.2.8 with Suhosin-Patch
X-Powered-By: PHP/5.2.8
Last-Modified: Tue, 30 Jun 2009 10:37:51 GMT
Content-language: en
Set-Cookie: COUNTRY=DNK%2C193.162.142.106; expires=Tue, 07-Jul-2009
09:51:08 GMT; path=/; domain=.php.net
X-PHP-QUESTION: I wonder if anyone will ever notice this
Transfer-Encoding: chunked
Content-Type: text/html;charset=utf-8

<=== Headers
My test ===>
The file is writeable
<=== My test


Actual result:
--
Output from PHP 5.2.10 (run from command line):
PHP Warning:  curl_setopt(): the provided file handle is not writable
in /curl.php on line 5

Warning: curl_setopt(): the provided file handle is not writable in
/curl.php on line 5
HTTP 200
Headers ===>
<=== Headers
My test ===>
The file is writeable
<=== My test






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



#48695 [Com]: PHP_SELF / SCRIPT_NAME issues not bogus - bugfix in 5.2.9 still causing trouble

2009-07-02 Thread sriram dot natarajan at gmail dot com
 ID:   48695
 Comment by:   sriram dot natarajan at gmail dot com
 Reported By:  allerlei+bugs dot php dot net at sihw dot nl
 Status:   Open
 Bug Type: CGI related
 Operating System: Centos 4/5
 PHP Version:  5.2.10
 New Comment:

what configuration do i need to set in apache to reproduce this ?


Previous Comments:


[2009-07-02 07:42:01] allerlei+bugs dot php dot net at sihw dot nl

Yes. This is what happened in 5.2.10. PHP_SELF and SCRIPT_FILENAME
changed in respect to 5.2.8. (Sorry, I skipped 5.2.9). I installed
5.2.10 but had to rebuild 5.2.8 because of the PHP_SELF troubles.

This happens when some process (in my case an external handler
executable that starts php under the UID of the virtual web site, but if
would take a look at suexec as well) juggles with SCRIPT_NAME,
ORIG_SCRIPTNAME etcetera.

By the way: I am not saying one way is better than the other. PHP_SELF
should reflect the url the client needs to call the same script again
(right?). So maybe the way those cgi wrappers change the cgi environment
should be changed. The "startscript" executable I use company wide uses
the same logic for building ORIG_SCRIPTNAME etcetera as the old cgiwrap
code it is slightly based on.

But: this looks to me as a big change for a minor version number
update. I would expect the same external behaviour between versions
numbers that differ only behind the second dot.

Maybe we should get it straight which environment variables php-cgi
uses to create PHP_SELF and friends.

If you need any more information, please tell me. (I am going to be on
a holiday soon, but will be back...).


Thanks,

Jelmer Jellema



[2009-07-02 04:29:19] sriram dot natarajan at gmail dot com

have you tried this issue with recent php 5.2.10 . r u able to
reproduce 
this with 5.2.10 as well ?



[2009-06-25 14:22:35] allerlei+bugs dot php dot net at sihw dot nl

Description:

Bug #47625 was closed as bogus (because it would be the same as bug
#47042) but it is not. In version 5.2.10 at least, PHP_SELF and
SCRIPT_FILENAME are set based on the ORIG_SCRIPTNAME, while in version
5.2.8 these are based on SCRIPT_NAME.

So bug #47042 fixes some bug, but introduces a new one. Therefore this
is not a duplicate bug. It is not bogus because the values of PHP_SELF
etc changed betwoon 5.2.10 without this being part of the specification
for 5.2.10. It breaks a lot of code on my systems, including phpmyadmin
and joomla.

Problem is that PHP_SELF should refer to the URL before the internal
redirect or external handler. This is a problematic requirement because
of all the jugling with SCRIPTNAME and ORIG_SCRIPTNAME, but bug #47625
described the bug exactly. The problem might me in the naming: handlers
put the redirection into ORIG_SCRIPTNAME and the original path in
SCRIPTNAME.

I use a handler called startscript that is called with some pathinfo
like /../startscript/php/myuser/path/to/script/. 
So the path
/centraal/scripts/info.php
when called from a vsite owned by user jelmer, is rewritten to
/usr/bin/startscript/php/jelmer/scripts/info.php

but PHP_SELF should remain /centraal/scripts/info.php

Thank you for your thougths,

Jelmer






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



#48773 [NEW]: Incorrect error when setting PDO::ATTR_STATEMENT_CLASS with ctor_args

2009-07-02 Thread saschagros at gmail dot com
From: saschagros at gmail dot com
Operating system: Linux
PHP version:  6CVS-2009-07-02 (snap)
PHP Bug Type: PDO related
Bug description:  Incorrect error when setting PDO::ATTR_STATEMENT_CLASS with 
ctor_args

Description:

I'm getting the following error when the ATTR_STATEMENT_CLASS option is
set...

Fatal error: Uncaught exception 'PDOException' with message
'SQLSTATE[HY000]: General error: PDO::ATTR_STATEMENT_CLASS requires format
array(classname, array(ctor_args)); the classname must be a string
specifying an existing class' in
/drupal7/includes/database/database.inc:338

The same configuration works for PHP 5.2 and 5.3

The reproduce code is the constructor of the DatabaseConnection class of
Drupal 7, see also
http://cvs.drupal.org/viewvc.py/drupal/drupal/includes/database/database.inc?revision=1.57&view=markup

Reproduce code:
---
  function __construct($dsn, $username, $password, $driver_options =
array()) {
// Because the other methods don't seem to work right.
$driver_options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION;

// Call PDO::__construct and PDO::setAttribute.
parent::__construct($dsn, $username, $password, $driver_options);

// Set a specific PDOStatement class if the driver requires that.
if (!empty($this->statementClass)) {
  $this->setAttribute(PDO::ATTR_STATEMENT_CLASS,
array($this->statementClass, array($this)));
}
  }


Expected result:

The connection can be established

Actual result:
--
Fatal error: Uncaught exception 'PDOException' with message
'SQLSTATE[HY000]: General error: PDO::ATTR_STATEMENT_CLASS requires format
array(classname, array(ctor_args)); the classname must be a string
specifying an existing class' in
/drupal7/includes/database/database.inc:338
Stack trace:
#0 .../drupal7/includes/database/database.inc(338): PDO->setAttribute(13,
Array)
#1 .../drupal7/includes/database/mysql/database.inc(36):
DatabaseConnection->__construct('mysql:host=loca...', 'd7', 'd7', Array)
#2 /.../drupal7/includes/database/database.inc(1350):
DatabaseConnection_mysql->__construct(Array)
#3 .../drupal7/includes/database/database.inc(1218):
Database::openConnection('default', 'default')
#4 .../drupal7/includes/database/database.inc(1793):
Database::getConnection('default')
#5 .../drupal7/includes/bootstrap.inc(1242): db_query('SELECT 1 FROM
{...', Array)


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



#48754 [Opn->Ver]: mysql_close() crash php when no handle specified

2009-07-02 Thread uw
 ID:   48754
 Updated by:   u...@php.net
-Summary:  mysql_close() crash php
 Reported By:  busia at tiscali dot it
-Status:   Open
+Status:   Verified
 Bug Type: MySQL related
-Operating System: Windows Vista
+Operating System: *
 PHP Version:  5.3.0
-Assigned To:  
+Assigned To:  mysql
 New Comment:

This one is funny. It may have existed since more than one year now and
nobody has ever found it.


Previous Comments:


[2009-07-01 21:59:31] busia at tiscali dot it

1) The sleep function is not needed
2) The connection is successfull

An other information: if I save in $a the mysql_connect return value
and pass it to mysql_close php doesn't crash. In othe words this script
works well:


This instead crashes php:




[2009-07-01 18:04:17] sjoerd-php at linuxonly dot nl

Thank you for your bug report.

I have a couple of questions regarding your bug report:
1. Is the sleep(2) needed to reproduce the bug?
2. Does the database connection succeed? (i.e. what is the return value
of mysql_connect?)



[2009-07-01 12:30:54] busia at tiscali dot it

Description:

This simple code crash php.

This is the Debug diagnostic tool output:

In
php__PID__5128__Date__07_01_2009__Time_02_22_25PM__909__Second_Chance_Exception_C005.dmp
the assembly instruction at php_mysql!zif_mysql_close+92 in C:\Program
Files\PHP\ext\php_mysql.dll from The PHP Group has caused an access
violation exception (0xC005) when trying to read from memory
location 0x on thread 0


Report for
php__PID__5128__Date__07_01_2009__Time_02_22_25PM__909__Second_Chance_Exception_C005.dmp
Type of Analysis Performed   Crash Analysis 
Machine Name   PC-UTENTE 
Operating System   Windows Vista Service Pack 1 
Number Of Processors   2 
Process ID   5128 
Process Image   C:\Program Files\PHP\php.exe 
System Up-Time   00:13:11 
Process Up-Time   00:00:02 


Thread 0 - System ID 5132
Entry point   php!mainCRTStartup 
Create time   01/07/2009 14.22.23 
Time spent in user mode   0 Days 0:0:0.31 
Time spent in kernel mode   0 Days 0:0:0.62 






Function Arg 1 Arg 2 Arg 3   Source 
php_mysql!zif_mysql_close+92  02a0d350    

php5ts!zend_do_fcall_common_helper_SPEC+946  02a40070  
  00052fd0
php5ts!ZEND_DO_FCALL_SPEC_CONST_HANDLER+130 00c0fbd4 00052fd0  
  00c0fe70
php5ts!execute+29e 02a40070 00052f00 
php5ts!zend_execute_scripts+f6 0008 00052fd0   
 
php5ts!php_execute_script+22d 00c0fe70 00052fd0    

php!main+bf1 0002 00052f68 00051888
php!mainCRTStartup+e3 7ffdb000 00c0ffd4 77bee4b6
kernel32!BaseThreadInitThunk+e 7ffdb000 770bbeaf   
 
ntdll!__RtlUserThreadStart+23 00402d78 7ffdb000    

ntdll!_RtlUserThreadStart+1b 00402d78 7ffdb000    





PHP_MYSQL!ZIF_MYSQL_CLOSE+92In
php__PID__5128__Date__07_01_2009__Time_02_22_25PM__909__Second_Chance_Exception_C005.dmp
the assembly instruction at php_mysql!zif_mysql_close+92 in C:\Program
Files\PHP\ext\php_mysql.dll from The PHP Group has caused an access
violation exception (0xC005) when trying to read from memory
location 0x on thread 0

Module Information 
Image Name: C:\Program Files\PHP\ext\php_mysql.dll   Symbol Type:  PDB

Base address: 0x01c3   Time Stamp:  Mon Jun 29 22:24:49 2009  
Checksum: 0x   Comments:  Thanks to Zeev Suraski, Zak Greant,
Georg Richter 
COM DLL: False   Company Name:  The PHP Group 
ISAPIExtension: False   File Description:  MySQL 
ISAPIFilter: False   File Version:  5.3.0 
Managed DLL: False   Internal Name:  MYSQL extension 
VB DLL: False   Legal Copyright:  Copyright © 1997-2009 The PHP Group 
Loaded Image Name:  php_mysql.dll   Legal Trademarks:  PHP 
Mapped Image Name:  C:\Program Files\PHP\ext\php_mysql.dll   Original
filename:  php_mysql.dll 
Module name:  php_mysql   Private Build:   
Single Threaded:  False   Product Name:  PHP 
Module Size:  44,00 KBytes   Product Version:  5.3.0 
Symbol File Name: 
C:\Users\utente\Desktop\php-debug-pack-5.3.0-Win32-VC6-x86\php_mysql.pdb
  Special Build:  & 




Reproduce code:
---







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



#43306 [Com]: File Download Problem.

2009-07-02 Thread manish at sakshiinfosys dot com
 ID:   43306
 Comment by:   manish at sakshiinfosys dot com
 Reported By:  d dot tas40 at chello dot nl
 Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: Windows XP
 PHP Version:  5.2.5
 New Comment:

Hello,

I have created Mobile Software Secured download website.

When user click on download link that time opening box to Download
file.

When Download Click on 'OK' button that time Succesfully downloaded
after Deleted that file and directory.

But, When Download Click on 'Cancel' Button that time also Deleted that
file and directory. Actually Click on 'Cancel' button and user not
Downloaded.

Please i have need to help to Why we know file downloaded Successfully
or not.

If you can not understand my problem than aslo reply me.

Thanks & Regards
Manish Bhuva


Previous Comments:


[2009-05-06 18:56:54] fali68 at yahoo dot com

I have the same issue with PHP 4.449 and 4.1.2.0 mysql. and worked fine
with pervious version. can somone shed some light on this?
here is the code I'm using
mysql_select_db($database_tred, $conn);
$query = sprintf("SELECT * FROM Files WHERE Files.FileID = %s",
$TID_Recordset1);
$result = MYSQL_QUERY($query, $tred)or die(mysql_error());
$data = MYSQL_RESULT($result,0,"filename"); 
$type = MYSQL_RESULT($result,0,"filetype");
$filesize =  MYSQL_RESULT($result,0,"filesize");
$file = MYSQL_RESULT($result,0,"bin_data");
if($result) {
header("Content-Tranfer-Encoding: binary");
header("Content-Disposition: attachment; filename= $data");
header("Content-length: $filesize");
header("Content-Description: PHP Generated Data");
print ($file);



[2009-04-03 04:30:10] marcell at equylybra dot com

Also having issues using the same script. I get no errors when
downloading files with sizes below 20Mb.

>From 20Mb files are perfectly downloaded via FTP but are saved with a
corrupted file size (0Kb) when downloaded via PHP. Tryed the solution
proposed by "webmaster at anpera dot net" too but I had no success.

Tryed without Content-Lenght header with no effect. Also tryed with
different Content-Types (e.g.
'application/octet-stream','application/force-download','application/zip').

I am on PHP 5.2.8 with Apache 2.2.11 under Linux



[2008-12-24 18:31:39] jon at jonraivala dot com

Using strlen of the blob instead of filesize in the header works for
me.

Example - 

header("Content-Length: ".strlen($blob_data));

Hope this helps someone.



[2008-10-23 09:54:32] arasan at mahiti dot org

I've used this code but the download rate is very slow compared to
ordinary download. whether there is any way to overcome this?



[2008-09-25 04:51:26] lbarn...@php.net

Please try without any Content-Length header, your HTTP server is
probably using a chunked transfert encoding. Also try with a
Content-Type like 'application/octet-stream'.

Also check the character_set_* variables in your MySQL connection, the
server may try to convert the query or the results if some variables do
not match (blobs are binary but queries and results are not).



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

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



#48765 [Fbk->Opn]: When I use for MYSQLi "load data local infile" Apache 2.2.11 gives out ERROR!

2009-07-02 Thread mypost100 at gmail dot com
 ID:   48765
 User updated by:  mypost100 at gmail dot com
 Reported By:  mypost100 at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: MySQLi related
 Operating System: Windows XP sp3
 PHP Version:  5.3.0
 New Comment:

Apache: apache_2.2.11-win32-x86-openssl-0.9.8i.msi
PHP: php-5.3.0-Win32-VC6-x86.zip
MySql: mysql-5.1.34-win32.msi (5.1.34-community)

Start PHP without errors.
max_execution_time = 180
max_input_time = 180

I use HTTPS(SSL) - I can't use simple HTTP.

table1 dump (9 fields):
CREATE TABLE IF NOT EXISTS `table1` (
  `partnum` varchar(20) NOT NULL DEFAULT '0',
  `partnumre` varchar(20) NOT NULL DEFAULT '0',
  `partname` varchar(50) NOT NULL DEFAULT '0',
  `qumin` varchar(5) NOT NULL DEFAULT '0',
  `weight` varchar(10) NOT NULL DEFAULT '0',
  `rg` varchar(5) NOT NULL DEFAULT '0',
  `price` varchar(10) NOT NULL DEFAULT '0',
  `pfand` varchar(10) NOT NULL DEFAULT '0',
  `suppid` int(5) unsigned NOT NULL DEFAULT '1',
  KEY `partnum` (`partnum`(7))
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;

Code:
$qu1="ALTER TABLE table1 ALTER COLUMN suppid SET DEFAULT \"1\"";
$setdefault=mysqli_query($MYSQLI_CONPR,$qu1);

$qu2="ALTER TABLE table1 DISABLE KEYS";
$indexoff=mysqli_query($MYSQLI_CONPR,$qu2);

I use for loading 7 fields
$qu3="LOAD DATA LOCAL INFILE 'D:/file.txt' INTO TABLE table1 FIELDS
TERMINATED BY ';' LINES TERMINATED BY '\r\n'
(partnum,partnumre,partname,weight,rg,price,pfand)";
$res_load=mysqli_query($MYSQLI_CONPR,$qu3);

Later 3-4 sec after run script
Apache gives out window with error
"The program has caused an error and will be closed"

(but dont close and works causing same error)

PHP 5.2.10 takes for this operation too 3-4 sec, but without any errors
and all OK!


Previous Comments:


[2009-07-02 10:15:34] johan...@php.net

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


What kind of error are you getting? What does your code look like? What
MySQL version? What does the table and statement look like?



[2009-07-02 03:03:22] mypost100 at gmail dot com

Description:

Hello.
When I use for MYSQLi "load data local infile"
(file.txt = 110 rows)
divider of columns - [ ; ]
Apache 2.2.11 gives out ERROR!
Loaded rows = 62 and stop of execution file php.






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



#48400 [Bgs->Opn]: gpf on imap on when using OP_PROTOTYPE option

2009-07-02 Thread dkelsey
 ID:   48400
 Updated by:   dkel...@php.net
 Reported By:  dkelsey at uk dot ibm dot com
-Status:   Bogus
+Status:   Open
 Bug Type: IMAP related
 Operating System: *
 PHP Version:  5.*, 6CVS (2009-05-26)
 New Comment:

re-opening the original bug as new bug raised was closed a bogus.


Previous Comments:


[2009-07-02 06:25:58] dkelsey at uk dot ibm dot com

I sent an email to the c-client mailing list and the response I got
states clearly that it is a php problem as php is not using the mail
apis correctly. Here is the response


Hi Dave -

This is not a bug.  Rather, you have misunderstood some important
points.

There are three issues with your sample program.

[1] You SHOULD include c-client.h, and not mail.h directly.  mail.h has

most, but not all, of the consumer API definitions and prototypes.

[2] You MUST (repeat, MUST!!) include linkage.c at the start of your 
main() function instead of calling mail_link() directly.

[3] A prototype stream is not something that can be given to 
mail_close_full().

Without knowing why you are opening a prototype stream, it appears to
me 
that you do not understand what a prototype stream is and how/why it is

used; especially since this is an IMAP prototype stream, something
which 
is almost completely useless except for internal c-client purposes.

A prototype stream is not a stream.  The closest analog to a prototype

stream would be a factory object or class definition.  Internally, a 
prototype stream is simply a pointer to a static area of constant
memory 
that has the dtb for that driver.

Prototype streams have VERY limited use to API consumers.  The primary

consumer use is that of a local filesystem format prototype stream as
an 
argument to mail_create() to force the created mailbox to be in that 
format.  However, that use is deprecated in favor of the #driver.???/ 
prefix; e.g.,
 mail_create (NIL,"#driver.mix/newbox");
is the preferred and more modern way of doing
 mail_create (mail_open
(NIL,existingmixmailbox,OP_PROTOTYPE),"newbox");

The prototype stream method is the way to create a new local filesystem

mailbox of the same format as an existing local filesystem mailbox, as

opposed to a specified format via the #driver.???/ syntax .  This is 
therefore the 99% reason why any API consumer would use a prototype 
stream.

Your use may be in the remaining 1% (it would have to be, given that
it's 
an IMAP prototype stream), but I suspect that it's really a case of
your 
not understanding what you are doing.

Getting back to the subject at hand; since it is a factory object (or 
class definition), it is inappropriate to call non-factory methods on
it. 
For most API consumers, other than mail_create() with a local
filesystem 
driver prototype, the remaining uses are power tools for master
sorcerers.

mail_close() and mail_close_full() are completely inappropriate methods
to 
use with a prototype stream, even for a master sorcerer.  A prototype 
stream is not a stream, and is not something that can be closed.  When
you 
are finished with a prototype stream, you just drop the pointer.

-- Mark --

>From the response, maybe the best solution is to just remove to
OP_PROTOTYPE option, but the response does seem to indicate there could
be other issues hiding away.



[2009-05-26 19:59:54] j...@php.net

Considering this crashes also test.c:

#include "mail.h"

void mm_searched (MAILSTREAM *stream,unsigned long number){}
void mm_exists (MAILSTREAM *stream,unsigned long number){}
void mm_expunged (MAILSTREAM *stream,unsigned long number){}
void mm_flags (MAILSTREAM *stream,unsigned long number){}
void mm_notify (MAILSTREAM *stream,char *string,long errflg){}
void mm_list (MAILSTREAM *stream,int delimiter,char *name,long
attributes){}
void mm_lsub (MAILSTREAM *stream,int delimiter,char *name,long
attributes){}
void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status){}
void mm_log (char *string,long errflg){}
void mm_dlog (char *string){}
void mm_login (NETMBX *mb,char *user,char *pwd,long trial){}
void mm_critical (MAILSTREAM *stream){}
void mm_nocritical (MAILSTREAM *stream){}
long mm_diskerror (MAILSTREAM *stream,long errcode,long serious){}
void mm_fatal (char *string){}

int main(void) 
{
MAILSTREAM *imap_stream;

mail_link (&imapdriver);
imap_stream = mail_open(NIL, "{localhost}", OP_PROTOTYPE);
mail_close_full(imap_stream, 0);
}

# gcc -g -lc-client -I/usr/include/imap/ test.c -o test
# ./test
*** glibc detected *** ./test: free(): invalid pointer: 0x0063e260 ***
=== Backtrace: =
/lib/libc.so.6[0xa7c3a4]
/lib/libc.so.6(cfree+0x96)[0xa7e356]
/usr/li

#48772 [Opn->Bgs]: php_mysql.dll crashes

2009-07-02 Thread jani
 ID:   48772
 Updated by:   j...@php.net
 Reported By:  bentogoa at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Reproducible crash
 Operating System: Windows XP
 PHP Version:  5.3.0
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #48754



Previous Comments:


[2009-07-02 11:29:07] bentogoa at gmail dot com

Description:

php_mysql.dll crashes when mysql_close() is called with no link
identifier.

Apache 2.2.10

Running php with only one extension

Reproduce code:
---
 

Expected result:

Connected successfully

Actual result:
--
php_mysql.dll crashes and the connection is reset.





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



#48766 [Opn->Bgs]: gpf on imap on when using OP_PROTOTYPE option (Reopened)

2009-07-02 Thread jani
 ID:   48766
 Updated by:   j...@php.net
 Reported By:  d_kelsey at uk dot ibm dot com
-Status:   Open
+Status:   Bogus
 Bug Type: IMAP related
 Operating System: linux
 PHP Version:  5.2CVS-2009-07-02 (snap)
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Your comment is registered. Please don't spam the bug database. Mail to
internals@ if you disagree on something.


Previous Comments:


[2009-07-02 06:32:06] d_kelsey at uk dot ibm dot com

Description:

I was not able to re-open bug 48400 so have created a new bug with the
extra information.

I asked the question on the c-client mailing list using the example
code provided in bug http://bugs.php.net/bug.php?id=48400
and the response implies that php code is at fault here 

-
This is not a bug.  Rather, you have misunderstood some important
points.

There are three issues with your sample program.

[1] You SHOULD include c-client.h, and not mail.h directly.  mail.h has

most, but not all, of the consumer API definitions and prototypes.

[2] You MUST (repeat, MUST!!) include linkage.c at the start of your 
main() function instead of calling mail_link() directly.

[3] A prototype stream is not something that can be given to 
mail_close_full().

Without knowing why you are opening a prototype stream, it appears to
me 
that you do not understand what a prototype stream is and how/why it is

used; especially since this is an IMAP prototype stream, something
which 
is almost completely useless except for internal c-client purposes.

A prototype stream is not a stream.  The closest analog to a prototype

stream would be a factory object or class definition.  Internally, a 
prototype stream is simply a pointer to a static area of constant
memory 
that has the dtb for that driver.

Prototype streams have VERY limited use to API consumers.  The primary

consumer use is that of a local filesystem format prototype stream as
an 
argument to mail_create() to force the created mailbox to be in that 
format.  However, that use is deprecated in favor of the #driver.???/ 
prefix; e.g.,
 mail_create (NIL,"#driver.mix/newbox");
is the preferred and more modern way of doing
 mail_create (mail_open
(NIL,existingmixmailbox,OP_PROTOTYPE),"newbox");

The prototype stream method is the way to create a new local filesystem

mailbox of the same format as an existing local filesystem mailbox, as

opposed to a specified format via the #driver.???/ syntax .  This is 
therefore the 99% reason why any API consumer would use a prototype 
stream.

Your use may be in the remaining 1% (it would have to be, given that
it's 
an IMAP prototype stream), but I suspect that it's really a case of
your 
not understanding what you are doing.

Getting back to the subject at hand; since it is a factory object (or 
class definition), it is inappropriate to call non-factory methods on
it. 
For most API consumers, other than mail_create() with a local
filesystem 
driver prototype, the remaining uses are power tools for master
sorcerers.

mail_close() and mail_close_full() are completely inappropriate methods
to 
use with a prototype stream, even for a master sorcerer.  A prototype 
stream is not a stream, and is not something that can be closed.  When
you 
are finished with a prototype stream, you just drop the pointer.

-- Mark --
-

The simpliest solution would be to remove the OP_PROTOTYPE option but
the response may indicate a concern in general in the way php uses the
c-client apis.






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



#48772 [NEW]: php_mysql.dll crashes

2009-07-02 Thread bentogoa at gmail dot com
From: bentogoa at gmail dot com
Operating system: Windows XP
PHP version:  5.3.0
PHP Bug Type: Reproducible crash
Bug description:  php_mysql.dll crashes

Description:

php_mysql.dll crashes when mysql_close() is called with no link
identifier.

Apache 2.2.10

Running php with only one extension

Reproduce code:
---
 

Expected result:

Connected successfully

Actual result:
--
php_mysql.dll crashes and the connection is reset.

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



#45280 [Csd]: Reflection of instantiated COM classes causes PHP to crash.

2009-07-02 Thread RQuadling at GMail dot com
 ID:   45280
 User updated by:  RQuadling at GMail dot com
 Reported By:  RQuadling at GMail dot com
 Status:   Closed
 Bug Type: COM related
 Operating System: Windows XP SP2
 PHP Version:  5.3CVS-2008-06-16 (snap)
 Assigned To:  kalle
 New Comment:

Hmm.

Ok. So no crash, but no valid output either.


Previous Comments:


[2009-07-01 18:47:32] ka...@php.net

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.





[2009-05-11 13:10:55] RQuadling at GMail dot com

Thread 0 - System ID 5216
Entry point   php!mainCRTStartup 
Create time   11/05/2009 14:03:27 
Time spent in user mode   0 Days 0:0:0.62 
Time spent in kernel mode   0 Days 0:0:0.93 

Function Arg 1 Arg 2 Arg 3   Source 
php5!zend_hash_internal_pointer_reset_ex+c  00c0e8dc   
 
0b18
php5!zm_info_reflection+700 00c0e938 015209b0 0139ebf0
php5!zim_reflection_class___toString+9a  0139fea8 
00c0ea3c
php5!zend_call_function+6fa  00c0e978 0024
php5!call_user_function_ex+65  00c0ea40 00c0ea44   

php5!zim_reflection_export+70 0002 0139ff08 00c0eb04   

php5!zend_call_function+6fa 0030 00c0ea88 013ad4a8
php5!zend_reflection_class_factory+9b2 013a0280 0001 
1002263f
php5!zim_reflection_object_export+1a 0001 013a0280 

php5!execute+c9f 013d0070 10021b4e 00c0ec28
php5!execute+101c 00c0ec28 00c0fed4 00c0fcbc
php5!execute+1ae 0139d0d8 00c0fed4 
php5!zend_execute_scripts+be 0008  0003   

php5!php_execute_script+1c8 00c0fed4 0040642c 0001
php!main+a9a 0001 011530c0 01153330
php!memcpy+160 001520b8 00180018 7ffde000
kernel32!BaseProcessStart+23 00402dda     


PHP5!ZEND_HASH_INTERNAL_POINTER_RESET_EX+CIn 
php__PID__4828__Date__05_11_2009__Time_02_03_29PM__999__Second_Chance
_Exception_C005.dmp the assembly instruction at 
php5!zend_hash_internal_pointer_reset_ex+c in C:\PHP5\php5.dll from 
The PHP Group has caused an access violation exception (0xC005) 
when trying to read from memory location 0x0014 on thread 0

Module Information 
Image Name: C:\PHP5\php5.dll   Symbol Type:  PDB 
Base address: 0x1000   Time Stamp:  Mon May 11 12:57:20 2009  
Checksum: 0x0055b027   Comments:   
COM DLL: False   Company Name:  The PHP Group 
ISAPIExtension: False   File Description:  PHP Script Interpreter 
ISAPIFilter: False   File Version:  5.3.0RC3-dev 
Managed DLL: False   Internal Name:  PHP Script Interpreter 
VB DLL: False   Legal Copyright:  Copyright © 1997-2008 The PHP Group

Loaded Image Name:  php5.dll   Legal Trademarks:  PHP 
Mapped Image Name: Original filename:  php5.dll 
Module name:  php5   Private Build:   
Single Threaded:  False   Product Name:  PHP 
Module Size:  5.44 MBytes   Product Version:  5.3.0RC3-dev 
Symbol File Name:  C:\PHP5\debug\php5.pdb   Special Build:  &



[2009-05-11 13:09:38] RQuadling at GMail dot com

Report for
php__PID__4828__Date__05_11_2009__Time_02_03_29PM__999__Second_Chance_Exception_C005.dmp
Type of Analysis Performed   Crash Analysis 
Machine Name   RICHARDQUADLING 
Operating System   Windows XP Service Pack 3 
Number Of Processors   2 
Process ID   4828 
Process Image   C:\PHP5\php.exe 
System Up-Time   4 day(s) 01:37:48 
Process Up-Time   00:00:03 


Thread 0 - System ID 5216
Entry point   php!mainCRTStartup 
Create time   11/05/2009 14:03:27 
Time spent in user mode   0 Days 0:0:0.62 
Time spent in kernel mode   0 Days 0:0:0.93 






Function Arg 1 Arg 2 Arg 3   Source 
php5!zend_hash_internal_pointer_reset_ex+c  00c0e8dc   
 0b18   d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\zend\zend_hash.c @ 1059 + 4 
php5!zm_info_reflection+700 00c0e938 015209b0 0139ebf0  
d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\ext\reflection\php_reflection.c @ 538 
php5!zim_reflection_class___toString+9a  0139fea8
00c0ea3c   d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\ext\reflection\php_reflection.c @ 3194

php5!zend_call_function+6fa  00c0e978 0024  
d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\zend\zend_execute_api.c @ 958 + 16 
php5!call_user_function_ex+65  00c0ea40 00c0ea44  
d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\zend\zend_execute_api.c @ 735 
php5!zim_reflection_export+70 0002 0139ff08 00c0eb04  

#47224 [Com]: MYSQL_ATTR_INIT_COMMAND is no longer available

2009-07-02 Thread mg at artigo dot pl
 ID:   47224
 Comment by:   mg at artigo dot pl
 Reported By:  contact at joycebabu dot com
 Status:   Assigned
 Bug Type: PDO related
 Operating System: Windows
 PHP Version:  5.3.0alpha3
 Assigned To:  mysql
 New Comment:

A temporary solution is to use INT value (1002) instead of constant.


Previous Comments:


[2009-06-02 12:15:28] daniz at rocketmail dot com

Looking into 

/ext/pdo_mysql/pdo_mysql.c I saw this:

/* {{{ PHP_MINIT_FUNCTION
 */
static PHP_MINIT_FUNCTION(pdo_mysql)
{
#if PDO_USE_MYSQLND
REGISTER_INI_ENTRIES();
#endif

REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_USE_BUFFERED_QUERY",
(long)PDO_MYSQL_ATTR_USE_BUFFERED_QUERY);
REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_LOCAL_INFILE",
(long)PDO_MYSQL_ATTR_LOCAL_INFILE); 
#ifndef PDO_USE_MYSQLND
REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_MAX_BUFFER_SIZE",
(long)PDO_MYSQL_ATTR_MAX_BUFFER_SIZE);
REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_INIT_COMMAND",
(long)PDO_MYSQL_ATTR_INIT_COMMAND);
REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_READ_DEFAULT_FILE",
(long)PDO_MYSQL_ATTR_READ_DEFAULT_FILE);
REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_READ_DEFAULT_GROUP",
(long)PDO_MYSQL_ATTR_READ_DEFAULT_GROUP);
REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_COMPRESS",
(long)PDO_MYSQL_ATTR_COMPRESS);
#endif
REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_DIRECT_QUERY",
(long)PDO_MYSQL_ATTR_DIRECT_QUERY);
REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_FOUND_ROWS",
(long)PDO_MYSQL_ATTR_FOUND_ROWS);
REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_IGNORE_SPACE",
(long)PDO_MYSQL_ATTR_IGNORE_SPACE);

#ifdef PDO_USE_MYSQLND
pdo_mysqlnd_zval_cache =
mysqlnd_palloc_init_cache(PDO_MYSQL_G(cache_size));
#endif

return php_pdo_register_driver(&pdo_mysql_driver);
}



Meaning in short:
if not defined "PDO_USE_MYSQLND" -
REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_INIT_COMMAND",
(long)PDO_MYSQL_ATTR_INIT_COMMAND);

else don't register that class? Does it's supposed to come from
somewhere else? I just moved the init_command into a simple query("SET
NAMES utf8"); to get rid of the error.



[2009-05-22 04:06:55] christian dot gahlert at web dot de

Hi,

I just had the same problem. It occured because I installed the PDO
extension via pecl but forgot to also install PDO_MYSQL.

After I installed the PDO_MYSQL everything was fine.

I hope I could save someone some time :)
Chris



[2009-04-25 15:35:53] j...@php.net

For some reason this (and some other) constants are only available when

mysqlnd driver is used.



[2009-01-27 12:33:45] contact at joycebabu dot com

Description:

The constant PDO::MYSQL_ATTR_INIT_COMMAND is not available.

Reproduce code:
---
try {
$pdbo = new PDO("mysql:host=localhost;dbname=test", 'root', '',
array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
}catch(PDOException $e){
echo $e->getMessage();
}


Expected result:

A successful connection to the mysql database

Actual result:
--
Fatal error: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' in
D:\Projects\Apache\htdocs\mysite.com\httpdocs\include\define-vars.inc.php
on line 23





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



#48759 [Fbk->Csd]: Interactive mode - No prompt, no interaction

2009-07-02 Thread booi at crunchyroll dot com
 ID:   48759
 User updated by:  booi at crunchyroll dot com
 Reported By:  booi at crunchyroll dot com
-Status:   Feedback
+Status:   Closed
 Bug Type: CGI related
 Operating System: Fedora Core 6 x86_64
 PHP Version:  5.3.0
 New Comment:

Ah, that's it. Sorry about that.


Previous Comments:


[2009-07-02 10:20:37] johan...@php.net

Did you compile PHP without that flag and then recompiled without
running "make clean" in between?



[2009-07-01 23:58:48] booi at crunchyroll dot com

Yes, php -m does list readline as being there.

[b...@nexus4 ~]$ php -m
[PHP Modules]
...
readline
...

[Zend Modules]



[2009-07-01 22:11:14] j...@php.net

1. Is readline mentioned in php -m output?
2. If not, check config.log for reason why it failed.



[2009-07-01 20:47:14] booi at crunchyroll dot com

A little bit more information. Notable failure during "make test"

FAIL CLI -a and readline [sapi/cli/tests/016.phpt] 


/home/booi/php-5.3.0/sapi/cli/tests/016.phpt

--
Snippet no. 1:
--
Interactive mode enabled

echo 'Hello world';
exit


--
Snippet no. 2:
--
Interactive mode enabled

echo 'multine
single
quote';
exit


--
Snippet no. 3:
--
Interactive mode enabled

echo << Hello world
007- php > 
012- Interactive shell
013+ Interactive mode enabled
014- php > php ' php ' multine
015+ echo 'multine
016- quote
017- php > 
017+ quote';
018+ exit
019+ 
022- Interactive shell
024+ Interactive mode enabled
024- php > <<< > <<< > <<< > <<< > <<< > Here
026+ echo << 
031+ HEREDOC;
033+ 
033- Interactive shell
035- php > php { php { php > Done
036- php > 
037+ Interactive mode enabled
039+ if (0) {
040+ echo "I'm not there";
041+ }
042+ echo "Done";
043+ 
041- Interactive shell
043- php > php { php { php > I was called!
044- php > 
048+ Interactive mode enabled
050+ function a_function_with_some_name() {
051+ echo "I was called!";
052+ }
053+ a_function_w   );
054+ 




[b...@nexus4 php-5.3.0]$ uname -a
Linux nexus4 2.6.22.14-72.fc6 #1 SMP Wed Nov 21 14:10:25 EST 2007
x86_64 x86_64 x86_64 GNU/Linux

[b...@nexus4 php-5.3.0]$ rpm -qa | grep readline
readline-5.1-1.1
readline-devel-5.1-1.1
readline-5.1-1.1
readline-devel-5.1-1.1

There are duplicate packages because one is 32bit and one is 64bit.



[2009-07-01 20:16:46] booi at crunchyroll dot com

Description:

PHP Interactive mode does not give a prompt nor allow any interaction.
It is as if Readline was not compiled in.

Reproduce code:
---
php -a

Expected result:

[b...@nexus3 ~]$ php -i | grep readline
Configure Command =>  './configure'  '--enable-fastcgi'
'--enable-discard-path' '--enable-force-cgi-redirect' '--with-curl'
'--with-gd' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-mcrypt'
'--with-mysql=/usr/local/mysql' '--with-openssl' '--with-pear'
'--with-readline' '--with-ttf'
'--with-freetype-dir=/usr/include/freetype2' '--with-xmlrpc'
'--with-zlib' '--without-pdo-sqlite' '--without-sqlite' '--disable-pdo'
'--enable-exif' '--enable-ftp' '--enable-inline-optimization'
'--enable-mbstring' '--enable-soap' '--enable-sockets'
readline

[b...@nexus3 ~]$ php -v
PHP 5.2.9 (cli) (built: Jun 20 2009 01:06:18) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

[b...@nexus3 ~]$ php -a
Interactive shell

php > 


Actual result:
--
[b...@nexus4 bin]$ php -i | grep -i readline
Configure Command =>  './configure'  '--prefix=/usr/local'
'--with-apxs2=/usr/local/apache2/bin/apxs' '--disable-debug'
'--enable-exif' '--enable-ftp' '--enable-mbstring' '--enable-soap'
'--enable-sockets' '--enable-zip' '--with-bz2' '--with-curl'
'--with-freetype-dir=/usr/include/freetype2' '--with-gd'
'--with-jpeg-dir=/usr' '--with-mcrypt' '--with-mhash'
'--with-mysql=/usr/local/mysql' '--with-mysqli=mysqlnd' '--with-openssl'
'--with-pdo-mysql=mysqlnd' '--with-pear' '--with-png-dir=/usr'
'--with-xmlrpc' '--with-zlib' '--with-readline'
readline

[b...@nexus4 bin]$ php -v
PHP 5.3.0 (cli) (built: Jun 30 2009 19:08:04) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

[b...@nexus4 bin]$ php -a
Interactive mode enabled







-- 
Edit this bug report at http://bugs.php.net

#48758 [Opn->Bgs]: FILTER_VALIDATE_URL rejects urls with an umlaut in path

2009-07-02 Thread johannes
 ID:   48758
 Updated by:   johan...@php.net
 Reported By:  j dot jeising at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Filter related
 Operating System: *
 PHP Version:  5.3.0
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

They are not allowed. Browser often (not all do that btw.) translate
them in the adressbar for convenience but that's far off from any
standard.

RFC3986 specifies a URI to conatain only 
   ALPHA / DIGIT / "-" / "." / "_" / "~" / "%" HEXDIG HEXDIG / "!" /
"$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
where ALPHA is defined as a-zA-Z and DIGIT as 0-9.

http://tools.ietf.org/html/rfc3986#section-3.3



Previous Comments:


[2009-07-01 20:15:29] j dot jeising at gmail dot com

Description:

FILTER_VALIDATE_URL rejects URLs with umlauts in the path. Umlauts are

not allowed in the domain (object of #42353), but in the path, they are

(at least, everybody supports them).

Reproduce code:
---
$url = 'http://www.example.com/exämple';
var_dump(filter_var($url, FILTER_VALIDATE_URL));

Expected result:

string(30) "http://www.example.com/example";

Actual result:
--
bool(false)





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



#48759 [Opn->Fbk]: Interactive mode - No prompt, no interaction

2009-07-02 Thread johannes
 ID:   48759
 Updated by:   johan...@php.net
 Reported By:  booi at crunchyroll dot com
-Status:   Open
+Status:   Feedback
 Bug Type: CGI related
 Operating System: Fedora Core 6 x86_64
 PHP Version:  5.3.0
 New Comment:

Did you compile PHP without that flag and then recompiled without
running "make clean" in between?


Previous Comments:


[2009-07-01 23:58:48] booi at crunchyroll dot com

Yes, php -m does list readline as being there.

[b...@nexus4 ~]$ php -m
[PHP Modules]
...
readline
...

[Zend Modules]



[2009-07-01 22:11:14] j...@php.net

1. Is readline mentioned in php -m output?
2. If not, check config.log for reason why it failed.



[2009-07-01 20:47:14] booi at crunchyroll dot com

A little bit more information. Notable failure during "make test"

FAIL CLI -a and readline [sapi/cli/tests/016.phpt] 


/home/booi/php-5.3.0/sapi/cli/tests/016.phpt

--
Snippet no. 1:
--
Interactive mode enabled

echo 'Hello world';
exit


--
Snippet no. 2:
--
Interactive mode enabled

echo 'multine
single
quote';
exit


--
Snippet no. 3:
--
Interactive mode enabled

echo << Hello world
007- php > 
012- Interactive shell
013+ Interactive mode enabled
014- php > php ' php ' multine
015+ echo 'multine
016- quote
017- php > 
017+ quote';
018+ exit
019+ 
022- Interactive shell
024+ Interactive mode enabled
024- php > <<< > <<< > <<< > <<< > <<< > Here
026+ echo << 
031+ HEREDOC;
033+ 
033- Interactive shell
035- php > php { php { php > Done
036- php > 
037+ Interactive mode enabled
039+ if (0) {
040+ echo "I'm not there";
041+ }
042+ echo "Done";
043+ 
041- Interactive shell
043- php > php { php { php > I was called!
044- php > 
048+ Interactive mode enabled
050+ function a_function_with_some_name() {
051+ echo "I was called!";
052+ }
053+ a_function_w   );
054+ 




[b...@nexus4 php-5.3.0]$ uname -a
Linux nexus4 2.6.22.14-72.fc6 #1 SMP Wed Nov 21 14:10:25 EST 2007
x86_64 x86_64 x86_64 GNU/Linux

[b...@nexus4 php-5.3.0]$ rpm -qa | grep readline
readline-5.1-1.1
readline-devel-5.1-1.1
readline-5.1-1.1
readline-devel-5.1-1.1

There are duplicate packages because one is 32bit and one is 64bit.



[2009-07-01 20:16:46] booi at crunchyroll dot com

Description:

PHP Interactive mode does not give a prompt nor allow any interaction.
It is as if Readline was not compiled in.

Reproduce code:
---
php -a

Expected result:

[b...@nexus3 ~]$ php -i | grep readline
Configure Command =>  './configure'  '--enable-fastcgi'
'--enable-discard-path' '--enable-force-cgi-redirect' '--with-curl'
'--with-gd' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-mcrypt'
'--with-mysql=/usr/local/mysql' '--with-openssl' '--with-pear'
'--with-readline' '--with-ttf'
'--with-freetype-dir=/usr/include/freetype2' '--with-xmlrpc'
'--with-zlib' '--without-pdo-sqlite' '--without-sqlite' '--disable-pdo'
'--enable-exif' '--enable-ftp' '--enable-inline-optimization'
'--enable-mbstring' '--enable-soap' '--enable-sockets'
readline

[b...@nexus3 ~]$ php -v
PHP 5.2.9 (cli) (built: Jun 20 2009 01:06:18) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

[b...@nexus3 ~]$ php -a
Interactive shell

php > 


Actual result:
--
[b...@nexus4 bin]$ php -i | grep -i readline
Configure Command =>  './configure'  '--prefix=/usr/local'
'--with-apxs2=/usr/local/apache2/bin/apxs' '--disable-debug'
'--enable-exif' '--enable-ftp' '--enable-mbstring' '--enable-soap'
'--enable-sockets' '--enable-zip' '--with-bz2' '--with-curl'
'--with-freetype-dir=/usr/include/freetype2' '--with-gd'
'--with-jpeg-dir=/usr' '--with-mcrypt' '--with-mhash'
'--with-mysql=/usr/local/mysql' '--with-mysqli=mysqlnd' '--with-openssl'
'--with-pdo-mysql=mysqlnd' '--with-pear' '--with-png-dir=/usr'
'--with-xmlrpc' '--with-zlib' '--with-readline'
readline

[b...@nexus4 bin]$ php -v
PHP 5.3.0 (cli) (built: Jun 30 2009 19:08:04) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

[b...@nexus4 bin]$ php -a
Interactive mode enabled







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



#48761 [Opn->Asn]: php crashes on start - getaddrinfo could not be located

2009-07-02 Thread johannes
 ID:   48761
 Updated by:   johan...@php.net
 Reported By:  aheckmann at m-s dot de
-Status:   Open
+Status:   Assigned
 Bug Type: Reproducible crash
 Operating System: win32 only - Windows 2000 SP4
 PHP Version:  5.3.0
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

Win 2000 is the required minimum version, or should be, while I don't
know about required service packs and other patches. Pierre?


Previous Comments:


[2009-07-01 22:23:39] aheckmann at m-s dot de

In my opinion this document from microsoft describes the solution to
fix the problem for older windows versions
that don't have the getaddrinfo function with an inline function:
http://msdn.microsoft.com/en-us/library/ms738520%28VS.85%29.aspx

Support for getaddrinfo on older versions of Windows

The getaddrinfo function was added to the Ws2_32.dll on Windows XP and
later. 
To execute an application that uses this function on earlier versions
of Windows, then you need to include the Ws2tcpip.h and Wspiapi.h files.

When the Wspiapi.h include file is added, the getaddrinfo function is
defined to the WspiapiGetAddrInfo inline function in the Wspiapi.h file.

At runtime, the WspiapiGetAddrInfo function is implemented in such a
way that if the Ws2_32.dll or the Wship6.dll 
(the file containing getaddrinfo in the IPv6 Technology Preview for
Windows 2000) does not include getaddrinfo, 
then a version of getaddrinfo is implemented inline based on code in
the Wspiapi.h header file. 
This inline code will be used on older Windows platforms that do not
natively support the getaddrinfo function.

Will this be fixed, or is Win2k support dropped for php 5.3.x?

The windows release notes for 5.3 only mentioned that pre-windows 2000
support is dropped.

Thanks



[2009-07-01 22:19:11] aheckmann at m-s dot de

Description:

Tested with VC6 and VC9 (+vcredist_x86.exe) Version of PHP 5.3.0

PHP does not start an produces the following error message:

php.exe - Entry Point Not Found : 
The procedure entry point getaddrinfo could not be located in the
dynamic link library WS2_32.dll


Reproduce code:
---
php.exe -v

Expected result:

php shows version info

Actual result:
--
Php does not start an shows the following error:

php.exe - Entry Point Not Found : 
The procedure entry point getaddrinfo could not be located in the
dynamic link library WS2_32.dll





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



#48765 [Opn->Fbk]: When I use for MYSQLi "load data local infile" Apache 2.2.11 gives out ERROR!

2009-07-02 Thread johannes
 ID:   48765
 Updated by:   johan...@php.net
 Reported By:  mypost100 at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: MySQLi related
 Operating System: Windows XP sp3
 PHP Version:  5.3.0
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


What kind of error are you getting? What does your code look like? What
MySQL version? What does the table and statement look like?


Previous Comments:


[2009-07-02 03:03:22] mypost100 at gmail dot com

Description:

Hello.
When I use for MYSQLi "load data local infile"
(file.txt = 110 rows)
divider of columns - [ ; ]
Apache 2.2.11 gives out ERROR!
Loaded rows = 62 and stop of execution file php.






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



#48771 [Opn->Asn]: rename() between drives error: No error

2009-07-02 Thread pajoye
 ID:   48771
 Updated by:   paj...@php.net
 Reported By:  bugs at thundercall dot dk
-Status:   Open
+Status:   Assigned
 Bug Type: Filesystem function related
 Operating System: Windows XP
 PHP Version:  5.3CVS-2009-07-02 (snap)
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

Verified, missing a flag to allow that.


Previous Comments:


[2009-07-02 07:55:34] bugs at thundercall dot dk

$handle = rename($old_file, $new_file);

$old_dir & $new_dir was meant for is_dir() checking before moving
files,... but as this test didn't needed that, i forgot to remove it
from the rename(),.. merged it into $old_file & $new_file.



[2009-07-02 07:51:53] bugs at thundercall dot dk

Description:

When using rename() from one drive to another drive PHP5.3 & Snap 5.3.1
2009-07-02 fails with error: "No error" and doesn't move the file...

Reproduce code:
---


Expected result:

Wuhoo!!

Actual result:
--
Warning: rename(C:\Temp\file.txt,D:\Temp\newfile.txt)
[function.rename]: No error in D:\home\main\test\rename\index.php on
line 6
Do'h!





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



#33500 [Asn]: imap_open() fails when the server advertises GSSAPI

2009-07-02 Thread pajoye
 ID:   33500
 Updated by:   paj...@php.net
 Reported By:  ed2019 at columbia dot edu
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  5.2.9
 Assigned To:  pajoye
 New Comment:

Yes, have the patch but it was too late for 5.3.0. It will be committed
in HEAD and after 5.3.1.


Previous Comments:


[2009-07-01 17:38:37] hperrin at SPAMMENOTgmail dot com

I'm running Group-Office and I have this same problem. I can get it to
login to our Exchange 2007 server by running `kinit usern...@domain.com`
on Apache's user. However, this causes all the Group-Office mail
accounts to receive that user's emails, regardless of the credentials
given to them. From my understanding, it is not technically incorrect to
use c-client the way PHP currently does, but it is inefficient and
limits the developers possibilities. So, it's been over a month since
this request was updated. Is there any news on the status of this issue?
Pajoye, if you can fix this, you will be my personal hero, and I'll name
something after you. ;)



[2009-05-21 09:23:43] paj...@php.net

It is a feature request, if you read our last two comments you will see
that we already agreed on that. 



[2009-05-20 22:00:16] hmandel at learningbygrace dot org

While you guys are debating whether this is a bug or a feature request
our coders here are still stuck at the end of developing some web apps
because PHP and Exchange will not "exchange"... Damn it Jim, we can't
get our emails off the Exchange server.:~)

So since I can see you have all this expertise and are fully aware of
the bug/feature request, I'd like to hire one of you to make this change
and customize our darn PHP code so these guys (PHP and Exchange) can
make up and talk again. 

ANyone up to it. I'll hire you so long as you REALLY can solve the
problem and also I will not discriminate between those who believe this
is a Feature Request and those who call i a Bug... we are equal
opportunity here at Learning By Grace. My contact info is hmandel at
learningbygrace dot org. Cell is two67-two49-five one67.

Any takers?



[2009-04-27 18:42:40] paj...@php.net

ok, I was looking at mail_auth*. Then it should be possible to do it, I
move the status to feature request (leaving it in the imap category but
assigned to me, I will setup GSSAPI in my test exchange server box to
valid the changes).

Thanks for all the referecences, it will make the implementation
easier.



[2009-04-27 17:31:15] ed2019 at columbia dot edu

pajoye - You're the one with the power to declare whether it's a bug or
not.  Since we disagree on this point, either I don't know what a bug is
(entirely possible) or myself & the others commenting on this situation
via the bug reporter have done a poor job of explaining to you what the
situation is.

To answer the included questions:

"It could be a feature request but I do not see either how to you can
force c-client to use a given authentication method. I suppose you know
right?"

Yes, you can force c-client to use / not use a particular
authentication method.  Please see this series of e-mail messages:

http://www.mail-archive.com/imap...@u.washington.edu/msg01962.html
http://www.mail-archive.com/imap...@u.washington.edu/msg01963.html

"now, about your proposal: 1) why don't you try?"

I did discuss the issue with Crispin, please see this exchange of
e-mail messages:
http://mailman2.u.washington.edu/pipermail/imap-uw/2005-June/000101.html

Notably his response:
"I agree that c-client should try the other authentication method, but
perhaps my definition of "should" is different.  I don't mean "should"
as in "should be fixed to"; I mean "should" as "it does already." I
believe that the problem is in how PHP uses c-client. "

More questions:

"2) and 3) are the same and I don't see how it could be possible. No
other clients using c-client allow that either"

For an example of an IMAP client, which uses c-client, and yet can
attach to IMAP servers which advertise multiple authentication
mechanisms please see Alpine ( http://www.washington.edu/alpine/ )

Here is a psudeo-psudeo-code examples of how it could be possible.  I'm
not a strong c-coder so I leave the actual implementation to the
reader:

* Add another optional arugment to the end of imap_open(), for
example:

imap_open(existing,argument,...,[NEW_ARUGMENT])

where: NEW_ARGUMENT is one or more, comma separated, of the following:
GSSAPI, PLAIN, CRAM_MD5, etc (all the auth methods which c-client
supports).

Then, before a connection is attempted, the mail_parameters thing is
set (as appears in Crispin's 

#48771 [Opn]: rename() between drives error: No error

2009-07-02 Thread bugs at thundercall dot dk
 ID:   48771
 User updated by:  bugs at thundercall dot dk
 Reported By:  bugs at thundercall dot dk
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: Windows XP
 PHP Version:  5.3CVS-2009-07-02 (snap)
 New Comment:

$handle = rename($old_file, $new_file);

$old_dir & $new_dir was meant for is_dir() checking before moving
files,... but as this test didn't needed that, i forgot to remove it
from the rename(),.. merged it into $old_file & $new_file.


Previous Comments:


[2009-07-02 07:51:53] bugs at thundercall dot dk

Description:

When using rename() from one drive to another drive PHP5.3 & Snap 5.3.1
2009-07-02 fails with error: "No error" and doesn't move the file...

Reproduce code:
---


Expected result:

Wuhoo!!

Actual result:
--
Warning: rename(C:\Temp\file.txt,D:\Temp\newfile.txt)
[function.rename]: No error in D:\home\main\test\rename\index.php on
line 6
Do'h!





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



#48771 [NEW]: rename() between drives error: No error

2009-07-02 Thread bugs at thundercall dot dk
From: bugs at thundercall dot dk
Operating system: Windows XP
PHP version:  5.3CVS-2009-07-02 (snap)
PHP Bug Type: Filesystem function related
Bug description:  rename() between drives error: No error

Description:

When using rename() from one drive to another drive PHP5.3 & Snap 5.3.1
2009-07-02 fails with error: "No error" and doesn't move the file...

Reproduce code:
---


Expected result:

Wuhoo!!

Actual result:
--
Warning: rename(C:\Temp\file.txt,D:\Temp\newfile.txt) [function.rename]:
No error in D:\home\main\test\rename\index.php on line 6
Do'h!

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



#48695 [Opn]: PHP_SELF / SCRIPT_NAME issues not bogus - bugfix in 5.2.9 still causing trouble

2009-07-02 Thread allerlei+bugs dot php dot net at sihw dot nl
 ID:   48695
 User updated by:  allerlei+bugs dot php dot net at sihw dot nl
 Reported By:  allerlei+bugs dot php dot net at sihw dot nl
 Status:   Open
 Bug Type: CGI related
 Operating System: Centos 4/5
 PHP Version:  5.2.10
 New Comment:

Yes. This is what happened in 5.2.10. PHP_SELF and SCRIPT_FILENAME
changed in respect to 5.2.8. (Sorry, I skipped 5.2.9). I installed
5.2.10 but had to rebuild 5.2.8 because of the PHP_SELF troubles.

This happens when some process (in my case an external handler
executable that starts php under the UID of the virtual web site, but if
would take a look at suexec as well) juggles with SCRIPT_NAME,
ORIG_SCRIPTNAME etcetera.

By the way: I am not saying one way is better than the other. PHP_SELF
should reflect the url the client needs to call the same script again
(right?). So maybe the way those cgi wrappers change the cgi environment
should be changed. The "startscript" executable I use company wide uses
the same logic for building ORIG_SCRIPTNAME etcetera as the old cgiwrap
code it is slightly based on.

But: this looks to me as a big change for a minor version number
update. I would expect the same external behaviour between versions
numbers that differ only behind the second dot.

Maybe we should get it straight which environment variables php-cgi
uses to create PHP_SELF and friends.

If you need any more information, please tell me. (I am going to be on
a holiday soon, but will be back...).


Thanks,

Jelmer Jellema


Previous Comments:


[2009-07-02 04:29:19] sriram dot natarajan at gmail dot com

have you tried this issue with recent php 5.2.10 . r u able to
reproduce 
this with 5.2.10 as well ?



[2009-06-25 14:22:35] allerlei+bugs dot php dot net at sihw dot nl

Description:

Bug #47625 was closed as bogus (because it would be the same as bug
#47042) but it is not. In version 5.2.10 at least, PHP_SELF and
SCRIPT_FILENAME are set based on the ORIG_SCRIPTNAME, while in version
5.2.8 these are based on SCRIPT_NAME.

So bug #47042 fixes some bug, but introduces a new one. Therefore this
is not a duplicate bug. It is not bogus because the values of PHP_SELF
etc changed betwoon 5.2.10 without this being part of the specification
for 5.2.10. It breaks a lot of code on my systems, including phpmyadmin
and joomla.

Problem is that PHP_SELF should refer to the URL before the internal
redirect or external handler. This is a problematic requirement because
of all the jugling with SCRIPTNAME and ORIG_SCRIPTNAME, but bug #47625
described the bug exactly. The problem might me in the naming: handlers
put the redirection into ORIG_SCRIPTNAME and the original path in
SCRIPTNAME.

I use a handler called startscript that is called with some pathinfo
like /../startscript/php/myuser/path/to/script/. 
So the path
/centraal/scripts/info.php
when called from a vsite owned by user jelmer, is rewritten to
/usr/bin/startscript/php/jelmer/scripts/info.php

but PHP_SELF should remain /centraal/scripts/info.php

Thank you for your thougths,

Jelmer






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



#48770 [Com]: call_user_func_array fails to call parent from inheriting class

2009-07-02 Thread sjoerd-php at linuxonly dot nl
 ID:   48770
 Comment by:   sjoerd-php at linuxonly dot nl
 Reported By:  lumeet at yahoo dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Windows XP SP3
 PHP Version:  5.3CVS-2009-07-02 (snap)
 New Comment:

Thank you for your bug report. I could reproduce it and added some more
data:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7d03b80 (LWP 6726)]
0x082dee15 in zend_is_callable_ex (callable=0x9e3cdc0, object_ptr=0x0,

check_flags=0, callable_name=0x0, callable_name_len=0x0,
fcc=0xbf49d190, 
error=0xbf49d0e8) at
/home/sjoerd/dev/php/trunk/php5/Zend/zend_API.c:2624
2624{
#0  0x082dee15 in zend_is_callable_ex (callable=0x9e3cdc0,
object_ptr=0x0, 
check_flags=0, callable_name=0x0, callable_name_len=0x0,
fcc=0xbf49d190, 
error=0xbf49d0e8) at
/home/sjoerd/dev/php/trunk/php5/Zend/zend_API.c:2624
#1  0x082df489 in zend_fcall_info_init (callable=0x9e3cdc0,
check_flags=0, 
fci=0xbf49d16c, fcc=0xbf49d190, callable_name=0x0,
error=0xbf49d0e8)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_API.c:2858
#2  0x082e35a2 in zend_parse_va_args (num_args=2, type_spec=0x85b0091
"a/", 
va=0xbf49d13c, flags=0)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_API.c:592
#3  0x082e3d12 in zend_parse_parameters (num_args=2,
type_spec=0xbf49d0e8 "")
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_API.c:870
#4  0x08220dd1 in zif_call_user_func_array (ht=2,
return_value=0x9e3ce7c, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
at
/home/sjoerd/dev/php/trunk/php5/ext/standard/basic_functions.c:4748
#5  0x083259b9 in zend_do_fcall_common_helper_SPEC
(execute_data=0x9de07bc)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:313
#6  0x08302dbe in execute (op_array=0x9448e90)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:104
#7  0x082d0c77 in zend_call_function (fci=0xbf49d37c,
fci_cache=0xbf49d3a0)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_execute_API.c:936
#8  0x08220df7 in zif_call_user_func_array (ht=2,
return_value=0x9e3ccb0, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
at
/home/sjoerd/dev/php/trunk/php5/ext/standard/basic_functions.c:4755
#9  0x083259b9 in zend_do_fcall_common_helper_SPEC
(execute_data=0x9de06fc)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:313
#10 0x08302dbe in execute (op_array=0x9448e90)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:104
#11 0x082d0c77 in zend_call_function (fci=0xbf49d58c,
fci_cache=0xbf49d5b0)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_execute_API.c:936
#12 0x08220df7 in zif_call_user_func_array (ht=2,
return_value=0x9e3cae4, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
at
/home/sjoerd/dev/php/trunk/php5/ext/standard/basic_functions.c:4755

...

#11213 0x083259b9 in zend_do_fcall_common_helper_SPEC
(execute_data=0x9c1d004)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:313
#11214 0x08302dbe in execute (op_array=0x9448e90)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:104
#11215 0x082d0c77 in zend_call_function (fci=0xbf60669c,
fci_cache=0xbf6066c0)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_execute_API.c:936
#11216 0x08220df7 in zif_call_user_func_array (ht=2,
return_value=0x9c822d4, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
at
/home/sjoerd/dev/php/trunk/php5/ext/standard/basic_functions.c:4755
#11217 0x083259b9 in zend_do_fcall_common_helper_SPEC
(execute_data=0x9c1cf44)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:313
#11218 0x08302dbe in execute (op_array=0x9448e90)
at /home/sjoerd/dev/php/trunk/php5/Zend/zend_vm_execute.h:104
etc. etc.


Previous Comments:


[2009-07-02 07:28:31] lumeet at yahoo dot com

Description:

When class C extends B, which extends A, calls from B to its parent 
methods fail when using call_user_func_array(). Using parent::func()
works just fine.

Reproduce code:
---
class A {
  function func( $str ) {
echo $str;
  }
}

class B extends A {
  public function func( $str ) {
call_user_func_array( array( $this, 'parent::func' ), array( $str )
);
  }
}

class C extends B {
  public function func( $str ) {
parent::func( $str );
  }
}

$c = new C;
$c->func( 'This should work!' );

Expected result:

The code should output "This should work!".

Actual result:
--
PHP crashes with backtrace (yes, only one line):

Function Arg 1 Arg 2 Arg 3   Source 
php5ts!zend_is_callable_ex+61e 011f0780 0006 003228e0  
 





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



#48770 [NEW]: call_user_func_array fails to call parent from inheriting class

2009-07-02 Thread lumeet at yahoo dot com
From: lumeet at yahoo dot com
Operating system: Windows XP SP3
PHP version:  5.3CVS-2009-07-02 (snap)
PHP Bug Type: Reproducible crash
Bug description:  call_user_func_array fails to call parent from inheriting 
class

Description:

When class C extends B, which extends A, calls from B to its parent 
methods fail when using call_user_func_array(). Using parent::func()
works just fine.

Reproduce code:
---
class A {
  function func( $str ) {
echo $str;
  }
}

class B extends A {
  public function func( $str ) {
call_user_func_array( array( $this, 'parent::func' ), array( $str )
);
  }
}

class C extends B {
  public function func( $str ) {
parent::func( $str );
  }
}

$c = new C;
$c->func( 'This should work!' );

Expected result:

The code should output "This should work!".

Actual result:
--
PHP crashes with backtrace (yes, only one line):

Function Arg 1 Arg 2 Arg 3   Source 
php5ts!zend_is_callable_ex+61e 011f0780 0006 003228e0

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



#48745 [Ver]: mysqlnd: mysql_num_fields returns wrong column count for mysql_list_fields

2009-07-02 Thread thetaphi
 ID:   48745
 Updated by:   theta...@php.net
 Reported By:  theta...@php.net
 Status:   Verified
 Bug Type: MySQL related
 Operating System: *
 PHP Version:  5.3.0
 Assigned To:  mysql
 New Comment:

Thanks! I understand the problem and that it is deprecated. The
important thing is: it should *not* SIGSEGV. So the best idea would be
to simply disable the whole function, if it is not working with mysqlnd
and you are not willing to support it (something like: "deprecated
functions work with libmysqlclient but not with mysqlnd". They should
simply return false or throw an error or should removed at all). Because
of the sigsegv it was hard to find out, where the error really occurred
in this thousands of lines of foreign PHP code.

But if Andrew is able to fix it, let's wait for it.

> compile ext/mysql against libmysql (like ever since) and try
> again in four weeks

My problem was, that this does not work easily with PHP 32bit on
Solaris x64 using /opt/csw libs (mysql_config only returns 64bit libs,
includes strange not GCC compatible CFLAGS and so on). But this is
another problem. It was also broken in 5.2 (but you were able to fix
it), but with 5.3 it now produces hard compilation errors (and can only
be fixed by replacing mysql_config with a "dummy" that returns correct
CFLAGS and LIB paths). But Linux users can always compile against
libmysql this.

For Solaris users mysqlnd is the best for problem-less installation!

The easiest workaround was to use mysqli in our case :) For me this bug
is obsolete, I only want to keep it open because of the SIGSEGV.

Uwe


Previous Comments:


[2009-07-02 07:01:42] u...@php.net

Thanks. As said, its fixable, I know the cause, I may know a hack to
fix it but the call is deprecated.  There are zillions of MySQL 4.0
users but we don't support MySQL 4.0 any more. There may be many
list_fields users, but list_fields is deprecated. 

At some point you simply have to stop giving old, deprecated calls the
highest priority.

Apart from that, I don't want to hack with the packet decoders in the
absence of Andrey if the workaround is as easy as: compile ext/mysql
against libmysql (like ever since) and try again in four weeks.

Ulf



[2009-07-01 17:14:33] theta...@php.net

As I noted before: This is not my code and there may be a lot of users
installing software using the old mysql extension and also this
function.

For me the workaround was to enable the mysqli configuration option in
Contenido. The only problem is, that it is not enabled per default in
this CMS (although it says: PHP 5 only). Contenido uses a PHP-written
database abstraction (from where I copied the functions in this bug
report) and it was easy to exchange by the other one. It was also
fixable by doing a dummy query "select * from table limit 1" and looking
into the field descriptions for the result set (this is how the
abstraction layer fr mysqli does it in Contenido).

So many thanks for looking at it, I will post a note in the Contenido
mailing list about this problem and the workaround.



[2009-07-01 16:54:38] u...@php.net

The trouble goes back to an over optimized COM_LIST_FIELDS
communication package and a guess that mysqlnd makes. mysqlnd makes a
guess on the number of fields that the deprecated API call
mysql_list_fields() may return. The guess is never adjusted to the
actual number of fields returned by the Server. As a result
mysql_num_fields(), when invoked with a result set handle returned by
mysql_list_fields(), may return a faulty number of fields. If a users
tries to loop over all fields using the number of fields returned by
mysql_num_fields() as a stop condition, he may try to access fields that
don't exist. The out-of-bound access is not detected because the
internal security check also gets the wrong number of fields reported. 

Workaround:

 - don't use deprecated functions, don't use mysql_list_fields()..
(there is a reason why we want to deprecate COM_LIST_FIELDS!)
 - use libmysql until its fixed


I don't want to play with the packet decoders and the protocol decoding
in the absence of Andrey. I know roughly how to fix, but packet decoding
is for Andrey. Andrey is on vacation until August.

As its easy to work around, I think it can wait.



[2009-06-30 20:10:52] theta...@php.net

Here is code to reproduce the bug, it crashes CLI, too:

Just create any database and a table in mysql and run this code on it:

the problematic function is mysql_list_fields() which is deprecated and
does no longer seem to work correct with mysql_field_*() functions.
After I cahnged the code in the Contenido database abstraction to
instead create a dummy query (select * from table l

#48769 [NEW]: parse_ini_file() equal sign issue with INI_SCANNER_RAW

2009-07-02 Thread ahar...@php.net
From: ahar...@php.net
Operating system: Linux x86
PHP version:  5.3CVS-2009-07-02 (CVS)
PHP Bug Type: Filesystem function related
Bug description:  parse_ini_file() equal sign issue with INI_SCANNER_RAW

Description:

In addition to bug 48768, which is a parse_ini_file() crasher when
INI_SCANNER_RAW mode is used, there's also an issue with configuration
items containing equal signs in general which results in a (seemingly)
spurious warning.

Given that INI_SCANNER_RAW is new and only minimally documented, this may
in fact be intended behaviour, in which case this should probably be
changed to a documentation problem. It would seem odd that changing the
scanner mode would prevent properly double-quoted configuration values from
being parsed, though.

Reproduce code:
---
INI file:

equal = "foo=bar"


PHP script:

$ini = parse_ini_file('equals.ini', false, INI_SCANNER_NORMAL);
var_dump($ini);

$ini = parse_ini_file('equals.ini', false, INI_SCANNER_RAW);
var_dump($ini);


Expected result:

array(1) {
  ["equal"]=>
  string(7) "foo=bar"
}
array(1) {
  ["equal"]=>
  string(7) "foo=bar"
}


Actual result:
--
array(1) {
  ["equal"]=>
  string(7) "foo=bar"
}

Warning: syntax error, unexpected '"' in equals.ini on line 1
 in /tmp/equals.php on line 5

Call Stack:
0.0007 324132   1. {main}() /tmp/equals.php:0
0.0012 324544   2. parse_ini_file() /tmp/equals.php:5


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



#48768 [NEW]: parse_ini_file() crash with INI_SCANNER_RAW

2009-07-02 Thread ahar...@php.net
From: ahar...@php.net
Operating system: Linux x86
PHP version:  5.3CVS-2009-07-02 (CVS)
PHP Bug Type: Reproducible crash
Bug description:  parse_ini_file() crash with INI_SCANNER_RAW

Description:

parse_ini_file() crashes in INI_SCANNER_RAW mode if a configuration item
consists solely of an equals sign.

Reproduce code:
---
INI file contents:

equal = "="


PHP script:

$ini = parse_ini_file('equals.ini', false, INI_SCANNER_NORMAL);
var_dump($ini);

$ini = parse_ini_file('equals.ini', false, INI_SCANNER_RAW);
var_dump($ini);


Expected result:

array(1) {
  ["equal"]=>
  string(1) "="
}
array(1) {
  ["equal"]=>
  string(1) "="
}

Actual result:
--
array(1) {
  ["equal"]=>
  string(1) "="
}
Segmentation fault (core dumped)


gdb backtrace:

#0  0xb75f58b1 in memcpy () from /lib/tls/i686/cmov/libc.so.6
#1  0x083d5e5b in zend_strndup (s=0xb7f14009 , length=3086171320) at /usr/include/bits/string3.h:52
#2  0x083d1b21 in ini_lex (ini_lval=0xbf9321d8) at
Zend/zend_ini_scanner.l:343
#3  0x083cf9fe in ini_parse () at
/h/aharvey/trees/php5/Zend/zend_ini_parser.c:1557
#4  0x083cfe91 in zend_parse_ini_file (fh=0xbf9322d0, unbuffered_errors=0
'\0', scanner_mode=1, ini_parser_cb=0x8320f20 ,
arg=0xa29d148) at /h/aharvey/trees/php5/Zend/zend_ini_parser.y:206
#5  0x0831f829 in zif_parse_ini_file (ht=3, return_value=0xa29d148,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at
/h/aharvey/trees/php5/ext/standard/basic_functions.c:5937
#6  0x08412a12 in execute_internal (execute_data_ptr=0xa2cddd8,
return_value_used=1) at /h/aharvey/trees/php5/Zend/zend_execute.c:1256
#7  0xb728dab0 in xdebug_execute_internal (current_execute_data=0xa2cddd8,
return_value_used=1) at /tmp/pear/temp/xdebug/xdebug.c:1630
#8  0x0843c9af in zend_do_fcall_common_helper_SPEC
(execute_data=0xa2cddd8) at
/h/aharvey/trees/php5/Zend/zend_vm_execute.h:315
#9  0x0841a08e in execute (op_array=0xa29c554) at
/h/aharvey/trees/php5/Zend/zend_vm_execute.h:104
#10 0xb728d734 in xdebug_execute (op_array=0xa29c554) at
/tmp/pear/temp/xdebug/xdebug.c:1561
#11 0x083f12f6 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /h/aharvey/trees/php5/Zend/zend.c:1188
#12 0x0839f610 in php_execute_script (primary_file=0xbf9348f4) at
/h/aharvey/trees/php5/main/main.c:2196
#13 0x08476002 in main (argc=2, argv=0xbf934a54) at
/h/aharvey/trees/php5/sapi/cli/php_cli.c:1188

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



#48745 [Ver]: mysqlnd: mysql_num_fields returns wrong column count for mysql_list_fields

2009-07-02 Thread uw
 ID:   48745
 Updated by:   u...@php.net
 Reported By:  theta...@php.net
 Status:   Verified
 Bug Type: MySQL related
 Operating System: *
 PHP Version:  5.3.0
 Assigned To:  mysql
 New Comment:

Thanks. As said, its fixable, I know the cause, I may know a hack to
fix it but the call is deprecated.  There are zillions of MySQL 4.0
users but we don't support MySQL 4.0 any more. There may be many
list_fields users, but list_fields is deprecated. 

At some point you simply have to stop giving old, deprecated calls the
highest priority.

Apart from that, I don't want to hack with the packet decoders in the
absence of Andrey if the workaround is as easy as: compile ext/mysql
against libmysql (like ever since) and try again in four weeks.

Ulf


Previous Comments:


[2009-07-01 17:14:33] theta...@php.net

As I noted before: This is not my code and there may be a lot of users
installing software using the old mysql extension and also this
function.

For me the workaround was to enable the mysqli configuration option in
Contenido. The only problem is, that it is not enabled per default in
this CMS (although it says: PHP 5 only). Contenido uses a PHP-written
database abstraction (from where I copied the functions in this bug
report) and it was easy to exchange by the other one. It was also
fixable by doing a dummy query "select * from table limit 1" and looking
into the field descriptions for the result set (this is how the
abstraction layer fr mysqli does it in Contenido).

So many thanks for looking at it, I will post a note in the Contenido
mailing list about this problem and the workaround.



[2009-07-01 16:54:38] u...@php.net

The trouble goes back to an over optimized COM_LIST_FIELDS
communication package and a guess that mysqlnd makes. mysqlnd makes a
guess on the number of fields that the deprecated API call
mysql_list_fields() may return. The guess is never adjusted to the
actual number of fields returned by the Server. As a result
mysql_num_fields(), when invoked with a result set handle returned by
mysql_list_fields(), may return a faulty number of fields. If a users
tries to loop over all fields using the number of fields returned by
mysql_num_fields() as a stop condition, he may try to access fields that
don't exist. The out-of-bound access is not detected because the
internal security check also gets the wrong number of fields reported. 

Workaround:

 - don't use deprecated functions, don't use mysql_list_fields()..
(there is a reason why we want to deprecate COM_LIST_FIELDS!)
 - use libmysql until its fixed


I don't want to play with the packet decoders and the protocol decoding
in the absence of Andrey. I know roughly how to fix, but packet decoding
is for Andrey. Andrey is on vacation until August.

As its easy to work around, I think it can wait.



[2009-06-30 20:10:52] theta...@php.net

Here is code to reproduce the bug, it crashes CLI, too:

Just create any database and a table in mysql and run this code on it:

the problematic function is mysql_list_fields() which is deprecated and
does no longer seem to work correct with mysql_field_*() functions.
After I cahnged the code in the Contenido database abstraction to
instead create a dummy query (select * from table limit 1), like it was
done in the Contenido database code for mysqli, it works also with
mysql.

Maybe, if mysqlnd does not support this, mysql_list_fields() should
simply do the same dummy command.






[2009-06-30 18:11:17] theta...@php.net

Hi Johannes,

I am still working on a simple test script. But what I can say is, that
when I changed Contenido's config to use mysqli, it does not crash
anymore.

I found the place where the mysql_field_table is called, but I cannot
see any problems there (this is from the included conlib):

  /* public: return table metadata */
  function metadata($table = "", $full = false) {
$count = 0;
$id= 0;
$res   = array();

/*
 * Due to compatibility problems with Table we changed the
behavior
 * of metadata();
 * depending on $full, metadata returns the following values:
 *
 * - full is false (default):
 * $result[]:
 *   [0]["table"]  table name
 *   [0]["name"]   field name
 *   [0]["type"]   field type
 *   [0]["len"]field length
 *   [0]["flags"]  field flags
 *
 * - full is true
 * $result[]:
 *   ["num_fields"] number of metadata records
 *   [0]["table"]  table name
 *   [0]["name"]   field name
 *   [0]["type"]   field type
 *   [0]["len"]field length
 *   [0]["flags"]  field flags
 *   ["meta"][field name]  index of field named "field name"
 *   This