0

i set up a dedicaced server with a tutorial.

I set in PHP :

mbstring.language=UTF-8 
mbstring.internal_encoding=UTF-8 
mbstring.http_input=UTF-8 
mbstring.http_output=UTF-8 
mbstring.detect_order=auto

But each time there is a $ in the password (i have one for the root of mysql + other script) the password won't work.

For example, I just removed the $ in the password for a script, and it worked.

When i connect @root on mysql via phpmyadmin : don't work When i connect @root via PHP : works

What can i do for this problem please ?

PS: my password works when i connect mysql via the console

Tristan
  • 498
  • 2
  • 9
  • 27

3 Answers3

1

Ok, problem found, only happens on firefox. I clean up all cache + cookies. Problem solved.

Weird. But solved. Thanks all ;)

Tristan
  • 498
  • 2
  • 9
  • 27
0

$ in PHP has a special meaning, you should escape it if used in double quotes (") strings. Or you should use single quoted (') strings:

"Pa$$word"

won't work, while

"Pa\$\$word"

and

'Pa$$word'

will work.

Daniele Santi
  • 2,529
  • 1
  • 25
  • 22
  • but i can't escape the password in the interface of PHPMYADMIN when he ask me my password. How can i fix that ? – Tristan May 24 '10 at 12:55
  • @Tristan does it works when you connect via console? as in "mysql -u root -p" ? – Daniele Santi May 24 '10 at 13:02
  • yes it works, i've just tested – Tristan May 24 '10 at 13:06
  • #1045 - Acc�s refus� pour l'utilisateur: 'root'@'@localhost' (using password: No) IT's what phpmyadmin outputs. ("accès refusé : means access denied) – Tristan May 24 '10 at 13:11
  • @Tristan seems a problem with the configuration of phpmyadmin, as it says "using password: No". Try go back to the setup page and check the authentication options. – Daniele Santi May 24 '10 at 13:16
  • do you mean vi /etc/mysql/my.cnf ? What am i looking for exaclty ? – Tristan May 24 '10 at 13:19
  • @Tristan no, you should configure phpmyadmin via its web interface. The url should be something like http://myserver/phpmyadmin/setup – Daniele Santi May 24 '10 at 13:33
  • @MrShunz Page not found. Plus, it worked couple of days ago and i didn't touche anything in the configuration of phpmyadmin. – Tristan May 24 '10 at 13:35
0

In your php configuration, set to vice versa of magic-quotes-runtime variable. here is more info: http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-runtime. Phpmyadmin will able to support for passwords contains $. & also use recent versions of PMA.

risyasin
  • 1,574
  • 9
  • 16