LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 01-30-2005, 02:51 PM   #1
BarkingBonefish
Member
 
Registered: Feb 2004
Posts: 52

Rep: Reputation: 15
PHP not working in FC3


I recently installed FC3. Added PHP 4.3.10 via rpm with -Uvh. I have httpd starting on boot. Placed a phpinfo script in the var/www/html/ directory, and when I point my browser to it, I get a blank screen. I tried this as part of a troubleshooting tip for a project to access a small local MySQL 4.1.8 database (again, added separately) from PHP, which I could not get working. Interestingly, although the phpinfo script returned nothing, I was able to get another script to return some text results below the <?php line, just no data. The MySQL was and is working, as the same queries came back fine from shell and the MySQL Query Browser. So I started testing PHP.......

The code for the script is as follows, and will be obvious to most:
Code:
<?php
phpinfo();
?>
Pretty simple. The welcome page shows Apache 2 running (or at least that is what it says, as I can only find the httpd directory - there is no apache2 directory in /etc/). A check of the /conf/httpd.conf file shows it is blank. But /conf.d/ has the php.conf file in it, with the proper load line:
Code:
LoadModule php4_module modules/libphp4.so
as well as
Code:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
libphp4.so is in the /modules directory.

I know I am missing something here. Happy to post the contents of any file or directory necessary to help solve this problem - just don't know what else to tell you right now.

Any help is greatly appreciated!
 
Old 01-30-2005, 03:45 PM   #2
snecklifter
Member
 
Registered: Mar 2004
Location: UK/West Yorkshire/Huddersfield
Distribution: Fedora 7
Posts: 982

Rep: Reputation: 30
Make sure you restart the http daemon after any config change.
I assume you are pointing your browser to:
http://127.0.0.1/info.php
(or whatever you called the info file)?
 
Old 01-30-2005, 05:02 PM   #3
BarkingBonefish
Member
 
Registered: Feb 2004
Posts: 52

Original Poster
Rep: Reputation: 15
PHP and FC3 issue

Yes, I restarted httpd every time I made a change. I tried a save using the config tool, then restarted. When that didn't work, I went in and renamed the .bak file, checked it thoroughly, saved, restarted httpd, and still nothing. It will serve up a generic html page no problem, just nothing PHP.
 
Old 01-30-2005, 07:01 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,739

Rep: Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921
The php files should have permission of 644 or they will not run. Also check the httpd logs for php errors.
 
Old 01-31-2005, 05:33 PM   #5
BarkingBonefish
Member
 
Registered: Feb 2004
Posts: 52

Original Poster
Rep: Reputation: 15
THANKS!!!!!!!!!!!!

Need I say more. Well, just in case, I am posting another thanks (tonight) on my site at www.thoughtmarket.com.

Cheers.
 
  


Reply



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
How do I send emails by PHP on FC3 (and configure the MTA)? murr4y Linux - Newbie 3 09-01-2005 04:20 PM
FC3 and PHP IMAP Mercury3 Fedora 0 07-21-2005 01:56 PM
FC3, PHP 4.3.9, and fopen PERMISSION DENIED Cottsay Programming 4 06-25-2005 02:39 PM
(FC3) ATI FGLRX Drivers work for months,FC3 update, stop working genixpro Linux - Hardware 2 04-23-2005 09:01 PM
WEP not working on FC3 chris8109964 Linux - Wireless Networking 10 02-14-2005 11:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:52 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration