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

Because https://httpd.apache.org/docs/2.2/howto/public_html.html#cgi / Apache Tutorial: Dynamic Content with CGI and more

Copy/paste from Re: To call a .pl file when a button is pressed on a GUI created using Perl CGI (webserver) for the links below

Its simple, you need a webserver

Why? Because webpages and CGI needs a webserver, thats how it works

Its weird that so many folks manage to create a GUI using Perl CGI without understanding this

learn about the internet,Web Programming: For Beginners, to get an overall picture of how the internet works, how tcp/ip, sockets, html, ajax, all fit together....

See also Mojolicious::Lite +and jQuery +AJAX + Mojo::Template

And a copy-pasta for you:)

Also, there are checklists for that , Basic debugging checklist , brian's Guide to Solving Any Perl Problem, CGI Help Guide , Troubleshooting Perl CGI scripts

Yes, 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

brian's Guide to Solving Any Perl Problem, CGI Help Guide , Troubleshooting Perl CGI scripts

So examine your server configuration and compare to https://httpd.apache.org/docs/2.2/howto/public_html.html#cgi / Apache Tutorial: Dynamic Content with CGI

learn about the internet,Web Programming: For Beginners, to get an overall picture of how the internet works, how tcp/ip, sockets, html, ajax, all fit together.

Explicitly using Options to permit CGI execution, Apache Tutorial: Dynamic Content with CGI - Apache HTTP Server Version 2.2 : Explicitly using Options to permit CGI execution

... let the deep links from the following explain Re: Cron revisited/Re^2: Perl Module Not Working In Crontab explain, and here they are:


In reply to Re^5: CGI script to output data as CSV by Anonymous Monk
in thread CGI script to output data as CSV by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.