note 18909 added to function.file

From: Date: Sat, 09 Feb 2002 17:56:27 +0000
Subject: note 18909 added to function.file
Groups: php.notes 
Request: Send a blank email to php-notes+get-26408@lists.php.net to get a copy of this message
It appears that the file() function causes file access problems for perl cgi scripts accessing the same files. I am using Perl v5.6.0 in linux with PHP/4.0.4pl1. After running a php app using the file() function, any perl cgi trying to access the same file randomly dies returning an internal server error: premature end of script headers. The simple fix is to use fopen(), fgets() and fclose() instead of file(). -- http://www.php.net/manual/en/function.file.php http://master.php.net/manage/user-notes.php?action=edit+18909 http://master.php.net/manage/user-notes.php?action=delete+18909 http://master.php.net/manage/user-notes.php?action=reject+18909

« previous php.notes (#26408) next »