General Community > Scripting Help

Puppet - hostingcms02 php error

(1/3) > >>

MC73:

--- Code: ---<?php
// pageok
// managed by puppet - hostingcms02
header("Content-type: text/plain");

// Total size of directory
$totalSize = 0;

// List of files in cwd
$dir  = opendir('.');
while (($filename = readdir($dir)) ==! false) {
   $files[] = $filename;
}

// The results of filesize are cached, clear that cache
clearstatcache();

// Total file sizes
foreach ($files as $file) {
  // Add file to total size
  $totalSize += filesize($file);
}

echo "pageok\n\n";
echo "Directory Size: $totalSize\n\n";

?>
--- End code ---

There is a code that just shows up on a ( yeah yeah I know before any comments , lol ) Godaddy hosting site. This problem started about a week ago and it is nothing but a white page with the code above. I have searched the net, including here but no real answer to what the problem is. I have a feeling that it is a GoDaddy problem since hostingcms02 points to godaddy. Even on their forum, they said that they couldnt recreate it, so not answer there. I checked the index.php but nothing has changed, including all themes including default. I know for a fact that this is not a SMF problem since other php type sites has has this problem b4 via google. Any idea on what is the H%ll the code means ?

btw, this is not my site .... just trying to help out a friend.

MrPhil:
I can't understand what you're saying. Under what circumstances does this show up? Is this a file that appears on their site (and is being run) or is it what you see on the screen? It doesn't appear to be doing anything harmful or malicious, but only to report the total size of all the files in this directory. Has this replaced the SMF forum? It must be a file (find its name) or an addition to an SMF file. Look in the site file manager to find the most recent files and start investigating them.

MC73:
For example ..... IF i go to ADMIN ( or forum, or any other page ) , then it will go to a white page with just the php code that I first posted. It doesn't do it all the time but, 5 times out of 10 it will go to the white page with just the script. The script is nowhere in the forum's folders or files ... Lord knows that I went through them all.

Members has complained that they can not log into the site because all they get is the script, but if you go to a history url, then you can get in.... but when you get in some pages will just show the white page script.

http://www.bestsatpros.com ...... script with just pageok

http://www.bestsatpros.com/index.php ..... the whole script

Those 2 links usually shows the scripts in question.

Orangine:
clear browser cache
reload the page by pressing CTRL+F5

MC73:
I already cleared it via admin and even deleted all caches out via ftp. CTRL+F5 is for IBM PC, Im on a MAC and I already did it there also.

Navigation

[0] Message Index

[#] Next page

Go to full version