Re: too many open files.
| From: | (Richard Lynch) | Date: | Mon, 03 Jul 2000 23:19:35 +0000 |
| Subject: | Re: too many open files. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4600@lists.php.net to get a copy of this message | ||
In article
<Pine.LNX.4.10.10006281009500.12861-100000@localhost.localdomain>,
kenn@pcintelligent.com (Ken N) wrote:
> Hi,
>
> My script is attempting to make a copy of a file (httpd.conf) open the
> copy. look for a string using ereg() and if it finds it. Open the actual
> httpd.conf and replace it (The string) with somehting else. However when I
> try to run the script I get "Too many open files" I was wondering if there
> was a limit, it seems so I can't have to files open at the same time?
> Can I change this or of course is there a better sugestion?
Are you closing the file you read before you try to open it for writing?...
I think the message you are seeing is usually the result of a file-system
limit on the number of open files the user PHP runs, but...
Are you sure you aren't looping around the fopen()?
--
Richard Lynch | If this was worth $$$ to you, buy a CD
US Customer Support Director | from one of the artists listed here:
Zend Technologies USA | http://www.L-I-E.com/artists.htm
http://www.zend.com | (this has nothing to do with Zend,
duh!)