LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-24-2003, 09:28 AM   #1
drweb
LQ Newbie
 
Registered: Jun 2003
Location: Multan, Pakistan.
Posts: 3

Rep: Reputation: 0
PHP Configuration [Need urgent help]


Im new to Linux and I set up a web server. I can get it to pull up html files. However when I made a small generic php file...

<?
echo "Hello World";
?>

Save is as "test.php" and try to access it I just get a blank page. Any ideas? Does PHP have to be enabled somewhere?
 
Old 06-24-2003, 09:30 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
please do mark any post as urgent, as it is considered rude.
(many people will actually deliberatly avoid threads marked as such)
 
Old 06-24-2003, 09:36 AM   #3
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
What do you see if you view the source of the "blank" page? If you built the webserver yourself and didn't include PHP specifically then you'll need to download it from http://www.php.net, if the web server came with the distro then its pretty likely that it'll be there. What distro are you using?

cheers

Jamie...
 
Old 06-24-2003, 01:09 PM   #4
drweb
LQ Newbie
 
Registered: Jun 2003
Location: Multan, Pakistan.
Posts: 3

Original Poster
Rep: Reputation: 0
I have installed all the packages of PHP during intalling linux 8. I have cheked that html files are being displayed but php files are not being displayed. apache webserver is working fine. I have also checked using rpm -q php, rpm - q mysql, rpm -q apache, all are working fine. mysql and apache are running in services too, but my php code is not being translated, so I am very much worried about it from last 2 weeks. I have read every where got not solution.Please help me in this matter.

Thanks in advance.
 
Old 06-24-2003, 01:43 PM   #5
andrew001
Member
 
Registered: Nov 2002
Distribution: Slackware 9.0
Posts: 321

Rep: Reputation: 30
Drweb~

Make sure you have 'libphp.so' or 'libphp4.so' in apache/libexec. If you don't you'll need to download php, and compile it with apxs.

If libphpx.so exists in the correct place, then your problem would be that apache doesn't understand what a '.php' means. Make sure you have these lines in httpd.conf :

LoadModule php4_module libexec/libphp4.so
AddType application/x-httpd-php .php

If you get an error after adding these, then you don't have php installed as you will need it, but it isn't too hard to compile it from source with apxs and mysql support

Last edited by andrew001; 06-24-2003 at 01:45 PM.
 
Old 06-24-2003, 01:57 PM   #6
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
And what did looking at the source of your blank page turn up?

Jamie...
 
  


Reply


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
PHP urgent help needed! xemous Programming 2 03-10-2005 06:27 AM
PHP Configuration Kronux Linux - Software 3 02-25-2005 05:28 PM
Sendmail Configuration ( Urgent Help Required) taimoor111 Linux - Networking 2 11-10-2004 12:22 PM
Sendmail Configuration ( Urgent Help Required) taimoor111 Linux - Software 1 11-10-2004 02:10 AM
Updating php 4.3.1 from tar and keeping current php configuration with mandrake 9.1 mrjeep Linux - General 0 04-02-2003 07:50 AM


All times are GMT -5. The time now is 01:44 PM.

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