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
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 executionIts 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.
... 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
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |