Click to See Complete Forum and Search --> : [RESOLVED] PHP/Apache Blank Screen in Browser


naycoder
12-24-2005, 03:49 PM
Hello All-

I am running an Apache2 server on a Windoze box.

I recently installed php5, mysql and phpmyadmin. Soon after installation, I realized that I had the "PHPIniDir" directive pointing to the wrong file causing php to not change no matter how much I changed php.ini.
I fixed the directive and now php wont work!

When I go to http://localhost/test.php, the screen is blank and the php code is shown in the source (i.e. phpinfo(); )
I checked the php manual faq and it says that this means that the server isn't sending the file to the php interpreter, but does anybody know how to make it send the file?

httpd.conf:

LoadModule php5_module modules/php5apache2.dll
PHPIniDir C:\php

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

rincewind456
12-24-2005, 05:38 PM
You need a path in your LoadModule line for instance mine is LoadModule php5_module "c:/server/php/php5apache2.dll"

naycoder
12-24-2005, 06:59 PM
That didn't do it, anything else?

naycoder
12-24-2005, 07:20 PM
EUREEKA!

I found that, aparently, my php got configured to only work using "<?php ...... ?>" and not "<? ....... ?>"

And this brings me to the question of "Is it possible to make the latter (<?.....?>) work?"

rincewind456
12-24-2005, 07:20 PM
You did put your path in, not the line I gave you?

naycoder
12-24-2005, 07:35 PM
yeah--
My setup is that I copied php5apache2.dll to the modules folder in the server root, so then I just did the modules/php5apache2.dll.

also, I figured out that there is a directive in php.ini to turn on <? ?>. it is called "short_open_tag" and i just changed it from "= Off" to "= On"