ImageMagik frustrations

jrjr

Joined: 2006-09-28
Posts: 26
Posted: Thu, 2006-09-28 20:56


Gallery version (not just "2"):2.1
PHP version (e.g. 4.3.11): 4.4.4
PHPInfo Link (see FAQ):
Webserver (e.g. Apache 1.3.33): IIS 5
Database (e.g. MySql 4.0.11):MySql
Activated toolkits (e.g. NetPbm, GD):ImageMagik
Operating system (e.g. Linux):Windows 2000 server
Browser (e.g. Firefox 1.0): FF 1.5.0.7

I have installed Gallery 2 and I can upload and delete photos but the thumbs are not working. Initially I did not have image magik installed so I installed it. Inserting path did not work no matter what I tried. Testing the imageMagik returned proof that it is installed and working. I uninstalled Gallery2 and reinstalled it hoping it would pick it up but it did not. I have been at this for several hours trying different things and searching endlessly.....

Any advice is welcome and TIA

Here is the output of debug:

Quote:
is_dir(c:\Program Files\ImageMagick-6.2.9-Q16\)
Loading plugin imagemagick
imagemagick plugin successfully instantiated
Check the version of the imagemagick plugin
The version of the imagemagick plugin is ok
getcwd()
chdir(D:\php site\gallery2\g2datazz\tmp\)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\gm.exe)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\identify.exe)
Executing: cmd /c " "c:\Program Files\ImageMagick-6.2.9-Q16\identify.exe"
"D:\php site\gallery2\modules\imagemagick\data\test.gif" 2> "D:\php
site\gallery2\g2datazz\tmp\g2d28C.tmp" "
getParameter exec.expectedStatus for core plugin
file_exists(D:\php site\gallery2\g2datazz\tmp\g2d28C.tmp)
filesize(D:\php site\gallery2\g2datazz\tmp\g2d28C.tmp)
unlink(D:\php site\gallery2\g2datazz\tmp\g2d28C.tmp)
Regular Output:
Error Output:
Status: -1 (expected 0)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\gm.exe)
tempnam(D:\php site\gallery2\g2datazz\tmp\, imgk_)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\convert.exe)
Executing: cmd /c " "c:\Program Files\ImageMagick-6.2.9-Q16\convert.exe"
"-size" "200x200" "-geometry" "200x200" "D:\php
site\gallery2\modules\imagemagick\data\test.gif" "D:\php
site\gallery2\g2datazz\tmp\img28D.tmp" 2> "D:\php
site\gallery2\g2datazz\tmp\g2d28E.tmp" "
getParameter exec.expectedStatus for core plugin
file_exists(D:\php site\gallery2\g2datazz\tmp\g2d28E.tmp)
filesize(D:\php site\gallery2\g2datazz\tmp\g2d28E.tmp)
unlink(D:\php site\gallery2\g2datazz\tmp\g2d28E.tmp)
Regular Output:
Error Output:
Status: -1 (expected 0)
unlink(D:\php site\gallery2\g2datazz\tmp\img28D.tmp)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\gm.exe)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\combine.exe)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\composite.exe)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\composite.exe)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\gm.exe)
tempnam(D:\php site\gallery2\g2datazz\tmp\, imgk_)
Executing: cmd /c " "c:\Program Files\ImageMagick-6.2.9-Q16\composite.exe"
"-geometry" "+0+0" "D:\php
site\gallery2\modules\imagemagick\data\test.jpg" "D:\php
site\gallery2\modules\imagemagick\data\test.gif" "D:\php
site\gallery2\g2datazz\tmp\img28F.tmp" 2> "D:\php
site\gallery2\g2datazz\tmp\g2d290.tmp" "
getParameter exec.expectedStatus for core plugin
file_exists(D:\php site\gallery2\g2datazz\tmp\g2d290.tmp)
filesize(D:\php site\gallery2\g2datazz\tmp\g2d290.tmp)
unlink(D:\php site\gallery2\g2datazz\tmp\g2d290.tmp)
Regular Output:
Error Output:
Status: -1 (expected 0)
unlink(D:\php site\gallery2\g2datazz\tmp\img28F.tmp)
chdir(D:\php site\gallery2)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2006-09-28 21:01
 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Thu, 2006-09-28 21:41

Thanks for the response!
inserted my computer name in the 2 places and it gave me this result:

Quote:
No mapping between account names and security IDs was done.

No difference.. looks like it didnt work.

Edit -
I went right to cmd.exe and gave IUSR_servername full permissions and it still did not work....

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Thu, 2006-09-28 22:15

Still working on this. I saw another person gave permissions right to cmd.exe and it worked. Is IUSR_machine name the right one to grant permissions to?

In this command:
C:\> cacls %COMSPEC% /E /G %COMPUTERNAME%\IUSR_%COMPUTERNAME%:R

I know to change COMPUTERNAME but am I supposed to change COMSPEC ?

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Thu, 2006-09-28 22:48

Well I tried this command instead:

Quote:
C:\> cacls %COMSPEC% /E /G IUSR_COMPUTERNAME:R

And it gave me this output:

Quote:
processed file: C:\WINNT\system32\CMD.EXE

Then I restarted IIS and SQL but still get the same errors.

 
robbiekb
robbiekb's picture

Joined: 2006-09-28
Posts: 24
Posted: Thu, 2006-09-28 22:49

I have exactly the same problem :)

IUSR_computername is not neccesarily the correct user account. Now I cn't get it working either so its a case of the blind leading the blind but I believe that you're looking to give permissions to the same user account that you use to give anonymous access to the specific website.

In my case , my website had a completely different user account set to provide the anonymouse access. I granted permissions to that account to RWX on cmd.exe and that didn't work either.

pretty frustrating stuff as this prevents any of the external binaries being configured correctly and I need to get ffmpeg working :)

 
robbiekb
robbiekb's picture

Joined: 2006-09-28
Posts: 24
Posted: Thu, 2006-09-28 22:51

Incidentally , to get thumbs working I went ahead and installed gd by uncommenting that particular php extension in my php.ini.

then after a reboot i activated gd in gallery and heh presto Thumbs work for certain image types

Doesn't help me though coz i need to make video work :)

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Thu, 2006-09-28 22:55

Yes its frustrating. I had a bug in MySql install that took me 3 days to resolve. I finally found the fix from extensive searches in Google.... it took a while though. Then Joomla installed without a hitch. After running the command that seemed to work above, I checked cmd.exe and it had been granted read&execute permissions for IUSR_machinename.

Makes me wanna wipe and put linux back on. I installed twice with Linux then moved to windows trying to get that MySql thing straighened out! LOL

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Thu, 2006-09-28 23:00

Could you elaborate a bit on what you did for:

uncommenting that particular php extension in my php.ini.
Where is php.ini? and what extension? :O)

 
robbiekb
robbiekb's picture

Joined: 2006-09-28
Posts: 24
Posted: Thu, 2006-09-28 23:01

Well thanks to your previous post i actually managed to get the cmd line to apply R permissions to certain users. .hmm however IUSR_machinename doesn't exist on my box as much as i can see ...

have you figured out a command that you can run that lets you see what Username IIS is running as ? that'd go a long way to solving these problems i reckon.

I wish i was running Linux for this install , it'd be way easier. I have to solve this problem even though i have gd installed and working for graphical thumbs coz I need to utilise ffmpeg.

oh well

 
robbiekb
robbiekb's picture

Joined: 2006-09-28
Posts: 24
Posted: Thu, 2006-09-28 23:06

Sure thing !

k so do a search on your box for php.ini

There might be multiple versions (that one caught me out) so we need to make sure you have the right one.

towards the bottom of the php.ini file.

do a search in the file for "gd"

the relevant bit of text looks like this: simply remove the ";" from the front of the windows extension "extension=php_gd2.dll"

you'll need to reboot to get php to reload itself and then, go into gallery and "activate gd"

;Windows Extensions
;Note that ODBC support is built in, so no dll is needed for it.
;

;extension=php_mbstring.dll
;extension=php_bz2.dll
;extension=php_cpdf.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_dbx.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
extension=php_mysql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_w32api.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_yaz.dll
;extension=php_zip.dll

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Thu, 2006-09-28 23:07

When I say IUSR_machinename... machinename is the name of your server. Mine is named Bombertwo. So its IUSR_Bombertwo

Sorry if you knew that already.

No but I was just thinking about searching for IIS names...
I dont need video but would like to know how you did gd if you have a minute.

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Thu, 2006-09-28 23:11

ive got 2 php.ini's
one in c:\php\backup
and one in c:\winnt

they both look the same

 
robbiekb
robbiekb's picture

Joined: 2006-09-28
Posts: 24
Posted: Thu, 2006-09-28 23:15

So the smart money says its the one in c:\winnt

go ahead and uncomment the line referencing gd2 and save and once you restart you will be good to go.
then log into gallery2 admin, goto modules and activate the graphics toolkit

I went ahead and tried IUSER_mycomputernamegoeshere and got the "no mapping between account names".... error

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Thu, 2006-09-28 23:19

Did you use this command?

Quote:
C:\> cacls %COMSPEC% /E /G IUSR_COMPUTERNAME:R

I uncommented both files actually and rebooted
Then installed gd.
it tells me:

Quote:
You don't seem to have the GD library available on this PHP installation.

That means compiling PHP or something I think.......

 
robbiekb
robbiekb's picture

Joined: 2006-09-28
Posts: 24
Posted: Thu, 2006-09-28 23:46

aha...

i noticed one difference between our configs. i installed php 5 which seems to come bundled with gd, all i had to do was uncomment that one line in php.ini and i was ready to rock.

i'm also running IIS 6 on windows server 2003 but that shouldnt affect our PHP install

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Fri, 2006-09-29 00:12

Yea not sure how that happened.... If I download 5.16 can I just install over the top?

 
robbiekb
robbiekb's picture

Joined: 2006-09-28
Posts: 24
Posted: Fri, 2006-09-29 00:24

So you might end up with a similar situation to the one i had with confused php.ini files but the newer version of php was so muc heasier to ultimately use and was worth the initial pain of uninstalling php reinstalling etc

don't even get me going about the number of times that mysql was reinstalled :)

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Fri, 2006-09-29 00:39

Ahhh so I need to uninstall first. The php site didn't mention that. Well that sounds like a project for tomorrow I think.....
Did you have the log in troubles with MySql?

 
robbiekb
robbiekb's picture

Joined: 2006-09-28
Posts: 24
Posted: Fri, 2006-09-29 00:43

tell me about it :)

rather than fool around with the permissions anymore tonight i went ahead with the Joomla/Gallery2 integration so i didnt feel liek today was a total bust..

you may not need to uninstall php at all. The problem that i had was a plethora of php.ini files and it ended up becoming an issue as to which file was actually being read in by IIS

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Fri, 2006-09-29 01:15

Well good luck with that... touch base with you tomorrow maybe. Later!!

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Fri, 2006-09-29 10:16

On the php site it tells me:

Quote:
Note: Since PHP 4.3 there is a bundled version of the GD lib.

so it seems like GD should work... can someone tell me why that isnt working?

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Fri, 2006-09-29 18:35

Well, I uninstalled PHP 4.4.4 and installed the latest 5.1.6. After some fiddling and configuring I got it all working again, and GD works now. ImageMagik still wont work right but at least the 'fork' trouble is gone. If I click save it says :

Quote:
The path you entered doesn't contain valid ImageMagick binaries. Use the 'test' button to check where the error is.

But I am definately putting in the correct path.

Here is the output of debug now... if someone could give me a clue where to look......

Quote:
is_dir(c:\Program Files\ImageMagick-6.2.9-Q16\)
Loading plugin imagemagick
imagemagick plugin successfully instantiated
Check the version of the imagemagick plugin
The version of the imagemagick plugin is ok
getcwd()
chdir(D:\php site\gallery2\g2datazz\tmp\)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\gm.exe)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\identify.exe)
Executing: cmd /c " "c:\Program Files\ImageMagick-6.2.9-Q16\identify.exe"
"D:\php site\gallery2\modules\imagemagick\data\test.gif" 2> "D:\php
site\gallery2\g2datazz\tmp\g2d40.tmp" "
getParameter exec.expectedStatus for core plugin
file_exists(D:\php site\gallery2\g2datazz\tmp\g2d40.tmp)
filesize(D:\php site\gallery2\g2datazz\tmp\g2d40.tmp)
unlink(D:\php site\gallery2\g2datazz\tmp\g2d40.tmp)
Regular Output:
Error Output:
Status: -1 (expected 0)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\gm.exe)
tempnam(D:\php site\gallery2\g2datazz\tmp\, imgk_)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\convert.exe)
Executing: cmd /c " "c:\Program Files\ImageMagick-6.2.9-Q16\convert.exe"
"-size" "200x200" "-geometry" "200x200" "D:\php
site\gallery2\modules\imagemagick\data\test.gif" "D:\php
site\gallery2\g2datazz\tmp\img41.tmp" 2> "D:\php
site\gallery2\g2datazz\tmp\g2d42.tmp" "
getParameter exec.expectedStatus for core plugin
file_exists(D:\php site\gallery2\g2datazz\tmp\g2d42.tmp)
filesize(D:\php site\gallery2\g2datazz\tmp\g2d42.tmp)
unlink(D:\php site\gallery2\g2datazz\tmp\g2d42.tmp)
Regular Output:
Error Output:
Status: -1 (expected 0)
unlink(D:\php site\gallery2\g2datazz\tmp\img41.tmp)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\gm.exe)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\combine.exe)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\composite.exe)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\composite.exe)
file_exists(c:\Program Files\ImageMagick-6.2.9-Q16\gm.exe)
tempnam(D:\php site\gallery2\g2datazz\tmp\, imgk_)
Executing: cmd /c " "c:\Program Files\ImageMagick-6.2.9-Q16\composite.exe"
"-geometry" "+0+0" "D:\php
site\gallery2\modules\imagemagick\data\test.jpg" "D:\php
site\gallery2\modules\imagemagick\data\test.gif" "D:\php
site\gallery2\g2datazz\tmp\img43.tmp" 2> "D:\php
site\gallery2\g2datazz\tmp\g2d44.tmp" "
getParameter exec.expectedStatus for core plugin
file_exists(D:\php site\gallery2\g2datazz\tmp\g2d44.tmp)
filesize(D:\php site\gallery2\g2datazz\tmp\g2d44.tmp)
unlink(D:\php site\gallery2\g2datazz\tmp\g2d44.tmp)
Regular Output:
Error Output:
Status: -1 (expected 0)
unlink(D:\php site\gallery2\g2datazz\tmp\img43.tmp)
chdir(D:\php site\gallery2)

 
robbiekb
robbiekb's picture

Joined: 2006-09-28
Posts: 24
Posted: Fri, 2006-09-29 19:21

Isn't that bizarre how sometimes you have to go backwards and reinstall somethign to go forwards and make it work ?

So last night i did finally get ffmepg AND imagegallery working correctly. Turns out that i hadnt granted permissions to IIS_WPG go figure !

I finally found this thread
http://gallery.menalto.com/node/52701

the relevant part was this:

Quote:
You need to give some privis to the directory:
IIS_WPG read/exec
IWAM_MACHINENAME read/exec
IUSR_MACHINENAME read/exec
NETWORK SERVICE read/exec

Also C:\windows\system32\cmd.exe
IIS_WPG read/exec
IWAM_MACHINENAME read/exec
IUSR_MACHINENAME read/exec (debated to be a security issue)

ImageMagick and Ffmpeg need access to cmd.exe

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2006-09-29 19:49
 
robbiekb
robbiekb's picture

Joined: 2006-09-28
Posts: 24
Posted: Fri, 2006-09-29 19:52

Will do :)

I'll add it once I figure out why ffmpeg thumbnails aren't working :)

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Sat, 2006-09-30 01:08
robbiekb wrote:
Isn't that bizarre how sometimes you have to go backwards and reinstall somethign to go forwards and make it work ?

Yes it sure is!

At least I got thumbs working. I think ImageMagik would give rotate and resize though which would be a good thing to have for users of the site.

I went though that post you linked to and I have granted permissions to just about everything I can think of. There is no IIS_WPG on mine though but i'm using 2000 server. That must be the difference?

I just had a thought though.... ImageMajik is installed in c:\Program Files

I wonder if having a space in the path is killing it? My Gallery2 is installed on D: drive too so tomorrow I will try installing IM on D: and see if that helps.

Glad you got yours going!!

 
robbiekb
robbiekb's picture

Joined: 2006-09-28
Posts: 24
Posted: Sat, 2006-09-30 01:28

absolutely that will cause a problem, you want to put the imagemagick directory off of the root if you can in a folder with no spaces.

I managed to get imagemagic working properly. ffmpeg works 60% (still no video thumbs)
my big challenge now is getting activation mail to work. theres another fun windows thread :)

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Sat, 2006-09-30 12:31

I uninstalled and installed in d:/imagemagic and that did no good. Then I removed that and tried the static version and that doesnt work either. I give up.

My budget won't allow server 2003 so I guess i'm out of luck unless I go back to nix.

 
Renkött

Joined: 2006-09-27
Posts: 3
Posted: Sat, 2006-09-30 19:13

I have not read all of the posts, but test to set the security options direct on cmd.exe (read & execute for iusr_%computername%)

It helped me :)

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Sat, 2006-09-30 19:57
Renkött wrote:
I have not read all of the posts, but test to set the security options direct on cmd.exe (read & execute for iusr_%computername%)

It helped me :)

Thanks, but I tried giving full permissions to everyone on the list for cmd.exe to no avail.

 
robbiekb
robbiekb's picture

Joined: 2006-09-28
Posts: 24
Posted: Sat, 2006-09-30 23:42

sorry i just back online today (late night last night reconfiguring the email smtp server so that joomla can send mails)

to take the emotion and frustration out of this problem (i had my share of it), there are two issues confronting you.

Firstly, getting the correct permissions to all of the files, secondly getting the path inputted correctly (joomla and gallery2 are not perfect, although awesome apps)

my path to imagemagick is as follows.

c:/\imagemagick\

my path to ffmpeg is c:/ffmpeg\ffmpeg.exe

weird but for ffmpeg i had to specify the exe or it was failing

i also did something naughty and copied cmd.exe locally into the imagemagick and ffmepg directories to solve whatever permissions problem i had remaining

I'm still not totally out of the woods as ffmepg is not creating the thumbnails for the video so i figure that wherever it tries to do that , one of the apps is still having permissions issues but i've made enough progress know to start to see what problem solving methodologies need to be applied to get this stuff working on windows.

 
robbiekb
robbiekb's picture

Joined: 2006-09-28
Posts: 24
Posted: Sat, 2006-09-30 23:44

i just noticed something... with all the frustration going on, you might have also misnamed a directory or somethgin so remember to double check that..

if you want me to look at your configuraiton for you, i'd be happy to add a second pair of eyes now that ive gone through the same trouble to get my own setup running.

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Sun, 2006-10-01 02:00

Wow, thanks for that! I do appreciate any and all help for sure! I have double checked everything to the point that I had to get away from it. Maybe in a few days I will re-visit. Thumbs are working fine with GD so the rest can wait.

Actually since I typed that last post I've been working on send mail in Joomla too. New registry's work, lost password works, but the contact form does not.
If you want to take a peek.... (different user name there)
http://forum.joomla.org/index.php/topic,99779.0.html

 
robbiekb
robbiekb's picture

Joined: 2006-09-28
Posts: 24
Posted: Sun, 2006-10-01 02:04

hmmm are you using smtp or the php mail function ?

You've made more progress than me, because i use an exchange server for mail and that server is physically remote form the webserver I ended up having to set up a new email server just for joomla last night, but its finally all working

i'll go check out your other post and give me a shout if I can help at all

 
jrjr

Joined: 2006-09-28
Posts: 26
Posted: Sun, 2006-10-01 14:05

I got all the mail working now. My trouble was a simple configuration error in the site. I probably would have stumbled on that page sooner or later but I never saw anything about that written before. See the post on the Joomla forum. Oh well, live and learn. I run my servers off of my home cable provider and they will not allow me to run an smtp server for security and spam's sake which is understandable. Thats why I configure my mail to send through their server. I can run a pop though and that works just fine.

You should be able to hit your exchange server from anywhere though...at least you found a solution.