Migrating from Apache2 to Lighttpd creating errors in PHP/mySQL?
- by Jean-Philippe Murray
Ok,
I've been using basics ubuntu LAMP setups for years now, and I wanted to give lighttpd a try. My LAMP setup run in a virtual machine with scripts running just fine. So I created a new virtual machine, starting with a fresh install of ubuntu and made my setups. On this new VM, lighttpd + php works just fine. (Or at least it seems...)
Problem occurs when I take the scripts from my LAMP setup and upload them to the new VM. I'm getting :
Warning: mysql_real_escape_string(): Access denied for user 'www-data'@'localhost' (using password: NO)
My lighttpd setup is configured as php-cgi but not my apache2 setup. Could this be the source of the problem? I think that scripts would be independent of the server configuration, so I doubt it.
Also, I know that my DB connexion informations are good (as I can log in via phpmyadmin perfectly).
I'm in the dark here, any pointers ?
Thanks,