PHP/MySQL Problem

I am installing a php program(webcp), and I ran into a problem. Whenever I access a page, it gives an error:

Warning: Supplied argument is not a valid MySQL result resource in /home/ admin/cp/template.inc.php on line 15
// web.cp

I then emptied that php file, and the login page display. But whenever I try to login, it gives this error,

Warning: Supplied argument is not a valid MySQL result resource in /home/ admin/cp/login.php on line 9

Warning: Cannot add header information - headers already sent by (output started at /home/admin/cp/login.php:9) in /home/ admin/cp/login.php on line 10

Looking at the source code and the two instances of error, I am suspecting that it has something to do with the php function mysql_query() and mysql_fetch_array(). However, as I am not a PHP programmer, I could not figure how it works.

I have the same code on another server, which works, but that server is using PHP 4.0.6. I am using PHP 4.0.4pl1 and MySql 3.23.36 for this server.

Could someone tell me why such error may arise and what to do to correct them?

Thanks,

Peter

 

 

 

 

Top