Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 310
  • Last Modified:

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?
0
akalbfell
Asked:
akalbfell
  • 2
  • 2
2 Solutions
 
slyongCommented:
On Fedora Core 5, can you provide the output of:

# rpm -qa *php*
# ls /etc/httpd/conf.d/
0
 
ygouthamCommented:
http://www.experts-exchange.com/Operating_Systems/Linux/Q_22056789.html

FC6 and FC5 are very close.  take a look at the above post.
0
 
akalbfellAuthor Commented:
[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
0
 
slyongCommented:
hi,
php is installed on your system.  if you put this a file (phpinfo.php) in /var/www/html directory with the content:

<?php
phpinfo();
?>

What is displayed? if you go to http://yourserver.com/phpinfo.php

0
 
ygouthamCommented:
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
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now