Professional Web Applications Themes

#25886 [Bgs]: failed to open stream: Too many open files in Unknown on line 0 - PHP Development

ID: 25886 User updated by: padair at pntsi dot ca Reported By: padair at pntsi dot ca Status: Bogus Bug Type: *General Issues Operating System: Solaris 8 PHP Version: 4.3.3 New Comment: Here is the page. <html> <META HTTP-EQUIV="refresh" CONTENT="10; "> <?PHP $apnum = $_REQUEST['apnum']; snmp_set_quick_print(1); $numsus=0; echo date("Y/m/d g:i:s a"); echo "<br>"; $a = snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::apsystemTemperature.0"); echo "Access Point Temperature: $a deg. C"; echo "<table border=1>"; echo "<tr><td>SU Description</td><td>Signal from AP</td><td>Signal to AP</td><td>SU Temp</td><td>Bytes Sent</td><td>Bytes Received</ td></tr>"; $numsus=snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suSUCount.0"); for ($sunum=1;$sunum<=$numsus;$sunum++) { $assoc=snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suAssociation.$sunum"); if ($assoc=="associated") { echo "<tr><td>"; $a = snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suRemarks.$sunum"); echo "$a"; echo "</td><td>"; $a = snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suRSSIFromAP.$sunum"); $b = round(((120-($a ...

  1. #1

    Default #25886 [Bgs]: failed to open stream: Too many open files in Unknown on line 0

    ID: 25886
    User updated by: padair at pntsi dot ca
    Reported By: padair at pntsi dot ca
    Status: Bogus
    Bug Type: *General Issues
    Operating System: Solaris 8
    PHP Version: 4.3.3
    New Comment:

    Here is the page.

    <html>
    <META HTTP-EQUIV="refresh" CONTENT="10; ">
    <?PHP


    $apnum = $_REQUEST['apnum'];

    snmp_set_quick_print(1);

    $numsus=0;
    echo date("Y/m/d g:i:s a");
    echo "<br>";
    $a =
    snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::apsystemTemperature.0");
    echo "Access Point Temperature: $a deg. C";
    echo "<table border=1>";
    echo "<tr><td>SU Description</td><td>Signal from AP</td><td>Signal to
    AP</td><td>SU Temp</td><td>Bytes Sent</td><td>Bytes Received</
    td></tr>";
    $numsus=snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suSUCount.0");
    for ($sunum=1;$sunum<=$numsus;$sunum++)
    {

    $assoc=snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suAssociation.$sunum");
    if ($assoc=="associated")
    {
    echo "<tr><td>";
    $a =
    snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suRemarks.$sunum");
    echo "$a";
    echo "</td><td>";
    $a =
    snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suRSSIFromAP.$sunum");
    $b = round(((120-($a * -1))/70)*100);
    echo "$b% ($a dBm)";
    echo "</td><td>";
    $a =
    snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suRSSIFromSU.$sunum");
    $b = round(((120-($a * -1))/70)*100);
    echo "$b% ($a dBm)";
    echo "</td><td>";
    $a =
    snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suTemperature.$sunum");
    echo "$a deg. C";
    echo "</td><td>";
    $a =
    snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suRfInOctets.$sunum");
    echo "$a";
    echo "</td><td>";
    $a =
    snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suRfOutOctets.$sunum");
    echo "$a";
    echo "</td><td>";
    echo "<a
    href=su-reboot.php?sunum=$sunum&apnum=$apnum>Reboot me</a>";
    echo "</td></tr>";
    }
    else
    {
    echo "<TR><TD>";
    print "SU #$sunum is currently not connected.";
    echo "</td></tr>";
    }
    }
    echo "</table>";
    ?>
    </html>


    Previous Comments:
    ------------------------------------------------------------------------

    [2003-10-16 00:54:20] [email]sniperphp.net[/email]

    If your OS runs out of file descriptors, of course it will error out.
    And as you failed to give us a short example script, bogus.


    ------------------------------------------------------------------------

    [2003-10-16 00:10:22] padair at pntsi dot ca

    Description:
    ------------
    I am getting a "failed to open stream: Too many open files in Unknown
    on line 0" error message.

    I check similar bug reports but none seemed to apply. I already am
    running 4.3.3 where this error was supposed to be fixed.

    My config is Solaris 8, Apache 2.0.44, PHP 4.3.3.

    My page pulls some simple snmp data and I have a META refresh tag at
    the top that refreshes the page every 30 seconds. 99% of the time the
    page is ok. Every now and then the error below shows. It goes away on
    its own usually by the next refresh.

    Actual result:
    --------------
    Warning: Unknown(/isp/www/pntsi/stats/snmp.php): failed to open stream:
    Too many open files in Unknown on line 0

    Warning: (null)(): Failed opening '/isp/www/pntsi/stats/snmp.php' for
    inclusion (include_path='.:/usr/local/php4/lib/php') in Unknown on line
    0


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=25886&edit=1[/url]
    padair at pntsi dot ca Guest

  2. #2

    Default #25886 [Bgs]: failed to open stream: Too many open files in Unknown on line 0

    ID: 25886
    Updated by: [email]jayphp.net[/email]
    Reported By: padair at pntsi dot ca
    Status: Bogus
    Bug Type: *General Issues
    Operating System: Solaris 8
    PHP Version: 4.3.3
    New Comment:

    What is your open files limit set to?

    Do 'ulimit -a' from a shell -- chances are it's set to
    256. Try increasing that to 1024 by opening up /etc/system
    as root and making changes to rlim_fd_cur and rlim_fd_max.
    Just don't go higher than 1024.

    You'll have to reboot your server (the actual machine, not
    just the web server) for the changes to take effect.

    See 'man -s 4 system' for details.

    J


    Previous Comments:
    ------------------------------------------------------------------------

    [2003-10-16 09:55:46] padair at pntsi dot ca

    Here is the page.

    <html>
    <META HTTP-EQUIV="refresh" CONTENT="10; ">
    <?PHP


    $apnum = $_REQUEST['apnum'];

    snmp_set_quick_print(1);

    $numsus=0;
    echo date("Y/m/d g:i:s a");
    echo "<br>";
    $a =
    snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::apsystemTemperature.0");
    echo "Access Point Temperature: $a deg. C";
    echo "<table border=1>";
    echo "<tr><td>SU Description</td><td>Signal from AP</td><td>Signal to
    AP</td><td>SU Temp</td><td>Bytes Sent</td><td>Bytes Received</
    td></tr>";
    $numsus=snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suSUCount.0");
    for ($sunum=1;$sunum<=$numsus;$sunum++)
    {

    $assoc=snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suAssociation.$sunum");
    if ($assoc=="associated")
    {
    echo "<tr><td>";
    $a =
    snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suRemarks.$sunum");
    echo "$a";
    echo "</td><td>";
    $a =
    snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suRSSIFromAP.$sunum");
    $b = round(((120-($a * -1))/70)*100);
    echo "$b% ($a dBm)";
    echo "</td><td>";
    $a =
    snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suRSSIFromSU.$sunum");
    $b = round(((120-($a * -1))/70)*100);
    echo "$b% ($a dBm)";
    echo "</td><td>";
    $a =
    snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suTemperature.$sunum");
    echo "$a deg. C";
    echo "</td><td>";
    $a =
    snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suRfInOctets.$sunum");
    echo "$a";
    echo "</td><td>";
    $a =
    snmpget("ap$apnum.pntsi.ca","pntsi-snmp","TRANGOM5830S-MIB::suRfOutOctets.$sunum");
    echo "$a";
    echo "</td><td>";
    echo "<a
    href=su-reboot.php?sunum=$sunum&apnum=$apnum>Reboot me</a>";
    echo "</td></tr>";
    }
    else
    {
    echo "<TR><TD>";
    print "SU #$sunum is currently not connected.";
    echo "</td></tr>";
    }
    }
    echo "</table>";
    ?>
    </html>

    ------------------------------------------------------------------------

    [2003-10-16 00:54:20] [email]sniperphp.net[/email]

    If your OS runs out of file descriptors, of course it will error out.
    And as you failed to give us a short example script, bogus.


    ------------------------------------------------------------------------

    [2003-10-16 00:10:22] padair at pntsi dot ca

    Description:
    ------------
    I am getting a "failed to open stream: Too many open files in Unknown
    on line 0" error message.

    I check similar bug reports but none seemed to apply. I already am
    running 4.3.3 where this error was supposed to be fixed.

    My config is Solaris 8, Apache 2.0.44, PHP 4.3.3.

    My page pulls some simple snmp data and I have a META refresh tag at
    the top that refreshes the page every 30 seconds. 99% of the time the
    page is ok. Every now and then the error below shows. It goes away on
    its own usually by the next refresh.

    Actual result:
    --------------
    Warning: Unknown(/isp/www/pntsi/stats/snmp.php): failed to open stream:
    Too many open files in Unknown on line 0

    Warning: (null)(): Failed opening '/isp/www/pntsi/stats/snmp.php' for
    inclusion (include_path='.:/usr/local/php4/lib/php') in Unknown on line
    0


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=25886&edit=1[/url]
    jay@php.net Guest

Similar Threads

  1. #25886 [Com]: failed to open stream: Too many open files in Unknown on line 0
    By michel dot jansens at ulb dot ac dot be in forum PHP Development
    Replies: 0
    Last Post: October 17th, 07:14 AM
  2. Replies: 0
    Last Post: October 16th, 04:54 AM
  3. #25886 [NEW]: failed to open stream: Too many open files in Unknown on line 0
    By padair at pntsi dot ca in forum PHP Development
    Replies: 0
    Last Post: October 16th, 04:10 AM
  4. Replies: 0
    Last Post: October 11th, 04:05 PM
  5. #22416 [Com]: failed to create stream: Too many open files in Unknown on line 0
    By jmorris at sunflower dot com in forum PHP Development
    Replies: 0
    Last Post: October 11th, 03:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139