in reply to Re: Make PHP, yatta yatta....
in thread Make PHP Execute in CGI output

I now have 2 installations of php, the server module one and a command line executable one installed to /usr/local/php/. I installed the command line one by leaving off the with-apache configure option.

So I write my HTML to file then pass it to the PHP executable. Not very efficient but it works. Thank you all for putting me onto this method

my $html =<<HTML; Content-type: text/html\n\n <?php include('header.php'); ?> <body> <!-- rest of doc --> </body> </html> HTML open PHP, '>phpinput.php'; print PHP $html; close PHP; #-q option to PHP forces it to leave off http headers my $output =eval {`/usr/local/php/bin/php -q phpinput.php`}; print $output unless $@;