J'ai déterminé le chemin d'accès au dossier php et en essayant d'exécuter un fichier php et d'obtenir ce message en ligne de commande.
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Users\U1>php
Failed loading \usr\local\php5\ext\php_xdebug-2.2.0-5.3-vc9.dll
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_curl.dll' - The specified module could not be found.
in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\
php_curl.dll' - The specified module could not be found.
in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_Gd2
.dll' - The specified module could not be found.
in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_Gd
2.dll' - The specified module could not be found.
in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_mbstring.dll' - The specified module could not be found.
in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_mb
string.dll' - The specified module could not be found.
in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_mysql.dll' - The specified module could not be found.
in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_my
sql.dll' - The specified module could not be found.
in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_mys
qli.dll' - The specified module could not be found.
in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_my
sqli.dll' - The specified module could not be found.
in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_pdo
_mysql.dll' - The specified module could not be found.
in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_pd
o_mysql.dll' - The specified module could not be found.
in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_pdo
_sqlite.dll' - The specified module could not be found.
in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_pd
o_sqlite.dll' - The specified module could not be found.
in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_sql
ite.dll' - The specified module could not be found.
in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_sq
lite.dll' - The specified module could not be found.
in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_soa
p.dll' - The specified module could not be found.
in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_so
ap.dll' - The specified module could not be found.
in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_sql
ite3.dll' - The specified module could not be found.
in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_sq
lite3.dll' - The specified module could not be found.
in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\php_xsl
.dll' - The specified module could not be found.
in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext\
php_xsl.dll' - The specified module could not be found.
in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>
^A
Toutes les bibliothèques sont ouvertes sur le fichier php.ini. Je les ai tous vérifiés. Je me demande pourquoi la ligne de commande essaie d'exécuter la bibliothèque dans un chemin incorrect, comme
'/usr/local/php5/ext\php_xsl.dll'
Est-ce que ça devrait être comme
'/usr/local/php5/ext/php_xsl.dll'
?
Ouvrez votre fichier php.ini
et définissez le paramètre suivant sur un chemin de fichier Windows:
extension_dir = "X:/path/to/your/php/ext"
Sous Windows, les chemins qui pointent vers quelque chose sur un disque dur normal doivent commencer par une lettre, puis deux points, comme "C:
". Les chemins start avec une barre oblique, /
, sont des chemins semblables à Unix et ne fonctionneront pas sous Windows.
Ajustez la valeur suivante dans le fichier php.ini:
; Directory in which the loadable extensions (modules) reside.
extension_dir = "C:\path to extension directory"
Vous pouvez également spécifier le répertoire d'extensions sans utiliser le chemin d'accès complet s'il se trouve dans le même dossier, au moins dans PHP 7.2.5 (n'a pas testé d'autres versions).
Exemple:
extension_dir = "ext"
Où ext
est votre répertoire d'extensions.