Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 14 of 14
  1. #1
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    phpinfo() returns blank page

    Hi All,

    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?

    Thanx
    Dwd

  • #2
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...
    Dwd

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #4
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    Yes. I do know that much ... 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.

  • #5
    New Coder
    Join Date
    Dec 2006
    Location
    Denver, Colorado
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #6
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    short_open_tag is set to off. I have tried it on and it also didn't work...

  • #7
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,026
    Thanks
    2
    Thanked 315 Times in 307 Posts
    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.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #8
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Last edited by dwd_Za; 07-25-2007 at 08:55 AM.

  • #9
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,619
    Thanks
    0
    Thanked 645 Times in 635 Posts
    Try removing the extra > that is probably confusing things.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #10
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what extra ">" ?

    my code is:

    <? phpinfo() ?>

  • #11
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,043
    Thanks
    19
    Thanked 42 Times in 42 Posts
    why cant you just not use short tags and go the extra mile <?php ??

  • #12
    Senior Coder timgolding's Avatar
    Join Date
    Aug 2006
    Location
    Southampton
    Posts
    1,519
    Thanks
    114
    Thanked 110 Times in 109 Posts
    using <? is a bad idea i think as it kinda messes with XML declarations
    You can not say you know how to do something, until you can teach it to someone else.

  • #13
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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....
    Last edited by dwd_Za; 07-25-2007 at 02:56 PM.

  • #14
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,043
    Thanks
    19
    Thanked 42 Times in 42 Posts
    just dont use <? use the proper full <?php tags, almost all php programmers do, i have never once used <?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •