LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 12-27-2004, 09:48 AM   #1
Besnell
LQ Newbie
 
Registered: Dec 2004
Posts: 2

Rep: Reputation: 0
Problems configuring apache for php5


I am currently running a default installation of Mandrake 10.0, which if my memory is correct is currently running httpd 2.0.48. I have upgraded / installed PHP5 (5.0.2) yet I have run into a couple of issues with apache's configuration files. Specifically I believe my modifications in the /etc/httpd/conf.d/70_mod_php.conf file are at the heart of my evils. At the moment when I attempt to view a php file the browser (IE6) prompts me to download the file….Which obviously is not the intended operation.
Can someone please point out my mistaken changes and lead me in the right direction.
Thank you
Shaun


The old file cat'd as:
quote:


[root@localhost conf.d]# cat old_70_mod_php
<IfDefine HAVE_PHP4>
<IfModule !mod_php4.c>
LoadModule php4_module extramodules/mod_php4.so
</IfModule>
</IfDefine>

<IfModule mod_php4.c>
PHPINIDir /etc
</IfModule>

<IfModule mod_mime.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
</IfModule>



The new file is:
quote:


[root@localhost conf.d]# cat 70_mod_php.conf
<IfDefine HAVE_PHP5>
<IfModule !mod_php5.c>
LoadModule php5_module libexec/libphp5.so
AddType application/x-httpd-php .php .php5 .phtml
</IfModule>
</IfDefine>

<IfModule mod_php5.c>
PHPINIDir /usr/local/lib/
</IfModule>

<IfModule mod_mime.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
</IfModule>
 
Old 12-27-2004, 07:20 PM   #2
caladbolg
Member
 
Registered: Jul 2004
Distribution: Mandrake 10.x, Fedora Core 3, Archlinux 0.7, Ubuntu 5.04
Posts: 303

Rep: Reputation: 31
It could very well be that you don't have apache2_modphp5 (or some package like that, just run a search for apache2 or modphp). When you install that, the apache config files will be automatically updated.
 
Old 12-27-2004, 10:04 PM   #3
Besnell
LQ Newbie
 
Registered: Dec 2004
Posts: 2

Original Poster
Rep: Reputation: 0
I am running apache and I have just compiled php5 and can be located in libexec/libphp5.so.....
 
Old 12-28-2004, 09:01 AM   #4
caladbolg
Member
 
Registered: Jul 2004
Distribution: Mandrake 10.x, Fedora Core 3, Archlinux 0.7, Ubuntu 5.04
Posts: 303

Rep: Reputation: 31
Did you install apache2-mod_php5? More than likely, your problem will be solved.

There was no need to compile php5. Mandrake has a package for it.
 
  


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
Configuring Apache problems Dolphin2005 Linux - Newbie 2 10-12-2005 09:06 PM
Apache and PHP5 Mogatu Linux - Software 3 06-17-2005 03:43 PM
Configuring PHP5 in Redhat 9 asheikh Linux - Software 3 07-24-2004 09:29 PM
problems configuring php and apache vikram_cvk Linux - Software 2 03-06-2004 02:42 PM
Problems configuring apache with php filezbyme Linux - Software 1 04-29-2002 10:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 09:38 PM.

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