phpinfo

Discussion in 'Installation/Configuration' started by skoena, Sep 24, 2009.

  1. skoena

    skoena Member HowtoForge Supporter

    I added this to a php file and uploaded it to my server:

    When I open this file in my browser I get a white screen, nothing happens? Any ideas, suggestions?
    (My site with a phpbb3 forum is functioning normal.)

    Rudolf.
     
  2. Miguel

    Miguel New Member HowtoForge Supporter

    No phpinfo

    Hi Rudolf,

    since you have a phpBB3 that works, than your php extension is loaded and being used :D.

    A setting I use myself in the php.ini (look for disable_functions) is:

    disable_functions = phpinfo

    Phpinfo is then disabled via the server and returns a blank page when it is called in a page as <?php phpinfo(); ?> or whatever variation of the phinfo command.

    I use this setting to improve security, visitors don't need to know which version of php I'm running and / or php extensions enabled.

    Check if this setting is on on your server, this would explain why it doesn't display the information.

    If you're on a hosted service, than your provider might have set this setting => one has to enabled it, by default disable_functions is empty and commented out in the php.ini.

    Kind regards,

    Miguel
     
    Last edited: Sep 24, 2009
  3. skoena

    skoena Member HowtoForge Supporter

    Hi there,
    Tnx for your message.
    I checked my php.ini and I see that phpinfo is not disabled.

    Rudolf.
     
  4. Miguel

    Miguel New Member HowtoForge Supporter

    Ok Rudolf,

    you can try this:

    Code:
    <? phpinfo(); ?>
    instead of

    Code:
    <?php
    phpinfo();
    ?>
    This is a workaround for IIS doing sometimes strange things with php.

    And last resort name the phpinfo.php to something else like info.php.

    The latter worked for me once, even though I never could figure out why phpinfo.php was blocked since it was on a hosting provider. I now run my own servers.

    If neighter works I don't of anything else that might cause it not do display the result .

    Kind regards,

    Miguel
     
  5. skoena

    skoena Member HowtoForge Supporter

    Hi there,
    Tried it and still didn't work. I created a new blank file inserted the
    and reuploaded it to the server. And now it works.

    Thanks for your help!
    Rudolf.
     
  6. Miguel

    Miguel New Member HowtoForge Supporter

    Hi Rudolf,

    I'm glad to hear that it worked.

    One of the issues might also be that you use Windows to write these files. If you do than use notepad or a html editor like coffeecup or whatever to make sure the formatting of the text is correct.

    Windows likes to screw it up and then you get results you did not expect.

    Kind regards,

    Miguel
     

Share This Page