in reply to Re^3: CGI script to output data as CSV
in thread CGI script to output data as CSV

I actually did chmod 755. Hopefully that's not as bad? I'm using this to collect data from an iOS app. I'll run through the app, input some data. Then go to check if the data has been collected via "serveraddress/participant_id_data.csv" and it just redirects me to the server homepage. Does that mean the script is not running at all? On my app side it says data has been successfully saved. I'm a little perplexed as to what might be wrong. I'm still a bit of a newbie to all this...

Replies are listed 'Best First'.
Re^5: CGI script to output data as CSV
by Anonymous Monk on Jul 09, 2015 at 08:13 UTC

    I actually did chmod 755. Hopefully that's not as bad? I'm using this to collect data from an iOS app. I'll run through the app, input some data. Then go to check if the data has been collected via "serveraddress/participant_id_data.csv" and it just redirects me to the server homepage. Does that mean the script is not running at all? On my app side it says data has been successfully saved. I'm a little perplexed as to what might be wrong. I'm still a bit of a newbie to all this...

    Why would visiting "serveraddress/participant_id_data.csv" run a cgi script?

    For example when you visit perlmonks, its index.pl that runs. This link calls index.pl, as does this one, because thats how perlmonks apache is configured.

    For a server to serve participant_id_data.csv it has to be configured to do so

    For "serveraddress/participant_id_data.csv" to run a cgi script it has to be configured to do so.

    If your server simply redirects, that probably means it doesn't recognize participant_id_data.csv as a valid resource, it has no idea you want it to run a cgi script or serve some file

    Also, why aren't you checking your server logs? They answer everything

    FYI

    Every perl/CGI problem can be solved if you work through these checklists, when you find a problem on the list, use a solution from the list, when you find a problem not on the list (rare), post the error message and problem description here

    CGI Help Guide, Troubleshooting Perl CGI scripts, CGI to mod_perl Porting. mod_perl Coding guidelines.. cgi101 brian's Guide to Solving Any Perl Problem, CGI Help Guide , Troubleshooting Perl CGI scripts ... More generic advice :) On debugging, verify everything, talk to teddybear ... checklists and more