• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved (bug ?) mysql_pconnect() fails if password contains $

AdrianC

Basic Pleskian
Plesk 17.5.3 on Centos.
I just noticed that if my database password contains "$" I get "access denied for user@localhost" error in PHP.
It works to connect just fine from other database tools, but in PHP I get db connection error.
I think also Plesk uses "$" when generating a random password.
You might want to fix that because for us it can be a pain to debug.
 
This is no bug in plesk, but normal php string behaviour.
$ is interpreted as the start of a variable in php. So when that is in a password, you need to escape it.

$_DB["password"] = "mypas$word"; translates for php in mypas + the content of the variable $word, as $word is not initialized or filled, it will be empty and the password you pass to mysql will be in this case: mypas .... resulting in an error.

it should be

$_DB['password'] = 'mypas$word'; (single quotes)
or
$_DB['password'] = "mypas\$word"; (escape the $)

Personally i find using single quotes less error prone.

regards
Jan
 
Well that's embarrasing, I was fully aware of all the above but I didn't realise it :)
Thanks.

// Maybe it would still be good for Plesk to avoid generating passwords containing $, as a precaution.
 
Back
Top