logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: getting Blank page after Apache2.2.4 and php5.2.4
Author
AMN



Joined: 01 Sep 2007
Posts: 4

PostPosted: Fri 07 Sep '07 8:29    Post subject: getting Blank page after Apache2.2.4 and php5.2.4 Reply with quote

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

PostPosted: Fri 07 Sep '07 9:41    Post subject: Reply with quote

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

PostPosted: Sat 08 Sep '07 7:00    Post subject: Reply with quote

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

PostPosted: Tue 18 Sep '07 3:01    Post subject: try not all the html Reply with quote

#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

PostPosted: Tue 18 Sep '07 10:25    Post subject: Reply with quote

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

PostPosted: Tue 18 Sep '07 10:42    Post subject: blank page Reply with quote

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

PostPosted: Sat 22 Sep '07 12:15    Post subject: blank page phpinfo() Reply with quote

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

PostPosted: Sat 22 Sep '07 14:29    Post subject: Reply with quote

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


Reply to topic   Topic: getting Blank page after Apache2.2.4 and php5.2.4 View previous topic :: View next topic
Post new topic   Forum Index -> Other Software