LinuxNoobPhilip
Technical User
So what I have done is made a cool .pl script which opens the database takes out some data, uses GD:graph to make a nice line graph and it creates the graph, the line of interest is
open(IMG, ">graph/the_image.$format") or die $1;
this line works when I run the script.
HERE IS WHERE IT BREAKS DOWN.
I took my script and put it into my cgi-bin folder (apache server) and did a 'chmod a+x file.pl'
On my index.php I made a form here is a snipet:
<form action="/cgi-bin/getgraph.pl" method="POST" target = "_top">
Now here is what happens, when I test this through my webserver it links to the perl script fine. My POST extraction works fine, it starts printing out my outputs. But when it gets to:
open(IMG, ">graph/the_image.$format") or die $1;
IT FAILS
my theory: I think that the server doesn't have permission to open files.
p.s. Also I cannot load a picture in that folder into my index.php either.
Help would be much appreciated
open(IMG, ">graph/the_image.$format") or die $1;
this line works when I run the script.
HERE IS WHERE IT BREAKS DOWN.
I took my script and put it into my cgi-bin folder (apache server) and did a 'chmod a+x file.pl'
On my index.php I made a form here is a snipet:
<form action="/cgi-bin/getgraph.pl" method="POST" target = "_top">
Now here is what happens, when I test this through my webserver it links to the perl script fine. My POST extraction works fine, it starts printing out my outputs. But when it gets to:
open(IMG, ">graph/the_image.$format") or die $1;
IT FAILS
my theory: I think that the server doesn't have permission to open files.
p.s. Also I cannot load a picture in that folder into my index.php either.
Help would be much appreciated