Click to See Complete Forum and Search --> : PHP as CGI


Anon
06-07-2001, 07:52 AM
Where the hell can I find instructions on how to do this? I've actually have PHP compiled already (I'm on IRIX, the regular build didn't work, so I'm using an SGI-precompiled thing). It's halfway set up. I have the PHP binary and all that, but how do I set up Apache to use PHP to handle the scripts?

I have an AddHandler set to handle .php as a cgi-script. However, I'm currently get "No input file specified". The test script I'm using is:

#!/usr/freeware/bin/php

dsfadsf

<?php echo "test" ?>

This works fine when I run it through the commandline, but no luck from the browser.

Anon
06-07-2001, 11:44 AM
Nevermind. Got it fixed.

Anon
06-12-2001, 02:54 PM
Hola!!
Lo que tienes que hacer es que cuando ejecutes tu CGI en Línea de commando (Shell), debes de indicar quién lo va a ejecutar, es decir, si tiene el php (ejecutable) en /opt/php4/php debes de poner la siguiente línea para que corra tu CGI:
<shell> /opt/php4/php file.cgi

OK