Hello ,

I'm trying to load a page with the following php code :

<?php

phpinfo();

?>

and when I go to the page - nothing displays. What could be the problem ?

Also I've noticed that the following will display information

$_SERVER[PHP_INFO] without quoting the index yet

$SERVER['PHP_INFO'] will result in the array printing as $SERVER['PHP_INFO']

What could be the problem

My config spec is as follows :

Server : Apache Server 2.2.1
PHP 5

Thanks,

    The PHP module isn't loading into your webserver.

    Here is the relevant section of my apache2.conf file after Zend Core installation:

    LoadModule php5_module /usr/local/Zend/Core/modules/apache22/libphp5.so

    PHP FastCGI

    LoadModule zend_enabler_module /usr/local/Zend/Core/modules/apache22/zend_enab

    ler.so

    FastCgiConfig /usr/local/Zend/Core/etc/zend_enabler.conf

    AddHandler zend-enabler-script .php

    PHP CGI

    Action application/x-httpd-php /zend-cgi/php

    ScriptAlias /zend-cgi/ /usr/local/Zend/Core/cgi-bin/

    LoadModule info_module /usr/local/Zend/Core/modules/apache22/mod_info.so
    LoadModule status_module /usr/local/Zend/Core/modules/apache22/mod_status.so

    AddType application/x-httpd-php .php
    DirectoryIndex index.php
    ExtendedStatus on

    End of Zend Core

    In a standard debian etch installation (Not Zend Core), you should have these files:

    /etc/apache2/mods-enabled/php5.conf
    /etc/apache2/mods-enabled/php5.load

      Also, are you positive the files are named with a .php extension? If you are developing on a Windows operating system, make sure file extensions aren't hidden (Tools -> Folder Options -> uncheck "Hide file extensions for known file types").

      If the files do indeed have .php file extensions, paste the relevant section of your httpd.conf file that was modified for PHP so we can examine it.

        7 days later

        I am having the same issue as the previous poster only difference is I am using:

        Win2k3
        PHP 5.2.4

        It is set up the same way on my other servers yet as of this past weekend this one has decided to stop working.

        Is there any advice or tips anyone could give regarding as to why it would suddenly stop working? I get blank pages from every script run. It view source is chosen you can see the PHP code in the window.

        Thanks for all suggestions.

          piampri wrote:

          I'm trying to load a page with the following php code :

          <?php     phpinfo();  ?>

          and when I go to the page - nothing displays.

          Server : Apache Server 2.2.1, PHP 5

          If you are on Linux, have a look at troybtj post.

          If you are on Windows (XP), like me, then use this in Apache httpd.conf
          I run Apache 2.2.6 and PHP 5.2.4.

          LoadModule userdir_module modules/mod_userdir.so
          #LoadModule usertrack_module modules/mod_usertrack.so
          #LoadModule vhost_alias_module modules/mod_vhost_alias.so
          #LoadModule ssl_module modules/mod_ssl.so

          For PHP 5 do something like this:

          LoadModule php5_module "c:/php/php5apache2_2.dll"
          AddType application/x-httpd-php .php
          AddType application/x-httpd-php-source .phps

          configure the path to php.ini


          PHPIniDir "c:/php"

          'Main' server configuration

          You can also set Apache log_level to debug
          And then you go have a look at the Apache logfile

          # LogLevel: Control the number of messages logged to the error_log.
          # Possible values include: debug, info, notice, warn, error, crit,
          # alert, emerg.
          #
          LogLevel warn

            Sorry I meant to put in I am using IIS 6. My other server is using Apache.

              I am not running apache on this server I am running IIS 6

                Sorry for the confusion. I am running Windows 2003 Server and IIS 6. But I am getting blank pages when running the phpinfo script.

                  halojoy wrote:

                  on linux?

                  If you're asking someone if they're running Windows or Linux when they mentioned using IIS, I would question whether you should be responding...

                  D-Bo: Can you tell us exactly what you did to integrate PHP into IIS? Have you tried starting from scratch and following the guide posted in this forum?

                    bradgrafelman wrote:

                    If you're asking someone if they're running Windows or Linux when they mentioned using IIS, I would question whether you should be responding...

                    D-Bo: Can you tell us exactly what you did to integrate PHP into IIS? Have you tried starting from scratch and following the guide posted in this forum?

                    Previously on this server there was 5.05 I uninstalled that version to load 5.2.3 onto the server. It worked fine for a few months. And suddenly I recieve an email from a customer that they were testing their website with PHP scripts and everything was coming up blank. Therefore I did some testing of my own and get the same problem. I checked all settings (i.e. environment variables, php.ini location, php5isapi.dll association with IIS) all things were correct but still get a blank page when trying to run phpinfo script. I decided to uninstall PHP and restart then re-install from scratch. But have gotten no where with that.

                      D-Bo78 wrote:

                      Previously on this server there was 5.05 I uninstalled that version to load 5.2.3 onto the server. It worked fine for a few months. And suddenly I recieve an email from a customer that they were testing their website with PHP scripts and everything was coming up blank. Therefore I did some testing of my own and get the same problem. I checked all settings (i.e. environment variables, php.ini location, php5isapi.dll association with IIS) all things were correct but still get a blank page when trying to run phpinfo script. I decided to uninstall PHP and restart then re-install from scratch. But have gotten no where with that.

                      Was the webserver working fine and nobody using PHP for a few months, or were PHP applications known to to be working up until a week ago, when PHP was first tried?

                      Where did you get your PHP server binaries/install files from? Have you checked back at that site to see if they have a bugfix/update or warning that something else needs to be changed in that release for IIS?

                        troybtj wrote:

                        Was the webserver working fine and nobody using PHP for a few months, or were PHP applications known to to be working up until a week ago, when PHP was first tried?

                        Where did you get your PHP server binaries/install files from? Have you checked back at that site to see if they have a bugfix/update or warning that something else needs to be changed in that release for IIS?

                        The server was working perfectly and PHP was tested like normal by myself and worked fine. I got the binaries from PHP.net

                          Did you use the MSI installer or did you download the .zip package and follow the manual installation instructions?

                            Write a Reply...