How to install phpMyAdmin – 2.11.3 on CentOS 5.
After , I installed PHP5, Apache2 and MySQL completed. I want to
maintain MySQL service by phpMyAdmin program. This is solution of how to
install phpMyAdmin 2.11.3 on CentOS 5.
The requested URL /phpmyadmin/ was not found on this server.
if httpd.conf is in /etc/httpd/conf/httpd.conf then
#vi /etc/httpd/conf.d/phpmyadmin.conf
insert the following in the conf
Alias /phpmyadmin /var/www/html/phpMyAdmin
<Directory "/var/www/html/phpMyAdmin">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
SSLRequireSSL
</Directory>
then restart apache
http://your.domain.com/phpmyadmin/
You should be find pop up for insert your user name and password.
1.The configuration file now needs a secret passphrase(blowfish_secret)
$cfg['blowfish_secret'] = 'test'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
$cfg['blowfish_secret'] = 'dfd3kjGj12dfT27665Z';
- $ su -
- # cd /var/www/html
- # wget -c http://prdownloads.sourceforge.net/phpmyadmin/
phpMyAdmin-2.11.3-english.tar.gz?download - # tar xvfz phpMyAdmin-2.11.3-english.tar.gz
- # mv phpMyAdmin-2.11.3-english phpmyadmin
- # cd phpmyadmin
- # cp config.sample.inc.php config.inc.php
- # vi config.inc.php
:
$cfg['Servers'][$i]['auth_type'] = ‘http‘; # default is cookies
: - # service httpd restart
1 Error:
But when i try to open http://IP/phpmyadmin i get error message:
Not Found
The requested URL /phpmyadmin/ was not found on this server.
if httpd.conf is in /etc/httpd/conf/httpd.conf then
#vi /etc/httpd/conf.d/phpmyadmin.conf
insert the following in the conf
Alias /phpmyadmin /var/www/html/phpMyAdmin
<Directory "/var/www/html/phpMyAdmin">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
SSLRequireSSL
</Directory>
then restart apache
http://your.domain.com/phpmyadmin/
You should be find pop up for insert your user name and password.
2. Error:
The Configuration File Now Needs A Secret Passphrase ( blowfish_secret )
1.The configuration file now needs a secret passphrase(blowfish_secret)
Varun Tyagi's picture
Mon, 31/08/2009 - 12:05pm — Varun Tyagi
When you try to access phpmyadmin with link http://localhost/phpmyadmin, if you get this error “The configuration file now needs a secret passphrase(blowfish_secret).” message on browsing window.
Solution : Go in /usr/share/phpmyadmin/config.inc.php file and find first occurrence of 'blowfish_secret', we will get a default line:
$cfg['blowfish_secret'] = ' ';
Change it with
$cfg['blowfish_secret'] = 'test'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
2.After login into phpMyAdmin panel I get this error message[1]
Everything work fine I can manage everything, but if security is important for you, you should look at the solution.
[1]Error message:
The configuration file now needs a secret passphrase(blowfish_secret)
Solution :
cat /var/lib/phpmyadmin/blowfish_secret.inc.php
$cfg['blowfish_secret'] = 'dfd3kjGj12dfT27665Z';
Get the blowfish_secret variable and paste it into the config.inc .php
vim /usr/share/phpmyadmin/config.inc.php
3.ERROR: The configuration file now needs a secret passphrase (blowfish_secret)
This can be resolved by copying the sample configuration file to the
correct name and making a small modification to it. From the phpMyAdmin
directory do the following.
After you do this visit your-url/phpadmin-directory where if you
don’t have mcrypt and mbstrong installed you will see two more errors.
There are easy to resolve by following the directions below.
I have encountered a problem when I am trying to access my phpmyadmin, the following error came up:
Wrong permissions on configuration file, should not be world writable!
I am thinking of some access control list error. I have searched the web and found article pertaining this error. The link is not on english but you can see that config.inc.php control is set to 777 (means writable).
Since I am familiar with my host (which is Ubuntu Linux), I just apply this command:
Starting httpd: httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName Starting httpd: [Wed Feb 04 21:18:16 2004] [error] (EAI 2)Name or service not known: Failed to resolve server name for 192.16.1.100 (check DNS) -- or specify an explicit ServerName You can avoid this by adding a default generic ServerName directive at the top of the httpd.conf file that references localhost instead of the default new.host.name:80.
ServerName new.host.name:80
#cp -p config.sample.inc.php config.inc.php
You will then need to edit the file with your favorite editor and add a blowfish_secret phrase to line 17 like the below.
$cfg['blowfish_secret'] = ‘BLOWFISH PASSWORD HERE’; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
4.ERROR:
Cannot load mcrypt extension. Please check your PHP configuration.
Cannot load mcrypt extension. Please check your PHP configuration.
This is easily resolved by installing php-mcrypt using the bellow command on CentOS.
#yum install php-mcrypt=================================================================== bwt yg make windows = http://files.edin.dk/php/win32/mcrypt/ 1. put libmcrypt.dll in windows system32 folder 2. make sure php_mcrypt.dll is in php extension directory 3. make sure php.ini directive extension_dir points to the right path 4. uncomment ;extension=php_mcrypt.dll from php.ini 5. restart webserver (kalo perlu ajja) ... thats it, should work now
5.ERROR:
The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.
The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.
This error may not be seen until logging into phpMyAdmin but is also
easily resolved by installing mbstring using the below command.
#yum install php-mbstring
5.Error:
PHPMyAdmin: Wrong permission on config file…
I have encountered a problem when I am trying to access my phpmyadmin, the following error came up:
Wrong permissions on configuration file, should not be world writable!
I am thinking of some access control list error. I have searched the web and found article pertaining this error. The link is not on english but you can see that config.inc.php control is set to 777 (means writable).
Since I am familiar with my host (which is Ubuntu Linux), I just apply this command:
#chmod 705 /var/www/phpmyadmin/config.inc.php
And it works!
6.Server Name Errors:
All ServerName directives must list a domain that is resolvable in DNS, or else you'll get an error similar to these when starting httpd.Starting httpd: httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName Starting httpd: [Wed Feb 04 21:18:16 2004] [error] (EAI 2)Name or service not known: Failed to resolve server name for 192.16.1.100 (check DNS) -- or specify an explicit ServerName You can avoid this by adding a default generic ServerName directive at the top of the httpd.conf file that references localhost instead of the default new.host.name:80.
ServerName new.host.name:80
ServerName localhost
Upon examining the entry, you can determine that someone at IP
address 67.119.25.115 on February 15, looked at the web page
/dns-static.htm returning a successful 200 status code. The amount of
data sent was 15190 bytes and the surfer got to the site by clicking on
the link http://www.linuxhomenetworking.com/sendmail.htm using Microsoft http://www.linuxhomenetworking.com/sendmail.htm
The HTTP status code can provide some insight into the types of operations surfers are trying to attempt and may help to isolate problems with your pages, not the operation of the Apache.
I
have successfully configured Apache web server for my client. But why
does my clients website just say "Error 403 Forbidden"? For example when
client send request http://myclient.com/something/ Apache generate a
403 error. How do I troubleshoot this problem?
Error code that start with 4xx is generated because of client browser request. A 403 error code means client browser (or person who is trying to access your site) cannot access the requested URL. It can be caused by many reason:
a) A 403 status code indicates that the client cannot access the requested resource. It means the wrong username and password were sent in the request, or that the permissions on the server do not allow what was being asked.
b) No default directory index page is present. Upload Index.html or Index.htm file. Directive DirectoryIndex defines the default index page name. Open your apache configuration file, find out default index file name, and upload the same file to directory:
c) Make sure the CGI script requested have executable permissions set on files. Use chmod command to set permission:
d) Make sure you have permission to use .htaccess file for Apache web server. If Apache has overrides disabled. you will bump back with a 403 error.
e) Make sure correct directory permissions are set on directory:
Typical errors that you'll find here are HTTP queries for files that don't exist or forbidden requests for directory listings. The file will also include Apache startup errors which can be very useful.
The /var/log/httpd/error_log file also is the location where CGI script errors are written. Many times CGI scripts fail with a blank screen on your browser; the /var/log/httpd/error_log file most likely lists the cause of the problem.
The Apache Status Log Files
The /var/log/httpd/access_log file is updated after every HTTP query and is a good source of general purpose information about your website. There is a fixed formatting style with each entry being separated by spaces or quotation marks.Table 20-3 Apache Log File Format
Field Number | Description | Separator |
---|---|---|
1 | IP Address of the remote web surfer | Spaces |
2 | Time Stamp | Square Brackets [] |
3 | HTTP query including the web page served | Quotes "" |
4 | HTTP result code | Spaces |
5 | The amount of data in bytes sent to the remote web browser | Spaces |
6 | The web page that contained the link to the page served. | Quotes "" |
7 | The version of the web browser used to get the page | Quotes "" |
The HTTP status code can provide some insight into the types of operations surfers are trying to attempt and may help to isolate problems with your pages, not the operation of the Apache.
Table 20-4 HTTP Status Codes
HTTP Code | Description |
---|---|
200 | Successful request |
304 | Successful request, but the web page requested hasn't been modified since the current version in the remote web browser's cache. This means the web page will not be sent to the remote browser, it will just use its cached version instead. Frequently occurs when a surfer is browsing back and forth on a site. |
401 | Unauthorized access. Someone entered an incorrect username / password on a password protected page. |
403 | Forbidden. File permissions or contexts prevents Apache from reading the file. Often occurs when the web page file is owned by user "root" even though it has universal read access. |
404 | Not found. Page requested doesn't exist. |
500 | Internal server error. Frequently generated by CGI scripts that fail due to bad syntax. Check your error_log file for further details on the script's error message. |
Apache 403 Forbidden Error and Solution
Error code that start with 4xx is generated because of client browser request. A 403 error code means client browser (or person who is trying to access your site) cannot access the requested URL. It can be caused by many reason:
a) A 403 status code indicates that the client cannot access the requested resource. It means the wrong username and password were sent in the request, or that the permissions on the server do not allow what was being asked.
b) No default directory index page is present. Upload Index.html or Index.htm file. Directive DirectoryIndex defines the default index page name. Open your apache configuration file, find out default index file name, and upload the same file to directory:
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml
c) Make sure the CGI script requested have executable permissions set on files. Use chmod command to set permission:
$ chmod +x file.cgi
d) Make sure you have permission to use .htaccess file for Apache web server. If Apache has overrides disabled. you will bump back with a 403 error.
e) Make sure correct directory permissions are set on directory:
<Directory "/home/domain/www"> Options +Indexes FollowSymLinks +ExecCGI AllowOverride AuthConfig FileInfo Order allow,deny Allow from all </Directory>f) Make sure the underlying file system permissions allow the User/Group under which Apache is running to access the necessary files. You can determine which case applies to your situation by checking the error log. In the case where file system permission are at fault, remember that not only must the directory and files in question be readable, but also all parent directories must be at least searchable by the web server in order for the content to be accessible. For example /home/httpd/theos.in/ must be searchable, enter:
# chmod +x /home/httpd/theos.in/
The Apache Error Log Files
The /var/log/httpd/error_log file is a good source for error information. Unlike the /var/log/httpd/access_log file, there is no standardized formatting.Typical errors that you'll find here are HTTP queries for files that don't exist or forbidden requests for directory listings. The file will also include Apache startup errors which can be very useful.
The /var/log/httpd/error_log file also is the location where CGI script errors are written. Many times CGI scripts fail with a blank screen on your browser; the /var/log/httpd/error_log file most likely lists the cause of the problem.
No comments:
Post a Comment