Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,015 members, 7,817,989 topics. Date: Sunday, 05 May 2024 at 02:13 AM

DreamweaverCS4 Database Connection Wahala! - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / DreamweaverCS4 Database Connection Wahala! (956 Views)

Database Connection Problem / Dreamweaver Php Database Connection / I Need Access Database Connection String (2) (3) (4)

(1) (Reply) (Go Down)

DreamweaverCS4 Database Connection Wahala! by SMcJ: 11:30pm On May 14, 2010
Hello everyone.Each time I want to test my database connection in Dreamweaver CS4 it shows unidentified error has occured..Even when I use Dreamweaver 8,I experience same connection problem.Pls can someone help me out?
Thanks
Re: DreamweaverCS4 Database Connection Wahala! by SMcJ: 10:25pm On May 15, 2010
Is there anyone in the house?
Re: DreamweaverCS4 Database Connection Wahala! by TechPros(m): 10:55am On May 16, 2010
u need to explain better
Re: DreamweaverCS4 Database Connection Wahala! by jjjkkkooo: 4:29pm On May 16, 2010
why would u want to use dreamweaver DBase connector. I feel u should hard code it urself. with this u have full control. Are u using php/mysql or what?
Re: DreamweaverCS4 Database Connection Wahala! by SMcJ: 8:46pm On May 17, 2010
Am using PHP/MySQL.Loaded a file with dbase as tutorial but when I test dbase connection,it's giving me that error.
Any way out?
Don't know whether am a bit explicit?
Re: DreamweaverCS4 Database Connection Wahala! by jjjkkkooo: 5:48pm On May 18, 2010
My bros, u are not explixit enough. What do u mean by "Loaded a file with dbase as tutorial ". Let me give u the connection string of php with mysql.
Re: DreamweaverCS4 Database Connection Wahala! by jjjkkkooo: 6:07pm On May 18, 2010
Now, i dont know how u created ur dbase and if u created ur dbase well. i always use the phpmyadmin that comes with xampp. Its quite easy. I use localhost as my host, username is "root", no password to enter the database. The dbase name is "summit", the table is "f_timer" (its a church-based database). If u still have problem let me know. This is my code

<?php

$con = mysql_connect("localhost", "root", ""wink or die ("Error , check your server connection."wink;
mysql_select_db("summit"wink;
$query="insert into f_timer(firstname,lastname,visit) values ('$fname','$lname','$visit')";

mysql_query($query) or die(mysql_error());

echo "1 record added";

mysql_close($con);
}
?>
Re: DreamweaverCS4 Database Connection Wahala! by SMcJ: 11:17am On May 19, 2010
jjjkkkooo:

My bros, u are not explixit enough. What do u mean by "Loaded a file with dbase as tutorial ". Let me give u the connection string of php with mysql.

What I actually mean is that, I have PHP/MySQL tutorial CD.I loaded it in MyPHPAdmin dbase.Then when I opened the file in Dreamweaver and test My dbase connection it gives me error.
Pls if u still need my explanation then give screenshot.

Hear from you.
Re: DreamweaverCS4 Database Connection Wahala! by jjjkkkooo: 4:43pm On May 19, 2010
i really dont know where the problem is from. Since u are following a tutorial its difficult to fix. i just felt u needed a code to connect ur php file to a mysql dbase. That was why i gave u that. Even if i see the screenshot i may find it dificult to identify d problm, since im not used to connecting from design view. i connect with codes and it works on all versions of dreamweaver. Sorry!
Re: DreamweaverCS4 Database Connection Wahala! by onyengbu1(m): 3:43pm On May 20, 2010
jjjkkkooo:

why would u want to use dreamweaver DBase connector. I feel u should hard code it urself. with this u have full control. Are u using php/mysql or what?

He is obviously a beginner and he states that he is using DW, if he hard code it himself, he might not be able to enjoy all the DW preview stuffs he is supposed to get.

@SMcJ,
the problem you are experiencing have something to do with using XP sp2 and DW. I think theres a patch file that corrects that problem on some site somewhere. I can no longer remember where or how i got it a long time ago.

However, you can still get your DB connection going by putting all the files DW needs to run. You however have to add the files urself.
You need to go through these steps.

if you havent, you will need to create a Folder named 'Connections' and inside it you put the connection file that I will show you just now.

Step 1.

Below is the file that DW will create for u IF :
1. your database name is 'db_name'
2. your database username is 'db_username' (by default it is usually 'root')
3. your database password is 'db_password' (leave it blank if did not specify a password for your db.)


<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conn = "localhost";
$database_conn = "db_name";
$username_conn = "db_username";
$password_conn = "db_password";
$purity = mysql_pconnect($hostname_conn, $username_conn, $password_conn) or trigger_error(mysql_error(),E_USER_ERROR);
?>

Above is what DW will create IF you used the names i suggested above. Now make sure you change all these names to match the one u have on that tutorial.

Step 2.
When you go through a database connection with DW, it also creates a folder it calls "_mmServerScripts" in your web root and inside this folder, it creates 2 additional files viz: MMHTTPDB.php and mysql.php.

These files helps do the live preview of database contents that makes DW very popular with beginners.

I am not sure it is legal to post the content of these files here on NL but . . . . .

when all these files and folders are in place, run your DW again and you can then do all your fun stuff with DW.

NB: I am not saying that these steps are necessary but I am saying that those are what DW requires.
there are simpler ways to do these things but if you are using DW, obey their rules.
Re: DreamweaverCS4 Database Connection Wahala! by onyengbu1(m): 3:54pm On May 20, 2010
I posted a response to your question but somehow I didnt see it again.

I guess it is too long for the bot.

However, your problem has something to do with using Windows XP sp2 and DW.

Theres a folder (_mmServerScripts) with two files that DW normally create after the Db connection procedure, find it from someone with a working DB connection and replace the one u have on your own web root and you will be ok.
Re: DreamweaverCS4 Database Connection Wahala! by SMcJ: 5:26am On May 23, 2010
Thanks Onye.Will give it shot.
Re: DreamweaverCS4 Database Connection Wahala! by SMcJ: 5:30am On May 23, 2010
Thanks Onye.Will give it shot.

(1) (Reply)

How To Put Donation Button In My Website / New Hyip Blog Owned By A Nigerian / Hot .ng Domain Names

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 19
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.