[php] browser wil php file downloaden

Pagina: 1
Acties:

  • Alex214
  • Registratie: Februari 2002
  • Laatst online: 08-07 15:36
Hoi,

ik ben ff bezig met een test servertje. Hier draait win2K op met Apache, MySQL en PHP.

Ik heb in de file apache.conf de volgende regels toegevoegd
LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php

Als b.v. naar [url="http://localhost/test.php"]http://localhost/test.php[/url] wil gaan, wilt de browser de file downloaden. Als je dan de php file bekijkt is hij ook helemaal niet door php.exe gegaan :(

Wie iemand wat ik vergeet?
GreetZ Alex

  • Krypt
  • Registratie: April 2000
  • Laatst online: 07-09 16:35
Post eens een stuk van je httpd.conf, kunnen we zien waarom ie um niet parst..

btw.. read the FAQ over begroetingen onder een post..

[edit]
Staat zoiets in:


#
# 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:
#
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

Pvouput live


  • drm
  • Registratie: Februari 2001
  • Laatst online: 09-06-2025

drm

f0pc0dert

probeer de verwijzing naar de dll eens te quoten:

LoadModule php4_module "c:/php/sapi/php4apache.dll"

Music is the pleasure the human mind experiences from counting without being aware that it is counting
~ Gottfried Leibniz


  • Krypt
  • Registratie: April 2000
  • Laatst online: 07-09 16:35
Hmm. wat werkt sneller??
Met scriptalias werken of een loadmodule doen?

Want die loadmodule staat er bij mij helemaal niet in..

Pvouput live


  • Alex214
  • Registratie: Februari 2002
  • Laatst online: 08-07 15:36
Het tussen quotes zetten werkt ook niet.
Ik heb nu net ook geprobeerd om het als Scriptalias te gebruiken maar dan doet hij precies hetzeflde.

Krypt, wat wil je precies zien van mijn httpd.conf, of zou ik hem helemaal posten?

  • TheRookie
  • Registratie: December 2001
  • Niet online

TheRookie

Nu met R1200RT

Heb je hier en hier al gekeken ?
you need to insert these lines to your Apache configuration file to set up the CGI binary:

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php .phtml
Action application/x-httpd-php "/php/php.exe"
en de apache gerestart na evt. aanpassingen in de httpd.conf ?

  • Alex214
  • Registratie: Februari 2002
  • Laatst online: 08-07 15:36
Na elke wijziging herstart ik de server.

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

Dit heb ik nu ook eens in de conf file gehad, maar werkt ook niet -> precies hetzelfde resultaat.
Het lijkt wel of Apache .php niet wilt gebruiken :(

Ik ga nu eens kijken naar die linkjes

Verwijderd

ff ter help dit staat er bij mij in:
[code]LoadModule php4_module C:\FOXSERV/php/sapi/php4apache.dll
AddType application/x-httpd-php .php4 .php .htm .php3 .inc
AddType application/x-httpd-php-source .phps[/code]


Sorry niet goed gelezen..

  • Alex214
  • Registratie: Februari 2002
  • Laatst online: 08-07 15:36
LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php

Dit werkt ook niet :(

  • Alex214
  • Registratie: Februari 2002
  • Laatst online: 08-07 15:36
Maakt het trouwens nog uit waar je deze regels neer zet?
LoadModule php4_module C:\FOXSERV/php/sapi/php4apache.dll
AddType application/x-httpd-php .php4 .php .htm .php3 .inc
AddType application/x-httpd-php-source .phps

  • Alex214
  • Registratie: Februari 2002
  • Laatst online: 08-07 15:36
Dit is ff vaag.
Het werkt nu dus wel gewoon, PHP als module laden, het lag blijkbaar aan de browser ofzo.

Ik probeerde het de hele tijd met test.php
Met een andere file werkt het nu wel. Erg vaag.

ff de hele history en temp.internetfiles van Exploder wissen.

In iedergeval bedankt voor de hulp!

  • Johannes
  • Registratie: Juni 2000
  • Laatst online: 27-08 21:32
Op maandag 25 februari 2002 14:54 schreef Krypt het volgende:
Hmm. wat werkt sneller??
Met scriptalias werken of een loadmodule doen?

Want die loadmodule staat er bij mij helemaal niet in..
LoadModule is sneller. Je kunt er van uitgaan dat Apache modules bijna altijd sneller zijn dan CGI(wat je met ScriptAlias gebruikt).

Uit volle borst op weg naar nergens / Zonder reden zonder doel
Met m'n zeden en m'n zonden / En mijn angstig voorgevoel
Laat mij mijn kont tegen de krib / Laat mij dit goddeloze lied
Hef jij je handen maar ten hemel / Maar red mij niet

Pagina: 1