From: James B. <bru...@wa...> - 2006-06-11 21:51:36
|
Thanks Matt, Redirecting stderr to stdout was something I should have thought to try. Print_r seems like a usefull function as well. It turned out that I didn't have enough permissions on the /usr/local/j2sdk1.4.2 directory. Even thought the permissions on the subsequent dirs were fine... I think I'm all up and running now! Regards, James Brunskill Library Systems Consultant The University of Waikato Ph: +64 7 838 4323 > -----Original Message----- > From: fez...@li... [mailto:fez-users- > bo...@li...] On Behalf Of Matthew Smith > Sent: Friday, 9 June 2006 4:59 p.m. > To: fez...@li... > Subject: Re: [Fez-users] Error when creating a record >=20 > James, >=20 > Try doing print_r($result) after the exec so that you see all the > lines of output if any. Also put a ' 2>&1 ' on the end of the command > line being passed into exec so that the shell pipes any error messages > into the results. >=20 > Matt >=20 > On 6/9/06, James Brunskill <bru...@wa...> wrote: > > Hi Matt, > > > > Since jhove is already a wrapper script I tried running this... > > > > I just tried running this php script: > > <? > > > > exec("/usr/local/j2sdk1.4.2/bin/java -classpath > > /usr/local/jhove/bin/JhoveApp.jar Jhove -c > > /usr/local/jhove/conf/jhove.conf -h xml -o /tmp/presmd_shell.xml > > /tmp/shell.txt", $result); > > > > echo $result[1]; > > > > ?> > > > > It doesn't use any shell variables and no wrapper script so it should > > work from with in the webserver (it doesn't). > > > > Permissions on all the files involved: > > > > brunskil@liby-cog3:/tmp$ ls -l /usr/local/j2sdk1.4.2/bin/java > > -rwxr-xr-x 1 brunskil brunskil 25056 2003-12-17 17:47 > > /usr/local/j2sdk1.4.2/bin/java > > > > brunskil@liby-cog3:/tmp$ ls -l /usr/local/jhove/bin/JhoveApp.jar > > -rwxr-xr-x 1 3242 staff 697984 2005-05-27 05:31 > > /usr/local/jhove/bin/JhoveApp.jar > > > > > > brunskil@liby-cog3:/tmp$ ls -l /usr/local/jhove/conf/jhove.conf > > -rwxrwxr-x 1 root root 1416 2006-05-09 14:13 > > /usr/local/jhove/conf/jhove.conf > > > > brunskil@liby-cog3:/tmp$ ls -l /tmp/shell.txt > > -rw-r--r-- 1 www-data www-data 0 2006-06-09 11:16 /tmp/shell.txt > > > > I tried playing around with the php script, and I can get it to run a > > bash script that writes to /tmp/. I can directly write to /tmp/ etc. > > This is turning out to be a hairy problem :) > > > > The original jhove script is also executable by everyone: > > > > brunskil@liby-cog3:/tmp$ ls -l /usr/local/jhove/jhove > > -rwxr-xr-x 1 root root 2124 2006-06-09 11:15 /usr/local/jhove/jhove > > > > Regards, > > > > James Brunskill > > Library Systems Consultant > > The University of Waikato > > Ph: +64 7 838 4323 > > > > > -----Original Message----- > > > From: fez...@li... [mailto:fez-users- > > > bo...@li...] On Behalf Of Matthew Smith > > > Sent: Friday, 9 June 2006 11:32 a.m. > > > To: fez...@li... > > > Subject: Re: [Fez-users] Error when creating a record > > > > > > James, > > > > > > The webserver is not able to run jhove for some reason. I guess you > > > should check the permissions for execution of jhove and make sure the > > > webserver has permission to read whatever jhove needs to get to (i.e. > > > /usr/local/jhove). Does jhove assume that certain things are in the > > > path like java? Perhaps the webserver doesn't have some environment > > > variables set when it is running (to get around that you'd need to > > > write a wrapper script called jhove in a different directory that sets > > > the environment variables and calls the real jhove - then tell Fez to > > > use your wrapper jhove). > > > > > > Matt > > > > > > On 6/9/06, James Brunskill <bru...@wa...> wrote: > > > > Hi Matt, > > > > > > > > I have attached the error message when ingesting a jpeg image. > > > > Imagemagick seems to run ok, because a thumbnail is generated. The > > error > > > > still doesn't contain a dsLocation, so I suspect it is the same > > issue. > > > > > > > > Running /webservices/wfb.presmd.php?file=3Dtest.pdf doesn't seem to do > > > > anything at all. I just get a blank page and sess file created in > > /tmp > > > > The command it runs is: > > > > /usr/local/jhove/jhove -h xml -o /tmp/presmd_test.xml /tmp//test.pdf > > > > > > > > There looks like ther is an extra / in /tmp/ however this works fine > > > > from the commandline... > > > > > > > > I tried adjusting this line in config.inc.php > > > > @define("APP_TEMP_DIR", "/tmp/"); > > > > To read > > > > @define("APP_TEMP_DIR", "/tmp"); > > > > > > > > This caused the command in premd.php to change to: > > > > /usr/local/jhove/jhove -h xml -o /tmppresmd_test.xml /tmp/test.pdf > > > > > > > > Which is clearly wrong... > > > > > > > > So I tried changing wfb.presmd.php to read: > > > > > > > > $APP_JHOVE_CMD .=3D ' '.$file_dir.$file; > > > > > > > > And changed config.inc.php back, so the command is now run with out > > the > > > > extra slash, but it doesn't seem to have helped... > > > > > > > > Regards, > > > > > > > > James Brunskill > > > > Library Systems Consultant > > > > The University of Waikato > > > > Ph: +64 7 838 4323 > > > > > -----Original Message----- > > > > > From: fez...@li... [mailto:fez-users- > > > > > bo...@li...] On Behalf Of Matthew Smith > > > > > Sent: Thursday, 8 June 2006 7:05 p.m. > > > > > To: fez...@li... > > > > > Subject: Re: [Fez-users] Error when creating a record > > > > > > > > > > Hi James, > > > > > > > > > > You could try ingesting a jpeg image and see if you get the same > > > > > errors for all of the thumbnail datastreams that fez tries to > > > > > create... > > > > > > > > > > I think it's more likely that jhove is not running because there > > > > > should have been some files called presmd_<blah>.xml appearing in > > the > > > > > tmp directory during the ingest. It should try and run jhove on > > any > > > > > files attached to the record. > > > > > > > > > > Here's a test, put a test.pdf file in /tmp. Then hit < http://fez > > > > > base url/webservices/wfb.presmd.php?file=3Dtest.pdf > and see what > > > > > errors you get. > > > > > > > > > > You can try putting a > > > > > echo $command; > > > > > just before the exec($command); line at the end. > > > > > > > > > > Matt > > > > > > > > > > On 6/8/06, James Brunskill <bru...@wa...> wrote: > > > > > > Hi Matthew, > > > > > > > > > > > > I tried uploading a document while running ls -l in the /tmp/ > > > > directory > > > > > > (default tmp dir in fez). > > > > > > > > > > > > I noticed this file show up: > > > > > > -rw------- 1 www-data www-data 5169 2006-06-08 14:34 phpCFTR0m > > > > > > Then this one: > > > > > > -rw------- 1 www-data www-data 0 2006-06-08 14:34 > > > > > > sess_be5cf24c2328f738d5b6 ef3655241411 > > > > > > > > > > > > Then the first file disappeared. > > > > > > The sess_be5... file doesn't seem to contain anything. > > > > > > > > > > > > I'm not sure if that means anything to you? > > > > > > > > > > > > My config.inc.php file contains the following (everything is the > > > > default > > > > > > I think) > > > > > > > > > > > > @define("APP_TEMP_DIR", "/tmp/"); > > > > > > @define("APP_DELETE_CMD", '/bin/rm -f '); > > > > > > @define("APP_DELETE_DIR", APP_TEMP_DIR); //Windows needs > > the > > > > > > delete path to be forward slashes, Linux does not > > > > > > @define("APP_CONVERT_CMD", "/usr/bin/convert"); // To > > > > convert > > > > > > image (part of ImageMagick) > > > > > > @define("APP_COMPOSITE_CMD", "/usr/bin/composite"); // > > To > > > > > > watermark image (part of ImageMagick) > > > > > > //@define("APP_CONVERT_CMD", "/usr/X11R6/bin/convert"); > > // > > > > > > convert could be in here for some Linux distros > > > > > > @define("APP_IDENTIFY_CMD", "/usr/bin/identify"); // To > > get > > > > > > image information (part of ImageMagick) > > > > > > @define("APP_JHOVE_DIR", "/usr/local/jhove"); > > > > > > @define("APP_JHOVE_TEMP_DIR", APP_TEMP_DIR); > > > > > > ini_set("include_path", ".:" . APP_PEAR_PATH); > > > > > > > > > > > > It looks like the webserver is writing to the /tmp/ directory so > > I > > > > don't > > > > > > think that it is a permissions issue there. > > > > > > > > > > > > Is there any way I can test the fedora upload webservice? > > > > > > > > > > > > Regards, > > > > > > > > > > > > James Brunskill > > > > > > Library Systems Consultant > > > > > > The University of Waikato > > > > > > Ph: +64 7 838 4323 > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: fez...@li... > > [mailto:fez-users- > > > > > > > bo...@li...] On Behalf Of Matthew Smith > > > > > > > Sent: Wednesday, 7 June 2006 11:00 a.m. > > > > > > > To: fez...@li... > > > > > > > Subject: Re: [Fez-users] Error when creating a record > > > > > > > > > > > > > > Hi James, > > > > > > > > > > > > > > Check the APP_TEMP_PATH settings in config.inc.php as per > > luis' > > > > email > > > > > > > - it may be a path problem. > > > > > > > > > > > > > > > > > > > > > if ((stristr(PHP_OS, 'win')) && (!stristr(PHP_OS, 'darwin'))) > > { // > > > > > > > Windows Server > > > > > > > @define("APP_TEMP_DIR", 'c:/temp/'); > > > > > > > @define("APP_DELETE_CMD", 'del '); > > > > > > > @define("APP_DELETE_DIR", 'c:\\temp\\'); //Windows > > needs > > > > the > > > > > > > delete path to be forward slashes > > > > > > > @define("APP_CONVERT_CMD", "c:/imagemagick/convert"); > > // > > > > To > > > > > > > convert image (part of ImageMagick) > > > > > > > @define("APP_COMPOSITE_CMD", > > "c:/imagemagick/composite"); > > > > // > > > > > > > To watermark image (part of ImageMagick) > > > > > > > @define("APP_IDENTIFY_CMD", "c:/imagemagick/identify"); > > // > > > > To > > > > > > > get image information (part of ImageMagick) > > > > > > > @define("APP_JHOVE_DIR", "c:/jhove"); > > > > > > > @define("APP_JHOVE_TEMP_DIR", 'c:\temp/'); // jhove > > needs > > > > > > > windows style dir names when run on a win server > > > > > > > ini_set("include_path", ".;" . APP_PEAR_PATH); > > > > > > > > > > > > > > Matt > > > > > > > > > > > > > > On 6/7/06, James Brunskill <bru...@wa...> wrote: > > > > > > > > I have made the changes to /usr/local/jhove/jhove but I > > don't > > > > see > > > > > > any > > > > > > > > change in fez's behaviour. I've tried restarting Apache to > > see > > > > if > > > > > > that > > > > > > > > helps, but it doesn't seem to. > > > > > > > > > > > > > > > > Any other Ideas? > > > > > > > > > > > > > > > > Jhove seems to work on the commandline, at least as far as I > > can > > > > > > tell. I > > > > > > > > haven't had to use it before :) > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > > > > > > > James Brunskill > > > > > > > > Library Systems Consultant > > > > > > > > The University of Waikato > > > > > > > > Ph: +64 7 838 4323 > > > > > > > > > -----Original Message----- > > > > > > > > > From: fez...@li... > > > > [mailto:fez-users- > > > > > > > > > bo...@li...] On Behalf Of Christiaan > > > > Kortekaas > > > > > > > > > Sent: Wednesday, 7 June 2006 3:15 a.m. > > > > > > > > > To: fez...@li... > > > > > > > > > Subject: Re: [Fez-users] Error when creating a record > > > > > > > > > > > > > > > > > > Hi All, > > > > > > > > > > > > > > > > > > Yes Luis is correct (thanks Luis!). This problem is to do > > the > > > > > > JHOVE > > > > > > > > > preservation metadata command line > > > > > > > > > application not being configured correctly. The below > > > > jhove.bat > > > > > > > > > modification will fix the problem for windows, > > > > > > > > > while applying the same fix to 'jhove' file executable > > will > > > > fix it > > > > > > for > > > > > > > > > linux. > > > > > > > > > > > > > > > > > > This is all covered in the Fez installation instructions > > under > > > > the > > > > > > > > JHOVE > > > > > > > > > prerequisite component installation area. > > > > > > > > > > > > > > > > > > Since this is the second time this has cropped up in the > > > > mailing > > > > > > list > > > > > > > > > I'll look at an FAQ area for this sort of thing. > > > > > > > > > > > > > > > > > > Cheers, > > > > > > > > > Christiaan > > > > > > > > > > > > > > > > > > Luis Zorita wrote: > > > > > > > > > > I resend the message supressing the debugged information > > > > > > > > > > Hi all: > > > > > > > > > > I had a similar problem. When you create a record the > > > > > > presmd_XXX.xml > > > > > > > > > > datastream is created too?. Or you miss this datastream > > and > > > > the > > > > > > > > matching > > > > > > > > > > icon . > > > > > > > > > > Presmd_xxx.xml is created whrn you add an image (or > > > > configuring > > > > > > a > > > > > > > > pdf). > > > > > > > > > > The problem was solved , modifying the jhove.bat: > > > > > > > > > > > > > > > > > > > > REM Set the CLASSPATH and invoke the Java loader > > > > > > > > > > REM %JAVA% -classpath %CP% Jhove %ARGS% > > > > > > > > > > %JAVA% -classpath %CP% Jhove -c > > %JHOVE_HOME%/conf/jhove.conf > > > > > > %ARGS% > > > > > > > > > > > > > > > > > > > > I tested this in windows XP and windows 2003. > > > > > > > > > > Greetings > > > > > > > > > > Luis Zorita > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >> > > > > > > > > > >> > > > > > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > > Fez-users mailing list > > > > > > > > > > Fez...@li... > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/fez-users > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > Fez-users mailing list > > > > > > > > > Fez...@li... > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/fez-users > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > Fez-users mailing list > > > > > > > > Fez...@li... > > > > > > > > https://lists.sourceforge.net/lists/listinfo/fez-users > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > Fez-users mailing list > > > > > > > Fez...@li... > > > > > > > https://lists.sourceforge.net/lists/listinfo/fez-users > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Fez-users mailing list > > > > > > Fez...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/fez-users > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Fez-users mailing list > > > > > Fez...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/fez-users > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Fez-users mailing list > > > > Fez...@li... > > > > https://lists.sourceforge.net/lists/listinfo/fez-users > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Fez-users mailing list > > > Fez...@li... > > > https://lists.sourceforge.net/lists/listinfo/fez-users > > > > > > > > _______________________________________________ > > Fez-users mailing list > > Fez...@li... > > https://lists.sourceforge.net/lists/listinfo/fez-users > > >=20 >=20 > _______________________________________________ > Fez-users mailing list > Fez...@li... > https://lists.sourceforge.net/lists/listinfo/fez-users |