Hello All,
Unable to run php files on Linux . php-4.2.2 is
preinstalled on RHL 9 .Whenever I run a .php file in the
webbrowser(Mozi lla) the HTML source code of the file is being
displayed instead of the output .
I did all the elementary diagnosis stated in the FAQ's like ....
1) $php -i (enter)
This command results in pagefule of HTML code (This indicates php is
working properly).
2)Inserted the following in httpd.conf file ....
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php .php
3)php4 module "libphp4.so " is seen under /etc/httpd/modules
4)$apachectl configtest (enter)
syntax ok (output)
According to the www.php.net/manual/installation_FAQ if "$php -i"
results in loads of HTML code & if HTML source is displayed when the
".php" is run in the webbrowser then it indicates that php is working
properly and the problem lies with the webserver configuration .
There is one thing which is bit confusing ...... according to install
manual "php.ini" file should be placed under /usr/local/lib ,but i
found the file under /etc .
According to FAQ if file is under different location (other than
default location ) then following line has to be added ..
--with-config-file-scan-dir=PATH
But even after adding the line there is no change !
Is the problem with the Apache Webserver or php . Where can I find
php configuration file & can I make changes to it once it is installed
.. I could not find any php directory where such config file could be
found .
contents of /var/log/httpd/error_log
------------------------------------
[Sat Mar 06 06:47:25 2004] [notice] Digest: generating secret for
digest authentication ...
[Sat Mar 06 06:47:25 2004] [notice] Digest: done
[Sat Mar 06 06:47:26 2004] [notice] Apache/2.0.40 (Red Hat Linux)
configured -- resuming normal operations
[Sat Mar 06 07:55:05 2004] [error] [client 202.223.68.1] Directory
index forbidden by rule: /var/www/html/
Sorry for such a lengthy query ........ its just an effort to give a
complete picture .
Plz help me out ..I'm posting this after going through the available
FAQ's on the net .
Thx in advance .
Regards
Vikram.