Hi Roger, "Roger Pang" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have written the following html called "test.html" in /var/www/html > directory : > <html> > <body> > <?php > phpinfo() > ?> > </body> > </html> > > When I access this html with a browser, nothing displayed. However, when I > renamed it to "test.php", it works.
It should be named with the .php extension. This is so the web server knows to hand the file to PHP for processing and then returns the results to your browser. You can modify your setup (httpd.conf) so php parses .html files aswell but there is no real need. If you do need this then find the folowing line in <apachedir>/conf/httpd.conf ...... AddType application/x-httpd-php .php ...... and then add which ever extensions you wish to be processed by PHP i.e. AddType application/x-httpd-php .php .html Remember to restart Apache after any changes. > > Anything wrong ? I am running Red Hat 7.1 and chosen to install everything. > No change on any config files relating to PHP and Apache. Nothing wrong so enjoy ;o) - Paul - > > > > > > -- > PHP Install Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]