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 |
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.
|
 |
10-23-2004, 11:35 PM
|
#1
|
Member
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331
Rep:
|
apache2 + php4
I just installed and apache2 and php4. I used apt-get to install them and apache2 is working fine. php4, however, is not going too great. I installed all the necessary packages. The documentation says it should work out of the box and no extra configuration is required but when ever I try and load my page the browser tells me I have chosen to open the file index.php and asks me if I want to open it or save it to a disk.
What am I doing wrong here?
Any input or suggestions will be appreciated.
Thanks.
|
|
|
10-24-2004, 09:52 AM
|
#2
|
Member
Registered: Feb 2004
Posts: 781
Rep: 
|
Please look at your httpd.conf file. Look if you have this:
Code:
DirectoryIndex index.php
and
Code:
AddType application/x-httpd-php .php
Boby
|
|
|
10-24-2004, 10:27 AM
|
#3
|
LQ Newbie
Registered: May 2003
Location: The Netherlands
Distribution: LFS
Posts: 28
Rep:
|
Also, you should edit Apache's httpd.conf to load the PHP module, like for example:
Code:
LoadModule php4_module modules/libphp4.so
|
|
|
10-24-2004, 01:21 PM
|
#4
|
Member
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331
Original Poster
Rep:
|
Thanks, both of you.
I tried that, and well... it didn't work.
A note, though: I replaced the modules/php4.so with the real path to the php4 module, of course.
Any other ideas?
|
|
|
10-24-2004, 02:44 PM
|
#5
|
Senior Member
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591
Rep: 
|
did the server give any messages when u had changed the
LoadModule line in httpd.conf?
u have to restart the server to make the changes in httpd.conf work.
another possible error might be, that there are different versions of apache available on your box and the httpd.conf belongs to the other server. but if httpd.conf resides in sth like apache2 directory u can count this idea out.
good luck
j.
|
|
|
10-24-2004, 02:53 PM
|
#6
|
Member
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331
Original Poster
Rep:
|
Nope, no messages at all from apache. And yes, I did restart the server (apache2ctl stop && apache2ctl start). I only have apache2 installed. And another thing. It did give me an error when I first tried the LoadModule thing, then I changed the path and doesn't give the error anymore so it must be reading the config file and loading the module, right?
|
|
|
10-25-2004, 03:12 PM
|
#7
|
Senior Member
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591
Rep: 
|
i think so, too. you may check the error_log of the server. maybe it supplies some info.
|
|
|
All times are GMT -5. The time now is 02:38 AM.
|
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
|
|