|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22416 failed to create stream: Too many open files in Unknown on line 0
Submitted: 2003-02-25 09:15 UTC Modified: 2004-09-06 21:59 UTC
Avg. Score:5.0 ± 0.0
Reproduced:8 of 8 (100.0%)
Same Version:6 (75.0%)
Same OS:7 (87.5%)
From: jhalla at legion dot org Assigned: wez (profile)
Status: Not a bug Package: iPlanet related
PHP Version: 4.3.5 OS: Solaris 8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
30 - 13 = ?
Subscribe to this entry?

 [2003-02-25 09:15 UTC] jhalla at legion dot org
Running: Solaris 8, iPlanet 6sp4 enterprise, PHP 4.3

All PHP pages get this error:

Warning: Unknown(/web_sites/doc_root/public_html/index.php): failed to create stream: Too many open files in Unknown on line 0

Warning: Unknown(): Failed opening '/web_sites/doc_root/public_html/index.php' for inclusion (include_path='.:/php/includes:/web_sites/doc_root:/home/web_sites/doc_root/public_html') in Unknown on line 0

Files which are basically just all HTML w/ no PHP code in them whatsoever, but w/ the .php extension, will also produce the above error.

PHP 4.2.3 appears to be the only workable release for iPlanet 6 on Solaris - at least, according to feedback from other users on this Bug List, so we are going back to that release.

This is a serious issue w/ PHP 4.3.0 and iPlanet, and needs to be addressed. Thank you. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-13 14:59 UTC]
The issue is that the (brain-dead) solaris libc has a hard limit of 256 FILE*s.
It is not possible to fopen() more files than that (although open() works just fine).

Duplicate of Bug #20274.
 [2003-10-11 12:02 UTC]
Use the newest version of PHP (4.3.3 or greater). There this limit is removed.
Your comment to 64bit is not acceptable for iPlanet users because iPlanet is a 32 bit webserver which cannot run modules compiled in 64 bit.
 [2004-09-06 13:42 UTC] mytto at openxtrem dot com
Though I'm running PHP 4.3.5, I encounter the same problem.
Do you have another solution?
 [2004-09-06 13:56 UTC]
In which context does that happen? Any function call? The Zend engine itsself has no further limitations.
Only 3rd party modules can run into this limitation if they use stdio which is limited in Solaris 32bit (even 3rd party libs that are used by a PHP extension). 

Libs/Extensions that have problems (as I know):
* sybase/sybase_ct (in the libs of Sybase, not PHP) -> use freetds here
* imap extension (no further testing), depends on the imap library used
* older MySQL libs, use newest one, not the bundled one

In PHP itsself one of this are currently the mail() function because it uses stdio pipes to send data to sendmail.
 [2004-09-06 21:44 UTC] mytto at openxtrem dot com
Unfortunately ih happens rather randomly on many websites I host, which are themselves instances of opensource solutions like Mambo, TikiWiki or dotProject.

It's often a fopen() fonction call that raise a 'failed to create/open stream: Too many open files'. The trick is that when I refresh several times, it happens work back again...

I'm quite puzzled :/
 [2004-09-06 21:59 UTC]
Are you sure that you are using 4.3.5? If yes, then you have really to few file handles and this problem have nothing to do with PHP. SunONE recommends for the webserver to raise the hard limit of open files (must be done by root in /etc/system):
set rlim_fd_max=8192
set rlim_fd_cur=1024

 [2004-09-06 22:15 UTC] mytto at openxtrem dot com
definitely sure, i checked it out twice :)
Unfortunately I don't have root access to my webspace but only FTP and Plesk admin...

Shall I request these modifications to my provider? 
Can I check those values from a web browser anyhow?

Thanks for you help
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 15:01:30 2024 UTC