Jump to content

DrumDude

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

DrumDude's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I am totally new to PHP scripting but had to upgrade Apache and PHP because of security issues. I upgraded from Apache 1.3.x and PHP 4.2.3 to Apache 2.0.54 and PHP 5.0.5. I now get this error on my index.php page: Fatal error: Call to a member function read() on a non-object on line 89. Here is the code I will insert#89 so you know which line 89 is. > <?php $fileHandle = fopen("dlconfig2.txt", "r"); while (!feof($fileHandle)) { $aLine = fgets($fileHandle, 4096); parse_str($aLine); } fclose($fileHandle); for ($i = 0; $i < count($dropType); $i++) { $typeToPrefix[$dropType[$i]] = $dropPrefix[$i]; } $aDirectory = dir(""); #89 while ($anEntry = $aDirectory->read()) { // Short cut because we know aDirectory only contains other directories. if ($anEntry != "." && $anEntry!="..") { $aDropDirectory = dir(""); $fileCount = 0; while ($aDropEntry = $aDropDirectory->read()) { if ((stristr($aDropEntry, ".html")))  { // Count the files in the directory $fileCount = $fileCount + 1; } } $aDropDirectory.closedir(); $parts = explode("-", $anEntry); if (count($parts) == 3) { $buckets[$parts[0]][] = $anEntry; $timePart = $parts[2]; $year = substr($timePart, 0, 4); $month = substr($timePart, 4, 2); $day = substr($timePart, 6, 2); $hour = substr($timePart,8,2); $minute = substr($timePart,10,2); $timeStamp = mktime($hour, $minute, 0, $month, $day, $year); $timeStamps[$anEntry] = date("D, j M Y H:i (O)", $timeStamp); if ($timeStamp > $latestTimeStamp[$parts[0]]) { $latestTimeStamp[$parts[0]] = $timeStamp; $latestFile[$parts[0]] = $anEntry; } } } } ?> Thanks for any help...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.