Follow us on Twitter!
It is never to LATE to become what you never WERE.
Friday, April 18, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 27
Guests Online: 22
Members Online: 5

Registered Members: 82829
Newest Member: mmoclauq
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

PHP pconnect errors

lukem_95
Member

Your avatar

Posts: 232
Location: 127.0.0.1:80
Joined: 05.07.06
Rank:
Apprentice
Warn Level: 5
Posted on 11-10-06 17:56
Ok i wrote an admin center script for my site [scoliomedia.co.uk] which seems fine, and requires('filename.php') a databse login script:

Code

<?php
// MySql Connections
$dbhost='dbdomain.domain.com';
$dbusername='username';
$dbuserpass='XXXXXXXXX';
$dbname='dbname';

//-------------------------------
// Connect To MySQL
//-------------------------------
mysql_pconnect($dbhost, $dbuser, $dbuserpass) or die(mysql_error());
mysql_select_db($dbname) or die(mysql_error());
?>





However when i run the script and try to login i get

Access denied for user 'XXXXXXXXX'@'XXX.XXX.XXX.XX' (using password: YES)


note: the XXXXXXXXX is my login for FTP, not the database :S And the other bit is an IP address (presumably my hosting server [1and1.co.uk])


Please help.




Edited by lukem_95 on 11-10-06 17:59
www.hellboundhackers.org/news.php?logout=yes
Author

RE: PHP pconnect errors


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 11-10-06 18:02
Well, three things

1. Password could be wrong
2. Your server may only allow connections from localhost
3. You haven't specified the port to connect to




Edited by on 11-10-06 18:04
Author

RE: PHP pconnect errors

lukem_95
Member

Your avatar

Posts: 232
Location: 127.0.0.1:80
Joined: 05.07.06
Rank:
Apprentice
Warn Level: 5
Posted on 11-10-06 18:20
ah.... well i can connect because the DB comes witht eh hosting, and i use it for my forum which works fine, and the pass is 100% fine, but you have to specify a port? iv never seen that before, could give me the syntax and/or an example bit of code pl0x?


www.hellboundhackers.org/news.php?logout=yes
Author

RE: PHP pconnect errors


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 11-10-06 19:02
It's not that you've got the wrong port, the error would be different. But it could be that they ony allow connections from set hosts, such as only from localhost.

At first glance the error is that you set $dbusername but then later read $dbuser .


Author

RE: PHP pconnect errors

lukem_95
Member

Your avatar

Posts: 232
Location: 127.0.0.1:80
Joined: 05.07.06
Rank:
Apprentice
Warn Level: 5
Posted on 14-10-06 09:10
thankyou, that fixed it, pmg watta noob, i shoulda checked, thts what comes frm using bits of your old scripts ad not checking :S


www.hellboundhackers.org/news.php?logout=yes
Author

RE: PHP pconnect errors

lukem_95
Member

Your avatar

Posts: 232
Location: 127.0.0.1:80
Joined: 05.07.06
Rank:
Apprentice
Warn Level: 5
Posted on 14-10-06 09:18
thankyou, that fixed it, pmg watta noob, i shoulda checked, thts what comes frm using bits of your old scripts ad not checking :S


www.hellboundhackers.org/news.php?logout=yes