|
13 May 2003, 19:33
|
#1
|
Registered User
Join Date: Jan 2003
Posts: 4,290
|
how to configure apache??
i want my apache-server to handle php-files. but instead of executing them it offers them for download
i use apache 2 (if that does matter , i have no idea about anything ) and i added
'AddType application/x-httpd-php .php'
to the httpd.conf file (whatever that means, its written in some documentation-file that came with php)
is there anything else i have to do?
edit: oh and pache runs on a linux-system, if that matters, besides the fact that bi have no idea about linux
__________________
im not tolerant, i just dont care.
Last edited by wu_trax; 13 May 2003 at 19:39.
|
|
|
13 May 2003, 19:40
|
#2
|
Mr. Blobby
Join Date: Nov 2000
Location: Belgium
Posts: 8,271
|
You're probably missing these two lines
Code:
Action application/x-httpd-php /php4/php.exe
ScriptAlias /php4/ "C:/whatever/php4/"
from your httpd.conf file.
Obviously the "C:/whatever/php4/" part in the last line needs to be replaced with the directory you have PHP4 installed in.
|
|
|
13 May 2003, 19:41
|
#3
|
Registered User
Join Date: Jan 2003
Posts: 4,290
|
i just edited it. its a linux system, so there probably is no exe-file, what do i have to write in that case?
__________________
im not tolerant, i just dont care.
|
|
|
13 May 2003, 19:43
|
#4
|
Mr. Blobby
Join Date: Nov 2000
Location: Belgium
Posts: 8,271
|
Blergh, you edited your post after I replied, thought you were running on a Windows system.
http://hotwired.lycos.com/webmonkey/...tw=programming
Check that link then instead, as I have no clue about Linux either
|
|
|
13 May 2003, 19:58
|
#5
|
Registered User
Join Date: Jan 2003
Posts: 4,290
|
i must have made some mistake while installing apache or php i did everything as written in your link (which is the same as written in the INSTALL-file that came with php)
but thanks anyway
__________________
im not tolerant, i just dont care.
|
|
|
13 May 2003, 20:54
|
#6
|
Ball
Join Date: Oct 2001
Posts: 4,410
|
You need something like "LoadModule php4_module modules/libphp4.so" too. apxs should add this (making PHP calls apxs), but if you create new httpd.conf then it won't be added.
|
|
|
13 May 2003, 20:57
|
#7
|
Bitch
Join Date: Jun 2002
Location: North Yorkshire
Posts: 3,848
|
Make sure the following lines are in your httpd.conf file. They should be in there but commented out (by default), remove the # and it should work.
LoadModule php4_module
AddModule mod_php4.c
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
__________________
ACHTUNG!!!
Das machine is nicht fur gefingerpoken und mittengrabben. Ist easy
schnappen der springenwerk, blowenfusen und corkenpoppen mit
spitzensparken. Ist nicht fur gewerken by das dummkopfen. Das
rubbernecken sightseeren keepen hands in das pockets. Relaxen und vatch
das blinkenlights!!!
|
|
|
13 May 2003, 21:05
|
#8
|
Darling
Join Date: Dec 2000
Location: Edinburgh
Posts: 890
|
you did compile apache with SO support?
|
|
|
13 May 2003, 21:27
|
#9
|
Registered User
Join Date: Jan 2003
Posts: 4,290
|
Quote:
Originally posted by BesigedB
you did compile apache with SO support?
|
i dont know :/ its been a while since i did that and i only followed some manual / readme-file
i guess i have to reinstall the whole thing sooner or later, because i dont get along here anymore
ill give up for today
__________________
im not tolerant, i just dont care.
|
|
|
13 May 2003, 21:28
|
#10
|
Ball
Join Date: Oct 2001
Posts: 4,410
|
Quote:
Originally posted by Gayle29uk
Make sure the following lines are in your httpd.conf file. They should be in there but commented out (by default), remove the # and it should work.
LoadModule php4_module
AddModule mod_php4.c
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
|
Quote:
Originally posted by wu_trax
i use apache 2
|
|
|
|
13 May 2003, 21:30
|
#11
|
Registered User
Join Date: Jan 2003
Posts: 4,290
|
oh and now it tells me the page is not found (even though the files is where it should be, well thats at least something)
i would ask for someone of you to have a look via ssh, if i only would know what port that damn thing is using.
lol, i should have stayed with windows
__________________
im not tolerant, i just dont care.
|
|
|
13 May 2003, 21:32
|
#12
|
Bitch
Join Date: Jun 2002
Location: North Yorkshire
Posts: 3,848
|
Quote:
Originally posted by wu_trax
i would ask for someone of you to have a look via ssh, if i only would know what port that damn thing is using.
|
22
__________________
ACHTUNG!!!
Das machine is nicht fur gefingerpoken und mittengrabben. Ist easy
schnappen der springenwerk, blowenfusen und corkenpoppen mit
spitzensparken. Ist nicht fur gewerken by das dummkopfen. Das
rubbernecken sightseeren keepen hands in das pockets. Relaxen und vatch
das blinkenlights!!!
|
|
|
13 May 2003, 21:33
|
#13
|
Bitch
Join Date: Jun 2002
Location: North Yorkshire
Posts: 3,848
|
Quote:
Originally posted by queball
apache 2
|
I was under the impression an old httpd.conf would still work, I take it that's not the case?
__________________
ACHTUNG!!!
Das machine is nicht fur gefingerpoken und mittengrabben. Ist easy
schnappen der springenwerk, blowenfusen und corkenpoppen mit
spitzensparken. Ist nicht fur gewerken by das dummkopfen. Das
rubbernecken sightseeren keepen hands in das pockets. Relaxen und vatch
das blinkenlights!!!
|
|
|
13 May 2003, 21:34
|
#14
|
Ball
Join Date: Oct 2001
Posts: 4,410
|
Quote:
Originally posted by Gayle29uk
I was under the impression an old httpd.conf would still work, I take it that's not the case?
|
Correct.
|
|
|
13 May 2003, 21:38
|
#15
|
Registered User
Join Date: Jan 2003
Posts: 4,290
|
Quote:
Originally posted by Gayle29uk
22
|
care to have a look ?
__________________
im not tolerant, i just dont care.
|
|
|
13 May 2003, 21:41
|
#16
|
Bitch
Join Date: Jun 2002
Location: North Yorkshire
Posts: 3,848
|
Quote:
Originally posted by wu_trax
care to have a look ?
|
My linux machine is halfway through a Ssuse 8.2 install and I resinstalled XP yesterday so don't have an SSH client to hand. Plus as has been pointed out the httpd.conf for apache 2 is different to 1.3.
However...
Quote:
Verify (and add if missing) these directives in /usr/local/apache/conf/httpd.conf:
# Make sure there's only **1** line with this directive:
LoadModule php4_module modules/libphp4.so
# Add index.php to your DirectoryIndex line:
DirectoryIndex index.html index.php
AddType application/x-httpd-php php
# PHP Syntax Coloring (recommended):
AddType application/x-httpd-php-source phps
|
Full file at http://dan.drydog.com/apache2php.html
__________________
ACHTUNG!!!
Das machine is nicht fur gefingerpoken und mittengrabben. Ist easy
schnappen der springenwerk, blowenfusen und corkenpoppen mit
spitzensparken. Ist nicht fur gewerken by das dummkopfen. Das
rubbernecken sightseeren keepen hands in das pockets. Relaxen und vatch
das blinkenlights!!!
|
|
|
13 May 2003, 21:50
|
#17
|
Registered User
Join Date: Jan 2003
Posts: 4,290
|
at the first try i made some mistake with the installation-directory, thats why it didnt work.
after that i uninstalled (i.e. deleted) everything and tryed again.
in this 2nd try i forgot to copy the php.ini
im too stupid for linux ((
now it works
thanks everyone
(and gayle if you ever need an ssh-client for windows try for 'putty' )
__________________
im not tolerant, i just dont care.
|
|
|
14 May 2003, 10:01
|
#18
|
Forever Delayed
Join Date: Sep 2000
Location: www.netgamers.org
Posts: 1,475
|
Quote:
Originally posted by queball
Quote:
Originally posted by Gayle29uk
I was under the impression an old httpd.conf would still work, I take it that's not the case?
|
Correct.
|
I think you need to expand on this, your BOFHish answers are unwelcome :-P
M.
__________________
Firefly Oper and General l4m3r - "I Do Stuff"
O2 Rip-off campaign
<vampy> plus i hate people ... i despise humanity as a whole
pablissimo "I'm still geting over the fact you just posted a pic of your own vomit"
|
|
|
14 May 2003, 14:50
|
#19
|
/dev/zero Retired Mod
Join Date: May 2000
Posts: 415
|
Code:
<IfDefine PHP>
<IfModule !mod_php4.c>
LoadModule php4_module extramodules/libphp4.so
</IfModule>
</IfDefine>
<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-source .phps
</IfModule>
Obviously you will need to change the path to your mod_php shared object.
__________________
#linux : Home of Genius
<idimmu> ok i was chained to a desk with this oriental dude
|
|
|
19 May 2003, 12:19
|
#20
|
Enforcer
Join Date: Jan 2003
Location: /dev/chair
Posts: 55
|
configure it with;
./configure --enable-so
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
|
All times are GMT +1. The time now is 04:08.
| |