PDA

View Full Version : Access denied for user 'www-data'@ after upgrading from CMPS 2.2.1 to 3.0.1


PyroMarkus
08-23-2008, 07:29 AM
Hi there,

I had a very simple module running (PHP-file, with template wrapper) which just includes two other php-files and then starts a function from those php-includes. So the module itself is just this:

<?
include("/var/www/html/db/settings.php3");
include("/var/www/html/db/inc/func.php3");

shownewlinks();
?>

These included php-files do not connect/use anything from vB or vBA - they connect to a different mySQL database and just read out the newest entries of a table.

It worked perfectly with CMPS 2.2.1 - but when I upgraded to 3.0.1 I get those errors:

Warnung: mysql_connect() [function.mysql-connect]: Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/html/db/inc/func.php3 (Zeile ...)

Warnung: mysql_numrows(): supplied argument is not a valid MySQL result resource in /var/www/html/db/inc/func.php3 (Zeile ...)


So, any idea why suddenly the connections fails in the module? When I run the above mentioned simple module directly in browser the connection is fine and the entries listed as intended.

Thanks in advance for any help.

PyroMarkus
08-23-2008, 08:23 AM
Ok, I am now pretty sure that it had something to do with the old "global" programming in those scripts.

Can one please confirm, that "global" variables are somehow stopped to work/disabled from CMPS 2.2.1 to 3.0.1?!

Thanks!

Our Sponsors
 

Brian
08-25-2008, 01:19 PM
Admin CP => vBa CMPS => Default Settings => Main Options => Process PHP File Modules Within A Function

Try changing that setting to the opposite of what it's set to now and see if that helps. If not, can you post the contents of those two files it's including, of course with any password or other sensitive info removed?