LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-12-2007, 02:53 AM   #1
jimbo1954
Member
 
Registered: Oct 2006
Location: High Wycombe, Bucks, UK.
Distribution: Debian and Fedora Core in equal measure
Posts: 256

Rep: Reputation: 33
Installing PHP on Fedora Core 6


I'm building a new apache server on Fedora Core 6, and everything is fine up to the point where I have apache presenting its default page when browsed, and MySQL is installed and happy, and then I tried to install mod-php so I can use php on web pages.

That's where I got stuck...I've done this on Debian before, and just installed the appropriate mod-php, created a test.php file with "php-info" in it, put it in the apache root directory, so when browsing to www."server".com/test.php, I get the full informational page to show all is well.

Well, obviously there is no mod-php installed, 'cos when I browse, I just get the single line that is the file contents, but equally, when I go to the GUI software installer, there's no evidence of any mod-php.

That should be no problem, just go and find a mod-php RPM, I thought....nope! can't find one that looks right...What am I doing wrong here? it was soooo simple under Debian. Kernel is 2.6.19, its a more-or-less default install...

Any Clues

Thanks
Jimbo
 
Old 02-12-2007, 09:26 AM   #2
Dudydoo
Member
 
Registered: Sep 2003
Location: UK
Distribution: I use 'em all ;-)
Posts: 273

Rep: Reputation: 38
The only packages you should need are:

httpd
php
php-mysql

try an 'rpm -qa | grep ...' to see if you have them installed.
 
Old 02-12-2007, 03:53 PM   #3
jimbo1954
Member
 
Registered: Oct 2006
Location: High Wycombe, Bucks, UK.
Distribution: Debian and Fedora Core in equal measure
Posts: 256

Original Poster
Rep: Reputation: 33
OK, so I did the following, as suggested:

[root@bastion2 log]# rpm -qa | grep httpd
httpd-2.2.3-5
[root@bastion2 log]# rpm -qa | grep php
php-common-5.1.6-3.3.fc6
php-cli-5.1.6-3.3.fc6
php-5.1.6-3.3.fc6
[root@bastion2 log]# rpm -qa | grep php-mysql


Having detected no php-mysql, I installed it.

[root@bastion2 log]# yum install php-mysql

Now when I browse to httpd://127.0.0.1/test.php I just get a blank screen.

(test.php has the single line

<? php phpinfo(); ?>

in it)

I'm going to dig around some more, see if I can get this sorted, but if you guys have any other ideas?

Cheers
Jimbo
 
Old 02-12-2007, 04:13 PM   #4
jimbo1954
Member
 
Registered: Oct 2006
Location: High Wycombe, Bucks, UK.
Distribution: Debian and Fedora Core in equal measure
Posts: 256

Original Poster
Rep: Reputation: 33
Whoa! Found what was happening and sorted it!

the line in the test.php file was:

<? php phpinfo(); ?>

and php was objecting to the space after the first "?".

I changed the line to

<?php phpinfo(); ?>

and that, with the installation of php-mysql suggested and described by dudydoo fixed it....Thanks for the help!

Cheers
Jimbo
 
Old 02-13-2007, 03:42 AM   #5
Dudydoo
Member
 
Registered: Sep 2003
Location: UK
Distribution: I use 'em all ;-)
Posts: 273

Rep: Reputation: 38
Yeah! I saw just that typo in your post and was about to say about it being wrong. If the <?php opening tag is <? or wrong, some browsers just interpret it as text. If think there is an option that can be changed in the php.ini somewhere, as you should be able to just use <? echo ... ?>

But I always use <?php ... ?> for completeness :-)
 
Old 04-12-2007, 09:14 PM   #6
sfo_sc
LQ Newbie
 
Registered: Apr 2007
Posts: 6

Rep: Reputation: 0
Thanks a lot. This helped me today too. I am missing php-mysql too. Doh~
 
  


Reply

Tags
fedora, mysql, php


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing PHP on Fedora Core 5 Rostfrei Linux - Software 2 10-11-2006 01:52 PM
Installing Apache, PHP, and Mysql on Fedora Core 4 Dsupreeme Linux - Software 10 10-03-2006 08:47 AM
php comment problem // and /* on Fedora Core 5 and PHP 5.1.4 shakeel_125 Linux - Server 4 09-29-2006 04:42 AM
php comment problem // and /* on Fedora Core 5 and PHP 5.1.4 shakeel_125 Fedora 4 09-29-2006 02:14 AM
How to get php 4.4.2 and php 5.1.4 running on fedora core 5? markg85 Linux - Software 2 06-18-2006 09:23 AM


All times are GMT -5. The time now is 02:03 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration