LinuxQuestions.org
Visit Jeremy's Blog.
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 11-24-2003, 01:32 AM   #1
orinjus
LQ Newbie
 
Registered: Dec 2002
Distribution: Debian Sid
Posts: 13

Rep: Reputation: 0
PHP execution from home directory


I have just installed php and apache2 from source according to the instructions here, and I am trying to set it up so that I can have php scripts in my public_html directory. I have a test php script in the DocumentRoot that executes correctly when I visit it in my browser, so I know my php setup it working. I have the exact same script in my public_html directory, but when I visit it in my browser it pops up a save dialog. The script has the executable permission set, and here is the part of my httpd.conf dealing with home dirs:
Code:
<Directory /home/*/public_html>
    AllowOverride None
    Options ExecCGI SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
</Directory>
I really am at a loss to figure out what I am doing wrong here. Can anyone help me out?
 
Old 11-24-2003, 04:21 AM   #2
lynger
Member
 
Registered: Nov 2003
Posts: 36

Rep: Reputation: 15
hi

when this happens:
* pops up a save dialog.

it shows that the apache is not working properly.. pls. verify if you configured httpd.conf properly. you could also post here your config files.

goodluck
 
Old 11-24-2003, 06:54 PM   #3
orinjus
LQ Newbie
 
Registered: Dec 2002
Distribution: Debian Sid
Posts: 13

Original Poster
Rep: Reputation: 0
Smile

Yes, I figured as much, but I am trying to figure out what the issue is My full httpd.conf is huge, so I don't want to paste it all, but here are the parts dealing with modules and directories:
Code:
LoadModule php4_module        modules/libphp4.so

<Directory />
  Options FollowSymLinks
  AllowOverride None
</Directory>

<Directory "/usr/local/apache2/htdocs">
  Options Indexes FollowSymLinks
  AllowOverride None
  Order allow,deny
  Allow from all                                                                              
</Directory>

UserDir public_html

<Directory /home/*/public_html>
    AllowOverride None
    Options ExecCGI SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
</Directory>

DirectoryIndex index.html index.php

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
My php compilation options:
Code:
'./configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql'
And as I said before, exact same script, works in documentroot, doesn't work in home dir.
 
Old 11-25-2003, 10:04 AM   #4
DirtDart
Member
 
Registered: Nov 2003
Distribution: Mandrake 10.1/Solaris 10 (sparc)
Posts: 96

Rep: Reputation: 16
orinjus - What browser are you using?

I am having the same problem; here's the specifics:

Linux (Mandrake 9.2) server, Windows (2000) client.

Using Firebird (0.7) or even IE (5.5 and 6.0), I get the same thing, it wants to save to disk, or wants to know what to use to open them.

With Mozilla 1.5, it opens them right up, so that tells me the config is OK on the web server.

Weird.
 
Old 11-26-2003, 07:28 PM   #5
lynger
Member
 
Registered: Nov 2003
Posts: 36

Rep: Reputation: 15
hi

i'm not quite sure about this.. but could you try this..

1.) you're using php4 lib.. so ( just maybe ) make your pages have extensions *.php4

2.) then add to your httpd.conf line saying directory index.

--DirectoryIndex index.html index.php index.php4

3.) and another in you addtype line:


---AddType application/x-httpd-php .php4

I admit i'm new to php but just a hunch.. i hop it could help..

good luck
 
  


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
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 03:37 PM
script execution - file/directory permission issue serksimper Linux - Enterprise 1 08-10-2005 04:01 PM
php command execution problem avswamy Programming 3 01-31-2005 05:55 AM
home directory paul62 Linux - Newbie 3 11-18-2004 09:39 PM
Can't get in home directory--Help dtsfanatic Linux - General 1 08-10-2002 04:19 PM


All times are GMT -5. The time now is 04:00 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration