11
evylrat
Re: Locating Imagemagick
  • 2005/2/24 17:52

  • evylrat

  • Not too shy to talk

  • Posts: 164

  • Since: 2004/2/25


What version are you running?
On my Windows box, i run ImageMagick 6.1.5. I did find issues with earlier versions.

12
McJagger
Re: Locating Imagemagick
  • 2005/2/24 18:09

  • McJagger

  • Just popping in

  • Posts: 20

  • Since: 2004/12/11


OK, so we have to use artilery :)

I expect you have ftp access to the Server.

Create a new file called test.php
Paste the following code in it:

<?php
// show directory content
function showDir($dir$i$maxDepth){
   
$i++;
   if(
$checkDir opendir($dir)){
       
$cDir 0;
       
$cFile 0;
       
// check all files in $dir, add to array listDir or listFile
       
while($file readdir($checkDir)){
           if(
$file != "." && $file != ".."){
               if(
is_dir($dir "/" $file)){
                   
$listDir[$cDir] = $file;
                   
$cDir++;
               }
               else{
                   
$listFile[$cFile] = $file;
                   
$cFile++;
               }
           }
       }
       
       
// show directories
       
if(count($listDir) > 0){
           
sort($listDir);
           for(
$j 0$j count($listDir); $j++){
               echo 
"
               <tr>"
;
                   
$spacer "";
                   for(
$l 0$l $i$l++) $spacer .= "&emsp;";
                   
// create link
                   
$link "<a href="" . $_SERVER["PHP_SELF"] . "?dir=" . $dir . "/" . $listDir[$j] . "">$listDir[$j]</a>";
                   echo 
"<td>" $spacer $link "</td>
               </tr>"
;
               
// list all subdirectories up to maxDepth
               
if($i $maxDepthshowDir($dir "/" $listDir[$j], $i$maxDepth);
           }
       }
       
       
// show files
       
if(count($listFile) > 0){
           
sort($listFile);
           for(
$k 0$k count($listFile); $k++){
               
$spacer "";
               for(
$l 0$l $i$l++) $spacer .= "&emsp;";
               echo 
"
               <tr>
                   <td>" 
$spacer $listFile[$k] . "</td>
               </tr>"
;    
           }
       }        
       
closedir($checkDir);
   }
}

if(
$_GET["dir"] == "" || !is_dir($_GET["dir"])) $dir getcwd();
else 
$dir $_GET["dir"];
// replace backslashes, not necessary, but better to look at
$dir str_replace("\""/"$dir);

// show parent path
$pDir pathinfo($dir);
$parentDir $pDir["dirname"];

echo 
"<a href="" . $_SERVER["PHP_SELF"] . ""><h3>Home</h3></a>";
echo 
"Current directory: " $dir;
echo 
"<a href="" . $_SERVER["PHP_SELF"] . "?dir=$parentDir"><h4>Parent directory: $parentDir</h4></a>";

// Display directory content
echo"<table border=1 cellspacing=0 cellpadding=2>
<tr><th align=left>File / Dir</th>"
;

// specifies the maxDepth of included subdirectories
// set maxDepth to 0 if u want to display the current directory
$maxDepth 0;
showDir($dir, -1$maxDepth);  
?>


Upload the file into your XOOPS homedir.

Now you can access the file via your browser (http://www.yoirsite.tld/test.php). It is a small filebrowser. You will see the files in your XOOPS dir and at the top you have the option to go upwards. just browse your way through the filesystem and you should find your directory ;)

If you want to jump directly to a dir you can open the test.php with the "dir" - argument, i.e.:http://www.yoirsite.tld/test.php?dir=c:\Program%20Files

Hope this helps ;)

13
evylrat
Re: Locating Imagemagick
  • 2005/2/24 18:18

  • evylrat

  • Not too shy to talk

  • Posts: 164

  • Since: 2004/2/25


Pretty nifty that is! works on linux and windows.

14
McJagger
Re: Locating Imagemagick
  • 2005/2/24 20:13

  • McJagger

  • Just popping in

  • Posts: 20

  • Since: 2004/12/11


Yeah, but I can only take the credits for knowing abouthttp://www.php.net, the real work did a german guy by the name Hendrik Wermer.

@tedsmith: I'd still like to know if it helped?!?

15
tedsmith
Re: Locating Imagemagick
  • 2005/2/25 13:42

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


That is indeed a nifty bit of stuff.

It idid and din't work. What it has done is made me realise something which may have been obvious to you guys, but not so much for me...

In my case, my XOOPS site is on the D:\ of the server. So, yes, using the script I could navigate through the D:\ drive. However, Imagemagick is on the C:\ drive.

I assumed that because IIS, php and MySQL are all on the C:\ then I though that XOOPS could also see the C:\ drive in much the same way, but clearly not.

In the past I've used paths like
\halfolder1folder2 etc


to address the server using Xoops. I've just tried using

\halprogram filesimagemagick


combined with all the combinations already tried, but still without success. I know for a fact that it's stored on the C:\ drive, in Program Files.

Would it help to install Imagemagick on the D:\ instead? I assume it would because then I know that XOOPS can see that. In fact, MyAlbum even mentions the D:\ drive. Or is there still another way (my network administartor hates me messing about with the server!)

Ted

16
McJagger
Re: Locating Imagemagick
  • 2005/2/25 14:20

  • McJagger

  • Just popping in

  • Posts: 20

  • Since: 2004/12/11


Well, a few more things I could think of:

+ Download ImageMagic, unzip it on you PC at home and upload the binaries onto your server via ftp, give MyAlbum the location on d drive.
+ Check if you have GD compiled into php and if MyAlbum supports GD.
+ Give me the url to the test.php and let me take a look around, then perhap I'll be able to tell you more.

PHP, MySQL and ISS being on drive C doesn't guarantee you that you can access it, ISS needs to be able to access the D drive, not the other way around.

Quote:
\\hal\folder1\folder2\


This looks like a network share...

17
tedsmith
Re: Locating Imagemagick
  • 2005/2/25 14:59

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


MyAlbum does support GD. I have problems with GD which is another story which is why I am trying to sort out Imagemagick.

I can't give you the url - it's an internal Intranet that is not accessible by the outside world.

So, I'll try installing Imagemagick on the D:\ drive and see if that helps.

Thanks for all your help.

Ted

18
ganjabob
Re: Locating Imagemagick
  • 2006/4/19 21:50

  • ganjabob

  • Just popping in

  • Posts: 6

  • Since: 2003/2/20


There are quite a few 'help' posting that state your image management tools cannot have spaces in their directory structure. Try installing IM directly under the C: or D: drives and see if that resolves.

If you've granted appropriate permissions to the folder for the IWAM and IUSR user accounts it shouldn't matter what drive the app is installed to as both are local accounts that can access all system drives.

Login

Who's Online

252 user(s) are online (161 user(s) are browsing Support Forums)


Members: 0


Guests: 252


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits