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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-24-2003, 09:28 AM
|
#1
|
LQ Newbie
Registered: Jun 2003
Location: Multan, Pakistan.
Posts: 3
Rep:
|
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?
|
|
|
06-24-2003, 09:30 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
please do mark any post as urgent, as it is considered rude.
(many people will actually deliberatly avoid threads marked as such)
|
|
|
06-24-2003, 09:36 AM
|
#3
|
Senior Member
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243
Rep:
|
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...
|
|
|
06-24-2003, 01:09 PM
|
#4
|
LQ Newbie
Registered: Jun 2003
Location: Multan, Pakistan.
Posts: 3
Original Poster
Rep:
|
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.
|
|
|
06-24-2003, 01:43 PM
|
#5
|
Member
Registered: Nov 2002
Distribution: Slackware 9.0
Posts: 321
Rep:
|
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.
|
|
|
06-24-2003, 01:57 PM
|
#6
|
Senior Member
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243
Rep:
|
And what did looking at the source of your blank page turn up?
Jamie...
|
|
|
All times are GMT -5. The time now is 09:15 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|