Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: edi67 - helmikuu 26, 2005, 01:59:12 IP

Otsikko: Failed to open stream ? error
Kirjoitti: edi67 - helmikuu 26, 2005, 01:59:12 IP
i have one problem my flashchat before today worked always perfectly
but today for one hour my server had problem and my site was down now site forum work but i have this problem in main forum

2: readfile(http://www.forumzoneru.25.com1.ru/FlashChat/info.php): failed to open stream: Permission denied
File: /home/forumzo7/public_html/Themes/default/BoardIndex.template.php (eval?)
Linea: 333


what means ? is possible correct it.

this is line 333 of boardindex.

if ($context['user']['is_logged'])
      {
   
      readfile("http://www.forumzoneru.25.com1.ru/FlashChat/info.php");
      }
Otsikko: Re: Failed to open stream ? error
Kirjoitti: Oldiesmann - helmikuu 26, 2005, 07:38:34 IP
Make sure that the Flaschat folder and the info.php file in it are chmodded to at least 755...
Otsikko: Re: Failed to open stream ? error
Kirjoitti: [Unknown] - helmikuu 26, 2005, 09:28:58 IP
Are you sure it's http://www.forumzoneru.25.com1.ru/FlashChat/info.php?

http://www.forumzoneru.25.com1.ru won't load for me.

-[Unknown]
Otsikko: Re: Failed to open stream ? error
Kirjoitti: edi67 - helmikuu 27, 2005, 02:26:36 AP
well CHMOD are 777 in directory and in file

and patch is correct:

http://www.forumzoneru.25.com1.ru/FlashChat/info.php?

the only thing i done to this file but many times ago was to make this change for see users online in chat:

http://www.simplemachines.org/community/index.php?topic=27137.msg155330#msg155330

and worked perfectly until yesterday


LainaaHow to ad list of users who are in chat

In /FlashChat/info.php, find:

Copy to clipboardCode:
<html>
<title>Who's in the chat?</title>
<head>
<style type="text/css">
<!--
.normal {
   font-family: Verdana, Arial, Helvetica, sans-serif;
   font-size: 12px;
   font-weight: normal;
}
A {
   font-family: Verdana, Arial, Helvetica, sans-serif;
   font-size: 12px;
   color: #0000FF;
}
A:hover {
   font-family: Verdana, Arial, Helvetica, sans-serif;
   font-size: 12px;
   color: #FF0000;
}
-->
</style>
</head>
   <body>
      <center>
      <p class=normal>There are <?=numusers()?> users in <?=$roomnumb?> rooms.</p>
      <?php if($roomnumb) { ?>
         <table border="1" cellpadding="1" class="normal">
            <tr>
               <th>ID</th>
               <th>Name</th>
               <th>Count</th>
               <th>Users</th>
            </tr>
            <?php foreach($rooms as $room) { ?>
               <tr>
                  <td><?=$room['id']?></td>
                  <td><?=$room['name']?></td>
                  <td><?=numusers($room['id'])?></td>
                  <td><?php

                  $users = usersinroom($room['id']);

                  foreach( $users as $user ) {
                     echo $user['login'] . "<br>";
                  }

                  ?> </td>
               </tr>
            <?php } ?>
         </table>
      <?php } ?>

      <p><a href="javascript:window.close()">Close</a></p>
      <center>
   </body>
</html>
Replace:

Copy to clipboardCode:
<span style="font-size:xx-small;color:#0232a1">
   <?php

                  $users = usersinroom($room['id']);

                  foreach( $users as $user ) {
                     echo $user['login'] . ",";
                  }

                  ?></span>

then ad this in index.template.php:

Copy to clipboardCode:
<td colspan="2">
';
if ($context['user']['is_logged'])
echo '               
      <font size="-2">Users in chat:</font> ';
      if ($context['user']['is_logged'])
      {
   
      readfile("http://www.example.com/FlashChat/info.php");
}
echo ' 

   
               
               </td>

help me

Otsikko: Re: Failed to open stream ? error
Kirjoitti: [Unknown] - helmikuu 27, 2005, 02:38:13 AP
I still can't get the domain to resolve.

-[Unknown]
Otsikko: Re: Failed to open stream ? error
Kirjoitti: edi67 - helmikuu 27, 2005, 02:44:37 AP
my forum not work for you?

http://www.forumzoneru.25.com1.ru

i repost the original info.php file without the owdy modification in this way sure u will see but i need owdy modification for see who is in chat and before with this owdy modification worked perfectly:

owdy told me to REPLACE THIS part:

<html>
<title>Who's in the chat?</title>
<head>
<style type="text/css">
<!--
.normal {
   font-family: Verdana, Arial, Helvetica, sans-serif;
   font-size: 12px;
   font-weight: normal;
}
A {
   font-family: Verdana, Arial, Helvetica, sans-serif;
   font-size: 12px;
   color: #0000FF;
}
A:hover {
   font-family: Verdana, Arial, Helvetica, sans-serif;
   font-size: 12px;
   color: #FF0000;
}
-->
</style>
</head>
   <body>
      <center>
      <p class=normal>There are <?=numusers()?> users in <?=$roomnumb?> rooms.</p>
      <?php if($roomnumb) { ?>
         <table border="1" cellpadding="1" class="normal">
            <tr>
               <th>ID</th>
               <th>Name</th>
               <th>Count</th>
               <th>Users</th>
            </tr>
            <?php foreach($rooms as $room) { ?>
               <tr>
                  <td><?=$room['id']?></td>
                  <td><?=$room['name']?></td>
                  <td><?=numusers($room['id'])?></td>
                  <td><?php

                  $users 
usersinroom($room['id']);

                  foreach( $users as $user ) {
                     echo $user['login'] . "<br>";
                  }

                  ?>
</td>
               </tr>
            <?php ?>
         </table>
      <?php ?>

      <p><a href="javascript:window.close()">Close</a></p>
      <center>
   </body>
</html>
Replace:

Copy to clipboardCode:
<span style="font-size:xx-small;color:#0232a1">
   <?php

                  $users 
usersinroom($room['id']);

                  foreach( $users as $user ) {
                     echo $user['login'] . ",";
                  }

                  ?>
</span>


with this one:

<span style="font-size:x-small;color:#0232a1">
<?php

$users usersinroom($room['id']);

foreach( $users as $user ) {
echo $user['login'] . ", ";
}

?>
</span>


and recall this file with this function for show who is in chat:

if ($context['user']['is_logged'])
      {
   
      readfile("http://www.forumzoneru.25.com1.ru/FlashChat/info.php");
      }


and worked good but until yesterday
Otsikko: Re: Failed to open stream ? error
Kirjoitti: [Unknown] - maaliskuu 02, 2005, 12:21:36 AP
It loads for me now, and so does the chat thing.

-[Unknown]