WPML problem adding languages

Hello, it’s me again!

I’m trying to set up a website based on bedrock on a vanilla database with WPML installed in it.

For some reasons I cannot add languages: here’s the log.

[Fri Jun 06 11:44:24.723142 2014] [:error] [pid 16701:tid 139942223136512] [client] FastCGI: server “/usr/lib/cgi-bin/php5-fcgi” stderr: PHP message: PHP Warning:  mysql_real_escape_string(): Access denied for user ‘deploy’@‘localhost’ (using password: NO) in /home/www/xxx/releases/20140606144803/web/app/plugins/sitepress-multilingual-cms/sitepress.class.php on line 1252, referer: http://xxx/wp/wp-admin/admin.php?page=sitepress-multilingual-cms/menu/languages.php

It looks is not using db credential at all… Any idea?

Well we don’t know/have the code for that plugin so it’s almost impossible to say. Is the source open anywhere?

nope not open source, I can provide the script privately though.

So, I figured out the problem. It looks like this plugin doesn’t inherit the DB credential in .env file at all. Despite it tries to connect the database with deploy user from capistrano workflow. I fixed that very issue creating a temp user with “deploy :: ‘’” credentials, and setting WPML up, other than that everythinkg works. But this sucks big time. Ideas to improve it for WPML guys so I submit a request?

Are you using the latest WPML version?

I have no idea what DB credentials WPML would be trying to use. It doesn’t need to know about the .env file since we just set the normal WP db constants that $wpdb uses.

I can’t replicate this issue with WPML 3.1.5. It all works as intended.

What version are you using?

Can help maybe: http://wpml.org/forums/topic/composer-support/#post-419855 – for composer.