Migrating from Apache2 to Lighttpd creating errors in PHP/mySQL?
Posted
by
Jean-Philippe Murray
on Server Fault
See other posts from Server Fault
or by Jean-Philippe Murray
Published on 2012-03-24T16:40:39Z
Indexed on
2012/03/24
17:31 UTC
Read the original article
Hit count: 492
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,
© Server Fault or respective owner