Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Filebrowser troubles

edited June 2006 in Vanilla 1.0 Help
When I browse to my filebrowser install (http://jdsmith.rwnaf.local/filebrowser/index.php) I get the below errors. This is jus ta snippet from the beginning, it appears to have dumped a ton of hte php code along with it. I'm running php5 and apache on this machine. Does anyone have an idea of what I need to do? :) ----------- error snip ----------------- ObjectFactory->NewObject($Context, "Error"); } else { $Error = new Error(); } $Error->AffectedElement = $AffectedElement; $Error->AffectedFunction = $AffectedFunction; $Error->Message = $Message; $Error->Code = $Code; $this->Errors[] = $Error; $this->ErrorCount += 1; if ($WriteAndKill == 1) $this->Write($Context); } function Clear() { $this->ErrorCount = 0; $this->Errors = array(); } function ErrorManager() { $this->Clear(); } function Iif($True = "1", $False = "0") { if ($this->ErrorCount == 0) { return $True; } else { return $False; } } function Write(&$Context) { echo(" "); if ($this->StyleSheet == "") { echo(" "); } else { echo("StyleSheet."\" />\r\n"); } echo(" A fatal, non-recoverable error has occurred Technical information (for support personel): "); for ($i = 0; $i < count($this->Errors); $i++) { echo(" Error Message: ".ForceString($this->Errors[$i]->Message, "No error message supplied")." Affected Elements: ".ForceString($this->Errors[$i]->AffectedElement, "undefined").".".ForceString($this->Errors[$i]->AffectedFunction, "undefined")."(); "); $Code = ForceString($this->Errors[$i]->Code, ""); if ($Code != "") { echo(" The error occurred on or near: ".$Code." "); } } if ($Context) { if ($Context->Mode == agMODE_DEBUG && $Context->SqlCollector) { echo(" Database queries run prior to error "); $Context->SqlCollector->Write(); } } echo(" For additional support documentation, visit the Lussumo Software support website at: lussumo.com/support "); // Cleanup if ($Context) $Context->Unload(); die(); } function GetSimple() { $sReturn = ""; for ($i = 0; $i < count($this->Errors); $i++) { $sReturn .= ForceString($this->Errors[$i]->Message, "No error message supplied\r\n"); } return $sReturn; } } class Parameters { var $aParameters = array(); // Add an element to the collection function Add($Name, $Value, $EncodeValue = 1) { if ($EncodeValue && !is_array($Value)) $Value = urlencode($Value); $this->aParameters[$Name] = $Value; } // Completely clear the collection function Clear() { $this->aParameters = array(); } // Return a count of how many elements are in the collection function Count() { return count($this->aParameters); } // Retrieves all get and post variables function DefineCollection($Collection, $ParameterPrefix = "", $IncludeByPrefix = "0", $ExcludeByPrefix = "0") { $ParameterPrefix = ForceString($ParameterPrefix, ""); $IncludeByPrefix = ForceBool($IncludeByPrefix, 0); $ExcludeByPrefix = ForceBool($ExcludeByPrefix, 0); $Add = 1; while (list($key, $value) = each($Collection)) { $Add = 1; if ($ParameterPrefix != "") { $PrefixMatchLocation = strstr($key, $ParameterPrefix); // If the prefix isn't found or the location is anywhere other than 0 (the start of the variable name) if ($PrefixMatchLocation === false || $PrefixMatchLocation != 0) { if ($IncludeByPrefix) $Add = 0; } else { if ($ExcludeByPrefix) $Add = 0; } } if ($Add) $this->Add($key, $value); } } function GetHiddenInputs() { $sReturn = ""; while (list($key, $val) = each($this->aParameters)) { if(is_array($val)) { $nmrows = count($val); for ($i = 0; $i < $nmrows; ++$i) { $sReturn .= "\r\n"; } } else { $sReturn .= "\r\n"; } } reset($this->aParameters); return $sReturn; } // Return the collection as a string in querystring name/value pair format function GetQueryString() { $sReturn = ""; while (list($key, $val) = each($this->aParameters)) { if(is_array($val)) { $nmrows = count($val); for ($i = 0; $i < $nmrows; ++$i) { $sReturn .= $key ."[]=" . $val[$i] . "&"; } } else { $sReturn .= $key . "=" . $val . "&"; } } // remove trailing ampersand $sReturn = substr($sReturn,0,strlen($sReturn) - 5); if ($sReturn != "") $sReturn = "?".$sReturn; reset($this->aParameters); return $sReturn; } // Remove an element from the collection function Remove($Name) { $key_index = array_keys(array_keys($this->aParameters), $Name); if (count($key_index) > 0) array_splice($this->aParameters, $key_index[0], 1); } // Set a value. If it already exists, overwrite it. function Set($Name, $Value, $EncodeValue = 1) { $this->Remove($Name); $this->Add($Name, $Value, $EncodeValue); } } class XmlNode { ---------- end snip -------------

Comments

  • Options
    You need to do a search and replace on the php files which form filebrowser to change <? for <?php (i think this became standard with php5 or it might just be a server config option - eitherway it should help)

    Might be worth doing this on the official download, mark?
  • Options
    edited June 2006
    Sweet, that was it.. I should have thought of that; and here Icall myself a programmer. *blushes* Now I'm off to figure out why none of my jpg's all generate thumbnails of Preview Unavailable and I'll be set. Maybe I have to generate thumbnails via the thumbnailer before it will preview.. Although I pretty much have to have it show me the preview immediately without any generation, ie a img link with the size scaled down via width and height. Off to dig around. :) Thanks for the help Mini! Best regards, JD Smith
  • Options
    You need to run the thumbnailer (I'm assuming you havent (not because i think you're an idiot, but because most people dont realise they have to!)) at /thumbnailer.php
    If you have and its still not doing it there are a number of reasons.

    And no worries, it took me a while to notice that the opening tag wasnt right the first time the error came up here. It's been around a few times though.
  • Options
    Aye, I was worried you had to do that. Hmm, for my purposes I'm gonna have to hack it to show a resized image instead of having to generate thumbnails. Basically I am in the middle of writing a large intranet application for the norton art gallery that manages everything to do with their collection and business. I'm at the point where I need to import thousands of images and associate them with thousands of artists/items that have been imported from their old database.. However, there's nothing linking the images with the things htey represent in the old database... Due to this the best solution I could think of is to allow them to dump those images into a directory hierarchy under a common image_share folder. They'd have things like image_share/artists/frederick_remington/lots of files at that point if they browse to that folder in the 'app' it would give htem the ability to easily select x number of images, an artist from a drop down, etc and then copy, rename the image, and insert into the database the appropriate information to link it together in the intranet app. It's easy to see now why having to have htem generate those thounds of thumbnails to see the preview of the images isn't very feasible. :) I figured I'd just start with this as it's already a pleasing look/feel and gives me less code to write. Best regards, JD Smith
  • Options
    Surely generating thumbnails once is better than making it resize the images every time you load a page? What might be easiest for you is just to set the number of files per page to something pretty big and then just let them click the >> in the nav - that will load up X images which are resized to the page width or less. Big enough they can see what they need but still lets them scan through a load at a time?
  • Options
    Well, if it can generate all the thumbnails in one go sure... However, the time I ran it htough the thumbnailer it only did a small handful of my test batch of 400 images. Something like 5 or 6. On a few thousand pictures that'd take all day. :) Currently I have that value set to 10, but the images I'm testing with are large 800x600 images and it is only puttin gone per page when i do next (probably because you can't fit 2 at my resolution), let me get actual test images and see how that works out. Best regards, JD Smith
  • Options
    Hmm, looks like the actual images are a good bit larger than my test images actually. I'm gonna peak through the thumbnailer file and see about getting it to thumbnail an entire directory at a time. Best regards, JD Smith
  • Options
    Um, you need to click the >> not the > or the >| or the next. Then it puts them in a line down the page.

    And it should thumbnail dirs at a time if you select them all. It might take a while but it'l run through them all itself.
This discussion has been closed.