Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connecting to database fail

Status
Not open for further replies.

khalique

Programmer
Aug 25, 2001
3
GB
i am not able to connect the database,plz any one help me
thanks....even die statement is not working........i think i need some configuration ......plz tell me
khalique
 
If you provide the code you are using, then we can help. Otherwise, there are too many possibilities to list.

chad. ICQ: 54380631
 
sir this is a simple code....& i am receiving a fatel error


<html>
<head>
<title>Example</title>
</head>
<body>
adding products now...
<?php

$dbh = dbmopen( &quot;d:/data/product&quot;, &quot;c&quot; ) or die(&quot;couldn't open DBM&quot;);
dbminsert ($dbh, &quot;khalique&quot;, &quot;23&quot;);
dbmclose($dbh);
?>

</body>

</html>
 
What is the fatal error? Is it your 'couldn't open DBM' message.

Make sure DBM support is available. PHP has to be configured and compiled with DBM support such as the following (as just one of the ways to do it):

./configure --with-gdbm=/<prefix> --with-ndbm --with-db=/<prefix> .......

Many people have experienced problems when upgrading PHP from v3 to v4 and realize that they have to reconfigure and compile PHP4 to support these.

Chad. ICQ: 54380631
 
Also, make sure you are not running in safe mode. If you are, then PHP checks the SUID for these databases and they has to match your SUID.

phpinfo(); can tell you a great deal and might even provide you with some answers.

Chad. ICQ: 54380631
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top