PHP page display

My first php page was suppose to show a page with a lot of details on php. But instead it just shows the php script that I wrote in the file [code]<?php
phpinfo();
?>[/code] I've played around in C++, C#, and Basic. This is by far the hardest thing I've ever tried. I mean, I can't even get started. Does anyone know what's wrong?

Comments

  • : My first php page was suppose to show a page with a lot of details
    : on php. But instead it just shows the php script that I wrote in the
    : file
    : <?php
    : phpinfo();
    : ?>[/code]: I've played around in C++, C#, and Basic. This is by far the
    : hardest thing I've ever tried. I mean, I can't even get started.
    : Does anyone know what's wrong?
    :

    Your code is correct -- are you [color=Red]sure [/color]php is set up correctly on the server you're loading the page from?

    -Simplicus
  • Assuming you are using Apache 2.2 and PHP 5,
    take a look at your httpd.conf file and make sure you have something like the following there:
    [color=Blue]LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"[/color]
    Of course you should also check that the .dll file is there.

    Then find the "" block and make sure you have this line in there:
    [color=Blue]AddHandler php5-script php[/color]

    If it still doesn't work, look at the error.log file in the Apache log directory for some clues. You may not have set the PATH variable correctly and Apache can't find PHP.

    Getting the server set up right can be tricky, but it's just a matter of experience, you'll understand the whole thing after a while.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories