PHP5.2.1, Apache, Windows 2k install problem

I have installed apache 2.2, PHP 5.21 and I get blank pages back when I
go to run a test script. I do not see any PHP code in the resulting
source code.

Any thought son where I whent wrong.

Apache installed in c:/apache2
PHP installed via msi in c:/php

Changes I made to httpd.conf

PHPIniDir "c:\\PHP\\"
LoadModule php5_module "C:\\PHP\\php5apache2_2.dll"
AddType application/c-httpd-php .php
AddType application/c-httpd-php-source .phps
ServerRoot "C:/apache2"
DocumentRoot "C:/apache2/htdocs"

Changes in PHP.ini

doc_root ="C:\apache2\htdocs"
extentions_dir ="C:\PHP\ext"

test script is

<html>
<head></head>
<body>
hello
<?php phpinfo();?>
</body>
</html>


Result source code returned
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

Any help would be most appreciated.

Cheers
Allan
Allan [ Do, 15 März 2007 14:22 ] [ ID #1659828 ]

Re: PHP5.2.1, Apache, Windows 2k install problem

allan wrote on 15.3.2007 :
> I have installed apache 2.2, PHP 5.21 and I get blank pages back when I go to
> run a test script. I do not see any PHP code in the resulting source code.
>
> Any thought son where I whent wrong.
>
> Apache installed in c:/apache2
> PHP installed via msi in c:/php
>
> Changes I made to httpd.conf
>
> PHPIniDir "c:\\PHP\\"
> LoadModule php5_module "C:\\PHP\\php5apache2_2.dll"
> AddType application/c-httpd-php .php
> AddType application/c-httpd-php-source .phps
> ServerRoot "C:/apache2"
> DocumentRoot "C:/apache2/htdocs"

I've used forward-slashes in apache's httpd.conf and php.ini. I hate to
escape all those \-marks. I'm not sure if it works on your system, but
I would use something like:
PHPIniDir "c:/PHP/"

Easier to read, IMO

> Changes in PHP.ini
>
> doc_root ="C:\apache2\htdocs"
> extentions_dir ="C:\PHP\ext"

Hi, did you remember to restart Apache after makinh the changes?

> test script is
>
> <html>
> <head></head>
> <body>
> hello
> <?php phpinfo();?>
> </body>
> </html>
>

Script's extension was "php"?

> Result source code returned
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html;
> charset=windows-1252"></HEAD>
> <BODY></BODY></HTML>
>
> Any help would be most appreciated.
>
> Cheers
> Allan

--
- Lurius
Lurius [ Do, 15 März 2007 22:10 ] [ ID #1659831 ]

Re: PHP5.2.1, Apache, Windows 2k install problem

Lurius.

I have restarted the apache server, the test file does have an extention
of php and I removed the backslashes and replaced with single foward
slashes and still I get back nothing.

Any other suggestions.

Cheers
Allan
Allan [ Do, 15 März 2007 22:43 ] [ ID #1659832 ]

Re: PHP5.2.1, Apache, Windows 2k install problem

allan laid this down on his screen :
> Lurius.
>
> I have restarted the apache server, the test file does have an extention of
> php and I removed the backslashes and replaced with single foward slashes and
> still I get back nothing.
>
> Any other suggestions.
>
> Cheers
> Allan

Put these in the very beginning of the file:

<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
?>

If it shows something, I'm not sure..

--
- Lurius
Lurius [ Fr, 16 März 2007 14:40 ] [ ID #1659842 ]
PHP » alt.php » PHP5.2.1, Apache, Windows 2k install problem

Vorheriges Thema: Query inconsistency (MySQL vs PHP) -> DATE_FORMAT
Nächstes Thema: Dynamic websites with reward points for members