PDA

View Full Version : php problem


acrors
21st September 2004, 10:54 AM
I've have problem with fedora 2. It doesn't recognise php commands. After starting httpd, i run test.html file:

<html><head><title>My First PHP Script</title></head>
<body>
<h4>Example One</h4>
<p><?php echo "Hello World"; ?></p>
</body>
</html>

and test.php file:

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

In both cases i don't get "Hello World" text.

Pls. show me how to fix this problem (let php running)

Thank you

jeru
21st September 2004, 01:05 PM
Does

rpm -qa php

return anything? If not;

up2date php

(P.S. by default your first example will not work anyways, use .php extensions for php embedded pages)

acrors
22nd September 2004, 05:04 AM

it doesn't help me ....

LLS
27th September 2004, 01:40 AM
How are you trying to view these "hello world" scripts Jeru?

lindamus
28th September 2004, 03:36 AM
From what you have said, you need to install php.

best way to do that is to 'yum install php apache-php' there may be some optional extras/deps like php-mysql you would like to install as well.

After that, create a file:

in your /var/www/html/phptest.php

<?
phpinfo();
?>

and then in your browser have a look at it. Should have all the php info that apache is capable of using.

HTH

superbnerd
28th September 2004, 03:59 AM
you should really check this thread about a similar problem with html and php (http://www.fedoraforum.org/forum/showthread.php?t=22237).