4 messages in com.mysql.lists.win32Re: Problems with connection| From | Sent On | Attachments |
|---|---|---|
| dkpi...@imation.com | 14 May 2001 08:39 | |
| Luc Van der Veken | 15 May 2001 00:29 | |
| dkpi...@imation.com | 15 May 2001 08:06 | |
| Paul Campbell | 15 May 2001 18:16 |
| Subject: | Re: Problems with connection![]() |
|---|---|
| From: | Paul Campbell (pa...@cmm.uklinux.net) |
| Date: | 05/15/2001 06:16:12 PM |
| List: | com.mysql.lists.win32 |
On Tuesday 15 May 2001 11:06, dkpi...@imation.com wrote:
Thanks for the reply. I had thought about the WinNT permissions issue and had reset all the permissions on both the PHP and the MySQL files to assure that all users (including both my collegue, and I, and the IUSR_RATBERT user that PHP uses from the IIS user) had access to all the files. The 2 PHP files I described will be accessed and displayed by either of us if I comment out the mysql_connect statement. The pages are essentially empty at that point but it does not seem to be an issue of file permissions. Once I uncomment the $connection = mysql_connect("localhost"); "the operation timed out error" reported by IE comes back.
First I should stress that I'm kinda new to MySQL and PHP myself, although my stuff works. So read with care and son't beieve any thing I say is out right fact.
If you have installed the MySQL server yourself I suggest you create a user name and password for yourself or better one for php with it's own password, you don't want hackers to get root access to your database should they get their hands on your source code from the server. Set the PHP user to have no default permissions and then enable them specifically for each database you want php to access. In fact create a user for each PHP script, to make it more secure. Remember your password will be plain text in your PHP script.
$connection = mysql_connect("localhost");
Who is connecting on localhost?????? Santa Claus.?
I have deleted the file that I cannot use and rewritten it from my computer, but I still cannot get it to open when the connect statement is present. However my collegue can from his machine.
No idea.......hold on, a momment of inspiration........ If the above connect line goes to an NT server then it may attempt to log in with the current user's name. As opposed to annonymous. I've never used NT but I use Linux and this is what it usually does. If you can get it from the NT machine and not from the Win32 box then this could be because the MySQL server needs at least a user name for anonymous entry. I'll say again that I'm not sure about this meerily surmising...
One question I have been looking into is how PHP proceeds to access the MySQL database. What user ID does it use and what needs to be in the mysql user database for access. Since both of us can access the database through other pages it does not seem possible to be that issue.
echo "PHP user id = ". get_current_user (); returns the IIS user name I thought that if I used $connection = mysql_connect("localhost", "root",""); it would use the user id "root" to access mysql. The default user id for root with an empty password is still setup in the mysql user database at this point.
Sorry see the above, if any of it helps, probably not. But do fix your passwords. see..... http://www.phpwizard.net/projects/phpMyAdmin/ make life a whole lot easier.
Thanks for any help. Dallas
"Luc Van der Veken" <luc...@wimi.be> on 05/15/2001 02:29:23 AM
Please respond to <luc...@wimi.be>
To: <dkpi...@imation.com>, "MySQL Win32 list \(E-mail\)" <win...@lists.mysql.com> cc: Subject: RE: Problems with connection
-----Original Message----- From: dkpi...@imation.com [mailto:dkpi...@imation.com] Sent: Monday 14 May 2001 17:40 To: win...@lists.mysql.com Subject: Problems with connection
I am having a problem with a very basic action. I have a Win NT 4.0 sp5 system setup with: PHP 4.0.4 MySQL MySQL3_23_35 IIS 3 I have 2 php pages that are accessing the same database location. I can open one of the pages from my NT workstation (using IE 4.0) and a collegue can open the other page from his Win 98 machine (using IE 4). However
This sounds like an NT permissions issue on the actual PHP files rather than a MySQL issue to me.
Could it be that you created the page you can open, and the other page was created by the other user?
Try logging on to your PC with the other user's name and password or vice versa, and see what page you can open then. Or simply check the file permissions on the two pages on the server.
--------------------------------------------------------------------- Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail win3...@lists.mysql.com
To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail win3...@lists.mysql.com instead.
--------------------------------------------------------------------- Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail win3...@lists.mysql.com
To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail win3...@lists.mysql.com instead.
-- Paul Campbell http://www.cmm.uklinux.net/ mailto:paul...@ntlworld.com pa...@cmm.uklinux.net




