Difference between revisions of "PhpMyAdmin (Русский)"

From ArchWiki
Jump to: navigation, search
(Инсталяция)
Line 14: Line 14:
 
pacman -S phpmyadmin php-mcrypt
 
pacman -S phpmyadmin php-mcrypt
 
</pre>
 
</pre>
 +
==Configuration==
 +
 +
Make sure you delete any old version of phpmyadmin.
 +
 +
<pre>
 +
rm -r /srv/httpd/phpMyAdmin
 +
</pre>
 +
 +
Copy the example configuration file to your httpd configuration file directory.
 +
 +
<pre>
 +
cp /etc/webapps/phpmyadmin/apache.example.conf /etc/httpd/conf/extra/httpd-phpmyadmin.conf
 +
</pre>
 +
 +
Add the following line to /etc/httpd/conf/httpd.conf:
 +
 +
<pre>
 +
Include conf/extra/httpd-phpmyadmin.conf
 +
</pre>
 +
 +
You can type this into the console to produce the same effect:
 +
 +
<pre>
 +
echo -e "\nInclude conf/extra/httpd-phpmyadmin.conf" >> /etc/httpd/conf/httpd.conf
 +
</pre>
 +
 +
Comment out (or delete) 'deny form all' in /usr/share/webapps/phpMyAdmin/.htaccess, the line should look like this:
 +
 +
<pre>
 +
#deny from all
 +
</pre>
 +
 +
Otherwise you will get "Error 403 - Access forbidden!" when you try to access your phpmyadmin installation.
 +
 +
Your '/etc/httpd/conf/extra/httpd-phpmyadmin.conf' should have the following information:
 +
 +
<pre>
 +
Alias /phpmyadmin/ "/usr/share/webapps/phpMyAdmin/"
 +
        <Directory "/usr/share/webapps/phpMyAdmin">
 +
                AllowOverride All
 +
                Options FollowSymlinks
 +
                Order allow,deny
 +
                Allow from all
 +
        </Directory>
 +
</pre>
 +
 +
Open your '/etc/php/php.ini' and edit the line containing 'open_basedir' so it has the following:
 +
 +
<pre>
 +
:/usr/share/webapps/:/etc/webapps
 +
</pre>
 +
 +
For example, mine contains the following:
 +
 +
<pre>
 +
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/srv/:/usr/share/webapps/:/etc/webapps
 +
</pre>
 +
 +
You need the mcrypt module, so uncomment in {{Filename|/etc/php/php.ini}}:
 +
  ;extension=mcrypt.so
 +
:to
 +
  extension=mcrypt.so

Revision as of 20:16, 12 December 2009

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n links end

Перед установкой

Для начала прочитайте LAMP wiki, где детально расписана установка apache, php and mysql.

Инсталяция

Для инсталяции phpMyAdmin наберите в консоле.

pacman -S phpmyadmin php-mcrypt

Configuration

Make sure you delete any old version of phpmyadmin.

rm -r /srv/httpd/phpMyAdmin

Copy the example configuration file to your httpd configuration file directory.

cp /etc/webapps/phpmyadmin/apache.example.conf /etc/httpd/conf/extra/httpd-phpmyadmin.conf

Add the following line to /etc/httpd/conf/httpd.conf:

Include conf/extra/httpd-phpmyadmin.conf

You can type this into the console to produce the same effect:

echo -e "\nInclude conf/extra/httpd-phpmyadmin.conf" >> /etc/httpd/conf/httpd.conf

Comment out (or delete) 'deny form all' in /usr/share/webapps/phpMyAdmin/.htaccess, the line should look like this:

#deny from all

Otherwise you will get "Error 403 - Access forbidden!" when you try to access your phpmyadmin installation.

Your '/etc/httpd/conf/extra/httpd-phpmyadmin.conf' should have the following information:

Alias /phpmyadmin/ "/usr/share/webapps/phpMyAdmin/"
        <Directory "/usr/share/webapps/phpMyAdmin">
                AllowOverride All
                Options FollowSymlinks
                Order allow,deny
                Allow from all
        </Directory>

Open your '/etc/php/php.ini' and edit the line containing 'open_basedir' so it has the following:

:/usr/share/webapps/:/etc/webapps

For example, mine contains the following:

open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/srv/:/usr/share/webapps/:/etc/webapps

You need the mcrypt module, so uncomment in Template:Filename:

 ;extension=mcrypt.so
to
 extension=mcrypt.so