我有一個名爲footer10.php
的PHP文件,在共享主機中工作得很好。我將它移動到虛擬服務器,它不再有效。文件在虛擬服務器中不起作用
我得到這些錯誤,當我的文件拉到了在瀏覽器中:
Warning: mysql_query() [function.mysql-query]: Access denied for user 'apache'@'localhost' (using password: NO) in /var/www/.../...com/httpdocs/.../footer10.php on line 23
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /var/www/.../...com/httpdocs/.../footer10.php on line 23
Access denied for user 'apache'@'localhost' (using password: NO)
這是文件的第23行:
$presult = mysql_query("SELECT COUNT(*) FROM submission") or die(mysql_error());
任何想法,我需要做的,使該文件在虛擬服務器上工作?
由於提前,
約翰
您是否連接到數據庫主機?發佈相關代碼 – 2011-01-06 11:09:58