Toon posts:

PHP 5.2.0 + Apache 2.2.3 probleem

Pagina: 1
Acties:

Verwijderd

Topicstarter
Hoi,

Ik heb zojuist apache 2.2.3 geinstalleerd. Vervolgens heb ik PHP 5.2.0 geinstalleerd (de versie waarbij je gewoon de bestanden moet kopieren naar in mijn geval: c:/server/php) Vervolgens heb ik de volgende wijzigingen aangebracht in het httpd bestand van apache:

Onderstaand heb ik onderaan de lijst met alle loadmodules gezet:
#LoadModule php5_module "c:/server/php/php5apache2.dll"
AddType application/x-httpd-php .php


Vervolgens heb ik van dit:
DirectoryIndex ndex.html
dit gemaakt:
DirectoryIndex index.php index.html

Het probleem is nu dat wanneer ik naar localhost ga in mijn webbrowser en een test.php bestand wil openen (met daarin onderstaande tekst) ik de melding krijg of ik het bestand wil downloaden. Ik kan het dus niet openen in m'n webbrowser.

<?php
phpinfo();
?>


Natuurlijk heb ik apache al herstart maar het wil toch niet werken.

  • G33rt
  • Registratie: Februari 2002
  • Laatst online: 22-06-2022
Vrij lullig, maar is het hekje voor LoadModule je al opgevallen? Of heb je een foutje met overnemen gemaakt? :)

Verwijderd

Ik zit ook met een probleem met m'n installatie.

Apache werkt en PHP ook, maar de php-modules worden niet geladen. Dit staat in m'n error-log van Apache:
[Wed Nov 08 20:48:23 2006] [notice] Parent: Received restart signal -- Restarting the server.
[Wed Nov 08 20:48:23 2006] [notice] Child 3668: Exit event signaled. Child process is ending.
[Wed Nov 08 20:48:23 2006] [notice] Apache/2.2.3 (Win32) PHP/5.2.0 configured -- resuming normal operations
[Wed Nov 08 20:48:23 2006] [notice] Server built: Jul 27 2006 16:49:49
[Wed Nov 08 20:48:23 2006] [notice] Parent: Created child process 2496
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Apache\\php\\ext\\php_date.dll' - Kan opgegeven module niet vinden.\r\n in Unknown on line 0
PHP Warning: PHP Startup: gd: Unable to initialize module\nModule compiled with module API=20060613, debug=0, thread-safety=1\nPHP compiled with module API=20050922, debug=0, thread-safety=1\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: mbstring: Unable to initialize module\nModule compiled with module API=20060613, debug=0, thread-safety=1\nPHP compiled with module API=20050922, debug=0, thread-safety=1\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: mssql: Unable to initialize module\nModule compiled with module API=20060613, debug=0, thread-safety=1\nPHP compiled with module API=20050922, debug=0, thread-safety=1\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Apache\\php\\ext\\php_msql.dll' - Kan opgegeven module niet vinden.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Apache\\php\\ext\\php_mysql.dll' - Kan opgegeven module niet vinden.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Apache\\php\\ext\\php_mysqli.dll' - Kan opgegeven procedure niet vinden.\r\n in Unknown on line 0
PHP Warning: PHP Startup: pdf: Unable to initialize module\nModule compiled with module API=20060613, debug=0, thread-safety=1\nPHP compiled with module API=20050922, debug=0, thread-safety=1\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Apache\\php\\ext\\php_pdo_mysql.dll' - Kan opgegeven module niet vinden.\r\n in Unknown on line 0
PHP Warning: PHP Startup: zip: Unable to initialize module\nModule compiled with module API=20060613, debug=0, thread-safety=1\nPHP compiled with module API=20050922, debug=0, thread-safety=1\nThese options need to match\n in Unknown on line 0
[Wed Nov 08 20:48:23 2006] [notice] Child 2496: Child process is running
[Wed Nov 08 20:48:24 2006] [notice] Child 3668: Released the start mutex
[Wed Nov 08 20:48:24 2006] [notice] Child 2496: Acquired the start mutex.
[Wed Nov 08 20:48:24 2006] [notice] Child 2496: Starting 250 worker threads.
[Wed Nov 08 20:48:25 2006] [notice] Child 3668: Waiting for 250 worker threads to exit.
[Wed Nov 08 20:48:25 2006] [notice] Child 3668: All worker threads have exited.
[Wed Nov 08 20:48:25 2006] [notice] Child 3668: Child process is exiting
[Wed Nov 08 20:48:25 2006] [notice] Child 2496: Starting thread to listen on port 80.
Ik vermoed dat het probleem zich bevindt bij de dubbele slashes in het pad, maar dit krijg ik niet weg.

In php.ini staat dit:
extension_dir = "C:\Apache\php\ext"

  • Spider.007
  • Registratie: December 2000
  • Niet online

Spider.007

* Tetragrammaton

CSA > WSS

---
Prozium - The great nepenthe. Opiate of our masses. Glue of our great society. Salve and salvation, it has delivered us from pathos, from sorrow, the deepest chasms of melancholy and hate


  • TommyGun
  • Registratie: Mei 2004
  • Laatst online: 18:50

TommyGun

Stik er maar in!

G33rt schreef op woensdag 08 november 2006 @ 17:44:
Vrij lullig, maar is het hekje voor LoadModule je al opgevallen? Of heb je een foutje met overnemen gemaakt? :)
Misschien dat mijn opmerking dan ook vrij lullig is;

DOCType? http://www.handleidinghtm...structuur-document04.html

“In a world without walls and fences, who needs Windows and Gates".


  • frickY
  • Registratie: Juli 2001
  • Laatst online: 15-02 17:57
Er is een probleem met de SAPI-module van PHP5 in combinatie met Apache2.
Ik meen dat dit met Apache2.5 was, maar ik kan me vergissen. Misschien de moeite even na te zoeken, ik ben er ruim een uur mee zoet geweest.

Apache zou in ieder geval niet op moeten starten, en whinen over dat hij de SAPI bestanden niet kan vinden of niet herkent.

  • TheJoxer
  • Registratie: Maart 2004
  • Laatst online: 14-05-2025

TheJoxer

Nou ja, dat dus....

Verwijderd schreef op dinsdag 07 november 2006 @ 17:53:
Hoi,

Ik heb zojuist apache 2.2.3 geinstalleerd. Vervolgens heb ik PHP 5.2.0 geinstalleerd (de versie waarbij je gewoon de bestanden moet kopieren naar in mijn geval: c:/server/php) Vervolgens heb ik de volgende wijzigingen aangebracht in het httpd bestand van apache:

Onderstaand heb ik onderaan de lijst met alle loadmodules gezet:
#LoadModule php5_module "c:/server/php/php5apache2.dll"
AddType application/x-httpd-php .php


Vervolgens heb ik van dit:
DirectoryIndex ndex.html
dit gemaakt:
DirectoryIndex index.php index.html

Het probleem is nu dat wanneer ik naar localhost ga in mijn webbrowser en een test.php bestand wil openen (met daarin onderstaande tekst) ik de melding krijg of ik het bestand wil downloaden. Ik kan het dus niet openen in m'n webbrowser.

<?php
phpinfo();
?>


Natuurlijk heb ik apache al herstart maar het wil toch niet werken.
Heb je de php5ts.dll gekopieerd naar je system directory? Of de directory PHP aan je searchpath toegevoegd?

Uit install.txt:

To make php4ts.dll / php5ts.dll available you have three options: copy
the file to the Windows system directory, copy the file to the web
server's directory, or add your PHP directory, C:\php to the PATH. For
better maintenance, we advise you to follow the last option, add
C:\php to the PATH, because it will be simpler to upgrade PHP in the
future. Read more about how to add your PHP directory to PATH in the
corresponding FAQ entry (and then don't forget to restart the computer
- logoff isn't enough).

  • FragFrog
  • Registratie: September 2001
  • Laatst online: 23:03
Als het DOCType fout is zou AFAIK niet test.php gedownload mogen worden maar hooguit de inhoud van z'n output, phpinfo dus :)

Heb je PHP zelf wel goed geinstalleerd? Wat gebeurt er als je PHP vanaf de commandline uitvoert? Ergo, pak een dosbox en draai x:/path/naar/php/php.exe x:/path/naar/test/test.php eens en kijk wat'ie zegt :)

(En inderdaad, dat #je voor LoadModule moet uiteraard wel weg.. :+)

[ Site ] [ twitch ] [ jijbuis ]

Pagina: 1