Author |
|
AMN
Joined: 01 Sep 2007 Posts: 4
|
Posted: Fri 07 Sep '07 8:29 Post subject: getting Blank page after Apache2.2.4 and php5.2.4 |
|
|
I have APache 2.2.4 and then I tried installing the php ver. 5.2.4. I followed Steffen's advice that he gave for an older version 5.1.4, thinking that it may closely match what is needed for this newer release).
Following this way, and after adding the same lines and synchronizing the folder names in httpd.exe and the php5 folder, the httpd.conf file has the following lines about php:
------------ in httpd.conf ------------
#Added the following lines for PHP5.2.4; apachelounge.com; steffen's instructions
LoadModule php5_module "c:/php5/php5apache2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php-source .phps
# configure the path to php.ini
PHPIniDir "c:/php5"
-----------------------------------------
on my .php files, i see only a BLANK page on the browser. the file i tried for testing php was as follows:
--------- test.php ---------------------
<html>
<head>
<title> Testing PHP5</title>
</head>
<body>
<font color="blue">
<?php
phpinfo();
echo '$date(l, F dS Y)\N' ?>
</body>
</html>
----------------------------
now can someone please spot the errors in my scheme and also their fixes?
as you may have noticed, i am a complete newbie for apache/ php/ mysql domains.
many thanks! |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 07 Sep '07 9:41 Post subject: |
|
|
What does your error log say?
If you open http://127.0.0.1/test.php What do you see, when you click on "view source" in your browser? |
|
Back to top |
|
AMN
Joined: 01 Sep 2007 Posts: 4
|
Posted: Sat 08 Sep '07 7:00 Post subject: |
|
|
I get a blank page with the following in the page view source.
<html>
<head>
<title> Testing PHP5</title>
</head>
<body>
<font color="blue">
<?php
phpinfo();
echo '$date(l, F dS Y)\N' ?>
</body>
</html> |
|
Back to top |
|
drizzitwill
Joined: 18 Sep 2007 Posts: 4 Location: Idaho
|
Posted: Tue 18 Sep '07 3:01 Post subject: try not all the html |
|
|
#1. Open notepad
#2. Type
<?php
phpinfo();
?>
#3. save as: phpinfo.php
#4. open browser and pu in address bar
http://localhost/phpinfo.php |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 18 Sep '07 10:25 Post subject: |
|
|
I saw an error in your config!
LoadModule php5_module "c:/php5/php5apache2.dll"
should be
LoadModule php5_module "c:/php5/php5apache2_2.dll" |
|
Back to top |
|
kaleon
Joined: 18 Sep 2007 Posts: 1
|
Posted: Tue 18 Sep '07 10:42 Post subject: blank page |
|
|
I was having the same problem and yes it was due to the a minor mistake
i. LoadModule php5_module "c:/php5/php5apache2_2.dll"
ii. AddType application/x-httpd-php .php
iii. AddType application/x-httpd-php .php-source .phps
# configure the path to php.ini
iv. PHPIniDir "c:/php5" or "c/php" whichever u decide
After checking all the steps i got the page right and its now displaying what it should in the first place i.e. phpinfo().
This post was very helpful to me and I hope it remains the same for lots of others |
|
Back to top |
|
thebalans
Joined: 22 Sep 2007 Posts: 1
|
Posted: Sat 22 Sep '07 12:15 Post subject: blank page phpinfo() |
|
|
I have the same problem. I've installed Apache 2.2.4 in the folder d:/server, PHP 5.2.4 in the folder d:/server/php.
In httpd.config I have:
LoadModule php5_module "D:/server/PHP/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php-source .phps
PHPIniDir "D:/server/PHP/"
The server is working ok with html but ignores any php code.
Any ideas? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 22 Sep '07 14:29 Post subject: |
|
|
short_open_tag = On is often an "error"
If not check the file extension with the commandline (cmd.exe) and dir command if it is realy .php and not .php.txt or something like that. |
|
Back to top |
|