#45462 [NEW]: Backslash char is not listed on a string correctly

2008-07-08 Thread lgandras at hotmail dot com
From: lgandras at hotmail dot com
Operating system: WINDOWS AND LINUX
PHP version:  5.2.6
PHP Bug Type: Scripting Engine problem
Bug description:  Backslash char is not listed on a string correctly

Description:

When a string contains backslashs, they are shown on a way, but kept
differntly on the string. This is annoying when a string needs to be parsed
to know if a quote is being escaped.

Reproduce code:
---
$stringA = "\\'";# returns \'
$stringB = "\\\'";   # returns \\'
$stringC = "'";  # returns \\'
$stringD = "\'"; # returns \\\'

# etc.. I don't have problem with it.
# But! this is the way it is shown!
# internally the string is kept how the programmer wrote it
# how are you supposted to known with php routines
# that $stringB escapes the quote and $stringC does not!
# using stripslashes is not an option,
# because it could delete some backslashes you want to keep.
# 
# 
# I've seen other bugs, where it is told
# that normal functioning of stripslashes
# is to delete all the "first" slashes,
# but then is not possible to parse a string
# even with regular expressions to know what
# a parser like mysql would understand of my
# string.
# 
# In other words, backslashes are still there,
# but you can't know it!

$stringB == $stringC; # devolves true, in the end is right, but not now.
$stringB === $stringC; # also true (in the end), but not for mysql


substr($stringB, 0, 1) === substr($stringC, 0, 1);
substr($stringB, 1, 1) === substr($stringC, 1, 1);
substr($stringB, 2, 1) === substr($stringC, 2, 1);

# again, on the last 3 examples it returns true,
# but it doesn't let me know if the quote is being escaped or not.
# If questions are done, i need to parse a mysql string!
# My other solution is that str_replace and/or regular
# expression functions handle this issues in an adecuate way

echo "B:";
echo str_replace('\\', '', $stringB);
echo "C:";
echo str_replace('\\', '', $stringC);

Expected result:

B:\'
C:'
# note that this is in concordance with what the manual says

Actual result:
--
B:'
C:'

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



#45345 [Opn->Csd]: SPLFileInfo::getPathInfo() returns incorrect values.

2008-07-08 Thread colder
 ID:   45345
 Updated by:   [EMAIL PROTECTED]
 Reported By:  RQuadling at GMail dot com
-Status:   Open
+Status:   Closed
 Bug Type: SPL related
 Operating System: Windows XP SP2
 PHP Version:  5.3CVS-2008-06-24 (CVS)
 Assigned To:  colder
 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:


[2008-06-24 10:29:14] RQuadling at GMail dot com

Description:

Using RII(RID()) to traverse a directory tree.

Using ->getFileInfo() to see what it returned.

The result contains an array with 2 entries, which are based upon the
directory of the object making the call and not the filename.

It might be me (hey, I've got more bogus bugs than actual ones, but I
think this is a real one this time!).

I'm drawn in 2 ways for the expected results.

Either ...

1 - "pathName" and "fileName" should match getPathname() and
getFilename()

or

2 - getPathInfo() should return the same values as pathinfo()



Reproduce code:
---
getPathname(), PHP_EOL, 'Filename:',
$o_File->getFilename(), PHP_EOL;
$a_PathInfo = $o_File->getPathinfo();
var_dump($a_PathInfo);
}

// Remove test files and tree.
unlink($s_Dir . DIRECTORY_SEPARATOR . 'test.txt');
rmdir($s_Dir);
rmdir(dirname($s_Dir));
rmdir(dirname(dirname($s_Dir)));
rmdir(dirname(dirname(dirname($s_Dir;


Expected result:

D:\TEMP\RAQ1\RAQ2\RAQ3\RAQ4\test.txt
object(SplFileInfo)#8 (2) {
  ["pathName":"SplFileInfo":private]=>
  string(22) "D:\TEMP\RAQ1\RAQ2\RAQ3\RAQ4\test.txt"
  ["fileName":"SplFileInfo":private]=>
  string(27) "test.txt"
}

pathName should match getPathname()
filename should match getFilename()

OR

splfileinfo::getPathInfo() should return the same values as pathinfo()

Actual result:
--
Pathname:D:\TEMP\RAQ1\RAQ2\RAQ3\RAQ4\test.txt
Filename:test.txt
object(SplFileInfo)#8 (2) {
  ["pathName":"SplFileInfo":private]=>
  string(22) "D:\TEMP\RAQ1\RAQ2\RAQ3"
  ["fileName":"SplFileInfo":private]=>
  string(27) "D:\TEMP\RAQ1\RAQ2\RAQ3\RAQ4"
}





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



#45459 [Asn->Csd]: date_create_from_format() fails on DATE_RFC3339

2008-07-08 Thread derick
 ID:   45459
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at benjaminschulz dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: Date/time related
 Operating System: linux / darwin
 PHP Version:  5.3CVS-2008-07-08 (CVS)
 Assigned To:  derick
 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:


[2008-07-08 16:26:09] [EMAIL PROTECTED]

It's not really a bug, the specifiers used are not 100% the same, but
I'll see if I can make it work better.



[2008-07-08 15:45:06] php at benjaminschulz dot com

Description:

date_create_from_format() is unable to parse DATE_RFC3339

Reproduce code:
---
format(DATE_RFC3339));
var_dump($otherdate);

Expected result:

A ::DateTime object

Actual result:
--
false





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



#42740 [Com]: php imap_status with Microsoft Exchange 2007

2008-07-08 Thread kevin at icscomp dot com
 ID:   42740
 Comment by:   kevin at icscomp dot com
 Reported By:  sigurdne at online dot no
 Status:   No Feedback
 Bug Type: IMAP related
 Operating System: mandriva
 PHP Version:  5.2.4
 New Comment:

When I run the PHP commands to try to retrieve the unread messages
using the imap_status command, I am finding that no data is being
returned.  Additionally, the data that is being returned is random
numbers each time I push the refresh button.  I would really like to see
this issue be fixed.  Thanks.

My code is below:

$mbox = imap_open("{mailserver:993/imap/ssl}",
"domain/user","password", OP_READONLY, 1) or die("can't connect:
".imap_last_error());
$imap_obj = imap_status($mbox, "{mail:993/imap/ssl}/INBOX",
SA_UNSEEN);
var_dump($imap_obj);


Here is the output

Output 1:
object(stdClass)#19 (1) { ["flags"]=> int(0) } 

Output 2:
object(stdClass)#19 (2) { ["flags"]=> int(26571976) ["uidnext"]=>
int(26649488) }

back and forth  no other data is listed.

Help!


Previous Comments:


[2007-10-10 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".



[2007-10-02 10:24:48] [EMAIL PROTECTED]

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.






[2007-09-23 10:41:45] sigurdne at online dot no

Description:

Recently the IT-administration of my company installed Microsoft
Exchange 2007 for their mail-services - and I discovered that the php
command imap_status stopped returning anything. Everything else seems to
be working.

The IMAP4 service at the server is started - and my user is enabled to
connect. At this point I am using fetcmail and postfix to deliver the
mail to a cyrus-server which is fine with imap_status.

I am using the imap-2006k.DEV.SNAP-0709051605 with php-5.2.4






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



#42862 [Com]: IMAP toolkit crash: rfc822.c legacy routine buffer, overflow

2008-07-08 Thread david at blue-labs dot org
 ID:   42862
 Comment by:   david at blue-labs dot org
 Reported By:  Maylein at ub dot uni-heidelberg dot de
 Status:   Assigned
 Bug Type: IMAP related
 Operating System: Linux 2.6.22
 PHP Version:  5.2.4
 Assigned To:  iliaa
 New Comment:

please fix 008_imap-bufferoverflows.patch to include the typedef for
RFC822BUFFER.

/* Output buffering for RFC [2]822 */

typedef long (*soutr_t) (void *stream,char *string);

typedef struct rfc822buffer {
  soutr_t f;/* I/O flush routine */
  void *s;  /* stream for I/O routine */
  char *beg;/* start of buffer */
  char *cur;/* current buffer pointer */
  char *end;/* end of buffer */
} RFC822BUFFER;


Previous Comments:


[2008-06-24 10:54:50] hoffie at gentoo dot org

This is CVE-2008-2829.



[2008-06-18 17:43:50] hoffie at gentoo dot org

Over 7 months and two releases have passed, yet no developer even
commented on this *security* issue (according to the c-client devs). So
what's up with this, are there any problems with the patch? If yes,
would you mind pointing them out, so that one can try to fix them?



[2008-05-27 13:06:39] falon at csi dot it

I use Horde Groupware Webmail Edition 1.0.6 with Apache/1.3.41 (Unix)
PHP/5.2.5 mod_ssl/2.8.31 OpenSSL/0.9.8g.

I had the same bug.

I tried sborril patch: it fix the problem also in my environment. I
appreciate if could be added to next release of php.

Regards



[2008-04-03 21:55:29] pubear at u dot washington dot edu

I am using imap c-client 2007a with php-5.2.5.

I am working with an extensively modified version of:
http://migrationtool.sourceforge.net

I ran into this issue migrating people's mailboxes in Exchange Server. 
I wanted to confirm that the patch submitted by sborrill at precedence
dot co dot uk appears to have fixed the buffer overflow bug.

Thank you very much.



[2008-03-04 16:57:55] sborrill at precedence dot co dot uk

php_imap.c uses rfc822_write_address() which, with imap-uw sources
since 2005, limits the complete returned address list to 16383 bytes in
length irrespective of the size of the buffer you pass into it (you
don't pass the length, so it can't know the actual size).

This means that if you have a large address lists in your To: or Cc:
headers, that would expand to more than 16383 characters, PHP will
core-dump with SIGABRT.

This affects PHP HEAD too.

rfc822_write_address is deprecated:

 * WARNING: These routines are for compatibility with old software
only.
 *
 * Their use in new software is to be avoided.
 *
 * These interfaces do not provide satisfactory buffer checking.  In
 * versions of c-client prior to imap-2005, they did not provide any
 * buffer checking at all.

The fix is to use rfc822_output_address_list().

Patch below (against 5.2.5):

--- php_imap.c.orig 2007-07-31 01:31:10.0 +0100
+++ php_imap.c  2008-03-04 17:48:30.0 +
@@ -70,6 +70,7 @@
 static void _php_imap_add_body(zval *arg, BODY *body TSRMLS_DC);
 static void _php_imap_parse_address(ADDRESS *addresslist, char
**fulladdress, zval *paddress TSRMLS_DC);
 static int _php_imap_address_size(ADDRESS *addresslist);
+static void _php_rfc822_write_address_len (char *dest, ADDRESS *adr,
int len);
 
 /* the gets we use */
 static char *php_mail_gets(readfn_t f, void *stream, unsigned long
size, GETS_DATA *md);
@@ -2137,7 +2138,7 @@
}
 
string[0]='\0';
-   rfc822_write_address(string, addr);
+   _php_rfc822_write_address_len(string, addr, sizeof(string));
RETVAL_STRING(string, 1);
 }
 /* }}} */
@@ -2906,13 +2907,13 @@
if (env->from && 
_php_imap_address_size(env->from) < MAILTMPLEN)
{
env->from->next=NULL;
address[0] = '\0';
-   rfc822_write_address(address, 
env->from);
+   _php_rfc822_write_address_len(address, 
env->from,
sizeof(address));
add_property_string(myoverview, "from", 
address, 1);
}
if (env->to && _php_imap_address_size(env->to) 
< MAILTMPLEN) {
env->to->next = NULL;
address[0] = '\0';
-   rfc822_write_address(address, env->to);
+   _php_rfc822_write_address_len(address, 
env->to,
sizeof(address));
  

#43206 [Asn->Csd]: date_timezone_get() leaks memory

2008-07-08 Thread derick
 ID:   43206
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Assigned
+Status:   Closed
 Bug Type: Date/time related
 Operating System: Any
 PHP Version:  5.2.5RC2
 Assigned To:  derick
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2007-11-06 17:42:38] [EMAIL PROTECTED]

The following patch fixes the problem:

== 
$ cvs diff -u ext/date/
cvs diff: Diffing ext/date
Index: ext/date/php_date.c
===
RCS file: /repository/php-src/ext/date/php_date.c,v
retrieving revision 1.43.2.45.2.51
diff -u -r1.43.2.45.2.51 php_date.c
--- ext/date/php_date.c 12 Jul 2007 18:59:05 -  1.43.2.45.2.51
+++ ext/date/php_date.c 6 Nov 2007 17:40:24 -
@@ -1613,7 +1613,7 @@
 static void date_object_free_storage_timezone(void *object TSRMLS_DC)
 {
php_timezone_obj *intern = (php_timezone_obj *)object;
-
+   timelib_tzinfo_dtor(intern->tz);
zend_object_std_dtor(&intern->std TSRMLS_CC);
efree(object);
 }
cvs diff: Diffing ext/date/lib
cvs diff: Diffing ext/date/tests

== 
Seems it was simply forgotten to free the timezone in DateTimeZone's
destructor.

Because ->tz is an internal pointer (and not a zval) memory_get_usage()
will not report a memory increase, you'll have to use Task Manager / top
/ ps to see the effect



[2007-11-06 17:40:00] [EMAIL PROTECTED]

Description:

date_timezone_get() leaks memory

Reproduce code:
---



Expected result:

Memory usage stays constant.

Actual result:
--
Memory usage increases.





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



#44163 [Asn->Csd]: Addition of more useful date time functions

2008-07-08 Thread derick
 ID:   44163
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cool_lim_lp at yahoo dot com dot sg
-Status:   Assigned
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: any
 PHP Version:  5.2.5
 Assigned To:  derick
 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.

date differences and intervals are part of PHP 5.3.


Previous Comments:


[2008-02-19 08:48:43] [EMAIL PROTECTED]

I didn't refer to the date() comments.  The bug reporter did.



[2008-02-19 08:05:20] [EMAIL PROTECTED]

Rasmus, most of the functions in the date() comments actually don't
work, so we can use something like this. I am hoping to manage to get it
into PHP 5.3.



[2008-02-19 05:59:03] [EMAIL PROTECTED]

Right, date_diff would be useful, but date addition and the ability to
get individual date parts are there already in date_modify() and
date_parse().



[2008-02-19 05:46:46] cool_lim_lp at yahoo dot com dot sg

look at the user notes at :

http://sg2.php.net/manual/en/function.date.php

see how many people have to write their own functions to do even simple
date calculations.



[2008-02-19 05:26:06] cool_lim_lp at yahoo dot com dot sg

ok, tell me how do you calculate the no. of days difference between two
given dates.



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

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



#44975 [Asn->Csd]: ext/date/php_date has comments starting with //

2008-07-08 Thread derick
 ID:   44975
 Updated by:   [EMAIL PROTECTED]
 Reported By:  orchard at engr dot wisc dot edu
-Status:   Assigned
+Status:   Closed
 Bug Type: Compile Failure
 Operating System: Solaris 9
 PHP Version:  5.2.6
 Assigned To:  derick
 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:


[2008-05-12 20:42:43] [EMAIL PROTECTED]

Already noticed it, but hadn't patched it.



[2008-05-12 20:39:51] orchard at engr dot wisc dot edu

Description:

ext/date/php_date.c has comments starting with // rather than enclosed
in /* and */  The Sun WS6 compiler does no accept such comments.

[tiger] 149% diff -c php_date.c.orig php_date.c
*** php_date.c.orig Wed Apr 16 12:21:46 2008
--- php_date.c  Mon May 12 15:08:17 2008
***
*** 269,277 
int initialized;
int type;
union {
!   timelib_tzinfo *tz; // TIMELIB_ZONETYPE_ID;
!   timelib_sll utc_offset; // TIMELIB_ZONETYPE_OFFSET
!   struct  // TIMELIB_ZONETYPE_ABBR
{
timelib_sll  utc_offset;
char*abbr;
--- 269,277 
int initialized;
int type;
union {
!   timelib_tzinfo *tz; /* TIMELIB_ZONETYPE_ID; */
!   timelib_sll utc_offset; /* TIMELIB_ZONETYPE_OFFSET
*/
!   struct  /* TIMELIB_ZONETYPE_ABBR
*/
{
timelib_sll  utc_offset;
char*abbr;







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



#45038 [Asn->Csd]: Crash when using DateTimeZone object returned by Date::getTimezone

2008-07-08 Thread derick
 ID:   45038
 Updated by:   [EMAIL PROTECTED]
 Reported By:  astax dot t at gmail dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: Date/time related
 Operating System: Linux
 PHP Version:  5.2.6
 Assigned To:  derick
 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:


[2008-07-01 07:59:12] peter dot bex at solide-ict dot nl

I can verify that it crashes on PHP 5.2.6 under NetBSD/amd64 (-current
from April), so most likely it's architecture-specific if it works on
i386.



[2008-07-01 03:27:46] levi at alliancesoftware dot com dot au

About as simple as you can get:

setTimezone($dt->getTimezone()); ?>


Segfaults on FC9 x86_64 CLI compiled from source.
(However, silently succeeds on FC8 x86 compiled from source).



[2008-05-31 10:54:36] [EMAIL PROTECTED]

Another reproduce script:



== Output ==
  object(DateTime)#1 (0) {
  }
  object(DateTimeZone)#2 (0) {
  }
  object(DateTime)#1 (0) {
  }
  string(31) "Sat, 31 May 2008 10:49:27 +"
  Segmentation fault
== /Output ==

PHP 5.2.6 (cgi) (built: May 19 2008 09:18:35)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies




[2008-05-27 10:46:51] [EMAIL PROTECTED]

Wait and rely. :)

Assigned to maintainer.



[2008-05-27 08:23:31] astax dot t at gmail dot com

Any chance for this to be fixed?



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

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



#44859 [Com]: is_readable() returns incorrect result with NTFS ACL permissions

2008-07-08 Thread carsten_sttgt at gmx dot de
 ID:   44859
 Comment by:   carsten_sttgt at gmx dot de
 Reported By:  phpbugs at steve dot ipapp dot com
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: Win 2000 SP4
 PHP Version:  5.2.5
 New Comment:

| NT ACL Permissions ...
| is_readable() doesn't seem to care and thinks that all
| these files are readable, when in fact they aren't.

I just run into the same problem and can verify/reproduce this :-/

| is_writeable() probably has the same problem.

Correct. is_writeable() only looks for the "read-only" file system
attribute (this one works).

But like is_readable(), it does not make a real UID/GID check on
Windows.

And there is no similar attribute for is_readable(), so is_readable()
is useless on Windows at the moment.

Regards,
Carsten


Previous Comments:


[2008-04-29 00:27:27] phpbugs at steve dot ipapp dot com

Description:

NT ACL Permissions can be modified in Windows by right clicking on the
file, going to properties, and security. Clicking the Everyone user and
hitting Deny Read, will prevent ANYTHING from reading, even if they have
 READ permissions granted elsewhere. 

is_readable() doesn't seem to care and thinks that all these files are
readable, when in fact they aren't. is_writeable() probably has the same
problem. Previous Bugs Identified with this have been closed: 41519.



Reproduce code:
---
$some_file = 'C:\\path\to\file.txt';
if(is_readable($some_file))
{
   echo file_get_contents($some_file);
} else
{
   echo "This file isn't readable";
}




Expected result:

With NTFS ACL Permissions set to allow reading:

*Contents of File*

With NTFS ACL Permissions set to disallow reading:

"This file isn't readable";



Actual result:
--
With NTFS ACL Permissions set to allow reading:

*Contents of File*

With NTFS ACL Permissions set to disallow reading:

Warning: file_get_contents(C:\\path\to\file.txt)
[function.file-get-contents]: failed to open stream: Permission denied
in C:\\path\to\script.php on line 4





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



#45461 [Opn->Bgs]: php_svn.dll missing in "official" release and incompatible in snap

2008-07-08 Thread scottmac
 ID:   45461
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jan at ecotech dot se
-Status:   Open
+Status:   Bogus
 Bug Type: Dynamic loading
 Operating System: Windows Vista
 PHP Version:  5.2.6
 New Comment:

It was missing from the 5.2.6 release because at that time it required
SVN 1.4, i've since sorted this so only 1.3 is required.

The reason its not working from the snapshot is that its linking
against APR 0.9 which is designed for Apache 2.0, hence the error.

If you use it from CLI it will work fine. Bugs for PECL extensions
should be reported at http://pecl.php.net/svn


Previous Comments:


[2008-07-08 16:42:57] jan at ecotech dot se

Description:

The PECL-extension php_svn.dll is missing in the "official" PECL 5.2.6
zip file provided on the download-page
http://www.php.net/downloads.php.

I then downloaded it from the 5.2 snap
(http://snaps.php.net/win32/pecl5.2-win32-200807081630.zip) where it is
included...

BUT

It seems to be incompatible with the 5.2.6 release since it wont load
on startup. I have tried and reproduced the error on:

- Windows XP, Apache/2.2.9
- Windows Vista, Apache/2.2.6
- Windows 2003 Server, Apache/2.2.9









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



#45461 [NEW]: php_svn.dll missing in "official" release and incompatible in snap

2008-07-08 Thread jan at ecotech dot se
From: jan at ecotech dot se
Operating system: Windows Vista
PHP version:  5.2.6
PHP Bug Type: Dynamic loading
Bug description:  php_svn.dll missing in "official" release and incompatible in 
snap

Description:

The PECL-extension php_svn.dll is missing in the "official" PECL 5.2.6 zip
file provided on the download-page http://www.php.net/downloads.php.

I then downloaded it from the 5.2 snap
(http://snaps.php.net/win32/pecl5.2-win32-200807081630.zip) where it is
included...

BUT

It seems to be incompatible with the 5.2.6 release since it wont load on
startup. I have tried and reproduced the error on:

- Windows XP, Apache/2.2.9
- Windows Vista, Apache/2.2.6
- Windows 2003 Server, Apache/2.2.9





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



#45459 [Opn->Asn]: date_create_from_format() fails on DATE_RFC3339

2008-07-08 Thread derick
 ID:   45459
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at benjaminschulz dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Date/time related
 Operating System: linux / darwin
 PHP Version:  5.3CVS-2008-07-08 (CVS)
-Assigned To:  
+Assigned To:  derick
 New Comment:

It's not really a bug, the specifiers used are not 100% the same, but
I'll see if I can make it work better.


Previous Comments:


[2008-07-08 15:45:06] php at benjaminschulz dot com

Description:

date_create_from_format() is unable to parse DATE_RFC3339

Reproduce code:
---
format(DATE_RFC3339));
var_dump($otherdate);

Expected result:

A ::DateTime object

Actual result:
--
false





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



#45460 [NEW]: imap patch for fromlength fix in imap_headerinfo doesn't accept lengths of 1024

2008-07-08 Thread andrew at lifescale dot com
From: andrew at lifescale dot com
Operating system: FreeBSD 6.1
PHP version:  5.2.6
PHP Bug Type: IMAP related
Bug description:  imap patch for fromlength fix in imap_headerinfo doesn't 
accept lengths of 1024

Description:

There was a patch on April 1 for imap.c that added a sanity check to the
from and subject lengths when calling imap_headerinfo()

http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.247&r2=1.248

The error message says that the from / subject lengths have to be between
1 and 1024.  However it will not accept a fromlength of 1024 due to the  >=
 operator.  MAILTMPLEN is 1024

This causes a problem for the pear library IMAPv2 as it defaults the
fromlength and subjectlength to 1024

Either the error message must be updated to MAILTMPLEN-1,  or the operator
and char array must be changed (this is preferred as to not bust IMAPv2)


Reproduce code:
---
I don't have a good example as  I use IMAPv2.  However, it seems like a
simple problem just by looking at the code

Expected result:

imap_headerinfo should accept a fromlength of 1024

Actual result:
--
A warning is given:

Jul  8 00:01:49 php: PHP Warning:  imap_headerinfo(): From length has to
be between 1 and 1024 in /usr/local/lib/php/Mail/IMAPv2.php on line 1505



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



#45448 [Fbk->Opn]: PHP Cuts off documents after some point

2008-07-08 Thread jowie dot 1337+phpnet at gmail dot com
 ID:   45448
 User updated by:  jowie dot 1337+phpnet at gmail dot com
 Reported By:  jowie dot 1337+phpnet at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: Windows XP Service Pack 1
 PHP Version:  5.2.6
 New Comment:

This is a snippet of my httpd.conf related to php, this is the same as
I used to test the scenario's in my opening post:


AddType application/x-httpd-php .php

LoadModule php4_module "C:/Program Files/PHP 4/php4apache2.dll"
PHPIniDir "C:/Program Files/PHP 4/" 

#PHPIniDir "C:/Program Files/PHP 5/"
#LoadModule php5_module "C:/Program Files/PHP 5/php5apache2_2.dll"


Previous Comments:


[2008-07-08 13:13:04] [EMAIL PROTECTED]

Which apache2 SAPI are you using?



[2008-07-07 22:55:19] jowie dot 1337+phpnet at gmail dot com

Description:

All my php documents are cut off after exactly 8800 bytes. The content
does not matter, it even happens on documents that have no php code at
all.

There are no errors (E_ALL) from php, nor from apache.

Renaming .php to .txt shows the whole file in my browser.
This also happends with an unmodified php.ini (php.ini-recommended,
besides extension_dir)

I have tried the following scenario's (restarted apache for each try):

+ Apache 2.2.9 PHP 4.4.8 as Module (bug appears)
+ Apache 2.2.9 PHP 5.2.6 as Module (bug appears)
+ Apache 2.2.9 PHP 5.2.6 under CGI (bug appears)
+ Apache 2.2.9 PHP 4.4.8 implicit_flush on (NO BUG)
+ Apache 2.2.9 PHP 5.2.6 Without ANY Extensions (bug appears)
+ Apache 2.2.9 PHP 5.2.6 implicit_flush on (bug appears)
+ Apache 2.2.9 PHP 5.2.6 output_buffering off (bug appears)
+ Apache 2.2.9 PHP 4.4.8 Super high memory_limit (bug appears)
+ Apache 2.2.9 PHP 5.2.6 Super high memory_limit (bug appears)

As you can see, for some reason if I turn implicit_flush on in php 4,
the bug disappears, i can see the whole document(s).


I have seen a different site where this happened. However it did not
appear on every document and at various cut-off lengths. This may be a
different bug perhaps unrelated to php but it is worth mentioning.
I only have the following limited info about that server:
OS: Some Linux Flavor; Apache 2.0.54 (Fedora); PHP 5.0.4 as a module

Reproduce code:
---
A text document containing more then 8800 characters saved as test.php

Expected result:

The whole text document

Actual result:
--
A text document that is cut off at 8800 characters





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



#45459 [NEW]: date_create_from_format() fails on DATE_RFC3339

2008-07-08 Thread php at benjaminschulz dot com
From: php at benjaminschulz dot com
Operating system: linux / darwin
PHP version:  5.3CVS-2008-07-08 (CVS)
PHP Bug Type: Date/time related
Bug description:  date_create_from_format() fails on DATE_RFC3339

Description:

date_create_from_format() is unable to parse DATE_RFC3339

Reproduce code:
---
format(DATE_RFC3339));
var_dump($otherdate);

Expected result:

A ::DateTime object

Actual result:
--
false

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



#45458 [Opn]: oci_fetch_all add NULL char to field name when field name is numeric

2008-07-08 Thread leopoldo dot donati at gmail dot com
 ID:   45458
 User updated by:  leopoldo dot donati at gmail dot com
 Reported By:  leopoldo dot donati at gmail dot com
 Status:   Open
 Bug Type: OCI8 related
 Operating System: Linux RHAS4
 PHP Version:  5.2.6
 New Comment:

I meant
$nr = oci_fetch_all($statID, $data, 0, -1, OCI_FETCHSTATEMENT_BY_ROW);


Previous Comments:


[2008-07-08 15:14:56] leopoldo dot donati at gmail dot com

Description:

Server: Oracle9i Enterprise Edition Release 9.2.0.7.0
Client: instant client 10.1.0.3

let's suppose we have a table (t) with 3 columns (a, b, c)
and you want to execute the statement:
select a "10", b "20", c "30" from t

if you parse, execute and then get the records like this:
while ($row = oci_fetch_array($statID, OCI_ASSOC)) $data[] = $row;
when you look at $data[0]["10"] there is a value

if you parse, execute and get the records with oci_fetch_all
$data = oci_fetch_all($statID, $data, 0, -1,
OCI_FETCHSTATEMENT_BY_ROW)
if you print_r $data it looks the same but you can't access
$data[0]["10"] because there is a NULL after the 10 (at least trying and
ord looks like)






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



#45372 [Asn->Csd]: hash# check in new re2c parser breaks code

2008-07-08 Thread nlopess
 ID:   45372
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Assigned
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: linux
 PHP Version:  5.3CVS-2008-06-27 (CVS)
 Assigned To:  nlopess
 New Comment:

Ok, I think it is really fixed now. I even fixed other related bug.
Please test and let me know if you can still break it :-)


Previous Comments:


[2008-07-08 13:28:00] [EMAIL PROTECTED]

Nuno, fix not correct?



[2008-07-07 14:12:44] [EMAIL PROTECTED]

This is not fixed, actually (is it OK to change Status back to Open?).

Nuno, I saw your commit yesterday, which didn't seem like it would help
(as it wasn't related to what I said above), but wanted to wait until I
could check again to make sure I wasn't crazy with my above description.
:-)

I just tried the latest Windows snapshot and it's still generating a
parse error with the *single line file* (no newline at the end, which .+
won't match, therefore won't trigger the YYFILL() "return 0" thing)
descibed in this report (and the CLI example in Bug #44654). Can't be
only broken on Windows since everything uses the same generated scanner
code...

Something like Alan's scanning loop could be done after just matching
#, BUT that's just another workaround for that underlying re2c/YYFILL()
problem (also affecting other things). I believe if you use the
tokenizer extension, you can see that if the last token of code is
matched by a variable length rule, it won't be returned. e.g. my example
of a simple rule, [a-z]+ not matching input "foo"



[2008-07-06 17:01:55] [EMAIL PROTECTED]

This bug has been fixed in CVS.

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





[2008-06-27 14:57:57] [EMAIL PROTECTED]

Not sure why re2c needs to deal with the #bang situation
looking at the code it would be better to eat that line outside of the
lexer..


Something like:

int ini_lex(zval *ini_lval TSRMLS_DC)
{
 if ((YYCTYPE*)yytext == SCNG(yy_start) && *yych == '#') {
 while(*yych != '\n' && *yych != '\n' && yych < yyend) {
yych++; 
 }
 while((*yych == '\n' || *yych == '\n') && yych < yyend) {
yych++; 
 }
 YYCURSOR = yych;
 }
.



[2008-06-27 11:26:18] [EMAIL PROTECTED]

Duplicated... Bug #45147



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

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



#45270 [Fbk->Opn]: session_start() incorrectly tries to send a cookie

2008-07-08 Thread vesselin dot atanasov at gmail dot com
 ID:   45270
 User updated by:  vesselin dot atanasov at gmail dot com
 Reported By:  vesselin dot atanasov at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: Fedora Core 8
 PHP Version:  5.2.6
 New Comment:

Hello Jani,
Once a PHP process/thread starts a session, it acquires an exclusive
lock of the session variables. This means that a different PHP
process/thread cannot start a session while the first process is
working. This turns out to be a problem for websites that provide some
kind of API. Let's assume that our API has two kinds of calls:
A) Ones that take more or less long time, e.g. 5-10 minutes.
B) Ones that take a sort time, e.g. 1-2 seconds.

So here is what a long web API call should look like:
1. Start the session (acquire an exclusive lock of the session data).
2. Read some session variables.
3. Close the session (release the exclusive lock).
4. Do some long processing for 5-10 minutes.
5. Write the processing result to standard output, effectively sending
it to the client that called the API.
6. Start the session again (acquire the exclusive lock again).
7. Write some state variables back to the session data.
8. Terminate the PHP script.

So from this sequence it is obvious that in step 4 many short API calls
can be performed while the long processing takes place. If we cannot
stop the session, releasing the lock and then start it again, we need to
hold the lock for 5-10 minutes thus serializing access to the API, which
is pretty inefficient.


Previous Comments:


[2008-07-08 13:30:31] [EMAIL PROTECTED]

Why would you stop and start a session in same request? It's by design
like this..



[2008-06-14 14:05:09] vesselin dot atanasov at gmail dot com

Description:

session_start() incorrectly tries to send a cookie even when it has
already been sent. This causes problems with sessions that are closed
with session_write_close() some output has been sent and then the
session is re-opened with session_start()

The second time when session_start() is called it should avoid sending
the cookie and cache headers, since they have already been sent by the
first call to session_start(). It seems that the second time
session_start() tries to send the same cookie value as the first time,
so it should be possible to avoid sending that cookie a second time.

Reproduce code:
---



Expected result:

No output at all.

Actual result:
--
Test
Warning: session_start() [function.session-start]: Cannot send session
cookie - headers already sent by (output started at
/var/medical/htdocs/try.php:4) in /var/medical/htdocs/try.php on line 5

Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent (output started at
/var/medical/htdocs/try.php:4) in /var/medical/htdocs/try.php on line 5





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



#45458 [NEW]: oci_fetch_all add NULL char to field name when field name is numeric

2008-07-08 Thread leopoldo dot donati at gmail dot com
From: leopoldo dot donati at gmail dot com
Operating system: Linux RHAS4
PHP version:  5.2.6
PHP Bug Type: OCI8 related
Bug description:  oci_fetch_all add NULL char to field name when field name is 
numeric

Description:

Server: Oracle9i Enterprise Edition Release 9.2.0.7.0
Client: instant client 10.1.0.3

let's suppose we have a table (t) with 3 columns (a, b, c)
and you want to execute the statement:
select a "10", b "20", c "30" from t

if you parse, execute and then get the records like this:
while ($row = oci_fetch_array($statID, OCI_ASSOC)) $data[] = $row;
when you look at $data[0]["10"] there is a value

if you parse, execute and get the records with oci_fetch_all
$data = oci_fetch_all($statID, $data, 0, -1, OCI_FETCHSTATEMENT_BY_ROW)
if you print_r $data it looks the same but you can't access $data[0]["10"]
because there is a NULL after the 10 (at least trying and ord looks like)


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



#45457 [Opn->Fbk]: compilation error

2008-07-08 Thread johannes
 ID:   45457
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dmiry at conft dot org
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: debian 4.0
 PHP Version:  5.2.6
 New Comment:

Looks like you didn't clean after changing the configure line. Please
make sure you're running make clean (or cvsclean) before building again.


Previous Comments:


[2008-07-08 14:33:58] dmiry at conft dot org

Description:

cannot compile php 5.2.6 on debian etch 4.0, get a compilation error,
compiling with the following configuration:
./configure \
 --with-apxs2=/usr/bin/apxs2 \
 --with-gd \
--with-gd-dir=/usr/lib \
--with-gettext \
--with-jpeg-dir=/usr/lib \
--with-freetype \
--with-freetype-dir=/usr/lib \
--with-kerberos \
--with-mcrypt \
--with-mhash \
--with-mysql=/usr/local/mysql \
--with-pear \
--with-png-dir=/usr//lib \
--with-xml \
--with-zlib \
--with-zlib-dir=/usr/lib \
--with-openssl \
--with-mysqli=/usr/bin/mysql_config \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-track-vars \
--enable-mbstring

Actual result:
--
sapi/cli/.libs/php_cli.o: In function `sapi_cli_deactivate':
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:320: undefined reference to
`sapi_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:322: undefined reference to
`sapi_globals'
sapi/cli/.libs/php_cli.o: In function `main':
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:728: undefined reference to
`executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1317: undefined reference
to `executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1324: undefined reference
to `executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:729: undefined reference to
`compiler_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:730: undefined reference to
`executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:805: undefined reference to
`sapi_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:828: undefined reference to
`compiler_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:997: undefined reference to
`compiler_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1029: undefined reference
to `sapi_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1030: undefined reference
to `sapi_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1032: undefined reference
to `sapi_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1043: undefined reference
to `compiler_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1055: undefined reference
to `core_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1141: undefined reference
to `executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1199: undefined reference
to `executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1210: undefined reference
to `executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1221: undefined reference
to `compiler_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1223: undefined reference
to `executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1269: undefined reference
to `executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1273: undefined reference
to `executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1276: undefined reference
to `executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1277: undefined reference
to `executor_globals'
sapi/cli/.libs/php_cli.o:(.debug_info+0x46f3): undefined reference to
`sapi_globals'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1





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



#45079 [Fbk->Csd]: --with-config-file-path causes segmentation fault

2008-07-08 Thread johannes
 ID:   45079
 Updated by:   [EMAIL PROTECTED]
 Reported By:  m dot kurzyna at crystalpoint dot pl
-Status:   Feedback
+Status:   Closed
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.3CVS-2008-05-23 (snap)
 Assigned To:  fb-req-jani
 New Comment:

Closing then.


Previous Comments:


[2008-07-08 11:35:16] m dot kurzyna at crystalpoint dot pl

Just tried with 2008.07.08 08:30 snap - seems to work fine with values
both quoted and not. Thanks for the fix.



[2008-07-06 11:46:32] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

And provide new backtrace generated with that snapshot.



[2008-05-26 20:43:31] m dot kurzyna at crystalpoint dot pl

As for the location - it seems convenient. Dunno if loading it with the
rest of .ini is a good or bad thing - personally I don't see
disadvantages of this except for having to parse one more file and thus
startup performance loss.

This however is irrelevant. I moved browsecap.ini to /tmp and set
browsecap option to new location - it still crashes. However when it
can't find the file it doesn't so it's something specific to this file
that causes the crash. 

I've managed to isolate basic test case: it's using quotation for 
values:

option="value" 

crashes, where 

option=value 

doesn't. This isn't true for configuration ini file - using quotations
has no crash effect as far as I tested.



[2008-05-26 20:11:44] [EMAIL PROTECTED]

Why do you actually have browscap.ini in that directory anyway..? That
sounds like a very bad idea to me, considering it will get loaded as
"normal" partial php.ini file. Of course it shouldn't cause a crash
though. :)



[2008-05-25 21:58:35] m dot kurzyna at crystalpoint dot pl

Core was generated by `./sapi/cli/php'.
Program terminated with signal 11, Segmentation fault.
[New process 20491]
#0  0x006f76f4 in ini_lex (ini_lval=0x7fffe7d51180) at
/home/users/builder/src/php/n2/Zend/zend_ini_scanner.c:1673
1673yytext[yyleng] = 0;
(gdb) bt
#0  0x006f76f4 in ini_lex (ini_lval=0x7fffe7d51180) at
/home/users/builder/src/php/n2/Zend/zend_ini_scanner.c:1673
#1  0x006f43be in ini_parse () at
/home/users/builder/src/php/n2/Zend/zend_ini_parser.c:1557
#2  0x006f3c36 in zend_parse_ini_file (fh=0x7fffe7d512c0,
unbuffered_errors=1 '\001', scanner_mode=1,
ini_parser_cb=0x620458 , arg=0xb2cec0)
at /home/users/builder/src/php/n2/Zend/zend_ini_parser.c:319
#3  0x00620aba in zm_startup_browscap (type=1,
module_number=7)
at /home/users/builder/src/php/n2/ext/standard/browscap.c:198
#4  0x00618005 in zm_startup_basic (type=1, module_number=7)
at
/home/users/builder/src/php/n2/ext/standard/basic_functions.c:4003
#5  0x0072b711 in zend_startup_module_ex (module=0xb55eb0) at
/home/users/builder/src/php/n2/Zend/zend_API.c:1585
#6  0x00733d00 in zend_hash_apply (ht=0xb335a0,
apply_func=0x72b568 )
at /home/users/builder/src/php/n2/Zend/zend_hash.c:673
#7  0x0072b8f2 in zend_startup_modules () at
/home/users/builder/src/php/n2/Zend/zend_API.c:1634
#8  0x006b1739 in php_module_startup (sf=0xb2b480,
additional_modules=0x0, num_additional_modules=0)
at /home/users/builder/src/php/n2/main/main.c:1898
#9  0x007c326e in php_cli_startup (sapi_module=0xb2b480) at
/home/users/builder/src/php/n2/sapi/cli/php_cli.c:358
#10 0x007c3ffb in main (argc=1, argv=0x7fffe7d51938) at
/home/users/builder/src/php/n2/sapi/cli/php_cli.c:716



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

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



#45455 [Opn->Bgs]: highlight_file could take start/length line numbers for excerpts

2008-07-08 Thread johannes
 ID:   45455
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ceo at l-i-e dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: N/A
 PHP Version:  5.2.6
 New Comment:

highlight_file is a small helper and not meant to be a full-features
highlighter.

Instead of parsing the output you might also read the file (using
file(), file_Get_contents() or so and then use highlight_string() on
some chunks of it.


Previous Comments:


[2008-07-08 13:45:09] ceo at l-i-e dot com

Description:

I would find highlight_file much more useful, particularly for writing
on-line tutorials, articles, etc if it would take a line number and
count optional arguments, to print out only an excerpt of the file.

One could then intersperse bits of code and commentary very easily with
original source files instead of having to keep code snippets in sync as
you develop/author an article.

One can, of course, play games with explode("" and array_slice,
but it's a bit of a pain, really.

It would also be extra nifty if line numbers could be added on the left
with yet another optional arg, and maybe even an arg for
absolute|relative numbering for the snippets.

PHP Rocks!







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



#45456 [Opn->Asn]: _WIN32_WINNT redefined

2008-07-08 Thread johannes
 ID:   45456
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Keisial at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Compile Warning
 Operating System: Windows
 PHP Version:  5.3CVS-2008-07-08 (snap)
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

Pierre, you're working on Windows stuff these days, please have a look,
thanks.


Previous Comments:


[2008-07-08 13:46:19] Keisial at gmail dot com

Description:

_WIN32_WINNT macro can be defiend before including windows headers to
specify the minimun windows nt version to support (usually to unhide
prototypes not available on previous versions).

It is used like this on TSRM/readdir.h before including windows.h
So far, so good.

However, due to include order, windows.h is already included before,
defining _WIN32_WINNT by itself and thus it doesn't do anything. So the
define should either be removed (if it's not needed), or moved before.

Reproduce code:
---
_WIN32_WINNT is defined on TSRM/readdir.h:10:
main/php.h:405->TSRM/tsrm_virtual_cwd.h:55->readdir.h

windows.h was already included by:
main/php.h:34->Zend/zend.h:53->zend_config.w32.h:39
(in fact winsock2.h at zend_config.w32.h:38 is already including it
before the real one)






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



#45457 [NEW]: compilation error

2008-07-08 Thread dmiry at conft dot org
From: dmiry at conft dot org
Operating system: debian 4.0
PHP version:  5.2.6
PHP Bug Type: Compile Failure
Bug description:  compilation error

Description:

cannot compile php 5.2.6 on debian etch 4.0, get a compilation error,
compiling with the following configuration:
./configure \
 --with-apxs2=/usr/bin/apxs2 \
 --with-gd \
--with-gd-dir=/usr/lib \
--with-gettext \
--with-jpeg-dir=/usr/lib \
--with-freetype \
--with-freetype-dir=/usr/lib \
--with-kerberos \
--with-mcrypt \
--with-mhash \
--with-mysql=/usr/local/mysql \
--with-pear \
--with-png-dir=/usr//lib \
--with-xml \
--with-zlib \
--with-zlib-dir=/usr/lib \
--with-openssl \
--with-mysqli=/usr/bin/mysql_config \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-track-vars \
--enable-mbstring

Actual result:
--
sapi/cli/.libs/php_cli.o: In function `sapi_cli_deactivate':
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:320: undefined reference to
`sapi_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:322: undefined reference to
`sapi_globals'
sapi/cli/.libs/php_cli.o: In function `main':
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:728: undefined reference to
`executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1317: undefined reference to
`executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1324: undefined reference to
`executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:729: undefined reference to
`compiler_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:730: undefined reference to
`executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:805: undefined reference to
`sapi_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:828: undefined reference to
`compiler_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:997: undefined reference to
`compiler_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1029: undefined reference to
`sapi_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1030: undefined reference to
`sapi_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1032: undefined reference to
`sapi_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1043: undefined reference to
`compiler_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1055: undefined reference to
`core_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1141: undefined reference to
`executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1199: undefined reference to
`executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1210: undefined reference to
`executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1221: undefined reference to
`compiler_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1223: undefined reference to
`executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1269: undefined reference to
`executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1273: undefined reference to
`executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1276: undefined reference to
`executor_globals'
/usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1277: undefined reference to
`executor_globals'
sapi/cli/.libs/php_cli.o:(.debug_info+0x46f3): undefined reference to
`sapi_globals'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

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

#45456 [NEW]: _WIN32_WINNT redefined

2008-07-08 Thread Keisial at gmail dot com
From: Keisial at gmail dot com
Operating system: Windows
PHP version:  5.3CVS-2008-07-08 (snap)
PHP Bug Type: Compile Warning
Bug description:  _WIN32_WINNT redefined 

Description:

_WIN32_WINNT macro can be defiend before including windows headers to
specify the minimun windows nt version to support (usually to unhide
prototypes not available on previous versions).

It is used like this on TSRM/readdir.h before including windows.h
So far, so good.

However, due to include order, windows.h is already included before,
defining _WIN32_WINNT by itself and thus it doesn't do anything. So the
define should either be removed (if it's not needed), or moved before.

Reproduce code:
---
_WIN32_WINNT is defined on TSRM/readdir.h:10:
main/php.h:405->TSRM/tsrm_virtual_cwd.h:55->readdir.h

windows.h was already included by:
main/php.h:34->Zend/zend.h:53->zend_config.w32.h:39
(in fact winsock2.h at zend_config.w32.h:38 is already including it before
the real one)


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



#45455 [NEW]: highlight_file could take start/length line numbers for excerpts

2008-07-08 Thread ceo at l-i-e dot com
From: ceo at l-i-e dot com
Operating system: N/A
PHP version:  5.2.6
PHP Bug Type: Feature/Change Request
Bug description:  highlight_file could take start/length line numbers for 
excerpts

Description:

I would find highlight_file much more useful, particularly for writing
on-line tutorials, articles, etc if it would take a line number and count
optional arguments, to print out only an excerpt of the file.

One could then intersperse bits of code and commentary very easily with
original source files instead of having to keep code snippets in sync as
you develop/author an article.

One can, of course, play games with explode("" and array_slice, but
it's a bit of a pain, really.

It would also be extra nifty if line numbers could be added on the left
with yet another optional arg, and maybe even an arg for absolute|relative
numbering for the snippets.

PHP Rocks!



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



#45236 [Opn->Fbk]: error_get_last reports errors from other scripts

2008-07-08 Thread jani
 ID:   45236
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jdp34 at njit dot edu
-Status:   Open
+Status:   Feedback
 Bug Type: *General Issues
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

IIRC, something like this bug was fixed already..


Previous Comments:


[2008-06-11 13:23:42] jdp34 at njit dot edu

This happens only on my Linux installation, but not on my Windows
installation.



[2008-06-11 13:20:06] jdp34 at njit dot edu

Description:

error_get_last() returns errors from other scripts running on the same
PHP instance, or reports errors previously in the script that had since
been fixed. If run as the sole contents of a file, it will return the
errors that PHP picked up before in previous scripts.

Reproduce code:
---


Expected result:

Nothing.

Actual result:
--
Array ( [type] => 8 [message] => Undefined variable: foo [file] =>
/home/jdp/public_html/not_the_same_script.php [line] => 5 )





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



#45270 [Opn->Fbk]: session_start() incorrectly tries to send a cookie

2008-07-08 Thread jani
 ID:   45270
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vesselin dot atanasov at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Fedora Core 8
 PHP Version:  5.2.6
 New Comment:

Why would you stop and start a session in same request? It's by design
like this..


Previous Comments:


[2008-06-14 14:05:09] vesselin dot atanasov at gmail dot com

Description:

session_start() incorrectly tries to send a cookie even when it has
already been sent. This causes problems with sessions that are closed
with session_write_close() some output has been sent and then the
session is re-opened with session_start()

The second time when session_start() is called it should avoid sending
the cookie and cache headers, since they have already been sent by the
first call to session_start(). It seems that the second time
session_start() tries to send the same cookie value as the first time,
so it should be possible to avoid sending that cookie a second time.

Reproduce code:
---



Expected result:

No output at all.

Actual result:
--
Test
Warning: session_start() [function.session-start]: Cannot send session
cookie - headers already sent by (output started at
/var/medical/htdocs/try.php:4) in /var/medical/htdocs/try.php on line 5

Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent (output started at
/var/medical/htdocs/try.php:4) in /var/medical/htdocs/try.php on line 5





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



#45372 [Opn->Asn]: hash# check in new re2c parser breaks code

2008-07-08 Thread jani
 ID:   45372
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: linux
 PHP Version:  5.3CVS-2008-06-27 (CVS)
-Assigned To:  helly
+Assigned To:  nlopess
 New Comment:

Nuno, fix not correct?


Previous Comments:


[2008-07-07 14:12:44] [EMAIL PROTECTED]

This is not fixed, actually (is it OK to change Status back to Open?).

Nuno, I saw your commit yesterday, which didn't seem like it would help
(as it wasn't related to what I said above), but wanted to wait until I
could check again to make sure I wasn't crazy with my above description.
:-)

I just tried the latest Windows snapshot and it's still generating a
parse error with the *single line file* (no newline at the end, which .+
won't match, therefore won't trigger the YYFILL() "return 0" thing)
descibed in this report (and the CLI example in Bug #44654). Can't be
only broken on Windows since everything uses the same generated scanner
code...

Something like Alan's scanning loop could be done after just matching
#, BUT that's just another workaround for that underlying re2c/YYFILL()
problem (also affecting other things). I believe if you use the
tokenizer extension, you can see that if the last token of code is
matched by a variable length rule, it won't be returned. e.g. my example
of a simple rule, [a-z]+ not matching input "foo"



[2008-07-06 17:01:55] [EMAIL PROTECTED]

This bug has been fixed in CVS.

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





[2008-06-27 14:57:57] [EMAIL PROTECTED]

Not sure why re2c needs to deal with the #bang situation
looking at the code it would be better to eat that line outside of the
lexer..


Something like:

int ini_lex(zval *ini_lval TSRMLS_DC)
{
 if ((YYCTYPE*)yytext == SCNG(yy_start) && *yych == '#') {
 while(*yych != '\n' && *yych != '\n' && yych < yyend) {
yych++; 
 }
 while((*yych == '\n' || *yych == '\n') && yych < yyend) {
yych++; 
 }
 YYCURSOR = yych;
 }
.



[2008-06-27 11:26:18] [EMAIL PROTECTED]

Duplicated... Bug #45147



[2008-06-27 09:31:21] [EMAIL PROTECTED]

This should work like in older releases, Marcus please check 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/45372

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



#45448 [Opn->Fbk]: PHP Cuts off documents after some point

2008-07-08 Thread jani
 ID:   45448
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jowie dot 1337+phpnet at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Windows XP Service Pack 1
 PHP Version:  5.2.6
 New Comment:

Which apache2 SAPI are you using?


Previous Comments:


[2008-07-07 22:55:19] jowie dot 1337+phpnet at gmail dot com

Description:

All my php documents are cut off after exactly 8800 bytes. The content
does not matter, it even happens on documents that have no php code at
all.

There are no errors (E_ALL) from php, nor from apache.

Renaming .php to .txt shows the whole file in my browser.
This also happends with an unmodified php.ini (php.ini-recommended,
besides extension_dir)

I have tried the following scenario's (restarted apache for each try):

+ Apache 2.2.9 PHP 4.4.8 as Module (bug appears)
+ Apache 2.2.9 PHP 5.2.6 as Module (bug appears)
+ Apache 2.2.9 PHP 5.2.6 under CGI (bug appears)
+ Apache 2.2.9 PHP 4.4.8 implicit_flush on (NO BUG)
+ Apache 2.2.9 PHP 5.2.6 Without ANY Extensions (bug appears)
+ Apache 2.2.9 PHP 5.2.6 implicit_flush on (bug appears)
+ Apache 2.2.9 PHP 5.2.6 output_buffering off (bug appears)
+ Apache 2.2.9 PHP 4.4.8 Super high memory_limit (bug appears)
+ Apache 2.2.9 PHP 5.2.6 Super high memory_limit (bug appears)

As you can see, for some reason if I turn implicit_flush on in php 4,
the bug disappears, i can see the whole document(s).


I have seen a different site where this happened. However it did not
appear on every document and at various cut-off lengths. This may be a
different bug perhaps unrelated to php but it is worth mentioning.
I only have the following limited info about that server:
OS: Some Linux Flavor; Apache 2.0.54 (Fedora); PHP 5.0.4 as a module

Reproduce code:
---
A text document containing more then 8800 characters saved as test.php

Expected result:

The whole text document

Actual result:
--
A text document that is cut off at 8800 characters





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



#45451 [Opn->Bgs]: disable building dynamic zlib extension

2008-07-08 Thread jani
 ID:   45451
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mike at openbunker dot org
-Status:   Open
+Status:   Bogus
 Bug Type: Dynamic loading
 Operating System: linux
 PHP Version:  5.2.6
 New Comment:

Because some people prefer shared extensions and don't mind that they
lose functionality along that.


Previous Comments:


[2008-07-08 07:51:48] mike at openbunker dot org

Description:

As it was stated at the end of http://bugs.php.net/bug.php?id=36753
discussion, "compiling *all* extensions as shared is stupid". Why not to
disable building shared zlib extension if it is not fully supported (at
least an issue #36753)?






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



#45454 [Opn->Bgs]: strtoupper() doesn't work with danish letters: ���

2008-07-08 Thread jani
 ID:   45454
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hkb at hkb dot it
-Status:   Open
+Status:   Bogus
-Bug Type: Unknown/Other Function
+Bug Type: *General Issues
 Operating System: Linux/Debian
 PHP Version:  5.2.6
 New Comment:

Fixed in PHP 6, in PHP 5, use mb_strtoupper() (mbstring)


Previous Comments:


[2008-07-08 12:55:40] hkb at hkb dot it

Description:

The function strtoupper does not work with the danish letters æøå. Here
is an example:



Outputs 'ABCDEFGHIJKLMNOPQRSTUVXYZæøå' when it should output
'ABCDEFGHIJKLMNOPQRSTUVXYZÆØÅ'.

Reproduce code:
---


Expected result:

ABCDEFGHIJKLMNOPQRSTUVXYZÆØÅ

Actual result:
--
ABCDEFGHIJKLMNOPQRSTUVXYZæøå





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



#45454 [NEW]: strtoupper() doesn't work with danish letters: ���

2008-07-08 Thread hkb at hkb dot it
From: hkb at hkb dot it
Operating system: Linux/Debian
PHP version:  5.2.6
PHP Bug Type: Unknown/Other Function
Bug description:  strtoupper() doesn't work with danish letters: æøå

Description:

The function strtoupper does not work with the danish letters æøå. Here is
an example:



Outputs 'ABCDEFGHIJKLMNOPQRSTUVXYZæøå' when it should output
'ABCDEFGHIJKLMNOPQRSTUVXYZÆØÅ'.

Reproduce code:
---


Expected result:

ABCDEFGHIJKLMNOPQRSTUVXYZÆØÅ

Actual result:
--
ABCDEFGHIJKLMNOPQRSTUVXYZæøå

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



#44578 [Com]: Strange Behavior of PHP using COM Object

2008-07-08 Thread spijoel at gmail dot com
 ID:   44578
 Comment by:   spijoel at gmail dot com
 Reported By:  hargael at gmail dot com
 Status:   Open
 Bug Type: COM related
 Operating System: Windows XP
 PHP Version:  5.2.5
 New Comment:

I have the same problem (Fatal error: Can't use method return value in
write context in ...), with PHP 5.2.6 , Apache 2.2.9 , and Windows 2003
Server.

I'm not able to do this:
$obj->Attribute('data1') = "test";

This is also not working like this:
$obj->Attribute['data1'] = "test";

and it's working in VBS so I know it should work here also.


Previous Comments:


[2008-03-31 12:39:49] hargael at gmail dot com

Description:

I've a problem with COM objects.
It's very similar to the bug #33734. In fact, I think that it is the
same problem but the bug is supposed to be fixed since 5.1.0. I use the
5.2.5 and have the same problem.

Excuse me for my clumsy english, I hope that my report will be
readable.


Reproduce code:
---
Here is the code :

Applications->Add($path);
$obj_unite = $obj_appli->Units->Add("foo");
$obj_instance = $obj_unite->objects->add($nom_instance);
$sous_objet = $obj_instance->collection("Objects");
$propriete = $sous_objet->Item("alm");
echo "Label Value : " . $propriete->Value("Label",0); //Returns the
good Value

// Test 1
$propriete->Value("Label",0) = "New Label";
// Fatal Error


//Test 2
$propriete->Value["Label",0] = "New Label";
// Invalid number of parameters.




Expected result:

I've tried many ways of writing the $propriete->Value["Label",0]. With
(), [], mix of both. I cannot write on the value.
I though it was a read-only value but when I tried with VBa, it worked
perfectly. Here is the code.

Dim SsObjs as PrsCollObjects
Set SsObjs = MyInst.Collection("Objects")
Set MyObject = SsObjs.Item("Fault")
MyObject.Value("Label", 0) = "Défaut pompe 1"

Actual result:
--
Result of TEST 1 with () :

Fatal error: Can't use method return value in write context in
C:\wamp\www\Test COM\index.php on line 71



Result of TEST 2 with [] :

Fatal error: Uncaught exception 'com_exception' with message 'Error
[0x8002000e] Nombre de param?tres non valide. ' in C:\wamp\www\Test
COM\index.php:69 Stack trace: #0 C:\wamp\www\Test COM\index.php(69):
unknown() #1 {main} thrown in C:\wamp\www\Test COM\index.php on line 69

Depending on the way I write with [], I also have an "Unexpected ','"
error.







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



#45079 [Com]: --with-config-file-path causes segmentation fault

2008-07-08 Thread m dot kurzyna at crystalpoint dot pl
 ID:   45079
 Comment by:   m dot kurzyna at crystalpoint dot pl
 Reported By:  m dot kurzyna at crystalpoint dot pl
 Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.3CVS-2008-05-23 (snap)
 Assigned To:  fb-req-jani
 New Comment:

Just tried with 2008.07.08 08:30 snap - seems to work fine with values
both quoted and not. Thanks for the fix.


Previous Comments:


[2008-07-06 11:46:32] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

And provide new backtrace generated with that snapshot.



[2008-05-26 20:43:31] m dot kurzyna at crystalpoint dot pl

As for the location - it seems convenient. Dunno if loading it with the
rest of .ini is a good or bad thing - personally I don't see
disadvantages of this except for having to parse one more file and thus
startup performance loss.

This however is irrelevant. I moved browsecap.ini to /tmp and set
browsecap option to new location - it still crashes. However when it
can't find the file it doesn't so it's something specific to this file
that causes the crash. 

I've managed to isolate basic test case: it's using quotation for 
values:

option="value" 

crashes, where 

option=value 

doesn't. This isn't true for configuration ini file - using quotations
has no crash effect as far as I tested.



[2008-05-26 20:11:44] [EMAIL PROTECTED]

Why do you actually have browscap.ini in that directory anyway..? That
sounds like a very bad idea to me, considering it will get loaded as
"normal" partial php.ini file. Of course it shouldn't cause a crash
though. :)



[2008-05-25 21:58:35] m dot kurzyna at crystalpoint dot pl

Core was generated by `./sapi/cli/php'.
Program terminated with signal 11, Segmentation fault.
[New process 20491]
#0  0x006f76f4 in ini_lex (ini_lval=0x7fffe7d51180) at
/home/users/builder/src/php/n2/Zend/zend_ini_scanner.c:1673
1673yytext[yyleng] = 0;
(gdb) bt
#0  0x006f76f4 in ini_lex (ini_lval=0x7fffe7d51180) at
/home/users/builder/src/php/n2/Zend/zend_ini_scanner.c:1673
#1  0x006f43be in ini_parse () at
/home/users/builder/src/php/n2/Zend/zend_ini_parser.c:1557
#2  0x006f3c36 in zend_parse_ini_file (fh=0x7fffe7d512c0,
unbuffered_errors=1 '\001', scanner_mode=1,
ini_parser_cb=0x620458 , arg=0xb2cec0)
at /home/users/builder/src/php/n2/Zend/zend_ini_parser.c:319
#3  0x00620aba in zm_startup_browscap (type=1,
module_number=7)
at /home/users/builder/src/php/n2/ext/standard/browscap.c:198
#4  0x00618005 in zm_startup_basic (type=1, module_number=7)
at
/home/users/builder/src/php/n2/ext/standard/basic_functions.c:4003
#5  0x0072b711 in zend_startup_module_ex (module=0xb55eb0) at
/home/users/builder/src/php/n2/Zend/zend_API.c:1585
#6  0x00733d00 in zend_hash_apply (ht=0xb335a0,
apply_func=0x72b568 )
at /home/users/builder/src/php/n2/Zend/zend_hash.c:673
#7  0x0072b8f2 in zend_startup_modules () at
/home/users/builder/src/php/n2/Zend/zend_API.c:1634
#8  0x006b1739 in php_module_startup (sf=0xb2b480,
additional_modules=0x0, num_additional_modules=0)
at /home/users/builder/src/php/n2/main/main.c:1898
#9  0x007c326e in php_cli_startup (sapi_module=0xb2b480) at
/home/users/builder/src/php/n2/sapi/cli/php_cli.c:358
#10 0x007c3ffb in main (argc=1, argv=0x7fffe7d51938) at
/home/users/builder/src/php/n2/sapi/cli/php_cli.c:716



[2008-05-23 12:40:17] m dot kurzyna at crystalpoint dot pl

Description:

Configuring build --with-config-file-path=/etc/php causes 
segmentation fault when invoking binary (both CLI and CGI).


Reproduce code:
---
./configure --with-config-file-path=/etc/php
make
./sapi/cli/php

Actual result:
--
[EMAIL PROTECTED] n1]$ ./sapi/cgi/php-cgi
Segmentation fault

A strace follows:

[...]
open("/etc/php/php.ini", O_RDONLY)  = 3
lstat("/etc", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/etc/php", {st_mode=S_IFDIR|0755, st_size=52, ...}) = 0
lstat("/etc/php/php.ini", {st_mode=S_IFREG|0644, 
st_size=42387, ...}) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffe8ff0d60) = -1 ENOTTY 
(Inappropriate ioctl for device)
fstat(3, {st_mode=S_IFREG|0644, st_size=42387, ...}) = 0
mmap(NULL, 42403, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b4dc1b13000
munmap(0x2b4dc1b13000, 42387)   = 0
close(3)= 0
mmap(NULL, 323584, PROT_READ|PROT_WRITE, MAP_PRIVATE|
MAP_ANONYMOUS, -1, 0) = 0x2b4dc1b13000
brk(0xa42000)   = 0xa42000
brk(0xa63000)

#45453 [Opn->WFx]: PHP has encountered an Access Violation at 7C94F583

2008-07-08 Thread derick
 ID:   45453
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kimu at europegoodbye dot com
-Status:   Open
+Status:   Wont fix
 Bug Type: IIS related
 Operating System: windows 2003
 PHP Version:  4.4.8
 New Comment:

We are sorry, but we can not support PHP 4 related problems anymore.
Momentum is gathering for PHP 6, and we think supporting PHP 4 will
lead to a waste of resources which we want to put into getting PHP 6
ready.


Previous Comments:


[2008-07-08 10:23:26] kimu at europegoodbye dot com

Description:

PHP has encountered an Access Violation at 7C94F583

Reproduce code:
---
PHP has encountered an Access Violation at 7C94F583

Expected result:

PHP has encountered an Access Violation at 7C94F583

Actual result:
--
PHP has encountered an Access Violation at 7C94F583





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



#45453 [NEW]: PHP has encountered an Access Violation at 7C94F583

2008-07-08 Thread kimu at europegoodbye dot com
From: kimu at europegoodbye dot com
Operating system: windows 2003
PHP version:  4.4.8
PHP Bug Type: IIS related
Bug description:  PHP has encountered an Access Violation at 7C94F583

Description:

PHP has encountered an Access Violation at 7C94F583

Reproduce code:
---
PHP has encountered an Access Violation at 7C94F583

Expected result:

PHP has encountered an Access Violation at 7C94F583

Actual result:
--
PHP has encountered an Access Violation at 7C94F583

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



#45450 [Opn->Bgs]: APC don't compile at snaps.php.net

2008-07-08 Thread pajoye
 ID:   45450
 Updated by:   [EMAIL PROTECTED]
 Reported By:  djonline at djonline dot ru
-Status:   Open
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: windows
 PHP Version:  5.2.6
 New Comment:

Already fixed, for 5.2 and 5.3. HEAD will have to wait a bit.

By the way, please report APC bugs here:

http://pecl.php.net/apc


Previous Comments:


[2008-07-08 07:21:55] djonline at djonline dot ru

Description:

APC extention (php_apc.dll) do not compiled in snaps.php.net package.
You can view build log there. There is no *apc* in win32 build.

Expected result:

I need lastest php_apc.dll (3.0.19, not 3.0.16).






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



#45434 [Asn->Csd]: circular reference causes segfault in gc_collect_cycles()

2008-07-08 Thread dmitry
 ID:   45434
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at benjaminschulz dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: Reproducible crash
 Operating System: linux, osx
 PHP Version:  5.3CVS-2008-07-04 (CVS)
 Assigned To:  dmitry
 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:


[2008-07-04 20:59:05] [EMAIL PROTECTED]

(gdb) bt
#0  0x082d6232 in zend_objects_destroy_object (object=0x89f0bc0,
handle=2)
at /home/johannes/src/php/PHP_5_3/Zend/zend_objects.c:111
#1  0x082d5146 in gc_collect_cycles ()
at /home/johannes/src/php/PHP_5_3/Zend/zend_gc.c:561
#2  0x082c9223 in zif_gc_collect_cycles (ht=0, return_value=0x89ef718,

return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
at
/home/johannes/src/php/PHP_5_3/Zend/zend_builtin_functions.c:184
#3  0x082f2361 in zend_do_fcall_common_helper_SPEC
(execute_data=0x8a1fd20)
at /home/johannes/src/php/PHP_5_3/Zend/zend_vm_execute.h:313
#4  0x082e039e in execute (op_array=0x89ede88)
at /home/johannes/src/php/PHP_5_3/Zend/zend_vm_execute.h:104
#5  0x082ba286 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /home/johannes/src/php/PHP_5_3/Zend/zend.c:1198
#6  0x08269487 in php_execute_script (primary_file=0xbff2c988)
at /home/johannes/src/php/PHP_5_3/main/main.c:2082
#7  0x0832dcc4 in main (argc=1, argv=0xbff2cae4)
at /home/johannes/src/php/PHP_5_3/sapi/cli/php_cli.c:1139




[2008-07-04 20:25:34] php at benjaminschulz dot com

Oops, i missed one important point: the segfault occurs if an exception
is thrown ;) Sorry, it's too late for me today.



[2008-07-04 20:14:21] php at benjaminschulz dot com

Description:

A circular reference causes gc_collect_cycles() to segfault. I know
there is another bug that looks similar (#36482) but i think this is a
far better (because simpler) test case.

Reproduce code:
---
foo = $f2;
$f2->foo = $f1;
unset($f1, $f2);
// triggers a segfault
gc_collect_cycles();


Actual result:
--
$ php test.php 
Segmentation fault





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



#45451 [NEW]: disable building dynamic zlib extension

2008-07-08 Thread mike at openbunker dot org
From: mike at openbunker dot org
Operating system: linux
PHP version:  5.2.6
PHP Bug Type: Dynamic loading
Bug description:  disable building dynamic zlib extension

Description:

As it was stated at the end of http://bugs.php.net/bug.php?id=36753
discussion, "compiling *all* extensions as shared is stupid". Why not to
disable building shared zlib extension if it is not fully supported (at
least an issue #36753)?


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



#39198 [Com]: is_dir seem to have permission problems

2008-07-08 Thread phpbugs at mainskill dot com
 ID:   39198
 Comment by:   phpbugs at mainskill dot com
 Reported By:  php dot spam at frogblender dot net
 Status:   No Feedback
 Bug Type: Directory function related
 Operating System: Windows 2003
 PHP Version:  5.1.6
 New Comment:

Addition to my previous comment: This happens in safe mode only.


Previous Comments:


[2008-07-08 07:22:55] phpbugs at mainskill dot com


// this script runs under user www-data
// Apache/2.2.3 (Debian) 
//  PHP/5.2.0-8+etch11 
...
echo "\$dirName is $dirName\n";

$FullDirname = realpath( $dirName );
echo "\$FullDirname is $FullDirname\n";

if (!is_dir( $FullDirname )) {
  // as the directory is there this should never
  // be displayed!
  echo "$FullDirname is not a directory\n";
}


output:
$dirName is mswbt_A6565897X3B91B
$FullDirname is /var/www/V3.46-pre03/source/mswbt_A6565897X3B91B
/var/www/V3.46-pre03/source/mswbt_A6565897X3B91B is not a directory


this clearly shows that the directory is there
$ ls -als /var/www/V3.46-pre03/source/
insgesamt 16
4 drwxrwsrwx  4 www-data www-data 4096 2008-07-07 16:17 .
4 drwxr-xr-x 14 root root 4096 2008-07-07 16:19 ..
4 drwxr-sr-x  5 www-data www-data 4096 2008-07-07 16:17
mswbt_A6565897X3B91B


Msg to [EMAIL PROTECTED]:
Please do not try to run this code on your machine. You will most
probably *not* have this directory structure and the is_dir() function
call would succeed on your machine as returning FALSE would be correct
then!

I hope this can help a bit to solve the problem.



[2007-06-04 22:12:57] sweston at lyon dot edu

I having the same problem.

OS: FreeBSD 6.2
PHP: 5.1.2
Server: Apache 2.2

Mount a windows share.
Run the following on the windows share:

$d = dir("Path/to/windows/share");
while (false !== ($entry = $d->read())) {
   echo "Entry: $entry\n";
   var_dump(is_dir($entry));
   echo "";
}

All sub-directories on the windows share return:

Entry: Sub_Dir_1
bool(false)
Entry: Sub_Dir_2
bool(false)



[2007-05-20 13:24:43] legolas558 at users dot sourceforge dot net

The problem seems affecting only the temporary directory's
subdirectories; please fix this bug because it is causing a lot of weird
effects on scripts which verify paths existance and eventually create
them.

I am using PHP 5.2.0 and running this script:
http://bugs.php.net/bug.php?id=39198
// @author legolas558

if ( !function_exists('sys_get_temp_dir') ) {
// Based on http://www.phpit.net/
// article/creating-zip-tar-archives-dynamically-php/2/
function sys_get_temp_dir() {
// Try to get from environment variable
if ( !empty($_ENV['TMP']) )
return realpath( $_ENV['TMP'] );
else if ( !empty($_ENV['TMPDIR']) )
return realpath( $_ENV['TMPDIR'] );
else if ( !empty($_ENV['TEMP']) )
return realpath( $_ENV['TEMP'] );
// Detect by creating a temporary file
else {
// Try to use system's temporary directory
// as random name shouldn't exist
$temp_file = tempnam( md5(uniqid(rand(), TRUE)), '' );
if ($temp_file) {
$d_temp = realpath( dirname($temp_file) );
unlink( $temp_file );
return $d_temp;
} else
return FALSE;
}
}
}

$d_temp= sys_get_temp_dir();

if ($d_temp===false)
die('Cannot retrieve temporary path');

$d_temp = str_replace('\\','/', $d_temp);

if ($d_temp[strlen($d_temp)-1]!='/')
$d_temp .= '/';

// now $d_temp contains a correctly formatted path e.g.
C:/Windows/TEMP/

$my_temp_subdir = $d_temp.'39198_exists';

if (@rmdir($my_temp_subdir))
echo "I just removed a previous $my_temp_subdir
folder, now ";

// create a directory under the temporary path
if (!mkdir($my_temp_subdir))
die("I could not create $my_temp_subdir");
else
echo "$my_temp_subdir was created ";

// use here temp_is_dir() to see how the script should work instead
$b = is_dir($my_temp_subdir);

if (!$b)
echo "but the folder is not a dir (through is_dir())!";
else
echo "and is recognized as a dir (through is_dir())";

// workaround function
function temp_is_dir($dir) {
// check directory existance under temp folder (tested on Windows)
// see bug #31918 http://bugs.php.net/bug.php?id=39198
// by legolas558
if ([EMAIL PROTECTED]($dir))
return true;
rmdir($dir);
return false;
}

?>
I get this talkative output:
[code]
C:/WINDOWS/Temp/39198_exists was created but the folder is not a dir
(through is_dir())!
[/code]

But the correct talkative output would be instead:
[code]
C:/WINDOWS/Temp/39198_exists was created and is recognized as a dir
(through is_dir())
[/code]

Note

#45160 [Com]: PHP has encountered an Access Violation at 01B849C7

2008-07-08 Thread php at eklenet dot de
 ID:   45160
 Comment by:   php at eklenet dot de
 Reported By:  php at eklenet dot de
 Status:   Open
 Bug Type: PDO related
 Operating System: Windows 2003 Server 32bit
 PHP Version:  5.2.6
 New Comment:

now i have tried odbtp.
what i get is 
PHP has encountered an Access Violation at 01B849C7
like with pdo


Previous Comments:


[2008-07-07 12:42:03] php at eklenet dot de

i have changed to odbc vom pdo_odbc and i got even a similar error:
PHP has encountered an Access Violation at 01CBFC71
mybe they use the same base code ?



[2008-07-07 08:55:45] php at eklenet dot de

Have you now all informations to fix this Problem ?



[2008-06-09 14:25:35] php at eklenet dot de

i have modified my script to work on cli.
here are the dumps:
http://space.eklenet.de/CrashHang_Memory_Report.mht
http://space.eklenet.de/CrashHang_Report.mht
hope that helps !



[2008-06-09 09:27:56] php at eklenet dot de

hi,
how do i run IIS as a single thread ?
i dont found a manual to that.



[2008-06-09 08:40:13] [EMAIL PROTECTED]

Thanks for the backtrace, can you try to create a small script to
actually reproduce the crash?

Also if it is possible to configure your IIS to run a single thread, it
may help to see what causes the crash. The backtrace does not show
anything related to odbc or pdo.



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

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



#39198 [Com]: is_dir seem to have permission problems

2008-07-08 Thread phpbugs at mainskill dot com
 ID:   39198
 Comment by:   phpbugs at mainskill dot com
 Reported By:  php dot spam at frogblender dot net
 Status:   No Feedback
 Bug Type: Directory function related
 Operating System: Windows 2003
 PHP Version:  5.1.6
 New Comment:


// this script runs under user www-data
// Apache/2.2.3 (Debian) 
//  PHP/5.2.0-8+etch11 
...
echo "\$dirName is $dirName\n";

$FullDirname = realpath( $dirName );
echo "\$FullDirname is $FullDirname\n";

if (!is_dir( $FullDirname )) {
  // as the directory is there this should never
  // be displayed!
  echo "$FullDirname is not a directory\n";
}


output:
$dirName is mswbt_A6565897X3B91B
$FullDirname is /var/www/V3.46-pre03/source/mswbt_A6565897X3B91B
/var/www/V3.46-pre03/source/mswbt_A6565897X3B91B is not a directory


this clearly shows that the directory is there
$ ls -als /var/www/V3.46-pre03/source/
insgesamt 16
4 drwxrwsrwx  4 www-data www-data 4096 2008-07-07 16:17 .
4 drwxr-xr-x 14 root root 4096 2008-07-07 16:19 ..
4 drwxr-sr-x  5 www-data www-data 4096 2008-07-07 16:17
mswbt_A6565897X3B91B


Msg to [EMAIL PROTECTED]:
Please do not try to run this code on your machine. You will most
probably *not* have this directory structure and the is_dir() function
call would succeed on your machine as returning FALSE would be correct
then!

I hope this can help a bit to solve the problem.


Previous Comments:


[2007-06-04 22:12:57] sweston at lyon dot edu

I having the same problem.

OS: FreeBSD 6.2
PHP: 5.1.2
Server: Apache 2.2

Mount a windows share.
Run the following on the windows share:

$d = dir("Path/to/windows/share");
while (false !== ($entry = $d->read())) {
   echo "Entry: $entry\n";
   var_dump(is_dir($entry));
   echo "";
}

All sub-directories on the windows share return:

Entry: Sub_Dir_1
bool(false)
Entry: Sub_Dir_2
bool(false)



[2007-05-20 13:24:43] legolas558 at users dot sourceforge dot net

The problem seems affecting only the temporary directory's
subdirectories; please fix this bug because it is causing a lot of weird
effects on scripts which verify paths existance and eventually create
them.

I am using PHP 5.2.0 and running this script:
http://bugs.php.net/bug.php?id=39198
// @author legolas558

if ( !function_exists('sys_get_temp_dir') ) {
// Based on http://www.phpit.net/
// article/creating-zip-tar-archives-dynamically-php/2/
function sys_get_temp_dir() {
// Try to get from environment variable
if ( !empty($_ENV['TMP']) )
return realpath( $_ENV['TMP'] );
else if ( !empty($_ENV['TMPDIR']) )
return realpath( $_ENV['TMPDIR'] );
else if ( !empty($_ENV['TEMP']) )
return realpath( $_ENV['TEMP'] );
// Detect by creating a temporary file
else {
// Try to use system's temporary directory
// as random name shouldn't exist
$temp_file = tempnam( md5(uniqid(rand(), TRUE)), '' );
if ($temp_file) {
$d_temp = realpath( dirname($temp_file) );
unlink( $temp_file );
return $d_temp;
} else
return FALSE;
}
}
}

$d_temp= sys_get_temp_dir();

if ($d_temp===false)
die('Cannot retrieve temporary path');

$d_temp = str_replace('\\','/', $d_temp);

if ($d_temp[strlen($d_temp)-1]!='/')
$d_temp .= '/';

// now $d_temp contains a correctly formatted path e.g.
C:/Windows/TEMP/

$my_temp_subdir = $d_temp.'39198_exists';

if (@rmdir($my_temp_subdir))
echo "I just removed a previous $my_temp_subdir
folder, now ";

// create a directory under the temporary path
if (!mkdir($my_temp_subdir))
die("I could not create $my_temp_subdir");
else
echo "$my_temp_subdir was created ";

// use here temp_is_dir() to see how the script should work instead
$b = is_dir($my_temp_subdir);

if (!$b)
echo "but the folder is not a dir (through is_dir())!";
else
echo "and is recognized as a dir (through is_dir())";

// workaround function
function temp_is_dir($dir) {
// check directory existance under temp folder (tested on Windows)
// see bug #31918 http://bugs.php.net/bug.php?id=39198
// by legolas558
if ([EMAIL PROTECTED]($dir))
return true;
rmdir($dir);
return false;
}

?>
I get this talkative output:
[code]
C:/WINDOWS/Temp/39198_exists was created but the folder is not a dir
(through is_dir())!
[/code]

But the correct talkative output would be instead:
[code]
C:/WINDOWS/Temp/39198_exists was created and is recognized as a dir
(through is_dir())
[/code]

Note that using the workaround function "temp_is_dir()" in place of
"is_dir()" the correct output would be returned instead. Please ask me
more if necessary.

-

#45450 [NEW]: APC don't compile at snaps.php.net

2008-07-08 Thread djonline at djonline dot ru
From: djonline at djonline dot ru
Operating system: windows
PHP version:  5.2.6
PHP Bug Type: Compile Failure
Bug description:  APC don't compile at snaps.php.net

Description:

APC extention (php_apc.dll) do not compiled in snaps.php.net package.
You can view build log there. There is no *apc* in win32 build.

Expected result:

I need lastest php_apc.dll (3.0.19, not 3.0.16).


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