Date: 10/31/00
- Next message: mathieu <email protected>: "[PHP-DEV] PHP 4.0 Bug #7550 Updated: Content-type header cannot be turned off"
- Previous message: phpwizard <email protected>: "[PHP-DEV] PHP 4.0 Bug #7549 Updated: fdf_next_field_name doesn't work"
- In reply to: php <email protected>: "[PHP-DEV] PHP 4.0 Bug #7554: Exclusive flock() breaks client/server communication"
- Next in thread: Daniel T. Gorski: "Re: [PHP-DEV] PHP 4.0 Bug #7554: Exclusive flock() breaks client/servercommunication"
- Reply: Daniel T. Gorski: "Re: [PHP-DEV] PHP 4.0 Bug #7554: Exclusive flock() breaks client/servercommunication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 31 Oct 2000 php <email protected> wrote:
> From: php <email protected>
> Operating system: RedHat 6.2
> PHP version: 4.0.3pl1
> PHP Bug Type: Filesystem function related
> Bug description: Exclusive flock() breaks client/server communication
>
> A 2nd exclusive flock() - or a try to do so - causes a kind of infinite loop. Browser(s) are not responding. The Apache-process is allowed to write to /tmp.
>
>
> $fp1 = fopen("/tmp/test.txt","a");
> if (!$fp1) die("cant open file 1");
> if (!flock($fp1,2)) die("cant lock file 1");
>
> $fp2 = fopen("/tmp/test.txt","a");
> if (!$fp2) die("cant open file 2");
>
> // causes troubles
> if (!flock($fp2,2)) die("cant lock file 2");
>
> fclose($fp2);
> fclose($fp1)
>
>
> My configure:
>
> './configure' '--with-apxs=/usr/local/httpd/bin/apxs' '--with-config-file-path=/usr/local/httpd/conf' '--enable-track-vars' '--with-gdbm' '--enable-ftp' '--with-gd' '--with-ttf=/usr/include/freetype' '--enable-sysvshm' '--enable-sysvsem' '--with-openssl=../openssl-0.9.5a' '--with-imap=../imap-4.7c' '--with-pdflib' '--enable-sockets' '--with-mysql=/usr/local/mysql' '--with-oci8=/opt/oracle/product/8.1.5' '--with-sablot'
>
Are you sure that it isn't blocking on the second fopen()? That's what
locking is supposed to do.
-- Ignacio Vazquez-Abrams <ignacio <email protected>>-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: mathieu <email protected>: "[PHP-DEV] PHP 4.0 Bug #7550 Updated: Content-type header cannot be turned off"
- Previous message: phpwizard <email protected>: "[PHP-DEV] PHP 4.0 Bug #7549 Updated: fdf_next_field_name doesn't work"
- In reply to: php <email protected>: "[PHP-DEV] PHP 4.0 Bug #7554: Exclusive flock() breaks client/server communication"
- Next in thread: Daniel T. Gorski: "Re: [PHP-DEV] PHP 4.0 Bug #7554: Exclusive flock() breaks client/servercommunication"
- Reply: Daniel T. Gorski: "Re: [PHP-DEV] PHP 4.0 Bug #7554: Exclusive flock() breaks client/servercommunication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

