If you are using polls in a Simple Machines Forum (SMF) forum, it is possible to determine who voted for which option in a poll by using phpMyAdmin or by entering MySQL commands.
[More Info ]
|
|
[More Info ]
yum install phpmyadmin
from a command
prompt.
Note: you may have to install the Remi Repository or the RPMForge Repository
to be able to locate and install phpMyAdmin. Instructions for configuring
yum
to use one of those repositories can be found via the links
below.
Remi Repository
RPMForge
Repository
After installing the software you will need to restart Apache, which you
can do with apachectl restart
or service httpd restart
. You can then try accessing phpMyAdmin by
http://example.com/phpmyadmin
substituting your domain name or
IP address for example.com
.
If you receive a "403 Forbidden" error with the message "You don't have permission to access /phpmyadmin on this server.", it is likely because you are attempting to access the software from outside of the server itself. The orginal phpmyadmin.conf file contains the lines below:
#
# Web application to manage MySQL
#
<Directory "/usr/share/phpmyadmin">
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin
The Deny from all
line states that the default behavior
is to prevent any IP address from accessing phpMyAdmin. The next line,
Allow from 127.0.0.1
provides for the exception of accessing
the software from the server itself, i.e., the "localhost" address
127.0.0.1
. You could change the "deny from all" to "allow from
all" to allow access from anywhere or put a "#" at the beginning of the line
to comment it out. Or, you could add additional IP addresses or
FQDN's after the
127.0.0.1
to allow access to phpMyAdmin from other systems.
E.g. you could change the line to Allow from 127.0.0.1 192.168
to also allow access from any IP address beginning with 192.168. Restart
Apache again.
If you then try accessing phpMyAdmin, e.g., you might use
http://192.168.0.10/phpmyadmin
, if 192.168.0.10 was your
webserver's IP address, but get the error message The
configuration file now needs a secret passphrase (blowfish_secret).
then you need to edit /usr/share/phpmyadmin/config.inc.php
.
Look for the following lines:
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
Place a password between the two single quotes, e.g., you could have a
password of SomeGoodPassword
with the following:
$cfg['blowfish_secret'] = 'SomeGoodPassword';
If you refresh the webpage, you should then see a phpMyAdmin login window where you are prompted to enter a username and password, which should be the mysql root account and it's password.
For further information on phpMyAdmin and MySQL, there is a book by Marc Delisle, Mastering phpMyAdmin for Effective MySQL Management.
References:
httpd.conf
, which can usually be found at
/etc/httpd/conf/httpd.conf
on
a Linux system. To determine if it is loaded, look for a line similar to the
following in the configuration file:
LoadModule authz_host_module modules/mod_authz_host.so
You can restrict access to a website that is set up as a virtual host by
including information on what IP addresses should have access to documents
on the website in a directory section Directory
as shown below.
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ServerAdmin webmaster@example.com
DocumentRoot /home/www/example
ErrorLog /home/www/example/logs/error.log
CustomLog /home/www/example/logs/transfer.log common
<Directory /home/www/example>
Order Deny,Allow
Deny from all
Allow from 192.168 127.0.0.1
</Directory>
</VirtualHost>
In the case above, access to the document root of the website, i.e., all documents on the website, is restricted to allow access only from IP addresses beginning with 192.168 and 127.0.0.1, which is the "localhost" address, meaning the address of the server itself. Anyone trying to access example.com from any other IP address would see the default webpage for the server, if any, not the example.com website.
References: