Changing Config.ini.php
Posted by: Karl (---.bulldogdsl.com)
Date: February 13, 2006 04:35PM

Hi i am a complete 'newbie' to wamp and its components but have been trying for over a week to get the wamp environment to work. I have installed wamp and set the root password and deleted the anonymous user account as stated in the book i am using but since then i have not been able to access the phpMyAdmin, i have done some research that says i have to change the Config.ini.php but cannont find what or how i need to change this file to allow phpMyAdmin to work, it was working fine when i tested it before i set the root password. Now all i get is an error:

Welcome to phpMyAdmin 2.7.0-pl2

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server.

MySQL said: #1045 - Access denied for user 'root'@'localhost' (using password: NO)

Can anyone help?

Thank you in advance for any help or advice you can give it is very much appreciated.

Options: ReplyQuote
Re: Changing Config.ini.php
Posted by: sukhdev singh (---.static.exatt.net)
Date: February 13, 2006 06:23PM

Hi Karl
please check your config.inc.php and make sure change

C:\wamp\phpmyadmin\config.inc.php


line 31

find

$cfg['blowfish_secret'] = '';

change to this one

$cfg['blowfish_secret'] = 'http'; or $cfg['blowfish_secret'] = 'cookie';


line 71

find

$cfg['Servers'][$i]['auth_type'] = '';

change to this one

$cfg['Servers'][$i]['auth_type'] = 'http'; or $cfg['Servers'][$i]['auth_type'] = 'cookie';

Options: ReplyQuote
Re: Changing Config.ini.php
Posted by: kirti (---.cable.ubr03.newm.blueyonder.co.uk)
Date: February 15, 2006 12:50AM

hi sukhdev

I'm having the same problem as karl. I did what you've mentioned in your post but the following error occurred:

Parse error: syntax error, unexpected T_LOGICAL_OR in c:\wamp\phpmyadmin\config.inc.php on line 45

Options: ReplyQuote
Re: Changing Config.ini.php
Posted by: sukhdev singh (---.static.exatt.net)
Date: February 15, 2006 04:49AM



line 45

$cfg['blowfish_secret'] = 'http';


line 71

$cfg['Servers'][$i]['auth_type'] = 'http';

please choose one 'http' or 'cookie'

Options: ReplyQuote
Re: Changing Config.ini.php
Posted by: yfastud (---.cable.mindspring.com)
Date: February 18, 2006 04:08PM

Hi,

I'm not sure about how 'blowfish_secret' works because my line 45, which is the line $cfg['blowfish_secret'] = ''; still the same since I install wampserver, but all I know is you guys need to set password in 2 places or you will get the problem as already got.

Follows or check if you already did these:

Set password:

1. Set password in privileges in phpMyAdmin.
On browser, log in your localhost, then get in phpMyAdmin , then Privileges, then edit privileges. In the box Change Password, select Password, type in "yourpassword", then Re-type "yourpassword", then click Go.

2. Set password in config.inc.php.
In wamp folder, get in phpmyadmin folder, open config.inc.php, go to line:

$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password

then type in "yourpassword", must be the same as in number 1 above, for example:
$cfg['Servers'][$i]['password'] = 'yourpassword';

In addition, if like to set the permission to access PHPmyadmin and SQLitemanager on browser (credited to Joshua).

1. open httpd.conf in wamp/Apache2/conf/

2. find the lines

# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>

3. after the </directory> line above add the following:

<Directory "C:/Internet/wamp/www/phpmyadmin">
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Directory>

<Directory "C:/Internet/wamp/www/sqlitemanager">
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Directory>

4. change location of the directories as your might be different from "C:/Internet/wamp/www/phpmyadmin"

Also, if want to set permission on Alias [this credits to myself winking smiley ], in Alias folder (/wamp/Apache2/conf/alias), replace these lines in phpmyadmin.conf and splitemanager.conf:

Order allow,deny
Allow from all

By these lines:

Order deny,allow
Deny from all
Allow from 127.0.0.1

Have fun,

yfastud

Options: ReplyQuote
Re: Changing Config.ini.php
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 18, 2006 06:22PM

Karl
MySQL said: #1045 - Access denied for user 'root'@'localhost' (using password: NO)

Can anyone help?


If you are very common error, Access denied for user 'root'@'localhost' (using password: NO), it means you must have set a password for your root user. You need to find this line in your config.ini.php file on line 70 and change it to what your new password is:

change line 70 from this:
$cfg['Servers'][$i]['password'] = '';

to this:
$cfg['Servers'][$i]['password'] = 'YourPasswordHere';



kirti
I'm having the same problem as karl. I did what you've mentioned in your post but the following error occurred:

Parse error: syntax error, unexpected T_LOGICAL_OR in c:\wamp\phpmyadmin\config.inc.php on line 45


Make sure that all lines of code in your config.inc.php file end with a simicolon, like this:

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';


yfastud

I'm not sure about how 'blowfish_secret' works because my line 45, which is the line $cfg['blowfish_secret'] = ''; still the same since I install wampserver, but all I know is you guys need to set password in 2 places or you will get the problem as already got.

the configuratioin of this $cfg['blowfish_secret'] = ''; is not required but I do recommended you set it to something. It is used to encrypt your password for security conserns. It can be any combination of letters and numbers.

Options: ReplyQuote
Re: Changing Config.ini.php
Posted by: callie (---.hsd1.tx.comcast.net)
Date: March 05, 2011 03:30PM

Hi everyone. I'm new to wamp and I am trying to work on my first joomla site. It was working fine for a few months but for some reason I was unable to connect recently. I have tried to reinstall but I am now receiving an error that I do not understand. When I try to connect to phpMyAdmin I get this:

Parse error: syntax error, unexpected T_VAR in C:\wamp\apps\phpmyadmin3.3.9\config.inc.php on line 11

Here is my file:

<?php

/* Servers configuration */
$i = 0;

/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = ‘/var/lib/mysql/mysql.sock’;
$cfg['Servers'][$i]['connect_type'] = ’socket’;
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

/* End of servers configuration */

$cfg['DefaultLang'] = 'en-utf-8';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';


/* rajk - for blobstreaming */
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';


?>


Any help would be appreciated. I'm also new to the forum so I apologize if I posted this in the wrong place.

Thanks!

Options: ReplyQuote
Re: Changing Config.ini.php
Posted by: yfastud (Moderator)
Date: March 07, 2011 05:32AM

Quote

I'm also new to the forum so I apologize if I posted this in the wrong place.
The last post dated 2006

Change line 11 from:
$cfg['Servers'][$i]['socket'] = ‘/var/lib/mysql/mysql.sock’;
To:
$cfg['Servers'][$i]['socket'] = ‘’;

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Changing Config.ini.php
Posted by: callie (---.hsd1.tx.comcast.net)
Date: March 07, 2011 03:58PM

Problem solved. Thank you so much!

Options: ReplyQuote


Sorry, only registered users may post in this forum.