Has anyone been able to sucessfully generate PHP code from a CGI script
and have it processed by PHP before its given to the browser?
For example, I have PHP, Perl CGI scripts, Apache and a MySQL database all
working fine under Linux. When I run a CGI script from a web browser, it
outputs some stuff including some PHP code. But the result is not like
it would be from a normal PHP phtml document - I can see the PHP code
in the browser because its not processed by PHP as its outputed from
the perl script. Any ideas?
### Print Header ###
printf "Content-type: text/html\n\n";
echo \"testing from PHP\";
I actually see the <? echo... ?> in the HTML source from the browser.
Why? I want it processed by PHP first where I should see
"testing from PHP" on the web page. Note: This exact PHP code
works fine from a normal HTML doc such as test.html, but not
when its generated from a CGI script like this.