Difference between revisions of "Talk:PhpMyAdmin"

From ArchWiki
Jump to: navigation, search
(is this a typo?)
(typo?)
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''I have just installed mysql, and I've got'''
+
== <s> typo? </s>==
  
#mysql -u root
+
in the section that begins with;
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
+
  
 +
Use for PHP 5.x:
  
'''Thanks to the wiki i've done:'''
+
AddHandler php5-script php
  
General MySQL Connectivity
+
to
  
Check /var/run/mysqld for mysqld.sock and /tmp for mysql.sock. If mysql.sock doesn't exist, create a softlink:
+
AddHandler php5-script .php
  
# ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
+
:It's the same, see the official documentation: http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler
 +
:"The extension argument is case-insensitive and can be specified with or without a leading dot." -- [[User:Kynikos|Kynikos]] 04:35, 4 June 2011 (EDT)
  
Then restart the daemon:
+
== deny from all (.htaccess for phpmyadmin) ==
  
# /etc/rc.d/mysqld restart
+
Commenting out 'deny from all' as the article states will allow ''everyone'' access. Wouldn't a safer way to do this be:
 +
deny from all
 +
allow from localhost
 +
allow from 192.168.1.0/24
 +
Or something to this extent? [[User:Axanon|Axanon]] 06:54, 19 June 2011 (EDT)
  
 +
== Helpful info regarding config file, open_basedir, and a sample Nginx "sub-folder" ==
  
'''But should the mysql package do this?'''
+
I ran into some issues while configuring. It took me a really long time to realize why my config.inc.php file wasn't being read after updating it.
  
----
+
The Wiki page currently states:
  
== is this a typo? ==
+
Update open_basedir in /etc/php/php.ini and add "/usr/share/webapps/".
  
'''Use for PHP 5.x:'''
+
It should emphasize that /etc/webapps is needed. This is very important and I spent a lot of time debugging.
  
AddHandler php5-script php
+
The wiki page should mention that the configuration file is located in /etc/webapps/phpmyadmin (unless it already does. Maybe I overlooked it?)
  
to
+
Also, here is a sample configuration for using PHPMyAdmin as a sub-folder instead of a document root. It assumes PHPMyAdmin is linked at /srv/http/phpmyadmin. This may not be perfect but it is working for me. It follows the current configuration instructions and doesn't stray away from them as far as I can tell.
  
AddHandler php5-script .php
+
server {
 +
    location /phpmyadmin {
 +
        root          /srv/http/;
 +
        index          index.php;
 +
    }
 +
    location ~ ^/phpmyadmin.+.php$ {
 +
        root          /srv/http/; # Assumes PHPMyAdmin is linked at /srv/http/phpmyadmin
 +
        fastcgi_pass  unix:/var/run/php-fpm/php-fpm.sock;
 +
        fastcgi_index  index.php;
 +
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
 +
        include        fastcgi_params;
 +
    }
 +
}
 +
 
 +
--[[User:Kurtis|Kurtis]] ([[User talk:Kurtis|talk]]) 00:24, 6 May 2013 (UTC)

Revision as of 05:34, 9 May 2013

typo?

in the section that begins with;

Use for PHP 5.x:

AddHandler php5-script php

to

AddHandler php5-script .php

It's the same, see the official documentation: http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler
"The extension argument is case-insensitive and can be specified with or without a leading dot." -- Kynikos 04:35, 4 June 2011 (EDT)

deny from all (.htaccess for phpmyadmin)

Commenting out 'deny from all' as the article states will allow everyone access. Wouldn't a safer way to do this be:

deny from all
allow from localhost
allow from 192.168.1.0/24

Or something to this extent? Axanon 06:54, 19 June 2011 (EDT)

Helpful info regarding config file, open_basedir, and a sample Nginx "sub-folder"

I ran into some issues while configuring. It took me a really long time to realize why my config.inc.php file wasn't being read after updating it.

The Wiki page currently states:

Update open_basedir in /etc/php/php.ini and add "/usr/share/webapps/".

It should emphasize that /etc/webapps is needed. This is very important and I spent a lot of time debugging.

The wiki page should mention that the configuration file is located in /etc/webapps/phpmyadmin (unless it already does. Maybe I overlooked it?)

Also, here is a sample configuration for using PHPMyAdmin as a sub-folder instead of a document root. It assumes PHPMyAdmin is linked at /srv/http/phpmyadmin. This may not be perfect but it is working for me. It follows the current configuration instructions and doesn't stray away from them as far as I can tell.

server {
   location /phpmyadmin {
       root           /srv/http/;
       index          index.php;
   }
   location ~ ^/phpmyadmin.+.php$ {
       root           /srv/http/; # Assumes PHPMyAdmin is linked at /srv/http/phpmyadmin
       fastcgi_pass   unix:/var/run/php-fpm/php-fpm.sock;
       fastcgi_index  index.php;
       fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
       include        fastcgi_params;
   }
}

--Kurtis (talk) 00:24, 6 May 2013 (UTC)