Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 2nd August 2009, 01:40
jamesls jamesls is offline
Member
 
Join Date: Apr 2009
Posts: 33
Thanks: 1
Thanked 0 Times in 0 Posts
Default accessing CGI-BIN / odd script behaviour

I have a script that works fine when I run it on my debug machine but when I upload it to my ispconfig machine I have problems accessing it.

I'm running ubuntu 8.10 & ispconfig 3

The script is a PHP script, and is in my cgi-bin folder.
The script will run ok if its run at the start of the web page.
if I place the script in a form action it can't find the script.

The web layout is the default ispconfig, I use 'include "../cgi-bin/script.php" '
at the start of the page, (it sets up sessions) it'll work fine with no problems.

I place the same ../cgi-bin/script.php in a forms action and it gives me an error - page not found.

I've commented out everything within the script apart from a page redirect
header (Location: ../page02.php )

if I put the script in the same folder as the web pages (web) it all works fine.
I've tried various paths and the ../cgi-bin/script.php works at the top of a page but not if I put it in a form action.

It will work in the form action if I place it in the same folder as the web pages and change the form action /script.php.

Am I address the cgi-bin folder correctly?
The read, write, exeute for the cgi-bin folder & web folder appear to be the same.

I'm puzzled as to why it won't work when I call the script from a form if the script is in the cgi-bin folder.

Any help would be apreciated

james
Reply With Quote
Sponsored Links
  #2  
Old 2nd August 2009, 06:51
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,216 Times in 4,089 Posts
Default

The cgi-bin folder is for perl or shell scripts and not for PHP scripts. PHP scripts are no cgi scripts have to be in the normal web folder.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 2nd August 2009, 07:16
jamesls jamesls is offline
Member
 
Join Date: Apr 2009
Posts: 33
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Till

I wanted to put it in the cgi-bin directory so that it was not easy for people to look at.
I finaly got it to work using the path /cgi-bin/script.php.

It seems to be working ok

Is there a good reason not to place my scripts in cgi-bin.

Is there a way of putting the scripts in a folder that can not be downloaded or viewed from the internet.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
freebsd 7, samba 3, domain controller alexdimarco Suggest HOWTO 6 5th November 2010 16:54
Launching CGI script for home page bizman Installation/Configuration 2 19th April 2009 15:56
Autoresponder installation problem cgi script won't run MikeM Installation/Configuration 8 14th September 2007 17:52
Perl and cgi script installation linuxuser1 General 30 26th April 2006 23:09
Internal Server Error 500 cgi script mphayesuk General 6 8th February 2006 22:53


All times are GMT +2. The time now is 06:40.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.