in reply to Can't call PERL script on another server?

Do you have a webserver running on the second server with the script in the right place for CGI privileges?

The beauty of HTTP(S) is that things can be anywhere and it will just work. Of course, every server needs to know how to handle HTTP(S) requests ....

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested

  • Comment on Re: Can't call PERL script on another server?

Replies are listed 'Best First'.
Re^2: Can't call PERL script on another server?
by guisilva (Initiate) on Aug 18, 2004 at 15:21 UTC
    Ok, let me give u a little more info that may shed some light onto the problem.

    Like I said before, the script is called to read in values from the form, process them, and write the results to a DAT file. The script also prints out a "Thank you for completing the survey" message to the browser. Now, when I click on the SUBMIT button of the form, I get the "thank you" message, which means that the script was successfully accessed on the other server.

    However, the DAT file which is supposed to hold the form's processed data is not written to. The strange thing is that the virtual directory that points to the cgi-bin (with the PERL script and the DAT file) has READ, WRITE and SCRIPT SOURCE ACCESS permissions, and it can also execute both scripts and executables. Everything seems to be in place and properly configured. So I'm not sure why this is happening... Thanks

      If you get the "thank you" message, then the CGI script is running. It just isn't doing what it is supposed to. You need to debug it; do all the standard debugging things. Look at error logs, check success of system calls, print out debug messages.

      The devil is in the details...are you trying to create the dat file on the external server? If so , the dat file will need to be written from the script on the external server. Have you checked the data you're passing the second script to make sure it's getting it? Write a simple script on the 2nd(external) server and simply write a file to the location that you are attempting to write to in the CGI script. If this works, then copy that algorithm into your script and see if your test file is written when you call the second script that displays "thank you". If it is, then there is something wrong with your initial file I/O used to create the DAT file. If not then you may have permissions issues related to the uid that the webserver is running under. Also, is the file being created on the external server with no content? or is it just not being created? If you are able to create the file and nothing is getting put in it... I would wager you aren't receiving the processed form data you are trying to write. I'm rambling because without any code we can only guesstimate your intentions.