akalbfell
asked on
Install PHP on RHEL 4 AS or Fedora 5
I am trying to setup PHP on either OS, i assume the setup is the same. During the install of the OS i select to install PHP, Apache, MYSQL, etc. After the install apache is working fine. If i run a rpm -q php it says its installed but no php pages load. I have seen that some changes need to be made to the httpd.conf file and the php.ini file but nothing is concrete about what to do. Can someone please tell me what changes need to be made to get PHP working?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
[user@localhost ~]$ rpm -qa php
php-5.1.6-3
[user@localhost ~]$ ls /etc/httpd/conf.d/
auth_kerb.conf mailman.conf proxy_ajp.conf squirrelmail.conf
auth_mysql.conf manual.conf python.conf ssl.conf
auth_pgsql.conf perl.conf README webalizer.conf
authz_ldap.conf php.conf squid.conf welcome.conf
php-5.1.6-3
[user@localhost ~]$ ls /etc/httpd/conf.d/
auth_kerb.conf mailman.conf proxy_ajp.conf squirrelmail.conf
auth_mysql.conf manual.conf python.conf ssl.conf
auth_pgsql.conf perl.conf README webalizer.conf
authz_ldap.conf php.conf squid.conf welcome.conf
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
create a simple file called test.php and tye in the following
//************************ ****
<?php
echo "Hello World !!!\n";
?>
//************************ ****
when you run the command from commandline
user@localhost$ php test.php
Hello World !!!
and once you see that it runs successfully from commandline, you know php is installed. copy paste the same into your
/var/www/html
and try accessing what slyong has said or http://yourserver.com/test.php
you should see a white page with "hello world !!!"
can you post your /etc/httpd/conf.d/php.conf file also to see if you have all the lines in that or not???
goutham
//************************
<?php
echo "Hello World !!!\n";
?>
//************************
when you run the command from commandline
user@localhost$ php test.php
Hello World !!!
and once you see that it runs successfully from commandline, you know php is installed. copy paste the same into your
/var/www/html
and try accessing what slyong has said or http://yourserver.com/test.php
you should see a white page with "hello world !!!"
can you post your /etc/httpd/conf.d/php.conf
goutham
# rpm -qa *php*
# ls /etc/httpd/conf.d/