#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Hong Kong
    Posts
    73
    Rep Power
    15
    Hello
    I have a CGI Program written in C
    eg.
    ...
    ...
    print "<h1> Hello </h1>";
    print "<?php echo "Hello"; ?>";
    ...
    ...

    I cannot get these PHP code running.
    The result only print a "HELLO" on screen.

    I am not familar in Apache server setting. Do I have to config something?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 1999
    Location
    New York City
    Posts
    69
    Rep Power
    15
    I had this problem too. THe problem is that the output from your CGI is not parsed again by Apache (hence PHP), but sent directly to your browser.

    In fact if you look at the HTML in the browser, you will see that the php code is right there!

    A roundabout is to write the PHP file to the disk then access this file from your browser.


    ------------------

Similar Threads

  1. php script won't work inside "cgi-local" directory
    By Volitics in forum PHP Development
    Replies: 5
    Last Post: April 26th, 2004, 10:50 PM
  2. Need help launching a program through php
    By musa1982 in forum PHP Development
    Replies: 5
    Last Post: February 17th, 2004, 03:50 AM
  3. execute C program from PHP
    By opteron in forum PHP Development
    Replies: 1
    Last Post: February 11th, 2004, 10:10 AM
  4. javascript inside php tags
    By andy123 in forum JavaScript Development
    Replies: 5
    Last Post: February 5th, 2004, 04:34 PM
  5. Looking for specific php program?
    By flamesrock in forum PHP Development
    Replies: 1
    Last Post: January 31st, 2004, 10:43 PM

IMN logo majestic logo threadwatch logo seochat tools logo