•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,552 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,472 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 3137 | Replies: 4
![]() |
•
•
Join Date: Aug 2004
Posts: 14
Reputation:
Rep Power: 5
Solved Threads: 0
Hi,
I have apache, php, phpmyadmin, and mysql in my computer.
I could connect to mysql and manipulate database well before. But for an unknown reason, I can't do it now. Each time when I tried to do this, it gave an error message as "Can't create TCP/IP socket (10091)". My simplified php script is:
<?php
mysql_connect("localhost", "username", "password");
?>
I will really appreciate it if someone would help me.
Thanks a lot.
phpnovice
I have apache, php, phpmyadmin, and mysql in my computer.
I could connect to mysql and manipulate database well before. But for an unknown reason, I can't do it now. Each time when I tried to do this, it gave an error message as "Can't create TCP/IP socket (10091)". My simplified php script is:
<?php
mysql_connect("localhost", "username", "password");
?>
I will really appreciate it if someone would help me.
Thanks a lot.
phpnovice
<?php
mysql_connect("localhost", "username", "password");
?>Change to:
<?php
$conn = mysql_connect("localhost", "username", "password");
or die ("Couldn't connect to server.");
?>YoungCoder
•
•
Join Date: Aug 2004
Posts: 14
Reputation:
Rep Power: 5
Solved Threads: 0
Hi,
Thanks a lot for your reply. I will try your code sometime. But I guess the problem might come from Apache because it works fine now when I switched to Abyss.
It appears Apache has more protection than that Abyss does. So, I will switch back and test your code.
Do you have any thoughts on my reply? As my name, php novice, indicates, any reply will be helpful.
Thank you again.
phpnovice
Thanks a lot for your reply. I will try your code sometime. But I guess the problem might come from Apache because it works fine now when I switched to Abyss.
It appears Apache has more protection than that Abyss does. So, I will switch back and test your code.
Do you have any thoughts on my reply? As my name, php novice, indicates, any reply will be helpful.
Thank you again.
phpnovice
•
•
•
•
Originally Posted by YoungCoder
<?php mysql_connect("localhost", "username", "password"); ?>
Change to:
<?php $conn = mysql_connect("localhost", "username", "password"); or die ("Couldn't connect to server."); ?>
YoungCoder
Well to tell the truth i think your previouscode should have worked, al i can really think of is that there may be a problem later on in the code, i have never acctually come accross that specific error myself...
You may be able to get more information on the problem by using mysql_error()
e.g:
[php]
<?php
$conn = mysql_connect("localhost", "username", "password");
or die (mysql_error());
?>
[/php]
Hope this helps,
YoungCoder
You may be able to get more information on the problem by using mysql_error()
e.g:
[php]
<?php
$conn = mysql_connect("localhost", "username", "password");
or die (mysql_error());
?>
[/php]
Hope this helps,
YoungCoder
Class Info:
Warrior Priest | Bright Wizard |Witch Hunter | Rune Priest |Engineer | Hammerer |Ironbreaker | Black Orc |Orc Choppa | Goblin Shaman |Squig Herder | Chosen |Magus | Zealot | Marauder
Warrior Priest | Bright Wizard |Witch Hunter | Rune Priest |Engineer | Hammerer |Ironbreaker | Black Orc |Orc Choppa | Goblin Shaman |Squig Herder | Chosen |Magus | Zealot | Marauder
http://www.daniweb.com/techtalkforums/thread6958.html
check out this snippit i wrote, hopefully it will help you some.
check out this snippit i wrote, hopefully it will help you some.
!!!!! WARNING YOUR COMPUTER MAY BE INFECTED WITH SPYWARE!!!! PAY AN OVER PRICED AMMOUNT TO HAVE SOMTHING FIXED WE PLACED THERE IN THE FIRST PLACE!!!!!!!!!
sound familiar, know how to block yourself and keep yourself clean.
_____________________
http://www.lavasoftusa.com/ -->adaware
http://www.safer-networking.org/en/index.html -->spybot S&D
http://www.javacoolsoftware.com/spywareblaster.html -->spywareblaster
http://www.javacoolsoftware.com/spywareguard.html -->spywareguard
_____________________
and dont forget to spread the reputation to those that deserve!
sound familiar, know how to block yourself and keep yourself clean.
_____________________
http://www.lavasoftusa.com/ -->adaware
http://www.safer-networking.org/en/index.html -->spybot S&D
http://www.javacoolsoftware.com/spywareblaster.html -->spywareblaster
http://www.javacoolsoftware.com/spywareguard.html -->spywareguard
_____________________
and dont forget to spread the reputation to those that deserve!
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- connection of mysql with outlook express (MySQL)
- dynamic dropdowm list and mysql (PHP)
- C++ and MySQL connection (C++)
- php connection to mysql headache (PHP)
- MicroOLAP Database Designer for MySQL (Post your Resume)
Other Threads in the PHP Forum
- Previous Thread: php help needed for login
- Next Thread: Upadating booking page with php


Linear Mode