/ Forside / Teknologi / Udvikling / PHP / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
PHP
#NavnPoint
rfh 3959
natmaden 3372
poul_from 3310
funbreak 2700
stone47 2230
Jin2k 1960
Angband 1743
Bjerner 1249
refi 1185
10  Interkril.. 1146
php på apache (w2000)
Fra : Øystein Håland


Dato : 21-07-01 19:29

Eftersom disse to körer tillsammams så poster jeg spörsmålet her:
Har fått problem med att apache ikke kan lese php-filer etter att jeg
installerte en versjon 2 av apache (den er borte igjen, tilbake på 1.3.20).
Min httpd.conf ble overskrevet og jeg har nå försökt å gjenvinne innehållet
(jeg har gått igjennom alle bak-filer men allt forsvant). De tre rader:

ScriptAlias /php4/ "c:/php/"
AddType application/x-httpd-php4 .php .phtml
Action application/x-httpd-php4 "/php/php.exe"

finns der (php4 ligger i C:\php) igjen. Men jeg får bare opp ett
downloadvindu.
Så, hva blir det neste jeg skall forsöke?



 
 
Jakob M. Frederiksen (22-07-2001)
Kommentar
Fra : Jakob M. Frederiksen


Dato : 22-07-01 15:07

Du skal også indsætte disse 2 linier i httpd.conf:

LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php

Udover dette skal du også flytte filen php4ts.dll til dit win32 bibliotek i
Winnt biblioteket.

--
Med Venlig Hilsen
Jakob M. Frederiksen


"Øystein Håland" <molen@mbox302.swipnet.se> skrev i en meddelelse
news:XWj67.5775$5t1.7993@nntpserver.swip.net...
> Eftersom disse to körer tillsammams så poster jeg spörsmålet her:
> Har fått problem med att apache ikke kan lese php-filer etter att jeg
> installerte en versjon 2 av apache (den er borte igjen, tilbake på
1.3.20).
> Min httpd.conf ble overskrevet og jeg har nå försökt å gjenvinne
innehållet
> (jeg har gått igjennom alle bak-filer men allt forsvant). De tre rader:
>
> ScriptAlias /php4/ "c:/php/"
> AddType application/x-httpd-php4 .php .phtml
> Action application/x-httpd-php4 "/php/php.exe"
>
> finns der (php4 ligger i C:\php) igjen. Men jeg får bare opp ett
> downloadvindu.
> Så, hva blir det neste jeg skall forsöke?
>
>



Øystein Håland (22-07-2001)
Kommentar
Fra : Øystein Håland


Dato : 22-07-01 18:09

> Du skal også indsætte disse 2 linier i httpd.conf:
>
> LoadModule php4_module c:/php/sapi/php4apache.dll
> AddType application/x-httpd-php .php
>
> Udover dette skal du også flytte filen php4ts.dll til dit win32 bibliotek
i
> Winnt biblioteket.
>

Jeg trodde att dette gjöres om man körer php som modul. Om IKKE så insettes
de tre rader:

> > ScriptAlias /php4/ "c:/php/"
> > AddType application/x-httpd-php4 .php .phtml
> > Action application/x-httpd-php4 "/php/php.exe"
> >

Min forståelse av det hele: gör ENTEN de to överste rader samt kopiere
php4ts.dll till winnt/system32 ELLER insett de tre rader. Og jeg forsikrer
deg, jeg har prövd alle muligheter, både hver for seg og tilsammen. Jeg
fortsetter å få opp spörsmålet om jeg vil åpne filerne eller spare til disk.
Og jeg skjönner INGENTING av det hele...

Min httpd.conf ser f. t. ut som fölger (helt til slutt står de vesentlige
rader):

ServerName 127.0.0.1
ServerAdmin ha.pers@dellen
Port 80
ServerRoot C:/Apache
PidFile logs/httpd.pid
ServerType standalone
ServerSignature On
ServerTokens Full
UseCanonicalName On
AccessFileName w.htaccess
<Files w.htaccess>
Order allow,deny
Deny from all
</Files>
#
# Scope:Global -- Modules
#
# Complied in modules
# http_core.c
# mod_so.c
# mod_mime.c
# mod_access.c
# mod_auth.c
# mod_negotiation.c
# mod_include.c
# mod_autoindex.c
# mod_dir.c
# mod_cgi.c
# mod_userdir.c
# mod_alias.c
# mod_env.c
# mod_log_config.c
# mod_asis.c
# mod_imap.c
# mod_s.c
# mod_setenvif.c
# mod_isapi.c
#
# Scope:Global -- Server Performance
#
Timeout 300
KeepAlive On
KeepAliveTimeout 15
MaxRequestsPerChild 0
ThreadsPerChild 250
#
# Scope:Global -- Server Logging
#
HostnameLookups Off
ErrorLog logs/error.log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b %v" custom
CustomLog logs/access.log custom
#
# Scope:Global -- ISAPI
#
ISAPIReadAheadBuffer 49152
ISAPILogNotSupported On
ISAPIAppendLogToErrors Off
ISAPIAppendLogToQuery Off
#
# Scope:Global -- User Directories
#
UserDir DISABLED root
#
# Scope:Global -- Default Directory
# Configure the "default" to be a very restrictive set of permissions.
#
#
<Directory />
Options Indexes FollowSymLinks Multiviews
AllowOverride None
Order deny,allow
Deny from all
</Directory>
#
# Scope:Global -- Indexing
#
DirectoryIndex index.html index.htm
#
# Scope:Global -- Icons
#
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
#
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
#
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
#
DefaultIcon /icons/unknown.gif
#
# Scope:Global -- MIME Types
#
TypesConfig conf/mime.types
DefaultType text/html
AddType application/x-tar .tgz
AddType text/html .shtml
AddHandler cgi-script .pl .cgi
AddHandler server-parsed .shtml
AddHandler isapi-isa .dll
AddHandler php4 .php
#
# Scope:Sectional Directives -- Directory
#
# Document Root
DocumentRoot C:/Apache/htdocs
#
<Directory C:/Apache/htdocs>
Options Indexes FollowSymLinks Multiviews
AllowOverride All
DirectoryIndex index.html index.htm
Order allow,deny
Allow from all
</Directory>
#
# Directory Alias
Alias /icons/ C:/Apache/icons/
#
<Directory C:/Apache/icons>
Options Indexes Multiviews
AllowOverride None
DirectoryIndex
Order allow,deny
Allow from all
</Directory>
#
# Directory ScriptAlias
ScriptAlias /cgi-bin/ C:/Apache/cgi-bin/

#
<Directory C:/Apache/cgi-bin>
Options None
AllowOverride None
DirectoryIndex
Order allow,deny
Allow from all
</Directory>
#
#
# Scope:Global -- MIME Languages
#
AddLanguage en .en
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage he .he
AddLanguage it .it
AddLanguage ja .ja
AddLanguage kr .kr
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .se
AddLanguage cz .cz
AddLanguage ru .ru
AddLanguage tw .tw
AddLanguage zh-tw .tw
#
AddCharset ISO-8859-8 .iso8859-8
AddCharset ISO-2022-JP .jis
AddCharset ISO-2022-KR .iso-kr
AddCharset ISO-8859-2 .iso-pl
AddCharset Big5 .Big5 .big5
AddCharset WINDOWS-1251 .cp-1251
AddCharset CP866 .cp866
AddCharset ISO-8859-5 .iso-ru
AddCharset KOI8-R .koi8-r
AddCharset UCS-2 .ucs2
AddCharset UCS-4 .ucs4
AddCharset UTF-8 .utf8
#
LanguagePriority en da nl et fr de el he it ja kr no pl pt pt-br ltz ca es
sv cz ru tw zh-tw
#
# Included from APACHESRVCFG.INC
#
# Scope:Global -- Fixed directives
#
<Files ~ "^w.ht">
Order allow,deny
Deny from all
</Files>
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4.0" force-response-1.0
BrowserMatch "Java/1.0" force-response-1.0
BrowserMatch "JDK/1.0" force-response-1.0
#
#
# End of Configuration File.
# Som module:
LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php

# Annars:
#ScriptAlias /php4/ "c:/php/"
#AddType application/x-httpd-php4 .php .phtml
#Action application/x-httpd-php4 "/php/php.exe"



Søg
Reklame
Statistik
Spørgsmål : 177522
Tips : 31968
Nyheder : 719565
Indlæg : 6408672
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste