IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

EDI, CMS, Outils, Scripts et API PHP Discussion :

[Securité] .htaccess avec EasyPHP 2.0b-1


Sujet :

EDI, CMS, Outils, Scripts et API PHP

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Profil pro
    Étudiant
    Inscrit en
    Février 2007
    Messages
    379
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : Canada

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2007
    Messages : 379
    Par défaut [Securité] .htaccess avec EasyPHP 2.0b-1
    bonjour,


    je suis debutant en php (debutaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaant meme lol)

    je veux comprendre le .htaccess comment il marche , jutilise easyphp 2.0b-1 , avez vous un bon exemple qui peux m'expliquer comment travailler avec le .htacess localement


    merci

    ...

  2. #2
    Membre expérimenté

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Par défaut
    Dans quel but ? On peut en faire des choses avec un fichier .htaccess Il faut que vous soyez, pour commencer, autoriser à changer les options voulues dans les répertoires où ils sont placés (directive AllowOverride qui ne doit pas être à la valeur None - la valeur All étant la plus permissive).

  3. #3
    Membre éclairé
    Profil pro
    Étudiant
    Inscrit en
    Février 2007
    Messages
    379
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : Canada

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2007
    Messages : 379
    Par défaut
    en fait je travaille localement sur une page, mais cette derniere doit etre securisé (on ne peux y acceder qu'avec les bon username et password) et d'aprés ce que j'ai compris, avec le php pour avoir le resultat que je veux atteindre je dois utiliser le htaccess

    j'ai rien compris ?



    ...

  4. #4
    Membre expérimenté

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Par défaut
    PHP et ce genre d'authentification par htaccess ne sont pas liées (bien qu'on puisse directement le faire avec un script PHP sous certaines conditions).

    1. Dans un premier temps vous devez générer le fichier .htpasswd (c'est son nom par convention, ce qui lui permet normalement d'être protégé par défaut d'un accès direct au même titre que les fichiers .htaccess).
      Pour votre premier utilisateur, utilisez la commande :
      Code X : Sélectionner tout - Visualiser dans une fenêtre à part
      htpasswd -cs .htpasswd login1
      Puis pour les autres :
      Code X : Sélectionner tout - Visualiser dans une fenêtre à part
      htpasswd -s .htpasswd login2

      Les deux cas sont dissociés à cause de l'option -c qui crée le fichier. Si vous veniez à l'indiquer à nouveau vous perdriez vos précédents comptes. L'option -s indique que l'algorithme de hachage utilisé pour stocker les mots de passe est SHA1. Vous pouvez la remplacer par -m pour du MD5, -d pour CRYPT et -p pour les conserver en clair.
    2. Créez enfin le fichier .htaccess :
      Code X : Sélectionner tout - Visualiser dans une fenêtre à part
      1
      2
      3
      4
      5
      6
      AuthUserFile "/chemin/complet/vers/le/fichier/.htpasswd"
      AuthName Authentification
      AuthType Basic
      <Limit GET POST> 
          require valid-user
      </Limit>
      La valeur de la directive AuthUserFile doit indiquer un chemin complet (absolu) vers le fichier .htpasswd (Exemple : AuthUserFile "C:\Program Files\EasyPHP\www\authentification\.htpasswd").


    Notes :
    • Si ces commandes ne sont pas reconnues c'est que le répertoire où celles-ci sont situées (sous-répertoire apache/bin d'EasyPHP ?) ne fait pas partie de la variable d'environnement PATH. Ajoutez l'y ou alors utilisez leur chemin complet.
    • Comme j'avais commencé à l'indiquer, le fichier .htaccess ne sera pris en compte pour l'authentification que si le répertoire auquel il est associé (directive Directory) l'autorise : directive AllowOverride possédant au moins la valeur AuthConfig (voir le fichier de configuration d'Apache car j'ignore si EasyPHP est restrictif ou permissif par défaut à ce niveau)


    En cas de besoin : Les principales utilisations du htaccess avec Apache

  5. #5
    Membre éclairé
    Profil pro
    Étudiant
    Inscrit en
    Février 2007
    Messages
    379
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : Canada

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2007
    Messages : 379
    Par défaut
    Merci c'est tres clair

    mais le probleme que j'ai maintenant, est que windows ne me laisse pas créer de fichier .htpasswd ou .htaccess , j'obtient un message d'erreur de windows qui me demande de specifier le nom du fichier ( comme si c'etait une extension)

    avez vous une idée sur ce probleme ?


    thx



    ...

  6. #6
    Membre expérimenté

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Par défaut
    Ah oui c'est vrai. Je passe par la ligne de commande pour le renommer ensuite. Admettons que vous ayez créé le fichier C:\Program Files\EasyPHP\www\htaccess.txt, vous vous y prenez ainsi :
    Windows > Menu démarrer > Exécuter > tapez cmd et validez.
    Une console s'ouvre puis saisissez :
    Code X : Sélectionner tout - Visualiser dans une fenêtre à part
    cd "C:\Program Files\EasyPHP\www\"
    Et enfin :
    Code X : Sélectionner tout - Visualiser dans une fenêtre à part
    ren htaccess.txt .htaccess

  7. #7
    Membre éclairé
    Profil pro
    Étudiant
    Inscrit en
    Février 2007
    Messages
    379
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : Canada

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2007
    Messages : 379
    Par défaut
    voila ce que j'ai dans le fichier httpd.conf dans la partie <Directory "${path}/www">

    Code X : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    <Directory "${path}/www">
        #
        # Possible values for the Options directive are "None", "All",
        # or any combination of:
        #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
        #
        # Note that "MultiViews" must be named *explicitly* --- "Options All"
        # doesn't give it to you.
        #
        # The Options directive is both complicated and important.  Please see
        # http://httpd.apache.org/docs/2.2/mod/core.html#options
        # for more information.
        #
        Options Indexes FollowSymLinks
    
        #
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        #
        AllowOverride None
    
        #
        # Controls who can get stuff from this server.
        #
        Order allow,deny
        Allow from all
    
    </Directory>


    c'est correct ?

    j'ai essayé All a la place de None et ca ne fait rien , aucune fenetre d'authentification



    ...

  8. #8
    Membre expérimenté

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Par défaut
    Citation Envoyé par Mo_Poly
    c'est correct ?

    j'ai essayé All a la place de None et ca ne fait rien , aucune fenetre d'authentification
    Oui mais cette modification n'apparaît pas dans ce que vous donnez Avez-vous tenté de redémarrer Apache (ou EasyPHP carrément) après cela ? (EasyPHP détecte les modifications des fichiers de configuration mais il ne doit pas le faire lui-même). Vous n'avez pas de directives Directory plus spécifiques (ie se rapprochant plus au niveau du nom au répertoire où vous l'avez placé) ? Note : les directives du fichier .htaccess ci-dessus peuvent également figurer dans le fichier de configuration d'Apache dans une partie <Directory>.

    A tout hasard, auriez-vous un message d'erreur dans le journal prévu à cet effet (apache/log/error.log ou EasyPHP > Fichiers Log > Erreur Apache).

  9. #9
    Membre éclairé
    Profil pro
    Étudiant
    Inscrit en
    Février 2007
    Messages
    379
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : Canada

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2007
    Messages : 379
    Par défaut
    jai redemarré mais ca ne donne rien



    Citation Envoyé par julp Voir le message

    A tout hasard, auriez-vous un message d'erreur dans le journal prévu à cet effet (apache/log/error.log ou EasyPHP > Fichiers Log > Erreur Apache).

    oui

    Code X : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    [Mon Sep 17 15:46:32 2007] [notice] Apache/2.2.3 (Win32) PHP/5.2.0 configured -- resuming normal operations
    [Mon Sep 17 15:46:32 2007] [notice] Server built: Jul 27 2006 16:49:49
    [Mon Sep 17 15:46:32 2007] [notice] Parent: Created child process 3328
    [Mon Sep 17 15:46:32 2007] [notice] Child 3328: Child process is running
    [Mon Sep 17 15:46:32 2007] [notice] Child 3328: Acquired the start mutex.
    [Mon Sep 17 15:46:32 2007] [notice] Child 3328: Starting 250 worker threads.
    [Mon Sep 17 15:46:32 2007] [notice] Child 3328: Starting thread to listen on port 80.
    [Mon Sep 17 15:46:33 2007] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Sep 17 15:46:33 2007] [notice] Child 3328: Exit event signaled. Child process is ending.
    [Mon Sep 17 15:46:34 2007] [notice] Apache/2.2.3 (Win32) PHP/5.2.0 configured -- resuming normal operations
    [Mon Sep 17 15:46:34 2007] [notice] Server built: Jul 27 2006 16:49:49
    [Mon Sep 17 15:46:34 2007] [notice] Parent: Created child process 3768
    [Mon Sep 17 15:46:34 2007] [notice] Child 3768: Child process is running
    [Mon Sep 17 15:46:34 2007] [notice] Child 3328: Released the start mutex
    [Mon Sep 17 15:46:34 2007] [notice] Child 3768: Acquired the start mutex.
    [Mon Sep 17 15:46:34 2007] [notice] Child 3768: Starting 250 worker threads.
    [Mon Sep 17 15:46:34 2007] [notice] Child 3768: Starting thread to listen on port 80.
    [Mon Sep 17 15:46:35 2007] [notice] Child 3328: Waiting for 250 worker threads to exit.
    [Mon Sep 17 15:46:35 2007] [notice] Child 3328: All worker threads have exited.
    [Mon Sep 17 15:46:35 2007] [notice] Child 3328: Child process is exiting
    [Mon Sep 17 15:47:53 2007] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Sep 17 15:47:53 2007] [notice] Child 3768: Exit event signaled. Child process is ending.
    [Mon Sep 17 15:47:53 2007] [notice] Apache/2.2.3 (Win32) PHP/5.2.0 configured -- resuming normal operations
    [Mon Sep 17 15:47:53 2007] [notice] Server built: Jul 27 2006 16:49:49
    [Mon Sep 17 15:47:53 2007] [notice] Parent: Created child process 544
    [Mon Sep 17 15:47:53 2007] [notice] Child 544: Child process is running
    [Mon Sep 17 15:47:54 2007] [notice] Child 544: Acquired the start mutex.
    [Mon Sep 17 15:47:54 2007] [notice] Child 3768: Released the start mutex
    [Mon Sep 17 15:47:54 2007] [notice] Child 544: Starting 250 worker threads.
    [Mon Sep 17 15:47:54 2007] [error] [client 127.0.0.1] File does not exist: C:/Program Files/EasyPHP 2.0b1/www/Mo, referer: http://127.0.0.1/home/index.php
    [Mon Sep 17 15:47:55 2007] [notice] Child 3768: Waiting for 250 worker threads to exit.
    [Mon Sep 17 15:47:55 2007] [notice] Child 3768: All worker threads have exited.
    [Mon Sep 17 15:47:55 2007] [notice] Child 3768: Child process is exiting
    [Mon Sep 17 15:47:55 2007] [notice] Child 544: Starting thread to listen on port 80.
    [Mon Sep 17 15:47:55 2007] [error] [client 127.0.0.1] File does not exist: C:/Program Files/EasyPHP 2.0b1/www/favicon.ico
    [Mon Sep 17 15:48:05 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  type in C:\\Documents and Settings\\mo\\Mes documents\\html\\1.php on line 29, referer: http://127.0.0.1/Mo/html/
    [Mon Sep 17 15:48:05 2007] [error] [client 127.0.0.1] PHP Notice:  Use of undefined constant FICHIER_XML - assumed 'FICHIER_XML' in C:\\Documents and Settings\\mo\\Mes documents\\html\\1.php on line 46, referer: http://127.0.0.1/Mo/html/
    [Mon Sep 17 15:48:16 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  type in C:\\Documents and Settings\\mo\\Mes documents\\html\\1.php on line 29, referer: http://127.0.0.1/Mo/html/
    [Mon Sep 17 15:48:16 2007] [error] [client 127.0.0.1] PHP Notice:  Use of undefined constant FICHIER_XML - assumed 'FICHIER_XML' in C:\\Documents and Settings\\mo\\Mes documents\\html\\1.php on line 46, referer: http://127.0.0.1/Mo/html/
    [Mon Sep 17 15:50:20 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  type in C:\\Documents and Settings\\mo\\Mes documents\\html\\1.php on line 29, referer: http://127.0.0.1/Mo/html/
    [Mon Sep 17 16:11:39 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined variable: fiche in C:\\Documents and Settings\\mo\\Mes documents\\html\\1.php on line 31, referer: http://127.0.0.1/Mo/html/aj-pers.html
    [Mon Sep 17 16:11:39 2007] [error] [client 127.0.0.1] PHP Warning:  DOMNode::appendChild() expects parameter 1 to be DOMNode, null given in C:\\Documents and Settings\\mo\\Mes documents\\html\\1.php on line 31, referer: http://127.0.0.1/Mo/html/aj-pers.html
    [Mon Sep 17 16:35:12 2007] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Sep 17 16:35:12 2007] [notice] Child 544: Exit event signaled. Child process is ending.
    [Mon Sep 17 16:35:12 2007] [notice] Apache/2.2.3 (Win32) PHP/5.2.0 configured -- resuming normal operations
    [Mon Sep 17 16:35:12 2007] [notice] Server built: Jul 27 2006 16:49:49
    [Mon Sep 17 16:35:12 2007] [notice] Parent: Created child process 996
    [Mon Sep 17 16:35:12 2007] [notice] Child 996: Child process is running
    [Mon Sep 17 16:35:13 2007] [notice] Child 544: Released the start mutex
    [Mon Sep 17 16:35:13 2007] [notice] Child 996: Acquired the start mutex.
    [Mon Sep 17 16:35:13 2007] [notice] Child 996: Starting 250 worker threads.
    [Mon Sep 17 16:35:14 2007] [notice] Child 544: Waiting for 250 worker threads to exit.
    [Mon Sep 17 16:35:14 2007] [notice] Child 996: Starting thread to listen on port 80.
    [Mon Sep 17 16:35:20 2007] [notice] Child 544: All worker threads have exited.
    [Mon Sep 17 16:35:20 2007] [notice] Child 544: Child process is exiting
    [Mon Sep 17 16:35:35 2007] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Sep 17 16:35:35 2007] [notice] Child 996: Exit event signaled. Child process is ending.
    [Mon Sep 17 16:35:36 2007] [notice] Apache/2.2.3 (Win32) PHP/5.2.0 configured -- resuming normal operations
    [Mon Sep 17 16:35:36 2007] [notice] Server built: Jul 27 2006 16:49:49
    [Mon Sep 17 16:35:36 2007] [notice] Parent: Created child process 3172
    [Mon Sep 17 16:35:36 2007] [notice] Child 3172: Child process is running
    [Mon Sep 17 16:35:36 2007] [notice] Child 996: Released the start mutex
    [Mon Sep 17 16:35:36 2007] [notice] Child 3172: Acquired the start mutex.
    [Mon Sep 17 16:35:36 2007] [notice] Child 3172: Starting 250 worker threads.
    [Mon Sep 17 16:35:37 2007] [notice] Child 3172: Starting thread to listen on port 80.
    [Mon Sep 17 16:35:37 2007] [notice] Child 996: Waiting for 250 worker threads to exit.
    [Mon Sep 17 16:35:39 2007] [error] [client 127.0.0.1] File does not exist: C:/Program Files/EasyPHP 2.0b1/www/Mo, referer: http://127.0.0.1/home/index.php
    [Mon Sep 17 16:35:40 2007] [notice] Child 996: All worker threads have exited.
    [Mon Sep 17 16:35:40 2007] [notice] Child 996: Child process is exiting
    [Mon Sep 17 17:27:05 2007] [notice] Parent: Received shutdown signal -- Shutting down the server.
    [Mon Sep 17 17:27:05 2007] [notice] Child 3172: Exit event signaled. Child process is ending.
    [Mon Sep 17 17:27:06 2007] [notice] Child 3172: Released the start mutex
    [Mon Sep 17 17:27:07 2007] [notice] Child 3172: Waiting for 250 worker threads to exit.
    [Mon Sep 17 17:27:07 2007] [notice] Child 3172: All worker threads have exited.
    [Mon Sep 17 17:27:07 2007] [notice] Child 3172: Child process is exiting
    [Mon Sep 17 17:27:07 2007] [notice] Parent: Child process exited successfully.
    [Mon Sep 17 23:17:57 2007] [notice] Apache/2.2.3 (Win32) PHP/5.2.0 configured -- resuming normal operations
    [Mon Sep 17 23:17:57 2007] [notice] Server built: Jul 27 2006 16:49:49
    [Mon Sep 17 23:17:57 2007] [notice] Parent: Created child process 2840
    [Mon Sep 17 23:17:57 2007] [notice] Child 2840: Child process is running
    [Mon Sep 17 23:17:57 2007] [notice] Child 2840: Acquired the start mutex.
    [Mon Sep 17 23:17:57 2007] [notice] Child 2840: Starting 250 worker threads.
    [Mon Sep 17 23:17:57 2007] [notice] Child 2840: Starting thread to listen on port 80.
    [Mon Sep 17 23:19:10 2007] [error] [client 127.0.0.1] File does not exist: C:/Program Files/EasyPHP 2.0b1/www/favicon.ico
    [Tue Sep 18 00:33:02 2007] [notice] Parent: Received shutdown signal -- Shutting down the server.
    [Tue Sep 18 00:33:02 2007] [notice] Child 2840: Exit event signaled. Child process is ending.
    [Tue Sep 18 00:33:03 2007] [notice] Child 2840: Released the start mutex
    [Tue Sep 18 00:33:04 2007] [notice] Child 2840: Waiting for 250 worker threads to exit.
    [Tue Sep 18 00:33:04 2007] [notice] Child 2840: All worker threads have exited.
    [Tue Sep 18 00:33:04 2007] [notice] Child 2840: Child process is exiting
    [Tue Sep 18 00:33:05 2007] [notice] Parent: Child process exited successfully.
    [Tue Sep 18 15:32:12 2007] [notice] Apache/2.2.3 (Win32) PHP/5.2.0 configured -- resuming normal operations
    [Tue Sep 18 15:32:12 2007] [notice] Server built: Jul 27 2006 16:49:49
    [Tue Sep 18 15:32:12 2007] [notice] Parent: Created child process 3148
    [Tue Sep 18 15:32:12 2007] [notice] Child 3148: Child process is running
    [Tue Sep 18 15:32:12 2007] [notice] Child 3148: Acquired the start mutex.
    [Tue Sep 18 15:32:12 2007] [notice] Child 3148: Starting 250 worker threads.
    [Tue Sep 18 15:32:12 2007] [notice] Child 3148: Starting thread to listen on port 80.
    [Tue Sep 18 15:52:09 2007] [notice] Parent: Received restart signal -- Restarting the server.
    [Tue Sep 18 15:52:09 2007] [notice] Child 3148: Exit event signaled. Child process is ending.
    [Tue Sep 18 15:52:09 2007] [notice] Apache/2.2.3 (Win32) PHP/5.2.0 configured -- resuming normal operations
    [Tue Sep 18 15:52:09 2007] [notice] Server built: Jul 27 2006 16:49:49
    [Tue Sep 18 15:52:09 2007] [notice] Parent: Created child process 972
    [Tue Sep 18 15:52:09 2007] [notice] Child 972: Child process is running
    [Tue Sep 18 15:52:10 2007] [notice] Child 3148: Released the start mutex
    [Tue Sep 18 15:52:10 2007] [notice] Child 972: Acquired the start mutex.
    [Tue Sep 18 15:52:10 2007] [notice] Child 972: Starting 250 worker threads.
    [Tue Sep 18 15:52:10 2007] [notice] Child 972: Starting thread to listen on port 80.
    [Tue Sep 18 15:52:11 2007] [notice] Child 3148: Waiting for 250 worker threads to exit.
    [Tue Sep 18 15:52:11 2007] [notice] Child 3148: All worker threads have exited.
    [Tue Sep 18 15:52:11 2007] [notice] Child 3148: Child process is exiting
    [Tue Sep 18 16:05:35 2007] [notice] Parent: Received shutdown signal -- Shutting down the server.
    [Tue Sep 18 16:05:35 2007] [notice] Child 972: Exit event signaled. Child process is ending.
    [Tue Sep 18 16:05:36 2007] [notice] Child 972: Released the start mutex
    [Tue Sep 18 16:05:37 2007] [notice] Child 972: Waiting for 250 worker threads to exit.
    [Tue Sep 18 16:05:37 2007] [notice] Child 972: All worker threads have exited.
    [Tue Sep 18 16:05:37 2007] [notice] Child 972: Child process is exiting
    [Tue Sep 18 16:05:37 2007] [notice] Parent: Child process exited successfully.
    [Tue Sep 18 18:20:39 2007] [notice] Apache/2.2.3 (Win32) PHP/5.2.0 configured -- resuming normal operations
    [Tue Sep 18 18:20:39 2007] [notice] Server built: Jul 27 2006 16:49:49
    [Tue Sep 18 18:20:39 2007] [notice] Parent: Created child process 3596
    [Tue Sep 18 18:20:39 2007] [notice] Child 3596: Child process is running
    [Tue Sep 18 18:20:39 2007] [notice] Child 3596: Acquired the start mutex.
    [Tue Sep 18 18:20:39 2007] [notice] Child 3596: Starting 250 worker threads.
    [Tue Sep 18 18:20:39 2007] [notice] Child 3596: Starting thread to listen on port 80.
    [Tue Sep 18 18:22:07 2007] [error] [client 127.0.0.1] File does not exist: C:/Program Files/EasyPHP 2.0b1/www/favicon.ico



    c'est grave docteur ?



    ...

  10. #10
    Membre expérimenté

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Par défaut
    C'est bien ce que je craignais il n'y a rien dans le journal qui soit lié au ficher htaccess.

    Essayons de voir si le fichier .htaccess est lu (requiert toujours AllowOverride à All) en modifiant des options de PHP (un choix parmi d'autres). Ajoutez donc à celui-ci ceci :
    Code X : Sélectionner tout - Visualiser dans une fenêtre à part
    php_value docref_root "http://www.developpez.com"
    Créer un script dans ce même répertoire, consistant en :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    <?php
    echo ini_get('docref_root'); // Doit afficher : http://www.developpez.com
    A défaut et c'est éventuellement plus intéressant, je vais reprendre l'idée de placer directement l'authentification dans le fichier de configuration d'Apache. On suppose que le répertoire à protéger est C:\Program Files\EasyPHP\www\private\ :
    Code X : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    <Directory "${path}/www/private/">
        Options None
        AllowOverride None
        Order allow,deny
        Allow from localhost
    
        AuthUserFile "C:/.htpasswd"
        AuthName "Page protégée"
        AuthType Basic
        <Limit GET POST>
            Require valid-user
        </Limit>
    </Directory>

  11. #11
    Membre éclairé
    Profil pro
    Étudiant
    Inscrit en
    Février 2007
    Messages
    379
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : Canada

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2007
    Messages : 379
    Par défaut
    Citation Envoyé par julp Voir le message
    C'est bien ce que je craignais il n'y a rien dans le journal qui soit lié au ficher htaccess.

    Essayons de voir si le fichier .htaccess est lu (requiert toujours AllowOverride à All) en modifiant des options de PHP (un choix parmi d'autres). Ajoutez donc à celui-ci ceci :
    Code X : Sélectionner tout - Visualiser dans une fenêtre à part
    php_value docref_root "http://www.developpez.com"
    Créer un script dans ce même répertoire, consistant en :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    <?php
    echo ini_get('docref_root'); // Doit afficher : http://www.developpez.com
    et bein ca n'affiche rien du tout

    pour la deuxieme partie de ton post , j'ai pas trop saisi, est ce que je dois placer le code du .htaccess dans le httpd.conf ???!!!



    ...

Discussions similaires

  1. Sécurité avec .htpasswd et .htaccess sous EasyPHP
    Par flolebreton dans le forum Apache
    Réponses: 2
    Dernier message: 03/06/2009, 14h03
  2. perl avec easyphp
    Par HULK dans le forum Web
    Réponses: 18
    Dernier message: 09/01/2008, 16h19
  3. [Htaccess] Utilisation avec EasyPHP
    Par young077 dans le forum Apache
    Réponses: 10
    Dernier message: 02/09/2007, 14h46
  4. Réponses: 9
    Dernier message: 16/07/2006, 00h48
  5. [Sécurité] htaccess/htpasswd avec PHP
    Par Belegkarnil dans le forum Langage
    Réponses: 2
    Dernier message: 24/04/2006, 21h03

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo