Web Hosting Talk







View Full Version : I Want to include a php file in my cgi script


hvdm_20
03-29-2001, 12:47 PM
I Want to include a php file in my cgi script

But a friend is telling my that i must acces php in telnet

just type php

but its saying its not found

its my own server i did try the path where php is installed nowhere is php

i need the output of a php file in a cgi script please help

i can reconfire php maybe but i need some options which make the /usr/local/bin/php working, thank you...

hvdm_20
03-29-2001, 12:49 PM
he did tell my this must work
=================================
#!/usr/local/bin/php

<?php
echo "testing";
?>


help my, thank you...

jw
03-29-2001, 07:01 PM
Work on your english a bit :)
What he was telling you to do requires PHP to be installed as a CGI. Your server probably has it installed as an apache module which is much faster.

hvdm_20
03-29-2001, 07:06 PM
yeah i know my english is bad

but how do i install it as a cgi module ??

i need the telnet command "php"

so i can use this print command

print `php -q test.php`;

priyadi
04-08-2001, 12:41 AM
if your ISP does not install one for you, maybe you should try to install by yourself, grab the tarballs from http://www.php.net and configure it like this:
./configure --prefix=<your homedir>

Next, you should add path to your php interpreter to your startup scripts (mine is .bashrc) like this:
export PATH="$PATH:<yourhomedir>/bin"