Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
|
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 18th, 2003, 09:55 AM
Authorized User
 
Join Date: Jul 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default php/sql connection issue

my php scripts keep having their connections to mysql refused. the passords come from a seperate file that's in the include.

the pws work, i know because i tested each one by copying and pasting from that file.

http://24.91.157.113/findyourdesire/join.showcode

that file has had a small amount of editing fromt he actual file, which is noted at the top.

this is a print out from mysql that shows the users (logins edited)
http://24.91.157.113/findyourdesire/SQLUserInfo

i've tried adjusting the user being used in that script to Ashes and to localhost, both to no avail

t's a LAMP development environtment, there;s a router providing firewall resticting connections to the machine to just ftp/ssh/htttp if you're not on the network. since there's a hardware firewall on my network i turned off the software firewall on my server to be sure that's not the issue.

can anyone help me get this running?

internships are for the inexperienced, yet corproations award them only to those with experience. then corporations complain about the lack of experience in the emerging workforce.

corporations need to get logical.
__________________
internships are for the inexperienced, yet corproations award them only to those with experience. then corporations complain about the lack of experience in the emerging workforce.

corporations need to get logical.
 
Old August 19th, 2003, 04:04 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 256
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are 'Ashes' and 'localhost' the same machine? I mean, are your requests going to a MySQL server running on 'localhost' (the same machine as where PHP/Apache are running), and that one machine being known as 'Ashes' on the network? If so, I shouldn't see how the firewall is likely to be a problem.

If it's on a separate machine, the domain of your user is the domain of the machine making the request (i.e. the Apache webserver), not that of the database server, if that's any help. To configure firewall issues, MySQL uses Port 3306 as it's Port, by default, and so is very likely to be doing so in this case.

To find out which port it's using, you can enter:

mysqladmin -p variables

...at a commandline, telnet or (preferably) SSH session. This will tell you the port number (among other things) your DB serevr is using. (You'll need to enter your MySQL root-user password, of course).

Assuming it is 3306, then you could permit requests to Ashes on port 3306 from your webserver, and put both servers behind a second fire wall that ony permits requests on Port 80. Remember to flush privileges to your users after every change, too, of course ;)

I'm not sure if any of that's been any help, biut let us know how you get on.

Dan

Quote:
quote:Originally posted by m3rajk
 my php scripts keep having their connections to mysql refused. the passords come from a seperate file that's in the include.

the pws work, i know because i tested each one by copying and pasting from that file.

http://24.91.157.113/findyourdesire/join.showcode

that file has had a small amount of editing fromt he actual file, which is noted at the top.

this is a print out from mysql that shows the users (logins edited)
http://24.91.157.113/findyourdesire/SQLUserInfo

i've tried adjusting the user being used in that script to Ashes and to localhost, both to no avail

t's a LAMP development environtment, there;s a router providing firewall resticting connections to the machine to just ftp/ssh/htttp if you're not on the network. since there's a hardware firewall on my network i turned off the software firewall on my server to be sure that's not the issue.

can anyone help me get this running?

internships are for the inexperienced, yet corproations award them only to those with experience. then corporations complain about the lack of experience in the emerging workforce.

corporations need to get logical.
 
Old August 19th, 2003, 08:50 AM
Authorized User
 
Join Date: Jul 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes, Ashes is the name of localhost and both mysql and php are on the same machine.

odd.. mysqladmin -p variables had the connection refused. the same password works when going into sql with mysql -u root -p then typing the password on the next line

well.. turns outthe rror right now was quite simple....
more info: http://www.webmaster-forums.net/show...threadid=22135



internships are for the inexperienced, yet corproations award them only to those with experience. then corporations complain about the lack of experience in the emerging workforce.

corporations need to get logical.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Oracle connection issue. rupen ASP.NET 2.0 Professional 2 March 11th, 2009 02:26 AM
Chapter 11 Connection Issue justin000 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 August 4th, 2008 06:14 AM
ODBC Connection Issue On Client Site prince500 SQL Server 2005 1 June 7th, 2007 02:03 PM
CONNECTION ISSUE ktracy_2k SQL Server 2000 4 December 1st, 2006 04:45 PM
Database connection issue... Azrael808 Java Databases 2 April 5th, 2004 08:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.