Page 1 of 2

Newbie here!

Posted: 2009-07-25T13:59:21-07:00
by red_dragons
Hello all. I have in the last week created my own domain with phpbb 3 installed on it. Now as i am very new to phpbb, i noticed in the ACP under general > attachment settings that it says about this imagmagick. So i clicked on the link to search for it but nothing happened.
Anyway, i searched for it in google and it took me to the imagemagick website and from there i got here!

So, obviously it is not installed on my server. Also i dont know which version to download so i can upload it to my server. also, where would i put it, as i do not seem to have a user\bin directory unless i have to create that?

Any help would be greatly appreciated. :shock:

Re: Newbie here!

Posted: 2009-07-25T14:31:36-07:00
by Bonzo
i noticed in the ACP under general > attachment settings that it says about this imagmagick.
You have not actualy posted what it said !

Is it your server and so you know ImageMagick is not installed or is it a server that hosts your domain ?

If its not your server you could run this to confirm if its installed or not:

Code: Select all

<?php
echo "<pre>";
system("convert -version");  
echo "</pre>";
?> 
This will give you more info:

Code: Select all

<?php
// Build the array of items to be used
exec("convert convert -list list", $IMarray, $code);
// Start the loop to find and display the results
foreach ($IMarray as $value) {
echo "<br>system (\"convert -list $value\")";
echo "<pre>";
system("convert -list $value");
echo "</pre><hr>";
}
?>

Re: Newbie here!

Posted: 2009-07-25T14:50:49-07:00
by red_dragons
No, its not my own server, my domain is hosted by one.com, sorry for confusion.

In my ACP for phpbb, under general, attachment settings, it says this:
Imagemagick path:
Full path to the imagemagick convert application, e.g. /usr/bin/.

Then at the side of it an empty box. To the right of that a link that says, 'search for imagemagick'. When i click it - it just refreshes my ACP & everything is still the same.
That is why i mean it is not installed on there.
Also that code u gave me, where do i type that in to run it?
or do i upload it as a php file. ?........

Re: Newbie here!

Posted: 2009-07-26T00:28:56-07:00
by Bonzo
You upload the files to the server and run as normal php files.

Re: Newbie here!

Posted: 2009-07-26T02:52:49-07:00
by red_dragons
well i uploaded the second code you gave me as a php file. I typed its location in my browser & its just a completly blank page.

Re: Newbie here!

Posted: 2009-07-26T03:16:08-07:00
by Bonzo
I would guess Imagemagick is not installed; try this one:

Code: Select all

<?php
echo "<pre>";
// Find the path to ImageMagicks convert comand
system("type convert"); 
// Alternate method
system('which convert',$path);
print_r($path); 
echo "</pre>";
?> 
If you do not get any output I would contact your hosts.

Re: Newbie here!

Posted: 2009-07-26T04:27:29-07:00
by red_dragons
Yeah, i contacted them yesterday, and they have just replied. Apparently imagemagick is not installed on their servers and I'll have to use 'GD2' which is already installed on their servers...

Re: Newbie here!

Posted: 2009-07-31T20:09:03-07:00
by anthony
Bad news man. GD is very very minimal in what it can do with images.

Re: Newbie here!

Posted: 2011-06-30T14:50:03-07:00
by Exirtis
Sorry to Necro, but I'm having a very similar issue.

I've installed phpBB (version 3) on my server (Suse Linux Enterprise 11, 64-bit) and I've tried the example codes given:

Code: Select all

<?php
// Build the array of items to be used
exec("convert convert -list list", $IMarray, $code);
// Start the loop to find and display the results
foreach ($IMarray as $value) {
echo "<br>system (\"convert -list $value\")";
echo "<pre>";
system("convert -list $value");
echo "</pre><hr>";
}
and

Code: Select all

?>
<?php
echo "<pre>";
system("convert -version");
echo "</pre>";
?>
But when I put either of those sets in a file (testing.php) it returns a blank HTML page. The thing is, I'm pretty sure that ImageMagick is installed on my server. Here's the information copied from Yast 2:
libMagickCore1 - Viewer and Converter for Images - runtime library
Version:
6.4.3.6-7.22.1
URL:
http://www.imagemagick.org
Source Package:
ImageMagick-6.4.3.6-7.22.1
Here are some sample entries under the file list (from both libMagickCore1 and libMagickCore1-32bit):
/usr/lib/ImageMagick-6.4.3
/usr/lib/ImageMagick-6.4.3/modules-Q16
/usr/lib/libMagickCore.so.1
/usr/lib/libMagickCore.so.1.0.0

/usr/lib64/ImageMagick-6.4.3
/usr/lib64/ImageMagick-6.4.3/config
/usr/lib64/ImageMagick-6.4.3/modules-Q16
/usr/lib64/libMagickCore.so.1
/usr/lib64/libMagickCore.so.1.0.0
So, am I right? According to this ImageMagick should be installed, but I'm still not getting something with the PHP code provided by Bonzo. The end-purpose of all this is so that phpBB that I've installed will use ImageMagick correctly.

I hope this wasn't too long, but I figured more info was better than too little.

Re: Newbie here!

Posted: 2011-06-30T16:40:07-07:00
by fmw42
exec("convert convert -list list", $IMarray, $code);
You have too many converts in the command. It should be only one and it may need to know the path to convert. So try

exec("convert -list list", $IMarray, $code);

Or try this

<?php
echo "<pre>";
system("which convert");
echo "</pre>";
?>

the above should tell you how many IM convert versions you have and where they are.

P.S. It is generally better to start a new thread than attach onto an old one. It gets confusing what has been answered when you tack onto an old one and often it goes unanswered.

Re: Newbie here!

Posted: 2011-07-01T08:38:22-07:00
by Exirtis
fmw42 wrote: P.S. It is generally better to start a new thread than attach onto an old one. It gets confusing what has been answered when you tack onto an old one and often it goes unanswered.
True. Sorry about that. I should have realized this, but I had been trying to figure out what was happening on my end for so long that I think my mental capacity must have become too exhausted to see that. :?


I tried reducing the number of converts as suggested, and when I could see nothing from that I also tried the following bit of code you provided:
<?php
echo "<pre>";
system("which convert");
echo "</pre>";
?>
But the page served up is still blank, despite Yast2 telling me I've installed it (as I excessively detailed in my last post).

Re: Newbie here!

Posted: 2011-07-01T15:19:47-07:00
by fmw42
try


<?php
echo "<pre>";
system("type convert");
echo "</pre>";
?>


Perhaps you have permission or ownership problems in your directories between PHP and IM? Have you checked into that?

Also try

?>
<?php
echo "<pre>";
system("/usr/local/bin/convert -version");
echo "</pre>";
?>

and

?>
<?php
echo "<pre>";
system("/usr/bin/convert -version");
echo "</pre>";
?>

Re: Newbie here!

Posted: 2011-07-05T15:38:03-07:00
by Exirtis
Thanks for the reply!

I've tried out the code samples you gave and, unfortunately, none of them changed anything. I haven't looked into permission or ownership problems yet, no. It's a good idea, I'll have to do some research into the kind of problems that crop up with that and ImageMagick and see if I have any of those.

Re: Newbie here!

Posted: 2011-07-05T16:03:20-07:00
by fmw42
perhaps you are not allowed to use "system(..)". Try using the same IM commands with "exec(..)" in such a way that you can get the error messages and the info back.

<?php
exec("/usr/local/bin/convert -version",$out,$returnval);
print_r($out[0]);
?>

<?php
exec("/usr/bin/convert -list",$out,$returnval);
print_r($out);
?>

<?php
exec("type convert",$out,$returnval);
print_r($out);
?>

Or shell_exec

<?php
$IM_version=shell_exec("/usr/local/bin/convert -version");
echo $IM_version
?>

Re: Newbie here!

Posted: 2011-07-06T11:10:38-07:00
by Exirtis
Interesting, I got something with the second and third example you gave me:
<?php
exec("/usr/bin/convert -list",$out,$returnval);
print_r($out);
?>
and
<?php
exec("type convert",$out,$returnval);
print_r($out);
?>
Each returned this:
Array ( )
That's not what I want to be seeing though, is it? Or rather, it's not all that I should be seeing? Granted, anything is better than the nothing I've been getting. :wink: