ashrafjp Posted January 14, 2016 Posted January 14, 2016 Hi, let`s say I uploaded a folder "sm" in the directory "/home/ashrafjp/perl", and let`s say it consists of the following two files "jcode.pl","search.cgi", as described below: /home/ashrafjp/perl/sm/jcode.plsearch.cgi well, what should the web path for these files (for front-end user) be?I tried some web paths, but they didn`t work... Also, I tried enabling CGI Wrap feature and adding a copy into "/home/ashrafjp/public_html/scgi-bin"and mounted the path to: "http://cairojpdept.heliohost.org/scgi-bin/"then, typed in normal file path, which was correct BUT with the following error: "scgiwrap: Caller must be the nobody user" 1- What`s the correct path for files in "/home/perl"?2- How can I solve mentioned error message? (cgi file permission is 755, pl file permission is 644" Note1: The path I need is to .cgi file, NOT to .pl fileNote2: First line of .pl file is "#!/usr/bin/perlml" Thanks
wolstech Posted January 15, 2016 Posted January 15, 2016 1. There isn't one. Files kept in folders that are not inside public_html are not web accessible. Move the files if they need to be web accessible. 2. SCgiwrap looks broken (google suggests its a server misconfiguration). Escalating...
Krydos Posted January 15, 2016 Posted January 15, 2016 Why does your script have to be in /home/ashrafjp/perl Why not put it somewhere like /home/ashrafjp/public_html/cgi-bin/ Then you could access it by going to http://cairojpdept.heliohost.org/cgi-bin/
ashrafjp Posted January 15, 2016 Author Posted January 15, 2016 I found instructions in CPanel setting perl modules location to "/home/ashrafjp/perl". The folder includes a perl script (jcode.pl) as well as a CGI script (search.cgi) that have to exist together in the same folder. However, I put them in "/home/ashrafjp/public_html/cgi-bin/goout" per your instruction, and it works. -SCgiwrap problem persists,it`s safer, but if it`s a complicated problem, the normal method (above) is ok. Thank you very much. If you want to test the script, to check SCgiwrap, so, please use the following URL:http://cairojpdept.h...t/sm/search.cgi If I try this one:http://cairojpdept.h...t/sm/search.cgi I`ll get the following error:"scgiwrap: Caller must be the nobody user" Thank you
ashrafjp Posted January 15, 2016 Author Posted January 15, 2016 I see the topic is marked as "solved".. but the second problem persists... however, I`ll open a new topic for it.Thanks
Krydos Posted January 15, 2016 Posted January 15, 2016 I see the topic is marked as "solved".. but the second problem persists... Sorry, the title of your post isWhat Is The Front End Web Path For Cgi Scripts?and I thought that had been answered especially since you never answered my questionWhy does your script have to be in /home/ashrafjp/perl? Well, it works on Stevie, but not on Johnny. http://krydos.heliohost.org/scgi-bin/test.py If you need this functionality immediately you could move your account to Stevie. It will probably take a recompile of Apache to make this work on Johnny too. We usually only recompile every couple months at the most, but I'll add this to Johnny's todo list. Thanks for bringing it to our attention.
ashrafjp Posted January 15, 2016 Author Posted January 15, 2016 Thanks for your reply.. and for your test script..I can wait Thank you. As for your question "Why does your script have to be in /home/ashrafjp/perl?" I replied to it before in the 1st paragraph, will copy it below:「I found instructions in CPanel setting perl modules location to "/home/ashrafjp/perl". The folder includes a perl script (jcode.pl) as well as a CGI script (search.cgi) that have to exist together in the same folder.」 The problem is solved (if I use /home/cgi-bin),but I don`t know why such instruction exist in CPanel.. may be for another server..Thank you.
Krydos Posted January 15, 2016 Posted January 15, 2016 I didn't realize that was referring to your scripts since it says modules. Generally modules are things you install and include in your scripts. One account may have some modules installed, and another may have different ones. That's what needs to be in /home/<username>/perl to include without an absolute path.
Recommended Posts