[apache mysql php]

Pagina: 1
Acties:

  • smaij
  • Registratie: November 2000
  • Laatst online: 21:11
Yes.. mijn apache werkt..maar:

ik krijg mijn php niet werkend, ik heb wat veranderingen gemaakt in het configuratiefiletje, maar nu wil hij bij extenties zoals .php3 de file downloaden i.p.v laden. wie kan mij een tip geven. Ik kom er niet meer uit..
Ik heb gewoon gekeken naar een ander configuratiefiletje van een compleet developers pakket genaamd phpdev.

http://www.klopt.nl/phpdev/

deze zou niet bedoelt zijn voor een openbaar netwerk. Ik heb alles aangepast in het configuratiebestand van apache die op mijn server staat van wat ik denk dat aangepast moest worden.

doe ik iets fout.. misschien simpel foutje?

  • MikeN
  • Registratie: April 2001
  • Laatst online: 05-05 12:25
Wat heb je nu voor PHP gerelateerde regels in je httpd.conf staan?

Verwijderd

Uit mijn hhtpd.conf bestand:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
    #
    # AddType allows you to tweak mime.types without actually editing it, or to
    # make certain files to be certain types.
    #
    # For example, the PHP 3.x module (not part of the Apache distribution - see
    # http://www.php.net) will typically use:
    #
    #AddType application/x-httpd-php3 .php3
    #AddType application/x-httpd-php3-source .phps
    #
    # And for PHP 4.x, use:
    #
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

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

  • smaij
  • Registratie: November 2000
  • Laatst online: 21:11
zal ik zo opzoeken... eerst even een logboek en acces file laten zien wat er in komt te staan bij het opvragen van een php3 file

error.log

[Thu Oct 04 21:53:39 2001] [warn] mod_mime: analyze_ct: cannot get media type from 'application'
[Thu Oct 04 21:53:39 2001] [warn] mod_mime: analyze_ct: cannot get media type from 'application'

acces.log

192.168.1.2 - - [04/Oct/2001:21:53:39 +0200] "GET /PHPMyAdmin HTTP/1.1" 301 325
192.168.1.2 - - [04/Oct/2001:21:53:39 +0200] "GET /PHPMyAdmin/ HTTP/1.1" 200 442

Ik heb het filetje dus dan naar mijn desktop gedownload en daar geopend met kladblok en wat blijkt, de normale inhoud zit er gewoon in. :s

  • smaij
  • Registratie: November 2000
  • Laatst online: 21:11
Zoals het nu nog is
code:
1
2
3
4
5
6
AddModule mod_so.c mod_mime.c mod_access.c mod_auth.c mod_negotiation.c
ScriptAlias /php/ "C:/php/"
Addtype application /x-httpd-php4 .php4 .php .php3 .php2 .phphtml .pwml
AddType application/x-tar .tgz

Action application/x-httpd-php4 "/php/php.exe"

hieronder staat wat er in het readme filetje staat van php, maar werkte niet
code:
1
2
3
ScriptAlias /php/ "c:/php/" 
AddType application/x-httpd-php .php .phtml 
Action application/x-httpd-php "/php/php.exe"

Ook neem ik aan dat het aanpassen van dit geen effect heeft
code:
1
2
3
<IfModule mod_dir.c>
    DirectoryIndex index.html index.php3
</IfModule>

Nog een vraagje:
welke van deze zijn nodig voor php.. je ziet ook welke er al geactiveerd zijn
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
#LoadModule anon_auth_module modules/mod_auth_anon.so
#LoadModule dbm_auth_module modules/mod_auth_dbm.so
#LoadModule digest_auth_module modules/mod_auth_digest.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule digest_module modules/mod_digest.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
#LoadModule proxy_module modules/mod_proxy.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule speling_module modules/mod_speling.so
#LoadModule info_module modules/mod_info.so
LoadModule status_module modules/mod_status.so
LoadModule usertrack_module modules/mod_usertrack.so

  • smaij
  • Registratie: November 2000
  • Laatst online: 21:11
Als ik dit doe, dan werkt het wel, maar zie ik de broncode van het php3 filetje :?
Op donderdag 04 oktober 2001 21:58 schreef gillesdegrote het volgende:
Uit mijn hhtpd.conf bestand:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
    #
    # AddType allows you to tweak mime.types without actually editing it, or to
    # make certain files to be certain types.
    #
    # For example, the PHP 3.x module (not part of the Apache distribution - see
    # http://www.php.net) will typically use:
    #
    #AddType application/x-httpd-php3 .php3
    #AddType application/x-httpd-php3-source .phps
    #
    # And for PHP 4.x, use:
    #
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

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

  • smaij
  • Registratie: November 2000
  • Laatst online: 21:11
Als ik bij het bovenstaande bericht dit toevoeg, krijg ik hetzelfde resultaat, namelijk dat mijn browser vraagt of ik het bestand wil downloaden.. met zo'n downloadvenster :?
code:
1
2
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps

  • Mark
  • Registratie: Juni 1999
  • Laatst online: 21:45
Waarom installeer je phpdev niet gewoon ???

  • SiErRa
  • Registratie: Februari 2000
  • Laatst online: 05-05 12:36
Op donderdag 04 oktober 2001 22:47 schreef smaij het volgende:
Als ik bij het bovenstaande bericht dit toevoeg, krijg ik hetzelfde resultaat, namelijk dat mijn browser vraagt of ik het bestand wil downloaden.. met zo'n downloadvenster :?
code:
1
2
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
met:
x-httpd-php3 .php3 zeg je dat .php3 file met een php3 preprocessor gelinkt worden. Maar dat wil je niet want jij hebt php4 geinstalleerd dus dan word de regel:
x-httpd-php .php .php3 (dan werkt zowel .php als .php3)

Verwijderd

Er kan zoveel fout zijn gegaan.. gebruik volgende keer dit document anders maar eens: http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/print.html

Als je geen SSL wilt laat je die regels uit je configure

:)

  • smaij
  • Registratie: November 2000
  • Laatst online: 21:11
Hieronder zat achteraf de fout
code:
1
2
3
ScriptAlias /php/ "c:/php/" 
AddType application/x-httpd-php .php .phtml 
Action application/x-httpd-php "/php/php.exe"

dit moest worden
code:
1
2
3
ScriptAlias /php/ "c:/php/" 
AddType application/x-httpd-php .php .phtml .php3 
Action application/x-httpd-php "/php/php.exe"

Nu nog ervoor zorgen dat hij WEL toegang krijgt tot Mysql, want somehow word user ROOT niet toegelaten :(

  • smaij
  • Registratie: November 2000
  • Laatst online: 21:11
Mooi site :)
Ik zal hem in ieder geval onthouden, want ik ben van plan ook is wat met linux te proberen, maar mijn server kan dat nog niet aan.. is nu nog een 486 :(
Op vrijdag 05 oktober 2001 14:07 schreef mighty.m het volgende:
Er kan zoveel fout zijn gegaan.. gebruik volgende keer dit document anders maar eens: http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/print.html

Als je geen SSL wilt laat je die regels uit je configure

:)

  • Pietb
  • Registratie: Maart 2001
  • Niet online
Persoonlijk vind ik deze nog mooier, nou ja, ik haal het beste uit beide tutorials... :)

http://www.isp-technology.nl/howto/apache/1.3/v1.txt
Pagina: 1