Garrett Serack | 2 Oct 2009 00:56
Picon
Favicon
Gravatar

RE: [PHP-DEV] Fix for 49148 (combination of stream_get_line and fseek does not work correctly)

I've updated my patch to return null on EOF.

Index: streams/streams.c
===================================================================
--- streams/streams.c   (revision 289073)
+++ streams/streams.c   (working copy)
 <at>  <at>  -890,6 +890,9  <at>  <at> 
                size_t seek_len;

                seek_len = stream->writepos - stream->readpos;
+               if(!seek_len)
+                       return FALSE;
+
                if (seek_len > maxlen) {
                        seek_len = maxlen;
                }
 <at>  <at>  -901,10 +904,7  <at>  <at> 
                }

                if (!e) {
-                       if (seek_len < maxlen && !stream->eof) {
-                               return NULL;
-                       }
-                       toread = maxlen;
+                       toread = (seek_len < maxlen) ? seek_len : maxlen;
                } else {
                        toread = e - (char *) stream->readbuf - stream->readpos;
                        skip = 1;

And the test script for it:
(Continue reading)

Mathieu Suen | 2 Oct 2009 08:58
Favicon
Gravatar

[PHP-DEV] Doc on the VM

Hi,

I would like to know if there is some documentation on the different 
layout of the array, object varaible ... in php.
Or were in the source can we read how the php VM reprensent those entites?

Thanks

-- 
-- Mathieu Suen
--

--

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Nicolai Scheer | 2 Oct 2009 16:46
Picon

Re: [PHP-DEV] Doc on the VM

Hi!

Mathieu Suen schrieb:
> Hi,
>
> I would like to know if there is some documentation on the different
> layout of the array, object varaible ... in php.
> Or were in the source can we read how the php VM reprensent those entites?

At first, you should have a look at Zend/zend.h in the php source tree.
There you'll find the definition of a "php variable", the zval struct:

struct _zval_struct {
	/* Variable information */
	zvalue_value value;		/* value */
	zend_uint refcount__gc;
	zend_uchar type;	/* active type */
	zend_uchar is_ref__gc;
};

The content of the variable is:

typedef union _zvalue_value {
	long lval;					/* long value */
	double dval;				/* double value */
	struct {
		char *val;
		int len;
	} str;
	HashTable *ht;				/* hash table value */
(Continue reading)

Israel Ekpo | 2 Oct 2009 17:46
Picon

Re: [PHP-DEV] Doc on the VM

On Fri, Oct 2, 2009 at 10:46 AM, Nicolai Scheer <scope <at> planetavent.de>wrote:

> Hi!
>
> Mathieu Suen schrieb:
> > Hi,
> >
> > I would like to know if there is some documentation on the different
> > layout of the array, object varaible ... in php.
> > Or were in the source can we read how the php VM reprensent those
> entites?
>
> At first, you should have a look at Zend/zend.h in the php source tree.
> There you'll find the definition of a "php variable", the zval struct:
>
> struct _zval_struct {
>        /* Variable information */
>        zvalue_value value;             /* value */
>        zend_uint refcount__gc;
>        zend_uchar type;        /* active type */
>        zend_uchar is_ref__gc;
> };
>
> The content of the variable is:
>
> typedef union _zvalue_value {
>        long lval;                                      /* long value */
>        double dval;                            /* double value */
>        struct {
>                char *val;
(Continue reading)

Florian Anderiasch | 3 Oct 2009 18:40
Picon
Favicon
Gravatar

[PHP-DEV] Patch for Bug #49757

Hello,
I've tried to fix http://bugs.php.net/bug.php?id=49757

As it's my first patch in c, any reviews and suggestions would be very
welcome.

Greetings,
Florian

Index: ext/standard/basic_functions.c
===================================================================
--- ext/standard/basic_functions.c	(revision 289129)
+++ ext/standard/basic_functions.c	(working copy)
 <at>  <at>  -3932,6 +3932,7  <at>  <at> 
 	int ip_len;
 	unsigned long n;
 	struct in_addr myaddr;
+	char str[INET_ADDRSTRLEN];

 	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &ip, &ip_len) == FAILURE) {
 		return;
 <at>  <at>  -3940,7 +3941,14  <at>  <at> 
 	n = strtoul(ip, NULL, 0);

 	myaddr.s_addr = htonl(n);
-	RETURN_STRING(inet_ntoa(myaddr), 1);
+
+#ifdef HAVE_INET_NTOP
(Continue reading)

internals | 5 Oct 2009 11:32
Picon

[PHP-DEV] PHP 5 Bug Summary Report

 PHP 5 Bug Database summary - http://bugs.php.net/

 Num Status     Summary (1521 total -- which includes 964 feature requests)
===============================================[*Compile Issues]==============
49771 Open       MYSQL_LIBS and MYSQL_INCLUDE path being read incorrectly?
===============================================[*Directory/Filesystem functions]
49620 Assigned   is_writeable does not work using netshare and normal user rights
===============================================[*General Issues]==============
48597 Open       Unclosed array keys break space escaping in $_GET/POST/REQUEST
49774 Feedback   defined delivers wrong value
===============================================[*Network Functions]===========
48167 To be documented  undefined function checkdnsrr()
===============================================[*Unicode Issues]==============
49687 Open       utf8_decode xml_utf8_decode vuln
===============================================[Apache related]===============
48894 Open       Occasional crashes with Apache 1.3.41
===============================================[Apache2 related]==============
32220 Assigned   [PATCH] thread_resources for thread not getting freed when apache kills thread
45945 Open       Apache byterange output filter nullified if mod_php5 output > 8000 bytes
47681 Open       System TMP dir ignored in file uploads
48260 Open       Size of PHP file affects behaviour of virtual() or #include virtual
49106 Open       PHP incorrectly sets no_local_copy=1 on response as Apache 2 module
49224 Assigned   Segmentation fault
49677 Open       ini parser crashes with zend_extension = ${extension_dir}"/foo.so"
===============================================[BC math related]==============
44995 Analyzed   bcpowmod() should not have scale parameter (only 0 is supported)
46564 Verified   bcmod( '1071', '357.5' ) returns '0'
===============================================[Bzip2 Related]================
29521 Assigned   compress.bzip2 wrapper
===============================================[Calendar related]=============
(Continue reading)

internals | 5 Oct 2009 12:00
Picon

[PHP-DEV] PHP 6 Bug Summary Report

 PHP 6 Bug Database summary - http://bugs.php.net/

 Num Status     Summary (99 total -- which includes 43 feature requests)
===============================================[*Compile Issues]==============
49270 Open       configure fails if PHP source folder path contains spaces
===============================================[Apache related]===============
47061 Open       User not logged under Apache
===============================================[Apache2 related]==============
44083 Open       virtual() not outputting results if zlib.output_compression = On
===============================================[Arrays related]===============
35277 Suspended  incorrect recursion detection
41758 Assigned   SORT_LOCALE_STRING broken for sort() in PHP6
43109 Open       array_intersect() emits unexpected no of notices when 2d array is passed as arg
48478 Open       Super-globals cannot be accessed with literal keys
===============================================[COM related]==================
45836 Open       cannot use com 
===============================================[Compile Failure]==============
42606 Open       unicode/constants.c relies on ICU draft api
44502 Suspended  Compiling ok with MySQL 5.0
49301 Open       HAVE_GLOB is not detected correctly
49421 Open       Make failure with MySQL 6 and PHP 6.0-dev
===============================================[Date/time related]============
46948 Assigned   ext/date/lib/parse_tz.c:99: Memory leak: buffer
===============================================[Documentation problem]========
49126 Open       unicode_set_error_handler undocumented
===============================================[DOM XML related]==============
49463 Open       setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","blah") produces error
===============================================[Filesystem function related]==
42110 Open       fgetcsv doesn't handle ""\n correctly in multiline csv record
44034 Open       FILE_IGNORE_NEW_LINES in FILE does not work as expected when lines end in \r\n
(Continue reading)

Al | 5 Oct 2009 14:59
Favicon

[PHP-DEV] Re: #49758 [Bgs]: Cannot send e-mails using SMTP in Mail PEAR package.


navossoc at gmail dot com wrote:
>  ID:               49758
>  User updated by:  navossoc at gmail dot com
>  Reported By:      navossoc at gmail dot com
>  Status:           Bogus
>  Bug Type:         Unknown/Other Function
>  Operating System: Windows Server 2003 R2
>  PHP Version:      5.2.11
>  New Comment:
> 
> A typing error into the example.
> Anyway, why downgrading without code changes works fine again?
> 
> The release log of php has a STMP bug fixed, maybe any relevance?
> 
> []'s
> 
> 
> Previous Comments:
> ------------------------------------------------------------------------
> 
> [2009-10-04 19:40:24] Sjoerd <at> php.net
> 
> Thank you for your bug report.
> 
> If there is a bug here, it is in a PEAR package and should be filed
> there:
> http://pear.php.net/package/Mail
> 
(Continue reading)

Pierre Joye | 5 Oct 2009 15:16
Picon
Gravatar

Re: [PHP-DEV] Re: #49758 [Bgs]: Cannot send e-mails using SMTP in Mail PEAR package.

hi,

pls reply using the web interace only.

Cheers,

On Mon, Oct 5, 2009 at 2:59 PM, Al <news <at> ridersite.org> wrote:
>
>
> navossoc at gmail dot com wrote:
>>
>>  ID:               49758
>>  User updated by:  navossoc at gmail dot com
>>  Reported By:      navossoc at gmail dot com
>>  Status:           Bogus
>>  Bug Type:         Unknown/Other Function
>>  Operating System: Windows Server 2003 R2
>>  PHP Version:      5.2.11
>>  New Comment:
>>
>> A typing error into the example.
>> Anyway, why downgrading without code changes works fine again?
>>
>> The release log of php has a STMP bug fixed, maybe any relevance?
>>
>> []'s
>>
>>
>> Previous Comments:
>> ------------------------------------------------------------------------
(Continue reading)

Ilia Alshanetsky | 5 Oct 2009 16:45

Re: [PHP-DEV] Patch for Bug #49757

Thanks for the patch, a patch closely based on your was just applied  
to SVN.

On 2009-10-03, at 12:40 PM, Florian Anderiasch wrote:

> Hello,
> I've tried to fix http://bugs.php.net/bug.php?id=49757
>
> As it's my first patch in c, any reviews and suggestions would be very
> welcome.
>
> Greetings,
> Florian
>
> Index: ext/standard/basic_functions.c
> ===================================================================
> --- ext/standard/basic_functions.c	(revision 289129)
> +++ ext/standard/basic_functions.c	(working copy)
>  <at>  <at>  -3932,6 +3932,7  <at>  <at> 
> 	int ip_len;
> 	unsigned long n;
> 	struct in_addr myaddr;
> +	char str[INET_ADDRSTRLEN];
>
> 	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &ip,  
> &ip_len) == FAILURE) {
> 		return;
>  <at>  <at>  -3940,7 +3941,14  <at>  <at> 
> 	n = strtoul(ip, NULL, 0);
>
(Continue reading)


Gmane