LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-16-2007, 10:10 AM   #1
AtomicBanana
LQ Newbie
 
Registered: Jun 2004
Posts: 8

Rep: Reputation: 0
php files only being executed in my root directory and nowhere else :(


Hi there,

Did a Slackware 11.0 install today, and I'm having some problems with php. I've managed to get the php module loaded, and I can load the test page when I place it in /var/www/htdocs . However, php in any other folder below that (/var/www/htdocs/whatever) is not executed (I just get to see the php in plain text). What are the possible causes of this? (i.e. which .conf do I need to stare at I suppose? )
 
Old 03-16-2007, 01:20 PM   #2
derzok
Member
 
Registered: Aug 2004
Location: Ohio
Distribution: Debian, Slackware
Posts: 58

Rep: Reputation: 15
It sounds like a misconfiguration in apache. What do the php relevant sections of /etc/apache/httpd.conf say? I'm not an apache expert, but usually when something works in the webroot and nowhere else, it means that something was set for <Directory "/var/www/htdocs"> but not <Directory "/">.
 
Old 03-16-2007, 01:32 PM   #3
AtomicBanana
LQ Newbie
 
Registered: Jun 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Hi, thanks for the reply. I didn't want to leave anything to chance, so here's my whole httpd.conf:

http://pastebin.com/900129

To be honest I'm a little out of my depth here - I've done fresh slack installs before but I never remember having to spend more than 2 seconds to get php working usually (just uncomment a few lines!) but that was quite a long time ago, a testament to stability I guess!
 
Old 03-17-2007, 01:57 AM   #4
davidsrsb
Member
 
Registered: Oct 2003
Location: Kuala Lumpur, Malaysia
Distribution: Slackware 13.37 current
Posts: 770

Rep: Reputation: 33
To get php4 and apache1 working you need to:
uncomment the line to enable the mod_php module very near the end of httpd.conf
and add index.php to the list of index files in httpd.conf

you then must restart httpd
 
  


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
creating files in /root in php irfanhab Programming 1 05-23-2006 07:42 AM
Files and folders that are in root directory sathish80 Linux - Newbie 1 03-17-2006 08:28 AM
PHP directory security - reading other people's files krasl Linux - Security 2 03-16-2006 07:36 AM
PHP: List files in directory, exclude backups kenneho Programming 2 12-30-2005 04:27 AM
Automatically Copying files from the ftp directory into the html directory swatward Linux - General 3 04-17-2005 10:55 PM


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