Re: Cant Display the image...

[email protected] (jeevs)
Newsgroups perl.beginners.cgi
Organization http://groups.google.com
Message-ID <[email protected]>
Ok.. here is the update.

Earlier i was trying it on windows..
now i m using linux....
but still the same problem

1) I created a directory called images under /var/www
2) gave it the permission so that i cud be able to write to it
3) i modified my code to
        ###########
  ..
...
        my      $gd = $graph->plot(\@data) or die $graph->error;
        my      $path = '/var/www/images/file.png';


        qx{rm -rf /var/www/images/file.png};

        open(IMG, '>/var/www/images/file.png') or die $!;
        binmode IMG;
        print IMG $gd->png;

        qx{chmod -R 777 /var/www/images/file.png};

        print '<body>';
        print "Its Done";
        print qq(<img src='/var/www/images/file.png'>);
        print '</body>';

################

 the file gets created if i view the file externally in some viewer it
looks good.. but some how it is not displayed thru code
and yes I think u ppl can suggest me the solution from the server
error log which says

    " File does not exist: /var/www/html/var, referer:
http://mymachine/cgi-bin/image.cgi"

why is it looking for the var file dat too in different folder . Is
there somthing i am totally unaware of ????
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.