2016-01-16 2 views
-1

J'ai une installation locale de XAMPP. Pour certaines raisons (Java-Php-Bridge), je dois utiliser FastCGI. Donc, je l'ai mis en place à l'aide de ce guide: http://www3.umoncton.ca/dashboard/docs/use-php-fcgi.htmlXAMPP: Phpmyadmin ne fonctionne pas avec FastCGI

Cela a bien fonctionné, mais maintenant je ne peux pas accéder à http://localhost/phpmyadmin/ L'erreur est:

Accès interdit!

Nouveau concept de sécurité XAMPP:

L'accès au répertoire est uniquement disponible à partir du réseau local.

Ce paramètre peut être configuré dans le fichier "httpd-xampp.conf".

Voici mon fichier "httpd-xampp.conf":

# 
# XAMPP settings 
# 

<IfModule env_module> 
    SetEnv MIBDIRS "C:/xampp/php/extras/mibs" 
    SetEnv MYSQL_HOME "\\xampp\\mysql\\bin" 
    SetEnv OPENSSL_CONF "C:/xampp/apache/bin/openssl.cnf" 
    SetEnv PHP_PEAR_SYSCONF_DIR "\\xampp\\php" 
    SetEnv PHPRC "\\xampp\\php" 
    SetEnv TMP "\\xampp\\tmp" 
</IfModule> 

# 
# PHP-Module setup 
# 
LoadFile "C:/xampp/php/php5ts.dll" 
LoadFile "C:/xampp/php/libpq.dll" 

#LoadModule php5_module "C:/xampp/php/php5apache2_4.dll" 
LoadModule fcgid_module modules/mod_fcgid.so 


#<FilesMatch "\.php$"> 
# SetHandler application/x-httpd-php 
#</FilesMatch> 
#<FilesMatch "\.phps$"> 
# SetHandler application/x-httpd-php-source 
#</FilesMatch> 
FcgidInitialEnv PHPRC "c:/xampp/php" 
AddHandler fcgid-script .php 
FcgidWrapper "c:/xampp/php/php-cgi.exe" .php 


# 
# PHP-CGI setup 
# 
#<FilesMatch "\.php$"> 
# SetHandler application/x-httpd-php-cgi 
#</FilesMatch> 
#<IfModule actions_module> 
# Action application/x-httpd-php-cgi "/php-cgi/php-cgi.exe" 
#</IfModule> 


<IfModule php5_module> 
    PHPINIDir "C:/xampp/php" 
</IfModule> 

<IfModule mime_module> 
    AddType text/html .php .phps 
</IfModule> 

ScriptAlias /php-cgi/ "C:/xampp/php/" 
<Directory "C:/xampp/php"> 
    AllowOverride None 
    Options None 
    Require all denied 
    <Files "php-cgi.exe"> 
      Require all granted 
    </Files> 
</Directory> 

<Directory "C:/xampp/cgi-bin"> 
    <FilesMatch "\.php$"> 
     SetHandler cgi-script 
    </FilesMatch> 
    <FilesMatch "\.phps$"> 
     SetHandler None 
    </FilesMatch> 
</Directory> 

<Directory "C:/xampp/htdocs/xampp"> 
    <IfModule php5_module> 
     <Files "status.php"> 
      php_admin_flag safe_mode off 
     </Files> 
    </IfModule> 
    AllowOverride AuthConfig 
</Directory> 

<IfModule alias_module> 
    Alias /licenses "C:/xampp/licenses/" 
    <Directory "C:/xampp/licenses"> 
     Options +Indexes 
     <IfModule autoindex_color_module> 
      DirectoryIndexTextColor "#000000" 
      DirectoryIndexBGColor "#f8e8a0" 
      DirectoryIndexLinkColor "#bb3902" 
      DirectoryIndexVLinkColor "#bb3902" 
      DirectoryIndexALinkColor "#bb3902" 
     </IfModule> 
     Require all granted 
    </Directory> 

    Alias /phpmyadmin "C:/xampp/phpMyAdmin/" 
    <Directory "C:/xampp/phpMyAdmin"> 
     AllowOverride AuthConfig 
     Require all granted 
    </Directory> 

    Alias /webalizer "C:/xampp/webalizer/" 
    <Directory "C:/xampp/webalizer"> 
     <IfModule php5_module> 
      <Files "webalizer.php"> 
       php_admin_flag safe_mode off 
      </Files> 
     </IfModule> 
     AllowOverride AuthConfig 
     Require all granted 
    </Directory> 
</IfModule> 

# 
# New XAMPP security concept 
# 
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))"> 
     #Require local 
    Require all granted 
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var 
</LocationMatch> 

Est-ce que quelqu'un a une idée?

+0

Je ne peux pas trouver une solution, mais je peux vous rassurer que phpMyAdmin travaille avec-cgi rapide sur ma machine. Avez-vous essayé http://127.0.0.1/phpmyadmin? – maxhb

+0

127.0.0.1/phpmyadmin produit la même erreur. –

Répondre

1

Ajouter à votre httpd-xampp.conf

options ExecCGI

Alias /phpmyadmin "D:/xampp/phpMyAdmin/" 
    <Directory "D:/xampp/phpMyAdmin"> 
    Options ExecCGI 
     AllowOverride AuthConfig 
     Require all granted 
    </Directory> 
+0

Cela fonctionne très bien. Merci! –