PDA

View Full Version : /cgi-bin/ and shebang #!


Sscotties
08-23-2002, 08:26 PM
I read somewhere that if I wanted to use PHP as an accessed code from the cgi-bin that in order to get the shebang recognised eg

#! usr/bin/php

...- then I would need a different version of PHP to do this.

Could some kind soul give me a link so that I can get to grips with this. At the moment I'm trying to use perl, but it's like trying to learn 2 languages at once

firepages
08-24-2002, 02:54 AM
Hi its more a server configuration thing, if your (apache) server is configured to run PHP as a CGI then you should be able to just use PHP code as is...

<?php //blah;?>

although some servers will expect the shebang line for PHP thats the execption rather than the rule and normally you would only use the shebang line if you were alredy running apache as a module or doing some shell scripting or CRON work.

what exactly is it you want to do ? and what is your server set-up?