View Full Version : phpinfo() returns blank page
07-24-2007, 06:04 PM
I am having a strange problem. I have installed Win2K3, PHP 5.2.3, IIS6 and for some reason whenever I try to go to phpinfo.php I get a blank page. The strange things is that it worked before (like a week back) and nothing has changed on the server.
I have a website that uses PHP on the machine and it seems to work, so I am not sure what is going on?
Can anyone suggest anything?
07-24-2007, 06:06 PM
oh. and one other thing. If I do a <?php phpinfo(); ?> I get a result. Please help. I am not very clued up with PHP so I do not know what to do?
Thanx in advance...
07-24-2007, 06:19 PM
So whats in phpinfo.php? You do realize that you have to actually put <?php phpinfo(); ?> inside of it right? Just simple calling phpinfo.php doesn't do anything.
07-24-2007, 06:36 PM
Yes. I do know that much :p ... Here is the contents of phpinfo.php file:
<?php phpinfo(); ?> --> returns info.
Previously I simply had:
<? phpinfo(); ?> --> now returns blank page.
though it used to work. But now all of a sudden it does not?
My problem lies with an open source app. I am trying to get to work on my machine. Everything goes fine but it does't write it's configuration stuff and now when I tried my phpinfo.php file I got a blank page until I changed it.
Don't know why? though.
07-24-2007, 07:49 PM
Sounds like you have an issue with your php.ini file regarding 'short_open_tag' handling, if it reads <?php ?> just fine but not <? ?>. See http://us.php.net/ini.core for more information on that.
As a rule of thumb, I always use the long tag (<?php) rather than the short, even when just echoing something. That way I make sure the system runs on any PHP installation, whether short_open_tag is on or not.
07-24-2007, 08:41 PM
short_open_tag is set to off. I have tried it on and it also didn't work...
07-24-2007, 10:49 PM
If you make a change in php.ini, you must stop and start your web server to get the change to take effect.
Also, make sure the php.ini you are making changes to is the one php is actually using. And, make sure you don't have a .htaccess file that is overriding the setting in php.ini.
07-25-2007, 09:50 AM
Yes, I know that as well. I have restarted IIS a number of times. I have even restarted the machine. BUt still not luck.
there is no .htaccess file as this is a Windows Machine? Or is there? If so, where would i find the file?
Just for some background, my main problem is that I have installed an open source app called Open-Realty. I have run the setup and all seems to be working fine i.e. it connects to the MySQL DB, creates the database tables etc. but it does not write the config file. I have checked and rechecked permissions and all is correct. I have posted on their support forum but I have got nothing back from them. So that is when I checked the phpinfo file and realised it is not working and only works with <?php phpinfo(); ?>.
So my php is working, but I am not sure what has happened that I needed to change the phpinfo file to get a result and why the app is not writing the config file. I suspect it has something to do with my setup, but what?
It is a straight forward PHP on IIS6 setup.
07-25-2007, 10:51 AM
Try removing the extra > that is probably confusing things.
07-25-2007, 11:38 AM
what extra ">" ?
my code is:
<? phpinfo() ?>
07-25-2007, 01:45 PM
why cant you just not use short tags and go the extra mile <?php ??
07-25-2007, 02:17 PM
using <? is a bad idea i think as it kinda messes with XML declarations
07-25-2007, 03:45 PM
I think the plot has somewhat gotten lost in this post.
I am not worried about whether I should use short_tag or not. It has always been set to OFF so that is not my concern. I am trying to figure out what is wrong with my installation.
I have rebuilt a Windows 2003 server with IIS6.0. I have installed MySQL and PHP on it. The php used to work fine until a few days back when it seems to have stopped. That's when I tried to use phpinfo.php to see what I get. Which resulted in a blank page. My original phpinfo.php did not seem to work anymore and only worked when I changed it to <?php...
What I am trying to understand here is what happened. What has changed on my system that caused this problem. I know I have not made any system changes so there should have been no problem, but there is.
Also, the open source app I am trying to install is not working properly even though it works fine on my hosting server which is also Win2k3, PHP, MySQL etc.
Thanx for all the suggestions and help so far.... but it does not seem to be solving my problem....
07-25-2007, 03:50 PM
just dont use <? use the proper full <?php tags, almost all php programmers do, i have never once used <?
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.