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.
Thread Tools Display Modes
Old 2nd August 2009, 02:40
jamesls jamesls is offline
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

Reply With Quote
Sponsored Links
Old 2nd August 2009, 07:51
till till is offline
Super Moderator
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,651 Times in 4,461 Posts

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
Old 2nd August 2009, 08:16
jamesls jamesls is offline
Join Date: Apr 2009
Posts: 33
Thanks: 1
Thanked 0 Times in 0 Posts

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


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 17:54
Launching CGI script for home page bizman Installation/Configuration 2 19th April 2009 16:56
Autoresponder installation problem cgi script won't run MikeM Installation/Configuration 8 14th September 2007 18:52
Perl and cgi script installation linuxuser1 General 30 27th April 2006 00:09
Internal Server Error 500 cgi script mphayesuk General 6 8th February 2006 23:53

All times are GMT +2. The time now is 03:41.

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