LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 05-27-2004, 08:23 AM   #1
Dakkar
Member
 
Registered: Dec 2003
Location: Turkey
Distribution: Suse
Posts: 89

Rep: Reputation: 15
Configuring php on apache


I just installed slackware 9.1 with php,mysql and apache but my php files are not working and i dont know how can i configure the apache conf in linux and in which directory includes apache config file.
Thanks
 
Old 05-28-2004, 11:52 AM   #2
sio
Member
 
Registered: Jul 2003
Location: Louisiana, US
Distribution: Slackware
Posts: 129

Rep: Reputation: 15
generally navigate to
/etc/apache
and open your httpd.conf
scroll down to the very bottom and you'll see a line commented out concerning PHP.
Uncomment this line and save it.

See if that works out for you
 
Old 05-28-2004, 12:20 PM   #3
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 30
Dakkar

Your PHP configuration file is /etc/httpd/conf.d/php.conf, this should be OK as is

Your main apache configuration file is /etc/httpd/conf/httpd.conf

In httpd.conf make sure this line is uncommented

# Load config files from the config directory "/etc/httpd/conf.d".
#
Include conf.d/*.conf

These lines may not be there, if not add them

# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
AddType application/x-tar .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

I would strongly suggest making a backup of your httpd.conf file, navigate to /etc/httpd/conf then enter cp httpd.conf httpd.save this will give you httpd.save to fall back on should you mess up,

When you make changes to httpd.conf dont forget to stop and start apache

In my case

/usr/sbin/apachectl stop
/usr/sbin/apachectl start

Hope this helps

Pete
 
Old 05-28-2004, 02:12 PM   #4
sio
Member
 
Registered: Jul 2003
Location: Louisiana, US
Distribution: Slackware
Posts: 129

Rep: Reputation: 15
Actually in slackware (he said he had 9.1) its done a wee bit different.

the files for apache are in
/etc/apache

the two files of importance pertaining to him would be
httpd.conf & mod_php.conf

which should both be there on a default install.

The line at the bottom that i said to uncomment is designated specifically for php by the default conf file in slack.

The mod_php.conf will add php as a module and then setup the MIME types so theres no need for him to add that to his httpd.conf

In essence all he has to do is uncomment the line at the bottom of his httpd.conf relating to php, in Slackware 9.1

Guess i should have been more specific in what i said huh
"generally (in slackware 9.1 with the defaults) navigate to..."
 
Old 05-28-2004, 02:35 PM   #5
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 30
sio

No offense meant, just trying to help, never used slackware so perhaps I should have read the post more carefully.

Regards

Pete
 
Old 06-01-2004, 09:26 AM   #6
sio
Member
 
Registered: Jul 2003
Location: Louisiana, US
Distribution: Slackware
Posts: 129

Rep: Reputation: 15
offence? no no no no, i just noted that i didn't say i was speaking specifically about slackware and my instructions were pretty bland at that no?

I only left the post after yours to clarify so he didn't go running around in slackware trying to find those things b/c he'd be totally lost then

Good days
 
  


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
configuring php for apache PennyroyalFrog Linux - Newbie 3 02-07-2008 11:58 PM
configuring apache, php mjl3434 Linux - Software 4 09-22-2005 06:49 PM
Configuring PHP with Apache. LinuxStart Linux - Software 6 07-11-2005 09:15 AM
configuring php with apache on redhat 9 GraemeK Linux - Networking 16 10-18-2003 04:54 PM
Configuring Apache and PHP... causticmtl Slackware 2 07-06-2003 01:11 PM


All times are GMT -5. The time now is 07:27 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