PHP Scripts, Apache

Q

Why does my browser display a dialogue box asking if I want to save or download the .php file instead of displaying the script. For example, this code: Should display today's date. Instead my browser finds the file, and then instead of parsing the script, asks if I want to save or open the script. Any suggestions regarding PHP or Apache configurations? Thanx

✍: Guest

A
You are getting PHP source code in your browser, because your Apache server is not configured to process PHP scripts. You need to tell Apache about PHP and where to find it. Open the Apache configuration file in C:\Program Files\Apache Group\Apache2\conf\httpd.conf and add the following three lines : LoadModule php4_module php/sapi/php4apache2.dll AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps

2008-05-27, 8105🔥, 0💬