Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:phpma_ispconfig [2017/12/13 17:34]
linux:phpma_ispconfig [2017/12/13 17:34] (current)
Line 1: Line 1:
 +====== Installing and using phpMyAdmin (4.2.2+) with ISPConfig 3+ (CentOS 6.5) ======
 +<WRAP center info>
 +This guide assumes apache 2.2 and php 5.5 are already installed on the server (latest phpMyAdmin from remi, requires php 5). It also assumes working installation of ISPConfig 3+.
 +</​WRAP>​
  
 +ISPConfig 3 currently uses mod_fcgid to as the default php handler. This causes problems, because the rpm-based (remi) distribution of phpMyAdmin only supports mod_php. Below are the steps to installing phpMyAdmin, and configuring it to run in an ISPConfig mod_fcgi environment.
 +
 +===== Installation =====
 +In order to install the latest phpMyAdmin, the remi, and remi-php55 repositories are needed. You can read about installing the repositories [[http://​rpms.famillecollet.com/​|here]].
 +
 +<WRAP center important>​As of ~~LASTMOD~~,​ **remi-php55** contains an RC version of phpMyAdmin 4. The **remi** repository contains the latest stable (4.2.2). Do not use package name '​phpmyadmin'​ as this will install the package from other repositories you may have (such as dag, or rpmforge), and it is very old.
 +</​WRAP>​
 +<code console>​yum install --enablerepo=remi --disablerepo=remi-php55 phpMyAdmin</​code>​
 +
 +===== Configuration =====
 +After installing, go to /​etc/​httpd/​conf.d,​ and rename the file phpMyAdmin.conf to phpMyAdmin.conf.rpmsave. This will de-activate the mod_php-based configuration file.
 +<code console>
 +mv /​etc/​httpd/​conf.d/​phpMyAdmin.conf /​etc/​httpd/​conf.d/​phpMyAdmin.conf.rpmsave
 +</​code>​
 +
 +phpMyAdmin, must then be enabled on a per-website basis in ISPConfig 3. Log in to the admin, and navigate to the website you would like to enable PMA for. On the **Apache Directives** box, paste the following:
 +<code apache>
 +# conf for enabling phpMyAdmin
 +# this is done per website.
 +Alias /phpMyAdmin /​usr/​share/​phpMyAdmin
 +Alias /phpmyadmin /​usr/​share/​phpMyAdmin
 +Alias /mysqladmin /​usr/​share/​phpMyAdmin
 +
 +<​Directory /​usr/​share/​phpMyAdmin/>​
 +    <​FilesMatch "​\.php[345]?​$">​
 +        SetHandler fcgid-script
 +    </​FilesMatch>​
 +    FCGIWrapper /​var/​www/​php-fcgi-scripts/​{user}/​.php-fcgi-starter .php
 +    FCGIWrapper /​var/​www/​php-fcgi-scripts/​{user}/​.php-fcgi-starter .php3
 +    FCGIWrapper /​var/​www/​php-fcgi-scripts/​{user}/​.php-fcgi-starter .php4
 +    FCGIWrapper /​var/​www/​php-fcgi-scripts/​{user}/​.php-fcgi-starter .php5
 +    Options +ExecCGI
 +    AllowOverride All
 +    Order allow,deny
 +    Allow from all
 +</​Directory>​
 +
 +<​Directory /​usr/​share/​phpMyAdmin/​setup/>​
 +    <​FilesMatch "​\.php[345]?​$">​
 +        SetHandler fcgid-script
 +    </​FilesMatch>​
 +    FCGIWrapper /​var/​www/​php-fcgi-scripts/​{user}/​.php-fcgi-starter .php
 +    FCGIWrapper /​var/​www/​php-fcgi-scripts/​{user}/​.php-fcgi-starter .php3
 +    FCGIWrapper /​var/​www/​php-fcgi-scripts/​{user}/​.php-fcgi-starter .php4
 +    FCGIWrapper /​var/​www/​php-fcgi-scripts/​{user}/​.php-fcgi-starter .php5
 +    Options +ExecCGI
 +    AllowOverride All
 +    Order Deny,Allow
 +    Deny from All
 +    Allow from 127.0.0.1
 +    Allow from ::1
 +</​Directory>​
 +
 +<​Directory /​usr/​share/​phpMyAdmin/​libraries/>​
 +    Order Deny,Allow
 +    Deny from All
 +    Allow from None
 +</​Directory>​
 +
 +<​Directory /​usr/​share/​phpMyAdmin/​setup/​lib/>​
 +    Order Deny,Allow
 +    Deny from All
 +    Allow from None
 +</​Directory>​
 +
 +<​Directory /​usr/​share/​phpMyAdmin/​setup/​frames/>​
 +    Order Deny,Allow
 +    Deny from All
 +    Allow from None
 +</​Directory>​
 +</​code>​
 +
 +Do not forget to replace **{user}** with the ISPConfig assigned **linux user** for the website (i.e. web10).
 +
 +Also, you must append the following to the **PHP open_basedir** textbox:
 +<​code>:/​usr/​share/​phpMyAdmin:/​var/​lib/​phpMyAdmin:/​etc/​phpMyAdmin</​code>​
 +
 +After making the changes, hit the '​Save'​ button. The changes should be reflected shortly thereafter. Again, phpMyAdmin can only be enabled on a per-website basis, because of the use of suexec and website-specific permissions for fcgid.
  • linux/phpma_ispconfig.txt
  • Last modified: 2017/12/13 17:34
  • (external edit)