php script is not getting connected to mysql db

Thread Tools Search this Thread
Top Forums Programming php script is not getting connected to mysql db
# 1  
Old 06-07-2011
php script is not getting connected to mysql db

Hi.. am a new to PHP scripting.

My php script is not getting connected to mysql db. Please help me!

i didn't get any errors in the output. may be the configuration issue. Smilie

my script is,

$username = "user";
$password = "pwd";
$hostname = "db.mysql"; 
$dbhandle = mysql_connect($hostname, $username, $password) 
if (!$dbhandle) {
    die('Could not connect: ' . mysql_error());
echo 'Connected successfully';

Thanks in Advance

Last edited by pludi; 06-07-2011 at 11:26 AM..
# 2  
Old 06-07-2011
If you are using PHP version 5.3.x, php_mssql.dll is no longer supported. The replacement is php_sqlsrv.dll.
# 3  
Old 06-07-2011
Am using the PHP version - 5.2.8
wamp server version is
# 4  
Old 06-10-2011
hi.. can any one help me ?
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming


Hello, While I was interpretation the PHP manual on database security the recent past, it said that you should by no means connect to the database as the super user but rather as one more user with more limited options. My question is: How do you generate new users and set access... (2 Replies)
Discussion started by: AimyThomas
2 Replies

2. Emergency UNIX and Linux Support

Migration of website... PHP/Mysql -which path for DB.php

Hi, I have two websites: and I didn't write either but have successfully moved all the files from to I (thought) I installed all the correct php modules and website2 is mostly up and running. However, my boss found that when we go to a... (15 Replies)
Discussion started by: Astrocloud
15 Replies

3. Shell Programming and Scripting

Mysql is not connected in php

Hi, The php is not able to connect into my mysql database. But i can able to connect by manually. I think that I have missed some points. Please guild for the same. Thanks, Mani (1 Reply)
Discussion started by: Mani_apr08
1 Replies

4. Programming


Hello every one i have question i want to build DATAbase using PHP as interface i use shell to access to linux . i have in linux psql and SQLplus i'll call all html files that has db tabels from shell directory. what should to do before design php pages. can build the database sql design... (3 Replies)
Discussion started by: Scotch
3 Replies

5. Shell Programming and Scripting

Shell script to display user logged last week and time connected

Hello all, I want to display all the user logged last week and know the time tnat they are connected. I have been looking for a solution in the Forum, but I didn't find. Thanks in advance (4 Replies)
Discussion started by: ahernandez
4 Replies

6. Shell Programming and Scripting

Shell script using ssh remains connected at primary site

Hi All, OS:AIX 5.3 L My shell script using ssh remains connected at primary site and ssh doesn't get disconnected.What should be typed and where in the shell script below to do it. Shell script ======== #!/usr/bin/ksh v_standby=`sqlplus -s /nolog <<END @standby.sql END` echo... (5 Replies)
Discussion started by: a1_win
5 Replies

7. Shell Programming and Scripting

Something went awfully wrong in PHP+MySQL :(

When I'm running a few statements through mysql console, they are working just fine but when I'm trying to write some logic in php and trying to execute it, its awfully slow.. Its perhaps performing, 10 queries in 20 seconds... :( Why is this happening? My table structures are: Name:... (23 Replies)
Discussion started by: Legend986
23 Replies

8. UNIX for Dummies Questions & Answers


I want to design a database, using mysql as a backend, and PHP as the frontend, I wanna be able to easily build forms in PHP to communicate with MySQL, is there any programs that will allow this, I really dont want to program all the forms by hand.. thankyou (2 Replies)
Discussion started by: kwalick
2 Replies

9. Cybersecurity

mysql php

with a limited knowledege of php and sql, what is a good and secure way to do passwords running an https server? (1 Reply)
Discussion started by: macdonto
1 Replies
Login or Register to Ask a Question