•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 397,816 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,596 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 3240 | Replies: 2
![]() |
•
•
Join Date: Jun 2004
Location: Colorado
Posts: 120
Reputation:
Rep Power: 5
Solved Threads: 1
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
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
•
•
Join Date: Jul 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
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
<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
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
- PHP Installation Help (PHP)
- PHP installation headache (PHP)
- probem with installing php engine?!! (PHP)
Other Threads in the PHP Forum
- Previous Thread: Random text display with image, link
- Next Thread: Operating scanners


Linear Mode