I'm trying to get PHP up and running on my computer. I'm running win xp and trying to install php 4.3.7 and using apache 2 webserver.
When I try to load a php file on by web browser I get a blank screen. According to php.net the issues is this:

" Do a 'view source' in the web browser and you will probably find that you can see the source code of your PHP script. This means that the web server did not send the script to PHP for interpretation. Something is wrong with the server configuration - double check the server configuration against the PHP installation instructions."

I've checked and rechecked my configuration against the install instructions and still nothing. Maybe some here can help. Here is what I have currently done:

php.ini file is in the C:/Windows
set doc_root = C:/programfiles/apachegroup/apache2/htdocs

php4ts.dll is in C:/windows/system32

The following lines have been added to my apache conf file:
LoadModule php4_module c:/php/php-4.3.7-Win32/sapi/php4apache2.dll
AddType application/x-httpd-php .php .phtml .html
AddType application/x-httpd-php-source .phps

I have noticed many forums on the internet where users seem to be mystified by the blank php page that shows up when they test the following code (or any php code mixed with HTML);

<html>
<head>
<title>Test PHP</title>
</head>

<body>
<?php
phpinfo ( );
?>

</body>
</html>

The blank PHP pages are occurring because the users are attempting to write their code using an some editor that is not coding in plain text. The users are coding in text that contains HTML itself. WordPad was giving me this trouble. Once I copied and pasted my code written in WordPad (incorporates HTML features into text) into NotePad (strictly plain text) and WALLAH... when I accessed my phpinfo test page I no longer saw a blank page. Before I used notepad, when I would "view source" while visiting the blank web page I would see the following sorta tags and HTML;

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD>
<BODY></BODY></HTML>

If you wish to use WordPad, then you must save the file as a text document (.txt) instead of the default RichText format which allows the use of HTML formatting behind the scenes.

Sincerely,
Shawn Englerth

ps. if this helps you please let me know... you can reach me at puffdaddy@dejazzd.com
OR
on AOL IM as Amishthugster

This article has been dead for over six months. Start a new discussion instead.