http://localhost/test.php

General discussions related to php

Moderators: macek, egami, gesf

gma_raj
New php-forum User
New php-forum User
Posts: 2
Joined: Mon Apr 21, 2003 10:39 pm

http://localhost/test.php

Postby gma_raj » Tue Apr 22, 2003 6:54 am

Hi All
I relatively new to PHP. Please help. I installed Apache, PHP. Then when I tried to test it by opening a test.php file with just the phpinfo() function in it as follows:

http://localhost/test.php

It doesn't execute the php file which is <? phpinfo(); ?>
instead, sends it for download and when I tried the same with a different filename like test.php3 or test.php4.

http://localhost/test.php3 or
http://localhost/test.php4

it just puts the file content on the browser but doesn't execute the function "phpinfo()"

Please let me know, if I have to change something in the php.ini file.

Thank you
Raj

sleepingdanny
New php-forum User
New php-forum User
Posts: 13
Joined: Mon Mar 17, 2003 6:38 am

Postby sleepingdanny » Sun May 11, 2003 4:55 am

Did you try to open the file from your own computer or after you uploaded to your site? (it wont work from your computer, because PHP is Server-Side language.

You can try adding this to your code :arrow:

Code: Select all

<?php
....
?>
:P

User avatar
Oleg Butuzov
Last Samuray
Last Samuray
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby Oleg Butuzov » Sun May 11, 2003 10:02 pm

problem - scripts isnt running
slove - accosiate PHP fiel with interpreter


open httpd.conf - Apache config file
and write that...


LoadModule php4_module modules/php4apache.dll
AddType application/x-httpd-php .php .phtml


but you need to install php4apache.dll to modules directory.


Return to “PHP General”

Who is online

Users browsing this forum: Google [Bot] and 1 guest