Web Hosting Talk







View Full Version : cbms


fishface
03-24-2002, 03:22 PM
Anyone had success getting cbms working ?

Keep getting these errors in the usermgmt.php (to load admin), even though i have modifed the usermgmt.php and common.php files

Warning: Supplied argument is not a valid MySQL result resource in /home/*******/public_html/billing/cbms-0.7/usermgmt.php on line 6

Warning: Cannot send session cache limiter - headers already sent (output started at /home/******/public_html/billing/cbms-0.7/dbinfo.php:5) in /home/******/public_html/billing/cbms-0.7/usermgmt.php on line 7

Warning: Supplied argument is not a valid MySQL result resource in /home/******/public_html/billing/cbms-0.7/usermgmt.php on line 17

Have already loaded all the tables from mysql.dump

kunal
03-25-2002, 05:03 AM
could you post your code from line 1-8 ?

fishface
03-25-2002, 05:12 AM
<?
include("common.php");
include("dbinfo.php");
$query="SELECT count(name) FROM USERS";
$result=mysql_query($query,$db_link);
$one=mysql_fetch_row($result);
if($one[0]==0){session_register("accesslvl"); $accesslvl=4;}
if(!secure(4)){print("You do not have access to this page.<br>");exit();}
$query="SELECT name,access FROM USERS WHERE access<=$accesslvl";


etc

kunal
03-25-2002, 05:25 AM
this is your line 6 : if($one[0]==0){session_register("accesslvl"); $accesslvl=4;}

correct?? there doesnt seem to be any mysql code there? none the less, above this line add this :

echo mysql_error();

that should give you a more detailed error...

fishface
03-25-2002, 07:23 AM
Hi

I now get :
Warning: Supplied argument is not a valid MySQL result resource in /home/*******/public_html/billing/cbms-0.7/usermgmt.php on line 6
No Database Selected

kunal
03-25-2002, 07:30 AM
thats what i thought... your database is being selected.. is this variable correct : $db_link ?

you would have to check your dbinfo.php file for that...

fishface
03-25-2002, 07:38 AM
excellent , thanks. works fine now

akaize
04-23-2002, 05:53 AM
I too have the same problem, but I am not very good in PHP/Mysql, need your help please. Folloiwng is my dbinfo.php

<?
$db_link=mysql_pconnect("localhost","akaize","london");
if(!mysql_select_db(cbms,$db_link))
{
print("There was an error connecting to the database.");
}
?>


My user name = akaize
Password = london
database name = cbms

mk123
08-01-2002, 04:23 PM
hey .. any guys there?

One query i had, can i email directly the user Invoice in html format?
so that customer no need to login and check

Thanks

CBS
08-10-2002, 04:15 AM
I changed the $accesslvl=4.
but still cannot access to the page. Here is the error message:Password supplied for user: Admin is Invalid..
someone here can help me out? how to set up the username and password in usermgmt.php?

mk123
08-10-2002, 09:13 AM
ok guys .. i found it!
i tweaked the manlinvc.php and now i can send invoices in html format to my customers :))

hey ppl, why u have error connecting? i do not remember i got those errors anytime... maybe download cbms once more and start a fresh .. step by step..

cheers!