Re: [PHP-DEV] flock() php_flock() compile problems

2007-04-05 Thread Rasmus Lerdorf
Sure, but the lock isn't needed at all here, so while your fix is probably correct for other cases that actually need a lock call, this isn't one of them. -Rasmus Frank M. Kromann wrote: > Hi Rasmus, > > But the definition of flock in win32/flock.c() is identical to the > definition of php_flock

Re: [PHP-DEV] flock() php_flock() compile problems

2007-04-05 Thread Frank M. Kromann
Hi Rasmus, But the definition of flock in win32/flock.c() is identical to the definition of php_flock() in ext/standard/flock_compat.c. I don't see any reason to hae the same function defined twice with two different names. - Frank > Frank M. Kromann wrote: > > Hello Everyone, > > > > I hope I

Re: [PHP-DEV] flock() php_flock() compile problems

2007-04-05 Thread Rasmus Lerdorf
Frank M. Kromann wrote: > Hello Everyone, > > I hope I'm not too far off here but getting rid of flock.c in > win32\build\config.w32 an adding flock_compat to ext\standard\config.w32 > seams to solve the compile problems, at least in the 5.2 branch. Rob tracked it down to the fact that it was usi

[PHP-DEV] flock() php_flock() compile problems

2007-04-05 Thread Frank M. Kromann
Hello Everyone, I hope I'm not too far off here but getting rid of flock.c in win32\build\config.w32 an adding flock_compat to ext\standard\config.w32 seams to solve the compile problems, at least in the 5.2 branch. - Frank -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

Re: [PHP-DEV] Build failure

2007-04-05 Thread Rob Richards
No difference using sprintf()/fwrite() instead of fprintf(). I did come across a similar issue from apache: http://mail-archives.apache.org/mod_mbox/httpd-dev/199503.mbox/[EMAIL PROTECTED] Changing to use VCWD_OPEN_MODE, write() and close() seems to work. Rob Rasmus Lerdorf wrote: That still

Re: [PHP-DEV] Build failure

2007-04-05 Thread Rasmus Lerdorf
That still doesn't make sense to me. Could you try doing an sprintf() followed by an fwrite() then? Is fprintf() perhaps doing something stupid internally? I'd really like to avoid a lock here. -Rasmus Rob Richards wrote: > I can confirm that it does fail with the single fprintf call without t

Re: [PHP-DEV] Build failure

2007-04-05 Thread Rob Richards
I can confirm that it does fail with the single fprintf call without the lock on Win32. Using flock() does fix the problem in my tests. I was able to fix win build using flock() instead of php_flock() and defining HAVE_FLOCK in win32/flock.h Rob Richard Quadling wrote: This test is with the

[PHP-DEV] Re: abstract static function

2007-04-05 Thread Jakob Buchgraber
Jingcheng Zhang wrote: Hi internals, I used to use abstract static function prior to php 5.2, because when I consider static class as a singleton, I can use abstract static function to delay the implementation of some methods to the derived classes. This happens, for example, when I declare a

Re: [PHP-DEV] Build failure

2007-04-05 Thread Richard Quadling
This test is with the multiline fprintf and no lock. Adding the php_flock() has stalled the build process for Win32 (I can't build on Win32 as I don't know how!). On 05/04/07, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: Yes, but again, is this test with the single fprintf call? That's the real

Re: [PHP-DEV] Build failure

2007-04-05 Thread Richard Quadling
Is it possible that at the lowest layer within the C library that 4K blocking is performed? On 05/04/07, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: Ilia Alshanetsky wrote: > Rasmus, > > Sorry for the delay in the reply. According to my tests on linux using > the sample script provided by the orig

Re: [PHP-DEV] Build failure

2007-04-05 Thread Rasmus Lerdorf
Yes, but again, is this test with the single fprintf call? That's the real fix for this problem, not the lock. -Rasmus Richard Quadling wrote: > Using PHP 5.2.2-dev (cli) (built: Mar 23 2007 07:02:57) I can > replicate the problem on Windows. > > Using this single line command at the CMD prompt

Re: [PHP-DEV] Build failure

2007-04-05 Thread Rasmus Lerdorf
Ilia Alshanetsky wrote: > Rasmus, > > Sorry for the delay in the reply. According to my tests on linux using > the sample script provided by the original bug reporter having no lock > causes a problem when the error message is >4k in length. In this case > multiple buffers are used and corruption

Re: [PHP-DEV] Build failure

2007-04-05 Thread Richard Quadling
Using ProcMon on WinXP, you can see that the different processes interleave the writes but in blocks of 4096 bytes. The remaining 929 bytes will sometimes be written after another processes 4096/929 bytes. Locking IS required here. On 05/04/07, Richard Quadling <[EMAIL PROTECTED]> wrote: Using

Re: [PHP-DEV] Build failure

2007-04-05 Thread Richard Quadling
Using PHP 5.2.2-dev (cli) (built: Mar 23 2007 07:02:57) I can replicate the problem on Windows. Using this single line command at the CMD prompt: for %x in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do start php -r "ini_set('error_log','/tmp/test.log');for($i=0;$i<100;$i++)error_log(

[PHP-DEV] Re: PHP general mailserver down?

2007-04-05 Thread Tijnema !
On 4/5/07, Tijnema ! <[EMAIL PROTECTED]> wrote: Hi, Is the mail server of the PHP general list down? It keeps bouncing my mesages with some SMTP error. Tijnema To clarify myself, the error i get is: PERM_FAILURE: SMTP Error (state 12): 550 we're manly enough already It seems that it only ha

[PHP-DEV] PHP general mailserver down?

2007-04-05 Thread Tijnema !
Hi, Is the mail server of the PHP general list down? It keeps bouncing my mesages with some SMTP error. Tijnema -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Build failure

2007-04-05 Thread Ilia Alshanetsky
Rasmus, Sorry for the delay in the reply. According to my tests on linux using the sample script provided by the original bug reporter having no lock causes a problem when the error message is >4k in length. In this case multiple buffers are used and corruption can happen (it did on a dua

Re: [PHP-DEV] Build failure

2007-04-05 Thread Richard Quadling
http://rquadling.php1h.com/main.c.diff.txt for HEAD. I don't know how to patch a specific version. On 05/04/07, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: Matt Wilmas wrote: > Hi, > > Maybe just a Windows problem if it wasn't noticed yet, but I was compiling > the latest 5.2 snapshot and got: >