On Mon, 21 Oct 2002 13:44:59 +0200, [EMAIL PROTECTED] (Andreas Pflug) wrote:
>I am quite new to perl and I am starting with a big problem. >I just compiled Perl 5.8.0 from the source -> Works fine. >I added several module -> Works fine. >I added GD 2.0.1 -> Problem starts: > >If I execute this script on the shell as root, it bworks fine and >prints out height and width of the picture. > >If I try the same as normal user, I get a "Segmentation fault". >I am running SuSE Linux 7.3 with new kernel 2.4.18 The script works fine for me as a user, but I have the jpg in the same directory as the script. A guess: You probably have a permissions problem, root probably has access to 0020.jpg but a normal user dosn't. You need to be careful with upgrading GD, it is usually best to get the latest GD from boutell.com(that is the c package), then once you build the libraries, do a ldconfig, then remake your perl-GD module, so it's built against the latest libs. >#!/usr/bin/perl > >use GD; >use CGI; >my $q = CGI->new(); >print $q->header; >my $image = GD::Image->newFromJpeg("../../html/bilder/0020.jpg"); ^^^^^^^^^^^^^^^^^^ try to put that jpg in the same directory as the script, and see if it works. If it does, then change the permissions on ../../html/bilder. Maybe you need to use the full path, not a relative path (../../.....) >my ($breite, $hoehe) = $image->getBounds(); >print $breite." ".$hoehe; > >A little help might help me :-) >Thanks, > >Andreas > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]