[Apache/PHP] Wat is er fout aan php.ini en httpd.conf?

Pagina: 1
Acties:

  • Reveller
  • Registratie: Augustus 2002
  • Laatst online: 05-12-2022
• Mijn machine draait op Windows XP
• Ik heb Apache 2.0.49 geinstalleerd in c:\Program Files\Apache\Apache2
• Ik heb PHP 4.3.7 geinstalleerd in c:\Program Files\PHP - php.exe staat dus in c:\Program Files\PHP

• Als ik http://localhost/ intik, krijg ik keurig de Apache Test pagina
• Als ik test.php in c:\Program Files\Apache\Apache2\htdocs zet, krijg ik een voudmelding: "The requested URL /program files/php/php.exe/test.php was not found on this server."

• test.php
code:
1
<?php echo "hello world!"; ?>


• httpd.conf (relevante delen)
code:
1
2
3
4
5
6
7
# Apache laten weten waar hij PHP bestanden naar toe moet sturen
ScriptAlias /php/ "c:/program files/php/" 
AddType application/x-httpd-php .php 
AddType application/x-httpd-php .php3 
AddType application/x-httpd-php .php4 
AddType application/x-httpd-php .phtml 
Action application/x-httpd-php "/program files/php/php.exe"


• php.ini
code:
1
2
3
4
5
6
; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues.  The alternate is to use the
; cgi.force_redirect configuration below
doc_root = "C:/Program Files/Apache/Apache2/htdocs"


• Ik heb zowel slash-forward als backslash geprobeerd in mijn paden (dus: c:\program files\php en c:/program files/php) maar dat maakt geen verschil. In beide gevallen krijg ik deze foutmelding.

Wat doe ik verkeerd?

"Real software engineers work from 9 to 5, because that is the way the job is described in the formal spec. Working late would feel like using an undocumented external procedure."


  • blackd
  • Registratie: Februari 2001
  • Niet online
Jouw config:
code:
1
Action application/x-httpd-php "/program files/php/php.exe"

Zie hier:
http://nl.php.net/manual/nl/install.apache2.php
code:
1
2
3
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"


dus bij jou moet de Action regel worden:
code:
1
Action application/x-httpd-php "/php/php.exe"

9000Wp o/w SolarEdge SE6K - Panasonic 5kW bi-bloc - gasloos sinds 17-7-2023


  • Reveller
  • Registratie: Augustus 2002
  • Laatst online: 05-12-2022
Geweldig, het werkt! Dank je wel :D

"Real software engineers work from 9 to 5, because that is the way the job is described in the formal spec. Working late would feel like using an undocumented external procedure."