[SOLVED] graphics library install

theredfox

Joined: 2004-11-01
Posts: 133
Posted: Sat, 2005-03-05 02:45

Can't work out the path to configure netpbm or imagemagick. Seems to be the final obstacle for a functioning G2 beta.

The install process for G1.4, which I also installed and tested, found the directories itself, and in the config file indicates that the path is

/usr/bin

I've tried this, I've tried the full pathway beginning /home/ htppd/vhosts, and I even tried the pathway to the netpbm/imagemagick directories which are in the modules section of G2 (I know: probably not the right files, but this is trial and error for me).

Any ideas?
Its quite difficult this - I've been wrestling with it for weeks, and this appears to be the final problem. Incidentally, I asked my company to upgrade GD from 1.6.2 to V2, because G2 seems to auto-detect this which would make it easier, but they say they can't upgrade.

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Sat, 2005-03-05 04:53

Gallery does NOT come with NetPBM or ImageMagik. The directories you see in the gallery installation are galleries files for using them. So you need to download IM or NetPBM and put it on your server somewhere, with proper permissions (755). Then you need to point gallery at the FULL path to the directory containing which ever you downloaded.

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Sat, 2005-03-05 10:37

Ok.
Do you have any guidance on what a full path syntax is, using unix?
I've tried severeal variations, beginning with the /home/ htppd/vhosts part that goes back to the root - more in fact, it goes back to my space on the server.
Still can't figure it out.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-03-05 10:40
Quote:
The install process for G1.4, which I also installed and tested, found the directories itself, and in the config file indicates that the path is

/usr/bin

I've tried this

was this G1.4 installation on the same server? If so and if this G1.4 still works/detects imagemagick in /usr/bin, then you should just choose /usr/bin as the path requested in the G2 module configuration. Hit Test and it should work.

If it is long ago you installed G1.4 or if it was another server anyway, then you have to ask your webhosting company if they can install imagemagick or netpbm.

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Sat, 2005-03-05 11:02

Aha!
I found some info. on a php test file for determiing the path of a directory. I've now entered that path and its still not working - in fact, i'd used this before.
This is what i get:

giftopnm
Failed
ppmtogif
Failed
jpegtopnm
Failed
pnmtojpeg
Failed
pngtopnm
Failed
pnmtopng
Failed
tifftopnm
Failed
pnmtotiff
Failed
bmptopnm
Failed
Error messages:

File does not exist

ppmtobmp
Failed
Error messages:

File does not exist

pnmcomp
Failed

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Sat, 2005-03-05 11:05
valiant wrote:
Quote:
The install process for G1.4, which I also installed and tested, found the directories itself, and in the config file indicates that the path is

/usr/bin

I've tried this

was this G1.4 installation on the same server? If so and if this G1.4 still works/detects imagemagick in /usr/bin, then you should just choose /usr/bin as the path requested in the G2 module configuration. Hit Test and it should work.

If it is long ago you installed G1.4 or if it was another server anyway, then you have to ask your webhosting company if they can install imagemagick or netpbm.

I installed G1 only about a week ago, and I've tried the /usr/bin path for G2 - doesn't work. Its the same sever though.

Also tried the path I obtained using a test.php file (see above) - doesnt work also.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-03-05 11:19

seems like you are trying to configure the netpbm module.
in your G1.4, did you use imagemagick, netpbm or both?
You should take the path for imagemagick for the G2 imagemagick module and the netpbm path for the netpbm module.

anyway, here's a script. please post the output to this forum.
upload find.php to your server and browse to it with your webbrowser.
and place find.php once in your G1 and once in your G2 folder to see if there's any difference.

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Sat, 2005-03-05 12:07

Done.
Huge amount of information there, but the beginning for both the G1 and G2 directories is the same:

- which ffmpeg ...not present
- which composite .../usr/bin/composite
- which identify .../usr/bin/identify
- which convert .../usr/bin/convert
- which giftopnm .../usr/bin/giftopnm
- which ppmtogif .../usr/bin/ppmtogif
- which jpegtopnm .../usr/bin/jpegtopnm

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-03-05 12:17

it's actually all in /usr/bin, so specifying /usr/bin in the the two G2 module configurations should work.

could you take a look at the two phpinfo files, from G1.4 and G2.
For G2, browse to your G2 installation/lib/tools&phpinfo.php
For G1.4, browse to yout G1.4 installation/setup/phpinfo.php

Right at the top, the 4th row of the phpinfo page, Server API. Is there a difference between the two phpinfo?
Same for Configuration File (php.ini) Path.
And open_basedir.

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Sat, 2005-03-05 12:28

Server API the same: Apache 2.0 Filter

Configuration path also the same: /usr/local/Zend/etc/php.ini

open_basedir also the same for both:

/home/httpd/vhosts/jameslomax.com/httpdocs:/tmp

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Sat, 2005-03-05 12:32

Dont know if this is relevant but the G1 setup check for imagemagick throws up this:

Note: Your ImageMagick directory (/usr/bin) is not in your open_basedir list

/home/httpd/vhosts/jameslomax.com/httpdocs:/tmp

The open_basedir list is specified in php.ini.
The result is, that we can't perform all of our basic checks on the files to make sure that they exist and they're executable.

BUT: the G1 install found both netpbm and imagemagick, so despite this - whatever ti means - its working OK

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-03-05 12:59

Very interesting. Maybe mindless or bharat can now resolve the issue with this information, thanks.

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Sat, 2005-03-05 13:29

Well I hope so.
Then at last I can get going.......

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-03-05 13:45

mindless, I guess we have to change some things in G2 how binaries are checked / handled when they are not in the list of openbasedirs. See ImageMagickToolkitHelper.class.

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Sat, 2005-03-05 13:55

?
Does this mean I can't use the existing G2 on my server?
Incidentally, its the beta version but I had the same problem with the final alpha.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-03-05 14:25

theredfox, just a wait a few hours or days. Eventually, this will be fixed.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-03-05 15:46

someone better file a bug so we don't lose track of this..

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-03-05 15:57
 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Sat, 2005-03-05 18:12

OK.

But is there a work-around for this, so I'm not waiting any longer?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-03-05 19:44

add the dir to your open basedir list.

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Sat, 2005-03-05 19:47

I dont understand that.
Could you explain how you do it? And if it works - great!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-03-05 19:51

i'm quite sure you cannot do that by yourself. and i'm also quite sure your webhost won't do it if you ask him to do so. none the less, you can ask him to do it.

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Sat, 2005-03-05 23:57

If it means base level server configuration that I can't do, I doubt it. They wouldn't even upgrade to GD version 2, which would have improved their service - and enabled me to use G2 without any problem.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-03-06 10:14

sidenote: upgrading GD to version 2 requires them to recompile php, a lengthy process. changing the open_basedir paths is done in 1 minute and all they have to do is restart the webserver.
we will let you know when this bug is fixed in G2. meanwhile, it seems, you can't use G2 on this server.

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Mon, 2005-03-07 17:37

I dont think they will respond to any request that involves server re-configuration, and shutting it down/restarting it.

Is there any news on this?
It seems to be a relatively minor but critical factor because if you can't get an image library going, your entire install is worthless.

Is it possible *I* can go into the G2 code and configure it so it will work?

I just want to get going. This has been like being in a labyrinth, where every path leads to a confusing dead end I don't understand - its been going on for weeks!

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Tue, 2005-03-08 17:05

I know, I know......

My frustration is not "your" fault.
But, damnit, I needed to let a little out, because this really has been a horrendous experience for me.

No offence though.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2005-03-08 20:01

I understand your frustration. We're basically using you to find bugs in our beta code, which is helpful for us but frustrating for you. Since we don't have a QA team or access to a big server farm with lots of variety, this is the best that we can do.

The imagemagick module is already equipped to deal with open_basedir restrictions, so unless there's a bug in that code, my guess is that it's not the problem. Can you put Gallery into buffered debug mode and then run the "test settings" again on ImageMagick with /usr/bin in the path? Save the HTML of that page somewhere and put a link to it here and we'll pore over it. Thanks!

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Wed, 2005-03-09 18:12

I dont understand what you mean by buffered debug mode. All I can see is 'show debug tree' in the interface, and also nothing in the install wizard with that description

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-03-09 20:53

see config.php

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Thu, 2005-03-10 00:28

Tried opening config.php and i get this - dont know if its related to this problem, or if its another problem:

Fatal error: Call to a member function on a non-object in /gallery2/config.php on line 35

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2005-03-10 00:32

um, in a text editor not your browser...

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Mon, 2005-03-14 10:21

It says this:

* Put Gallery into debug mode. Useful for tracking down problems with the
* application. Not a good idea to leave it this way, though. Possible debug
* choices are: 'buffered', 'logged', 'immediate' or false. Don't forget to
* use the quotes for any value but false!
*
* If you choose 'immediate', you'll see debugging information as soon as
* Gallery generates it. This can be useful at times, but it'll screw up some
* parts of the application flow.
*
* If you choose 'buffered', Gallery will display debug information in a table
* as part of the application. You won't necessarily get *all* the debug
* information but the application should work normally.
*
* If you choose 'logged', you must also specify:
* $gallery->setDebugLogFile('/path/to/writeable/file');
* and all debug output will get printed into that file. You'll get all the
* debug output and the application will work normally.
*
* For best debugging output use this line:
*
* $gallery->setDebug('buffered');
*
*/
$gallery->setDebug(false);

/*
* Profiling mode. You can enable profiling for different parts of G2 to get an
* idea of what's fast and slow. Right now the only options are to enable SQL
* profiling:
*
* $gallery->setProfile(array('sql'));
*
*/
$gallery->setProfile(false);

/*
* Embedded mode. You can disable direct access to main.php (standalone G2)
* by setting this this flag to true.
*/
$gallery->setConfig('mode.embed.only', false);

/*
* Allow a particular IP address to access the session (it still must know the
* session id) even though it doesn't match the address/user agent that created
* the session. Put the address of validator.w3.org ('128.30.52.13') here to allow
* validation of non-public Gallery pages from the links at the bottom of the page.
*/
$gallery->setConfig('allowSessionAccess', false);

/*
* Used by the installer to distinguish multiple sites supported by one codebase.
*/

- if there are instructions in there how to open up debug mode, I cant see them or dont understand them.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-03-14 10:33
bharat wrote:
Can you put Gallery into buffered debug mode and then run the "test settings" again on ImageMagick with /usr/bin in the path? Save the HTML of that page somewhere and put a link to it here and we'll pore over it. Thanks!

set $gallery->setDebug('immediate'); in your config.php to activate debug mode.

 
theredfox

Joined: 2004-11-01
Posts: 133
Posted: Mon, 2005-03-14 12:01

Done.

Now when I try to open the interface, it keeps going to the install wizard. Which will presumably write another config.php anyway, changing the debug command, and I'll be back where I started :-(

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-08-02 08:19

this should be fixed since some time.