2016-07-23 137 views
5

我試圖安裝和配置phpmyadmin使用家庭釀造。要安裝,我使用命令brew install phpmyadmin,這是在終端打印的消息摘要。安裝phpmyadmin家居釀造

==> Summary 
    /usr/local/Cellar/php71/7.1.0-beta.1: 342 files, 50.3M, built in 7 minutes 29 seconds 
==> Installing homebrew/php/phpmyadmin 
==> Downloading https://github.com/phpmyadmin/phpmyadmin/archive/RELEASE_4_6_2.t 
==> Downloading from https://codeload.github.com/phpmyadmin/phpmyadmin/tar.gz/RE 
######################################################################## 100.0% 
==> Caveats 
Note that this formula will NOT install mysql. It is not 
required since you might want to get connected to a remote 
database server. 

Webserver configuration example (add this at the end of 
your /etc/apache2/httpd.conf for instance) : 
    Alias /phpmyadmin /usr/local/share/phpmyadmin 
    <Directory /usr/local/share/phpmyadmin/> 
    Options Indexes FollowSymLinks MultiViews 
    AllowOverride All 
    <IfModule mod_authz_core.c> 
     Require all granted 
    </IfModule> 
    <IfModule !mod_authz_core.c> 
     Order allow,deny 
     Allow from all 
    </IfModule> 
    </Directory> 
Then, open http://localhost/phpmyadmin 

More documentation : file:///usr/local/Cellar/phpmyadmin/4.6.2/share/phpmyadmin/doc/ 

Configuration has been copied to /usr/local/etc/phpmyadmin.config.inc.php 
Don't forget to: 
    - change your secret blowfish 
    - uncomment the configuration lines (pma, pmapass ...) 

==> Summary 
    /usr/local/Cellar/phpmyadmin/4.6.2: 2,256 files, 63.2M, built in 39 seconds 

我接着在終端輸出的指示,儘管這當我輸入到URL http://localhost/phpmyadmin在Safari我仍然結束與錯誤消息,Safari can't open the page "localhost/phpmyadmin" because Safari can't connect to the server "localhost"。我認爲有可能我已經在phpmyadmin.config.in.php文件中正確設置了cookie配置,但不知道如何解決這個問題。

回答

2

我發現,說明不完整,你還必須:

  1. 在年初/etc/apache2/httpd.conf爲的LoadModule php5_module刪除 '#' 註釋:

    在/etc/apache2/httpd.conf
    LoadModule php5_module libexec/apache2/libphp5.so 
    
  2. 編輯DirectoryIndex的設置:

    DirectoryIndex index.php index.html home.pl index.cgi 
    
  3. 保存文件...

  4. 啓動Apache服務器的終端應用:

    sudo apachectl start 
    

    如果它已經開始,它會告訴你一個消息:「服務已經加載」,在這種情況下運行:

    sudo apachectl restart 
    
  5. 轉到http://localhost/phpmyadmin

    刷新頁面幾次(可能是以前的狀態被緩存。)

+0

它適合我!在我的情況下,祕密河豚和取消配置線是沒有必要的。謝謝冠軍! –