CGI Noob Question
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Re: CGI Noob Question
CGI Noob Question
02-10-2014 10:02 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Things like ;
Where to store the scripts [/public/CGI-BIN or /cgi-bin?]
How to reference the scripts
Path to Perl
Do I need a .htaccess
Etc
TIA!
Re: CGI Noob Question
02-10-2014 10:36 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: cpcnw Where to store the scripts [/public/CGI-BIN or /cgi-bin?]
Unless, you've made any changes, attempts to access /cgi-bin via a web browser will be re-written to /public/CGI-BIN. It doesn't sound like you're making use of your space so what I'd suggest you do is delete the /public/CGI-BIN directory along with the .htaccess file you should find in your root directory. This will remove the rewrite mentioned above and leave you with a clean slate where perl, cgi scripts reside under /cgi-bin and PHP files under /public.
Quote from: cpcnw How to reference the scripts
After following the above instructions a file called script.pl in /cgi-bin would be publicly accessible using http://ccgi.username.plus.com/cgi-bin/script.pl
A PHP file called script.php in the public folder would be publicly accessible using http://ccgi.username.plus.com/script.php
Quote from: cpcnw Path to Perl
I believe /usr/bin/perl will do the trick.
Quote from: cpcnw Do I need a .htaccess
Depends what you're trying to do.
There's a bit more info in the migration FAQ's here.
Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵
Re: CGI Noob Question
02-10-2014 12:40 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Done this using the CP Filemanager
> a file called script.pl in /cgi-bin would be publicly accessible using http://ccgi.username.plus.com/cgi-bin/script.pl
Mmm, not working...
---
40 Not Found
The requested URL /CGI-BIN/forum.pl was not found on this server.
---
> I believe /usr/bin/perl will do the trick.
#!/usr/bin/perl
This is what I have at top of my forum.pl and its chmod 700
Re: CGI Noob Question
02-10-2014 12:45 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: cpcnw ---
40 Not Found
The requested URL /CGI-BIN/forum.pl was not found on this server.
---
Sounds to me like you've not removed/renamed the .htaccess file in the root?
Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵
Re: CGI Noob Question
02-10-2014 12:52 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: CGI Noob Question
02-10-2014 12:59 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
and put the script files in the /public/CGI-BIN folder and then reference the script at http://ccgi.custompc.plus.com/CGI-BIN/forum.pl
I get the text content of the script...
Re: CGI Noob Question
02-10-2014 1:01 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵
Re: CGI Noob Question
02-10-2014 1:19 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
In fact I tested it by copying a .htaccess elsewhere and it was visible
Seems odd?
Anyways - thanks for looking at it!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page