Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: PHP Help!  (Read 7031 times)

0 Members and 1 Guest are viewing this topic.

PCgeek8080

  • Guest
PHP Help!
« on: August 01, 2004, 06:07:19 PM »
 ??? I have this problem with PHP. I installed it today, and it says the installation was sucessful. When I enter a script like <? print("Test") ?>, nothing shows up. :'( Please help!

Corrosive

  • Guest
Re: PHP Help!
« Reply #1 on: August 13, 2004, 02:56:46 PM »
At the risk of being incredibly patronising, have you also installed server software, such as Apache or IIS?

If you are running Apache server, you'll need to manually edit the "httpd.conf" file for PHP to work. Open it in Notepad or another editor and put the following in the script alias section (search for "ScriptAlias" without quotes to find it.)

ScriptAlias /php/ "C:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

You will probably have PHP and Apache installed, but neither of them knows the other exists. ;)

Edit: Just noticed something else that might be causing this. You are using the shortened version of the PHP tags, and these might not be enabled.

The proper (recommended) way of opening and closing PHP scripts is with:

<?php
    echo("Hello World");
?>

Try that. If it works, either use it or read the PHP Manual (www.php.net) to find out how to enable Short Tags.
« Last Edit: August 15, 2004, 06:52:06 AM by Corrosive »