Re: [PHP-DEV] Make mysqlnd default over libmysql in 5.4

2011-09-03 Thread Rasmus Lerdorf
On 09/02/2011 11:43 PM, Lester Caine wrote:
> All builds seem to have mysqlnd included by default? So that has to be
> tested on every installation even if it's not going to be used? And I've
> hit problems with distributions needing MySQL because of a dependency on
> mysqlnd.
> 
> I know we have had the discussion before, but if it is a general library
> for all databases then call it something else, if it's specific for
> MySQL then it only needs to be installed when MySQL is available on a
> system?

Which general library? We are talking about mysqlnd which is obviously
only for MySQL.

And what do you mean by "all builds" ?

We don't do builds, the distributions do builds and we can't really
control what they choose to include by default, but most of the ones I
have seen have a separate php-mysql package.

I guess you may be exclusively talking about Windows builds and that has
absolutely nothing to do with our current discussion of whether
--with-mysql should point to libmysql or libmysqlnd by default.

-Rasmus

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



Re: [PHP-DEV] Make mysqlnd default over libmysql in 5.4

2011-09-03 Thread Rasmus Lerdorf
On 09/02/2011 11:48 PM, Lester Caine wrote:
> Stas Malyshev wrote:
>> libmysql *is* the common case build and the one most people would be
>> running in
>> production, at least as far as I see around.
> In the words of wikipedia - provide proof.
> If this is the case then why is mysqlnd loaded by default? Even if we do
> not have MySQL installed.

Lester, it would really help if you added "on Windows" to the end of all
your messages so you don't confuse the rest of us who are not talking
about Windows at all. We are talking about the configure flags on UNIX.
mysqlnd is only loaded by default in the binary build on Windows.

-Rasmus

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



Re: [PHP-DEV] Make mysqlnd default over libmysql in 5.4

2011-09-03 Thread Lester Caine

Rasmus Lerdorf wrote:

On 09/02/2011 11:43 PM, Lester Caine wrote:

All builds seem to have mysqlnd included by default? So that has to be
tested on every installation even if it's not going to be used? And I've
hit problems with distributions needing MySQL because of a dependency on
mysqlnd.

I know we have had the discussion before, but if it is a general library
for all databases then call it something else, if it's specific for
MySQL then it only needs to be installed when MySQL is available on a
system?


Which general library? We are talking about mysqlnd which is obviously
only for MySQL.

And what do you mean by "all builds" ?

We don't do builds, the distributions do builds and we can't really
control what they choose to include by default, but most of the ones I
have seen have a separate php-mysql package.

I guess you may be exclusively talking about Windows builds and that has
absolutely nothing to do with our current discussion of whether
--with-mysql should point to libmysql or libmysqlnd by default.


My SUSE installs all have mysqlnd included in the core, As do other Linux 
distributions. I think for much the same reason that the windows builds do as 
well? The PHP development team have decided that -without-mysqlnd is required to 
remove it rather than -with-mysqlnd is with other optional packages. THAT 
decision determines what the distributions all do and flags mysqlnd as a core 
package?


Since I have no interest in MySQL much of this is academic other than having to 
manage the fallout, so the bit I'm not understanding here is where mysqlnd fits 
in with libmysql or libmysqlnd. Is mysqlnd even used by mysql if libmysql is the 
default library?


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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



Re: [PHP-DEV] Make mysqlnd default over libmysql in 5.4

2011-09-03 Thread Lester Caine

Rasmus Lerdorf wrote:

On 09/02/2011 11:48 PM, Lester Caine wrote:

>  Stas Malyshev wrote:

>>  libmysql*is*  the common case build and the one most people would be
>>  running in
>>  production, at least as far as I see around.

>  In the words of wikipedia - provide proof.
>  If this is the case then why is mysqlnd loaded by default? Even if we do
>  not have MySQL installed.

Lester, it would really help if you added "on Windows" to the end of all
your messages so you don't confuse the rest of us who are not talking
about Windows at all. We are talking about the configure flags on UNIX.
mysqlnd is only loaded by default in the binary build on Windows.


See other post!
I am documenting and supporting FLAP just as much as FWAP ...

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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



Re: [PHP-DEV] Make mysqlnd default over libmysql in 5.4

2011-09-03 Thread Rasmus Lerdorf
On 09/03/2011 12:15 AM, Lester Caine wrote:
> My SUSE installs all have mysqlnd included in the core, As do other
> Linux distributions. I think for much the same reason that the windows
> builds do as well? The PHP development team have decided that
> -without-mysqlnd is required to remove it rather than -with-mysqlnd is
> with other optional packages. THAT decision determines what the
> distributions all do and flags mysqlnd as a core package?

But I just told you that wasn't the case. Try it yourself. Download the
PHP tarball on your SUSE box and do ./configure && make
Show me where mysqlnd is linked in. It isn't.

-Rasmus


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



[PHP-DEV] Why does mysqlnd get included in Linux 'core' PHP5 packages?

2011-09-03 Thread Lester Caine

New thread ...


My SUSE installs all have mysqlnd included in the core, As do other
Linux distributions. I think for much the same reason that the windows
builds do as well? The PHP development team have decided that
-without-mysqlnd is required to remove it rather than -with-mysqlnd is
with other optional packages. THAT decision determines what the
distributions all do and flags mysqlnd as a core package?

But I just told you that wasn't the case. Try it yourself. Download the
PHP tarball on your SUSE box and do ./configure && make
Show me where mysqlnd is linked in. It isn't.


OK done that ...

http://lsces.co.uk/PHP/testphpinfo.php is the current PHP install managed via 
SUSE. Additional .ini files shows what I've added from the package manager (and 
my own extension builds), yet mysqlnd is listed as well.


I will put my hands up that I am only _building_ my own distributions on 
windows, but since the core packages I am seeing on SUSE and Mandriva are the 
same as a default windows build, as provided by phpinfo(), I did assume php was 
doing the same thing on Linux as windows. It would be useful if they DID do the 
same thing? But now the question is why do the Linux distributions do what they do?


I have to add -without-mysqlnd in the windows builds, and expected the same in 
the linux ones, but I'm not finding any switch in './configure --help' to 
enable/disable it at all, so how is it included in the core package that Linux 
distributions are supplying? Since the bulk of users will be using a php 
distribution, rather than building their own, should there not be some 
correlation between what is being tested and what is being used by most users? 
In the past the first we know about problems such as the fun with re-writing 
everybody's 'date' class is when the hosts apply the latest updates? So saying 
it's not a PHP problem is not really an option? On one hand one wants to update 
to get the latest security fixes, but there is the niggling doubt that something 
will get broken in the process ... so one switches this off just in case :(


I hope this also explains some of the background to other posts I've made. A 
Firebird and Apache install run fairly transparently on either Linux or Windows 
( and I understand Mac ) with little need to document differences, but PHP can 
be fun to get a parallel system work on both.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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



Re: [PHP-DEV] Why does mysqlnd get included in Linux 'core' PHP5 packages?

2011-09-03 Thread Tomas Kuliavas
2011.09.03 12:06 Lester Caine rašė:
> New thread ...
>
>>> My SUSE installs all have mysqlnd included in the core, As do other
>>> Linux distributions. I think for much the same reason that the windows
>>> builds do as well? The PHP development team have decided that
>>> -without-mysqlnd is required to remove it rather than -with-mysqlnd is
>>> with other optional packages. THAT decision determines what the
>>> distributions all do and flags mysqlnd as a core package?
>> But I just told you that wasn't the case. Try it yourself. Download the
>> PHP tarball on your SUSE box and do ./configure && make
>> Show me where mysqlnd is linked in. It isn't.
>
> OK done that ...
>
> http://lsces.co.uk/PHP/testphpinfo.php is the current PHP install managed
> via
> SUSE. Additional .ini files shows what I've added from the package manager
> (and
> my own extension builds), yet mysqlnd is listed as well.
>
> I will put my hands up that I am only _building_ my own distributions on
> windows, but since the core packages I am seeing on SUSE and Mandriva are
> the
> same as a default windows build, as provided by phpinfo(), I did assume
> php was
> doing the same thing on Linux as windows. It would be useful if they DID
> do the
> same thing? But now the question is why do the Linux distributions do what
> they do?

SuSE builds PHP with --with-mysql=shared,mysqlnd. IMHO php-mysql is
suggested when you install php package. It is not required.

Debian, Mandriva and Fedora build PHP with '--with-mysql=shared,/usr
--with-mysqli=shared,/usr/bin/mysql_config'. You haven't checked
Mandriva's PHP build and assumed that it is the same as on SuSE.

You can always check ./configure options in their source packages. Mysqlnd
is new PHP feature and Linuxes used 'shared,/usr' for ages.

-- 
Tomas


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



Re: [PHP-DEV] Why does mysqlnd get included in Linux 'core' PHP5 packages?

2011-09-03 Thread Ferenc Kovacs
On Sat, Sep 3, 2011 at 11:06 AM, Lester Caine  wrote:
> New thread ...
>
>>> My SUSE installs all have mysqlnd included in the core, As do other
>>> Linux distributions. I think for much the same reason that the windows
>>> builds do as well? The PHP development team have decided that
>>> -without-mysqlnd is required to remove it rather than -with-mysqlnd is
>>> with other optional packages. THAT decision determines what the
>>> distributions all do and flags mysqlnd as a core package?
>>
>> But I just told you that wasn't the case. Try it yourself. Download the
>> PHP tarball on your SUSE box and do ./configure && make
>> Show me where mysqlnd is linked in. It isn't.
>
> OK done that ...
>
> http://lsces.co.uk/PHP/testphpinfo.php is the current PHP install managed
> via SUSE. Additional .ini files shows what I've added from the package
> manager (and my own extension builds), yet mysqlnd is listed as well.
>
> I will put my hands up that I am only _building_ my own distributions on
> windows, but since the core packages I am seeing on SUSE and Mandriva are
> the same as a default windows build, as provided by phpinfo(), I did assume
> php was doing the same thing on Linux as windows. It would be useful if they
> DID do the same thing? But now the question is why do the Linux
> distributions do what they do?
>
> I have to add -without-mysqlnd in the windows builds, and expected the same
> in the linux ones, but I'm not finding any switch in './configure --help' to
> enable/disable it at all, so how is it included in the core package that
> Linux distributions are supplying? Since the bulk of users will be using a
> php distribution, rather than building their own, should there not be some
> correlation between what is being tested and what is being used by most
> users? In the past the first we know about problems such as the fun with
> re-writing everybody's 'date' class is when the hosts apply the latest
> updates? So saying it's not a PHP problem is not really an option? On one
> hand one wants to update to get the latest security fixes, but there is the
> niggling doubt that something will get broken in the process ... so one
> switches this off just in case :(
>
> I hope this also explains some of the background to other posts I've made. A
> Firebird and Apache install run fairly transparently on either Linux or
> Windows ( and I understand Mac ) with little need to document differences,
> but PHP can be fun to get a parallel system work on both.
>

mysql is(should be) disabled by default in the makefiles, so you have
to pass --with-mysql* arguments to explicitly enable mysql  in your
build.
if you don't need it, you can just omit the --with-mysql or set it to 'no'
I don't know much about OpenSuse, but for debian you have to
explicitly install the php5-mysql package, without that, you have no
mysql related module in the module list generated by php -m.

the windows build however seems interesting, I've just downloaded the
php-5.3.8-nts-Win32-VC9-x86.zip package, and it shows the mysqlnd in
the module list, albeit I don't see that explicitly added in the
configure line:
Configure Command => cscript /nologo configure.js
"--enable-snapshot-build" "--enable-debug-pack" "--disable-zts"
"--disable-isapi" "--disable-nsapi" "--without-mssql"
"--without-pdo-mssql" "--without-pi3web"
"--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared"
"--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared"
"--with-oci8-11g=D:\php-sdk\oracle\instantclient11\sdk,shared"
"--with-enchant=shared" "--enable-object-out-dir=../obj/"
"--enable-com-dotnet" "--with-mcrypt=static"
"--disable-static-analyze"

maybe Pierre can elaborate why is that.

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

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



Re: [PHP-DEV] Make mysqlnd default over libmysql in 5.4

2011-09-03 Thread Ulf Wendel

Am 03.09.2011 03:51, schrieb Rasmus Lerdorf:

On 09/02/2011 06:08 PM, Stas Malyshev wrote:

Hi!

On 9/2/11 6:02 PM, Rasmus Lerdorf wrote:

Well, we are not trying to get to 0 failed tests in all permutations of
all extensions on all platforms. We are trying to get to 0 failed tests
on a common-case build using defaults and common extensions. Given that,
changing a default has an impact on the 0-failed-tests goal.


Nobody talks about "all permutations of all platforms", let's not be
absurd here. However, there's a distance between "all permutations of
all platforms" and "we'll be ignoring failures on libmysql". libmysql
*is* the common case build and the one most people would be running in
production, at least as far as I see around.


Ah yes, but is that because they have actively chosen to use libmysql or
is it because our default is libmysql. It is buggier and less robust
than mysqlnd at this point, at least in my experience, so who are we
helping by leaving libmysql as the default?


ACK.

Yes, it is about the default that others copy from php.net.

(Yes, I consider mysqlnd stability to be at least on par with the 
libmysql and, mysqlnd is usually getting much faster bug fixes. Together 
with the set of free PHP license plugins (pecl/mysqlnd_*, query cache, 
replication support, load balancing, monitoring, ...), 
asynchronous/non-blocking queries, a nice debug trace log, copy-on-write 
variables, recognition of PHP's memory limit, ... it is worth a 
recommendation to users. Time to spread the news by switching the 
compile default. Five years after development started, four years after 
alpha and beta. Plus the PHP 5.3-series as an "incubation" time.)



Forget the failed tests. A new PHP release is about improving the
ecosystem. If the folks that maintain libmysql and mysqlnd suggest that
mysqlnd is more robust and it is the path forward, why would we resist
this? Do we not trust Oracle/MySQL enough to listen to their input?


ACK.

(For the last time in this thread: there are no plans to remove libmysql 
support but mysqlnd is the recommended choice.)


Ulf

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



Re: [PHP-DEV] Why does mysqlnd get included in Linux 'core' PHP5 packages?

2011-09-03 Thread Pierre Joye
It is part of the default exts just like on unix with the difference windows
has no libmysql support anymore since 5.3
On Sep 3, 2011 12:17 PM, "Ferenc Kovacs"  wrote:
> On Sat, Sep 3, 2011 at 11:06 AM, Lester Caine  wrote:
>> New thread ...
>>
 My SUSE installs all have mysqlnd included in the core, As do other
 Linux distributions. I think for much the same reason that the windows
 builds do as well? The PHP development team have decided that
 -without-mysqlnd is required to remove it rather than -with-mysqlnd is
 with other optional packages. THAT decision determines what the
 distributions all do and flags mysqlnd as a core package?
>>>
>>> But I just told you that wasn't the case. Try it yourself. Download the
>>> PHP tarball on your SUSE box and do ./configure && make
>>> Show me where mysqlnd is linked in. It isn't.
>>
>> OK done that ...
>>
>> http://lsces.co.uk/PHP/testphpinfo.php is the current PHP install managed
>> via SUSE. Additional .ini files shows what I've added from the package
>> manager (and my own extension builds), yet mysqlnd is listed as well.
>>
>> I will put my hands up that I am only _building_ my own distributions on
>> windows, but since the core packages I am seeing on SUSE and Mandriva are
>> the same as a default windows build, as provided by phpinfo(), I did
assume
>> php was doing the same thing on Linux as windows. It would be useful if
they
>> DID do the same thing? But now the question is why do the Linux
>> distributions do what they do?
>>
>> I have to add -without-mysqlnd in the windows builds, and expected the
same
>> in the linux ones, but I'm not finding any switch in './configure --help'
to
>> enable/disable it at all, so how is it included in the core package that
>> Linux distributions are supplying? Since the bulk of users will be using
a
>> php distribution, rather than building their own, should there not be
some
>> correlation between what is being tested and what is being used by most
>> users? In the past the first we know about problems such as the fun with
>> re-writing everybody's 'date' class is when the hosts apply the latest
>> updates? So saying it's not a PHP problem is not really an option? On one
>> hand one wants to update to get the latest security fixes, but there is
the
>> niggling doubt that something will get broken in the process ... so one
>> switches this off just in case :(
>>
>> I hope this also explains some of the background to other posts I've
made. A
>> Firebird and Apache install run fairly transparently on either Linux or
>> Windows ( and I understand Mac ) with little need to document
differences,
>> but PHP can be fun to get a parallel system work on both.
>>
>
> mysql is(should be) disabled by default in the makefiles, so you have
> to pass --with-mysql* arguments to explicitly enable mysql in your
> build.
> if you don't need it, you can just omit the --with-mysql or set it to 'no'
> I don't know much about OpenSuse, but for debian you have to
> explicitly install the php5-mysql package, without that, you have no
> mysql related module in the module list generated by php -m.
>
> the windows build however seems interesting, I've just downloaded the
> php-5.3.8-nts-Win32-VC9-x86.zip package, and it shows the mysqlnd in
> the module list, albeit I don't see that explicitly added in the
> configure line:
> Configure Command => cscript /nologo configure.js
> "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts"
> "--disable-isapi" "--disable-nsapi" "--without-mssql"
> "--without-pdo-mssql" "--without-pi3web"
> "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared"
> "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared"
> "--with-oci8-11g=D:\php-sdk\oracle\instantclient11\sdk,shared"
> "--with-enchant=shared" "--enable-object-out-dir=../obj/"
> "--enable-com-dotnet" "--with-mcrypt=static"
> "--disable-static-analyze"
>
> maybe Pierre can elaborate why is that.
>
> --
> Ferenc Kovács
> @Tyr43l - http://tyrael.hu
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>


Re: [PHP-DEV] Why does mysqlnd get included in Linux 'core' PHP5 packages?

2011-09-03 Thread Ferenc Kovacs
On Sat, Sep 3, 2011 at 12:36 PM, Pierre Joye  wrote:
> It is part of the default exts just like on unix with the difference windows
> has no libmysql support anymore since 5.3

so for windows, the mysqlnd is a builtin extension, (but one cannot
use it without the mysql or mysqli or pdo_mysql extension)?
I found that we have documentation about the windows built-in
extensions: http://php.net/manual/en/install.windows.extensions.php
but it seems a little bit outdated.
should I open a documentation bug report about this?

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

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



Re: [PHP-DEV] Why does mysqlnd get included in Linux 'core' PHP5 packages?

2011-09-03 Thread Lester Caine

Ferenc Kovacs wrote:

On Sat, Sep 3, 2011 at 12:36 PM, Pierre Joye  wrote:

>  It is part of the default exts just like on unix with the difference windows
>  has no libmysql support anymore since 5.3

so for windows, the mysqlnd is a builtin extension, (but one cannot
use it without the mysql or mysqli or pdo_mysql extension)?
I found that we have documentation about the windows built-in
extensions:http://php.net/manual/en/install.windows.extensions.php
but it seems a little bit outdated.
should I open a documentation bug report about this?


There are a lot of gaps in the windows documentation. I'm still trying to get my 
head around a number of them, and my own crib sheets are slowly getting up to 
date. -without-mysqlnd certainly removes mysqlnd on the windows builds, but I'm 
hitting a brick wall trying to do the same thing on the on the SUSE setup.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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



Re: [PHP-DEV] [VOTE] Weak References

2011-09-03 Thread Etienne Kneuss
Hi,

On Tue, Aug 9, 2011 at 14:22, Arvids Godjuks wrote:

> I have mixed feelings about this proposal - from one point it's quite
> neat - ability to mark circular references for the memory manager so
> it can free them sounds very delicious, especially for some cases. I
> had run into my own bunch of problems with memory in PHP in the past
> and right now I'm running a daemon written in PHP in production on
> 5.3.6. Careful construction and knowledge that circular references
> actually do harm I did add safeguards that actually clean up the
> objects in recursive manner (and objects have internal flags that
> cleanup has been initiated - that way I make sure I cleanup the same
> object only once). That sort of planing at the design stage makes it
> far more friendly with memory, so it doesn't mean that PHP should have
> soft references.
>
> My opinion is that if this can be done without using significant
> resources and will not have major issues while implementing - it can
> be added, otherwise just skip it - better off fixing bugs and
> optimizing :)
>

Weak references have been implemented in a PECL extension since weeks now:
http://php.net/weakref and/or http://pecl.php.net/weakref

It feels like you're beating up a dead horse here.

A discussion for bundling it might occur in the future, but given the
feedbacks PECL might very well be the right place for it.

Best,


>
> 2011/8/6 Lars Schultz :
> > Am 06.08.2011 02:14, schrieb Hannes Landeholm:
> >>
> >> Yeah I think there's a lot of misunderstandings going on with weak/soft
> >> references and how the garbage collector works. Weak/soft references is
> >> not
> >> some kind of solution to the cyclic reference problem. The GC takes care
> >> of
> >> that already. You can use whatever OOP patterns with whatever reference
> >> graphs you like Lars, the GC will free the entire structure as soon as
> the
> >> cyclic collector runs after you are not referencing it anymore. You
> might
> >> have become a bit confused with my last post where I explained how one
> >> could
> >> theoretically hack together a soft reference implementation by using
> weak
> >> references and some properties of cyclic collection. Also property
> access
> >> performance is off-topic.
> >
> > I did not misunderstand how weak/soft-references or php's new GC works.
> >
> > Having a GC collect circular references is neat, but if I remember
> > correctly, collecting them (which is why there are other, faster methods
> but
> > which require more memory) is neither simple nor fast (whatever that
> means)
> > so...if I can assist the GC by clearly stating that my child-objects may
> be
> > collected as soon as they and their parent are not referenced from
> userland
> > anymore thus not requiring the GC and thus freeing memory as soon as
> > possible,...seems like an optimization worth thinking of. Especially if I
> > tend to have vast structures with hundreds of objects.
> >
> > In 5.2 (we can't move our project to 5.3 yet because of a BC issue) i had
> to
> > manually clear those cycles before dropping the last userland reference
> to
> > the tree of objects because otherwise I'd run into memory problems when
> > processing alot of those trees.
> >
> >
> > --
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Etienne Kneuss
http://www.colder.ch


Re: [PHP-DEV] [VOTE] Weak References

2011-09-03 Thread Etienne Kneuss
Hi,

On Fri, Sep 2, 2011 at 14:25, Nicolas Grekas
wrote:

> How about adding weak maps to this RFC?
>
>
> https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/WeakMap
>
> This would be fantastic!
>
> Nicolas
>

Indeed, I planned to implement that as well, I haven't had the time to do it
yet though. It should happen in the following weeks.

Best,


>
> On Tue, Aug 9, 2011 at 14:55, Lars Schultz  >wrote:
>
> > Am 09.08.2011 14:22, schrieb Arvids Godjuks:
> >
> >  I have mixed feelings about this proposal - from one point it's quite
> >> neat - ability to mark circular references for the memory manager so
> >> it can free them sounds very delicious, especially for some cases. I
> >> had run into my own bunch of problems with memory in PHP in the past
> >> and right now I'm running a daemon written in PHP in production on
> >> 5.3.6. Careful construction and knowledge that circular references
> >> actually do harm I did add safeguards that actually clean up the
> >> objects in recursive manner (and objects have internal flags that
> >> cleanup has been initiated - that way I make sure I cleanup the same
> >> object only once). That sort of planing at the design stage makes it
> >> far more friendly with memory, so it doesn't mean that PHP should have
> >> soft references.
> >>
> >
> > Exactly what I did;)
> >
> >
> >  My opinion is that if this can be done without using significant
> >> resources and will not have major issues while implementing - it can
> >> be added, otherwise just skip it - better off fixing bugs and
> >> optimizing :)
> >>
> >
> > Of course. I am not saying that its a must have...just wanted to defend
> it
> > from being marked as useless.
> >
> >
> > --
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>



-- 
Etienne Kneuss
http://www.colder.ch


Re: [PHP-DEV] [VOTE] Weak References

2011-09-03 Thread Ferenc Kovacs
> Weak references have been implemented in a PECL extension since weeks now:
> http://php.net/weakref and/or http://pecl.php.net/weakref
>
> It feels like you're beating up a dead horse here.
>
> A discussion for bundling it might occur in the future, but given the
> feedbacks PECL might very well be the right place for it.

that mail was sent on Aug 9.

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

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



Re: [PHP-DEV] Why does mysqlnd get included in Linux 'core' PHP5 packages?

2011-09-03 Thread Lester Caine

Tomas Kuliavas wrote:

2011.09.03 12:06 Lester Caine rašė:

New thread ...


My SUSE installs all have mysqlnd included in the core, As do other
Linux distributions. I think for much the same reason that the windows
builds do as well? The PHP development team have decided that
-without-mysqlnd is required to remove it rather than -with-mysqlnd is
with other optional packages. THAT decision determines what the
distributions all do and flags mysqlnd as a core package?

But I just told you that wasn't the case. Try it yourself. Download the
PHP tarball on your SUSE box and do ./configure&&  make
Show me where mysqlnd is linked in. It isn't.


OK done that ...

http://lsces.co.uk/PHP/testphpinfo.php is the current PHP install managed
via
SUSE. Additional .ini files shows what I've added from the package manager
(and
my own extension builds), yet mysqlnd is listed as well.

I will put my hands up that I am only _building_ my own distributions on
windows, but since the core packages I am seeing on SUSE and Mandriva are
the
same as a default windows build, as provided by phpinfo(), I did assume
php was
doing the same thing on Linux as windows. It would be useful if they DID
do the
same thing? But now the question is why do the Linux distributions do what
they do?


SuSE builds PHP with --with-mysql=shared,mysqlnd. IMHO php-mysql is
suggested when you install php package. It is not required.

Debian, Mandriva and Fedora build PHP with '--with-mysql=shared,/usr
--with-mysqli=shared,/usr/bin/mysql_config'. You haven't checked
Mandriva's PHP build and assumed that it is the same as on SuSE.

You can always check ./configure options in their source packages. Mysqlnd
is new PHP feature and Linuxes used 'shared,/usr' for ages.


This is a changing area, and I moved back to SUSE from Mandriva for other 
reasons, so it was older versions of PHP that I had on Mandriva installs. All 
have had mysqlnd listed, without my selecting mysql.


Current state of play, the SUSE install includes mysqlnd with the core package, 
and mysql and mysqli are available as extra packages. Again - nowdays the 
'required' dependency on MySQL does seem to have been dropped, but other PHP 
extensions sometimes flag that they need it - even when they don't, which is 
when a manual build of the extension is required.


I'm currently trying to build a mod_php5.so replacement that does not include 
mysqlnd, really just as an exercise since I can live with the bloat as long as 
MySQL is not getting installed. The php has built fine, but 
--with-apxs2=/usr/sbin/apxs2 does not seem to be building the same things as 
SUSE expects ... It's little niggles like this which waste so much time :(


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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



Re: [PHP-DEV] [VOTE] Weak References

2011-09-03 Thread Etienne Kneuss
On Sat, Sep 3, 2011 at 13:57, Ferenc Kovacs  wrote:

> > Weak references have been implemented in a PECL extension since weeks
> now:
> > http://php.net/weakref and/or http://pecl.php.net/weakref
> >
> > It feels like you're beating up a dead horse here.
> >
> > A discussion for bundling it might occur in the future, but given the
> > feedbacks PECL might very well be the right place for it.
>
> that mail was sent on Aug 9.
>

right :) why did I feel Aug 9 was 2 days ago ? Time flies...


>
> --
> Ferenc Kovács
> @Tyr43l - http://tyrael.hu
>



-- 
Etienne Kneuss
http://www.colder.ch


Re: [PHP-DEV] Why does mysqlnd get included in Linux 'core' PHP5 packages?

2011-09-03 Thread Reindl Harald


Am 03.09.2011 14:00, schrieb Lester Caine:

> Current state of play, the SUSE install includes mysqlnd with the core 
> package, and mysql and mysqli are available
> as extra packages. Again - nowdays the 'required' dependency on MySQL does 
> seem to have been dropped, but other PHP
> extensions sometimes flag that they need it - even when they don't

and that is why libmysql-support should be dropped to get this clean

the other extensions MAY require mysql
if they use mysqlnd they do not
if they use libmysql they do

mysqlnd does exactly what you want - there is no longer any mysql-package
needed on a server to have mysql-support in php because libmysql would
not be needed - i really do not understand why tis legacy libmysql-support
will not be simply dropped - nobody needs this these days in php

on the other hand that some auto-tests seem behave differently depending
on mysqlnd/libmysql shows that the existence of both makes only troubles

normally a auto-tets shuld have ONE expected result




signature.asc
Description: OpenPGP digital signature


Re: [PHP-DEV] Why does mysqlnd get included in Linux 'core' PHP5 packages?

2011-09-03 Thread Lester Caine

Reindl Harald wrote:


Am 03.09.2011 14:00, schrieb Lester Caine:


>  Current state of play, the SUSE install includes mysqlnd with the core 
package, and mysql and mysqli are available
>  as extra packages. Again - nowdays the 'required' dependency on MySQL does 
seem to have been dropped, but other PHP
>  extensions sometimes flag that they need it - even when they don't

and that is why libmysql-support should be dropped to get this clean

the other extensions MAY require mysql
if they use mysqlnd they do not
if they use libmysql they do

mysqlnd does exactly what you want - there is no longer any mysql-package
needed on a server to have mysql-support in php because libmysql would
not be needed - i really do not understand why tis legacy libmysql-support
will not be simply dropped - nobody needs this these days in php

on the other hand that some auto-tests seem behave differently depending
on mysqlnd/libmysql shows that the existence of both makes only troubles

normally a auto-tets shuld have ONE expected result


In my own case I do not require any MySQL support ;)
I've only got Firebird as a database server, so I simply ignore any of the MySQL 
stuff, however it would be nice to be able to switch it off altogether ;)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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



Re: [PHP-DEV] Why does mysqlnd get included in Linux 'core' PHP5 packages?

2011-09-03 Thread Johannes Schlüter
Lester,

On Sat, 2011-09-03 at 10:06 +0100, Lester Caine wrote:
> OK done that ...
> 
> http://lsces.co.uk/PHP/testphpinfo.php is the current PHP install managed via 
> SUSE. Additional .ini files shows what I've added from the package manager 
> (and 
> my own extension builds), yet mysqlnd is listed as well.

You have a point of which i wasn't aware.

mysqlnd is not yet default from php.net side but SuSE has chosen to do
so. Now there is one consequence: If mysqlnd is used it will be built
statically in PHP, even on Unix, even if the other MySQL modules are
built shared. This can be fixed by adding a specific configuration
option to enforce mysqlnd being build as its own shared .so, too.

Doing this will add a small dependency issue as one has to ensure to
load mysqlnd first, then the other MySQL extensions. I think all
distributions are using a single mysql.ini file to activate all MySQL
extensions they would be able to list mysqlnd first in there and be
done.

johannes

-- 
Johannes Schlüter, Oracle
MySQL Engineering - Connectors and Client Connectivity


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



Re: [PHP-DEV] [VOTE] Weak References

2011-09-03 Thread Lars Schultz

Am 03.09.2011 13:56, schrieb Etienne Kneuss:

Indeed, I planned to implement that as well, I haven't had the time to do it
yet though. It should happen in the following weeks.


Not to keep you from doing this...but couldn't that easily be solved by 
using a simple associative php array like this:


$pseudoWeakMap = array();
$pseudoWeakMap[spl_object_hash($obj)] = new WeakReference($obj);

or did I misunderstand the concept? I hope I'll have a chance to use 
WeakReferences soon in my project;)



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



Re: [PHP-DEV] Why does mysqlnd get included in Linux 'core' PHP5 packages?

2011-09-03 Thread Lester Caine

Johannes Schlüter wrote:

On Sat, 2011-09-03 at 10:06 +0100, Lester Caine wrote:

>  OK done that ...
>
>  http://lsces.co.uk/PHP/testphpinfo.php  is the current PHP install managed 
via
>  SUSE. Additional .ini files shows what I've added from the package manager 
(and
>  my own extension builds), yet mysqlnd is listed as well.

You have a point of which i wasn't aware.

mysqlnd is not yet default from php.net side but SuSE has chosen to do
so. Now there is one consequence: If mysqlnd is used it will be built
statically in PHP, even on Unix, even if the other MySQL modules are
built shared. This can be fixed by adding a specific configuration
option to enforce mysqlnd being build as its own shared .so, too.

Doing this will add a small dependency issue as one has to ensure to
load mysqlnd first, then the other MySQL extensions. I think all
distributions are using a single mysql.ini file to activate all MySQL
extensions they would be able to list mysqlnd first in there and be
done.


This is actually the area that I find very nice in the way all the distributions 
handle extensions ... Piling everything into php.ini makes for a large amount of 
redundant settings. Adding a separate .ini for each package makes a lot more 
sense, and all of the extension specific settings can be kept in the one place. 
You can then load a database driver along with all it's own configuration simply 
by enabling an .ini file? And optional configurations are handled away from the 
core php.ini.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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



Re: [PHP-DEV] Why does mysqlnd get included in Linux 'core' PHP5 packages?

2011-09-03 Thread Reindl Harald


Am 03.09.2011 17:19, schrieb Lester Caine:
> Adding a separate .ini for each package makes a lot more sense

this is usally done since years

> and all of the extension specific settings can be kept in the one place. You 
> can then load
> a database driver along with all it's own configuration simply by enabling an 
> .ini file? 

tahts why --with-config-file-scan-dir exists

> And optional configurations are handled away from the core php.ini

fedora does this since i can think



signature.asc
Description: OpenPGP digital signature


Re: [PHP-DEV] [VOTE] Weak References

2011-09-03 Thread Etienne Kneuss
Hi,

On Sat, Sep 3, 2011 at 17:14, Lars Schultz wrote:

> Am 03.09.2011 13:56, schrieb Etienne Kneuss:
>
>> Indeed, I planned to implement that as well, I haven't had the time to do
>> it
>>
>> yet though. It should happen in the following weeks.
>>
>
> Not to keep you from doing this...but couldn't that easily be solved by
> using a simple associative php array like this:
>
> $pseudoWeakMap = array();
> $pseudoWeakMap[spl_object_**hash($obj)] = new WeakReference($obj);
>
> or did I misunderstand the concept? I hope I'll have a chance to use
> WeakReferences soon in my project;)
>
>
My understanding of weak maps would be a way to associate data with objects,
and have the data be freed once the object itself is deleted.
So basically in example:

$map = new WeakMap;

$obj = new Class;

$map[$obj] = .. some data ..
...
var_dump($map[$obj]); // .. some data ..

unset($obj); // unsets $map[$obj] automatically as well.

var_dump(isset($map[$obj])); // bool(false)

So sure, it could be implemented using spl_object_hash and having the Class
destructor take care of deleting all that associated Data, but using
weakmaps would make it far more convenient.

Best,


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


-- 
Etienne Kneuss
http://www.colder.ch


Re: [PHP-DEV] [VOTE] Weak References

2011-09-03 Thread Nicolas Grekas
>
> $pseudoWeakMap = array();
> $pseudoWeakMap[spl_object_**hash($obj)] = new WeakReference($obj);
>
> or did I misunderstand the concept? I hope I'll have a chance to use
> WeakReferences soon in my project;)



I also believe that this is the logic, but from the doc, when an object is
destroyed, its hash may be reused for other objects.
So this implementation could possibly have bad side effect, isn't it ?

Nicolas


[PHP-DEV] [RFC] New extension proposal: meta

2011-09-03 Thread Flavius Aspra

Hi

I'm Flavius Aspra and over the past weeks [1] I've worked on a small
extension, which I think it has a lot of potential. Thanks to everyone
for being patient with me on #php.pecl during this time - I've learned a
lot!

Meta will enable userland scripts to get the AST of a PHP source code,
to manipulate it, and if desired, to serialize it back to valid PHP code.

The current status is "not really usable", but it has already reached
around 2k LOCs and I think it's easier for you to review it now, than later.

The code is still hosted on github, please let me know what needs to be
done to make it PECL-compatible. Advices, bug fixes and improvements are
welcome. Pending TODOs are listed inline, in the code, as they fit, and
longer-term TODOs are in TODO.txt.

I've already asked for a first thought on IRC, and people seem to see
the need for this extension.

The project's page is at [2], it's called "phpmeta" there, so no
confusion arises. The extension is simply called "meta". Many other
details can be found in the README. Feel free to ask me anything.

[1] Actually, I wanted to work on this for GSoC, but I was a little bit
late, so I've worked on it in my spare time
[2] https://github.com/OriginalCopy/phpmeta

Cheers,
Flavius
--
What I cannot create, I do not understand. -- Feynman

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



Re: [PHP-DEV] [RFC] New extension proposal: meta

2011-09-03 Thread Arpad Ray
Hi,

Haven't had much of a look yet but I really like the concept :)

A couple of minor things to note:
- Now would be a good time to make it follow the PHP coding standards,
before it gets much larger or other devs get involved.
- Variable declarations should always begin a block, some platforms
will bork otherwise.

Regards,

Arpad

On Sat, Sep 3, 2011 at 10:21 PM, Flavius Aspra  wrote:
> Hi
>
> I'm Flavius Aspra and over the past weeks [1] I've worked on a small
> extension, which I think it has a lot of potential. Thanks to everyone
> for being patient with me on #php.pecl during this time - I've learned a
> lot!
>
> Meta will enable userland scripts to get the AST of a PHP source code,
> to manipulate it, and if desired, to serialize it back to valid PHP code.
>
> The current status is "not really usable", but it has already reached
> around 2k LOCs and I think it's easier for you to review it now, than later.
>
> The code is still hosted on github, please let me know what needs to be
> done to make it PECL-compatible. Advices, bug fixes and improvements are
> welcome. Pending TODOs are listed inline, in the code, as they fit, and
> longer-term TODOs are in TODO.txt.
>
> I've already asked for a first thought on IRC, and people seem to see
> the need for this extension.
>
> The project's page is at [2], it's called "phpmeta" there, so no
> confusion arises. The extension is simply called "meta". Many other
> details can be found in the README. Feel free to ask me anything.
>
> [1] Actually, I wanted to work on this for GSoC, but I was a little bit
> late, so I've worked on it in my spare time
> [2] https://github.com/OriginalCopy/phpmeta
>
> Cheers,
> Flavius
> --
> What I cannot create, I do not understand. -- Feynman
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



Re: [PHP-DEV] Why does mysqlnd get included in Linux 'core' PHP5 packages?

2011-09-03 Thread Lester Caine

Reindl Harald wrote:


Am 03.09.2011 17:19, schrieb Lester Caine:

>  Adding a separate .ini for each package makes a lot more sense

this is usally done since years


>  and all of the extension specific settings can be kept in the one place. You 
can then load
>  a database driver along with all it's own configuration simply by enabling 
an .ini file?

tahts why --with-config-file-scan-dir exists


>  And optional configurations are handled away from the core php.ini

fedora does this since i can think


Lots of distributions do this nicely, but not necessarily the same way?
My point was more that it would be nice if a clean stock install supported this, 
and extensions managed their own ini files centrally, rather then each 
distribution doing it's own thing? Some of the current discussions relate to 
individual extensions, rather than core functionality so it would be nice simply 
to wrap them in a way that they can be ignored if not applicable to a particular 
installation?


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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



Re: [PHP-DEV] [RFC] New extension proposal: meta

2011-09-03 Thread Kalle Sommer Nielsen
Hi Arpad

2011/9/3 Arpad Ray :
> - Variable declarations should always begin a block, some platforms
> will bork otherwise.

Actually this is required for the C standard, the early ones that we
use in PHP, whereas C++ allows them anywhere in a block, like PHP does
:)

-- 
regards,

Kalle Sommer Nielsen
ka...@php.net

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



[PHP-DEV] Turn on error on mixed declarations (Was: New extension proposal: meta)

2011-09-03 Thread Gustavo Lopes
On Sun, 04 Sep 2011 04:05:32 +0100, Kalle Sommer Nielsen   
wrote:



2011/9/3 Arpad Ray :

- Variable declarations should always begin a block, some platforms
will bork otherwise.


Actually this is required for the C standard, the early ones that we
use in PHP, whereas C++ allows them anywhere in a block, like PHP does
:)



By the way, since committing code with mixed declarations is a frequent  
problem -- GCC accepts it even without -std=C99 yet the Windows builds are  
broken --, we could make GCC treat this as an error with:


-Werror=declaration-after-statement

which gives something like:

foo.c:4:2: error: ISO C90 forbids mixed declarations and code

--
Gustavo Lopes

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



[PHP-DEV] Re: mysqli tests breaking

2011-09-03 Thread Stas Malyshev

Hi!

I've tried with latest mysql library and as I suspected, most of the 
issues still stay.

The ones I'm most worried about are:

1. mysqli_stmt_num_rows() is expected to return number of rows after all 
rows were fetched while returning 0 before that. libmysql definitely 
doesn't do that, in full accordance with mysql docs which state row 
numbers can't be had for unbuffered queries.
If we do want this new non-portable semantics in mysqlnd, we should have 
it in separate test, clearly marked as such, even though I'm not 
convinced having such semantics is a good idea at all (would lead to 
applications working with mysqlnd and not with libmysql - invitation for 
trouble).


2. last_insert_id semantics change. The test expects select queries to 
reset last insert it to 0, which does not happen with libmysql. Maybe it 
happens on later versions of mysql server, I do not know - but we can't 
have a test the is bound to specific server version, at least not 
without a check, and even better - separating it from portable tests. If 
it's specific to mysqlnd it's even worse - it means that some code that 
assumes libmysql behavior will be broken, and as last_insert_id() is a 
very frequently used function I think it's very dangerous.


Also, new issue added with recent libmysql - newer builds of libmysql do 
not declare DBUG_OFF at all in my_config.h. See for example 
http://bugs.mysql.com/bug.php?id=60872. So we should take the absence of 
DBUG_OFF as a sign that debug is enabled. I would recommend checking if 
DEBUG_ON is defined and enabling debug only then.

--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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



Re: [PHP-DEV] Make mysqlnd default over libmysql in 5.4

2011-09-03 Thread Stas Malyshev

Hi!

On 9/2/11 6:51 PM, Rasmus Lerdorf wrote:

Forget the failed tests. A new PHP release is about improving the
ecosystem. If the folks that maintain libmysql and mysqlnd suggest that
mysqlnd is more robust and it is the path forward, why would we resist
this? Do we not trust Oracle/MySQL enough to listen to their input?


Because of the little thing called BC? Right now I have at least two 
tests suggesting mysqlnd has different semantics than libmysql, and not 
in some obscure corners either but in functions most people use every 
day in every piece of code. This is worrying.

--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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



Re: [PHP-DEV] ext/pcre/tests/006.phpt

2011-09-03 Thread Stas Malyshev

Hi!

On 9/2/11 6:10 PM, Ferenc Kovacs wrote:

http://svn.php.net/viewvc?view=revision&revision=311323
it seems that the behavior was depending on the backtrack limit, but
I'm not sure what to do with the test.
should I simply delete? or can we change the patter in such way that
it would return NULL again?
I'm not even sure what are we testing there. :/


This tests works for me. What is the failure in your case?
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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



[PHP-DEV] mbstring failures

2011-09-03 Thread Stas Malyshev

Hi!

In my tests, I have some test failures in mbstring extensions, namely:

Bug #28220 (mb_strwidth() returns wrong width values for some Hangul 
characters) 
[/Users/smalyshev/php-src/branches/PHP_5_4/ext/mbstring/tests/bug28220.phpt]
Bug #49536 (mb_detect_encoding() returns incorrect results when 
strict_mode is turned on) 
[/Users/smalyshev/php-src/branches/PHP_5_4/ext/mbstring/tests/bug49536.phpt]
Unicode standard conformance test (ill-formed UTF sequences.) 
[/Users/smalyshev/php-src/branches/PHP_5_4/ext/mbstring/tests/illformed_utf_sequences.phpt]


The mb_strwidth() returns 8085 instead of 8101.
The mb_detect_encoding() returns false for both utf-8 examples and as 
far as I can see in the code of mbfl_filt_ident_utf8() it is intended 
result - this sequence is not considered valid utf-8.
For the illformed sequences I see many sequences that are supposed to be 
empty strings be 003f003f003f003f003f003f or 
more 3f's of different lengths.


Could you please check it out and see why these are failing?
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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