Newer than a newbie

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
gary_angel

Newer than a newbie

Post by gary_angel »

I Seriously need help with ImageMagick. as the subject says i am newer than a newbie.

I have installed imagemagick (with the help of a friend), but now when i am trying to view my pictures i get a square box with NO GD in it. What is it that i am doing wrong? I am running windows XP Home.This is the first time i have done something like this, so please be gentle with me. I am also trying to do it by using PHP Thumb nails
I know it is a stupid question, so i am expecting some criticism back, and also some help.

Hope someone can.

If there is any more information you want me to provide, please let me know

Gary
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Newer than a newbie

Post by anthony »

GD is a seperate image processing and scripting package, that also can be used from PHP. It is however much more limited in what it can do and the image types it can process.

If you are getting "NO GD" then something is trying to call GD, and the problem is not an Imagemagick problem. You may need to ask a local PC expert to take a look.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
gary_angel

Re: Newer than a newbie

Post by gary_angel »

I am trying to make PHP Thumb use Imagemagick, Is there any way of making that happen?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Newer than a newbie

Post by anthony »

As a starting point for PHP with image magick, do to the IM Examples Feedback and questions page
http://www.imagemagick.org/Usage/feedback/#php

This should let you first find out what IM support your PHP provider has given you.
Fram there you can then start useing the manuals for that specific API.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
gary_angel

Re: Newer than a newbie

Post by gary_angel »

Okay, i have tried that i get the message below:

From this command:



<?
header('Content-Type: text/plain');
system("exec 2>&1; type convert");
system("exec 2>&1; convert -version");
system("exec 2>&1; convert -list type");
?>

i got the error message below - i even tried it with PHP next to the <? to see if it made a difference.



'exec' is not recognized as an internal or external command, operable program or batch file. 'exec' is not recognized as an internal or external command, operable program or batch file. 'exec' is not recognized as an internal or external command, operable program or batch file.

and with



<?
$im_path="C:\Program Files\ImageMagick-6.3.2-Q16" (Not sure if this is correct, it is where my Convert.exe is placed)
header('Content-Type: text/plain');
system("exec 2>&1; $im_path/convert -version");
system("exec 2>&1; $im_path/convert -list type");
?>

I get the error mesage of:


&1; $im_path/convert -version"); system("exec 2>&1; $im_path/convert -list type"); ?>



I appreciate your help :)
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Newer than a newbie

Post by anthony »

That means that the PHP on your ISP host is configured NOT to allow you to run commands directly. That means you can ONLY use a API interface. try some of the later examples to see what interface is built in (if any)
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
gary_angel

Re: Newer than a newbie

Post by gary_angel »

I forgot to mention that i am hosting it from my laptop (using APACHE) running windows XP. Should these examples work or are there any more examples that i can try?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Newer than a newbie

Post by anthony »

Than you need to do more work on the PHP installation.
Most likely you will have not exist APIs in the PHP, so you will have to turn on
the PHP exec function.

Do to the PHP mailing lists and forums for this.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
gary_angel

Re: Newer than a newbie

Post by gary_angel »

Where do i find this PHP Exec function, I have spent all weekend going through all of my PHP Files that are in my directory and i havent come across it (Is this where you tell me i have been looking in the wrong place all weekend :).

I have gone to mailing lists and forums and am still waiting for a response.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Newer than a newbie

Post by anthony »

As a guess, the /etc/php.ini or /etc/php.d/* file(s) is where exec is enabled or denied.
Exec is the function to call other programs, deniying it a security measure.

My own PHP has...

Code: Select all

   safe_mode = Off
   safe_mode_exec_dir =
Which limit external commands to ONE specific directory with a specific pre-defined environment.

If you can't turn off 'safe_mode' then make links to the IM commands from that directory.

For more look in the PHP manual (online or offline).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
gary_angel

Re: Newer than a newbie

Post by gary_angel »

Hi,

I have checked my PHP.ini file and have done a search for "safe mode" However i am not sure what i am supposed to be changing now (as to what is code and what is just speech)

Code: Select all

Safe Mode
;
safe_mode = Off

; By default, Safe Mode does a UID compare check when
; opening files. If you want to relax this to a GID compare,
; then turn on safe_mode_gid.
safe_mode_gid = Off

; When safe_mode is on, UID/GID checks are bypassed when
; including files from this directory and its subdirectories.
; (directory must also be in include_path or full path must
; be used when including)
safe_mode_include_dir =

; When safe_mode is on, only executables located in the safe_mode_exec_dir
; will be allowed to be executed via the exec family of functions.
safe_mode_exec_dir =
.

I havent included everything, as i dont know what line i am looking for and there are quite a few to do with PHP.

thanks
Gary
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Newer than a newbie

Post by anthony »

As safe mode is off that is not the probelm.

Sorry I can't really help you. Try looking up the error (without the IM part) on google.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
gary_angel

Re: Newer than a newbie

Post by gary_angel »

Hi,

After going to several other sites to ask about my PHP / ImageMagick / GD Problem, i have now discovered that someone else is able to use ImageMagick on a windows XP machine. So now all i need to know is do i and if so how do i configure Image Magick to use GD?

My word if i knew it would be this hard i wouldnt of bothered :?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Newer than a newbie

Post by anthony »

GD is a completely separate unrelated image processing API to ImageMagick.
ImageMagick would never call it!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply