Connecting Tech Pros Worldwide Forums | Help | Site Map

mysql set up problem

Sheldon
Guest
 
Posts: n/a
#1: Jul 20 '05
Hi,

I have a mysql setting problem that is driving me mad. Hopefully someone can
give some advice:

On the local network I have windows 2000/iis5 machine running our intranet
site, with php and mysql working ok. Anonymous access is disabled, and root
has been assigned a password and given full access to all tables from all
hosts (i reliase this isn't secure but its only temporary for testing)

The local intranet site which uses php/mysql works fine accross the company
network, and i can use mysql administrator software sucessfully on any pc
without problems. In short, everying great working fine.

We also have an internet webserver. Same setup, windows 2003/iis6, same php
and mysql versions, in fact everything is indecital even the mysql user
setup. only difference between two servers is physical location, ip address
and some ntfs permissions. I can connect to the server fine from anywhere
using mysql administrator, and the php site runs fine but nothing using
mysql works either when running the site on the server itself using
//localhost/index.php or accessing it remotly over the internet using
ip.add.re.ss/index.php. Other stuff works fine on the intenet webserver, its
just accessing mysql through php.

The only difference i can see is the ntfs permissions, but I have made
changes to them without success and other stuff on the sever does work fine.

Any advice/suggestions would be greatly appreciated.

Cheers
Sheldon



Aggro
Guest
 
Posts: n/a
#2: Jul 20 '05

re: mysql set up problem


Sheldon wrote:
[color=blue]
> using mysql administrator, and the php site runs fine but nothing using
> mysql works either when running the site on the server itself using
> //localhost/index.php or accessing it remotly over the internet using
> ip.add.re.ss/index.php.[/color]

What php command doesn't work, and what is the error message?
Sheldon
Guest
 
Posts: n/a
#3: Jul 20 '05

re: mysql set up problem


"Aggro" <spammerdream@yahoo.com> wrote in message
news:XX_xc.293$Pd4.117@read3.inet.fi...[color=blue]
> Sheldon wrote:
>[color=green]
> > using mysql administrator, and the php site runs fine but nothing using
> > mysql works either when running the site on the server itself using
> > //localhost/index.php or accessing it remotly over the internet using
> > ip.add.re.ss/index.php.[/color]
>
> What php command doesn't work, and what is the error message?[/color]

I can't connect to the mysql database using the pconnect command. Although I
can connect to the database using mysql administrator.

I think it may be either a compatibility issue with iis6 or a ntfs
permissions problem.

Mysql version is 4.0.20a, and php version is 4.3.7


Aggro
Guest
 
Posts: n/a
#4: Jul 20 '05

re: mysql set up problem


Sheldon wrote:
[color=blue]
> I can't connect to the mysql database using the pconnect command. Although I
> can connect to the database using mysql administrator.[/color]

AFAIK there is no pconnect() function in php. There is mysql_pconnect(),
perhaps you mean that? But you didn't tell what the error message is
that you are receiving, or are you even checking the error message? Do
you know how to see it?
Sheldon
Guest
 
Posts: n/a
#5: Jul 20 '05

re: mysql set up problem


"Aggro" <spammerdream@yahoo.com> wrote in message
news:Wt2yc.396$Pd4.232@read3.inet.fi...[color=blue]
> Sheldon wrote:
>[color=green]
> > I can't connect to the mysql database using the pconnect command.[/color][/color]
Although I[color=blue][color=green]
> > can connect to the database using mysql administrator.[/color]
>
> AFAIK there is no pconnect() function in php. There is mysql_pconnect(),
> perhaps you mean that? But you didn't tell what the error message is
> that you are receiving, or are you even checking the error message? Do
> you know how to see it?[/color]

Perhaps my original post wasn't clear or was too complicated for you.

Server 1: Win2000/IIS5 - Everything works fine
Server 2: Win2003/IIS6 - Connecting to MySQL through PHP doesn't work
Both servers have identical PHP/MySQL setups.

This is NOT a coding issue since the code works fine on the W2K server. It
looks like a problem with either IIS6 or NTFS permissions since the default
NTFS permissions on Win2003 are stricter than Win2000.

Anyone else expericed similar problem on WIN2003 with MySQL?


Marc Hoeve
Guest
 
Posts: n/a
#6: Jul 20 '05

re: mysql set up problem


IIS6 on Win2003 has a very different setup compared to IIS5 in Windows 2000.
See the site http://s92192454.onlinehome.us./PHP_...under_IIS.html
for more details about configuring PHP and MySQL for IIS6...

Hope this site contains a solution for you...

Marc

"Sheldon" <sheldon_payne2000@yahoo.co.uk> schreef in bericht
news:RC5yc.128$ec4.60@newsfe5-win...[color=blue]
> "Aggro" <spammerdream@yahoo.com> wrote in message
> news:Wt2yc.396$Pd4.232@read3.inet.fi...[color=green]
> > Sheldon wrote:
> >[color=darkred]
> > > I can't connect to the mysql database using the pconnect command.[/color][/color]
> Although I[color=green][color=darkred]
> > > can connect to the database using mysql administrator.[/color]
> >
> > AFAIK there is no pconnect() function in php. There is mysql_pconnect(),
> > perhaps you mean that? But you didn't tell what the error message is
> > that you are receiving, or are you even checking the error message? Do
> > you know how to see it?[/color]
>
> Perhaps my original post wasn't clear or was too complicated for you.
>
> Server 1: Win2000/IIS5 - Everything works fine
> Server 2: Win2003/IIS6 - Connecting to MySQL through PHP doesn't work
> Both servers have identical PHP/MySQL setups.
>
> This is NOT a coding issue since the code works fine on the W2K server.[/color]
It[color=blue]
> looks like a problem with either IIS6 or NTFS permissions since the[/color]
default[color=blue]
> NTFS permissions on Win2003 are stricter than Win2000.
>
> Anyone else expericed similar problem on WIN2003 with MySQL?
>
>[/color]


Aggro
Guest
 
Posts: n/a
#7: Jul 20 '05

re: mysql set up problem


Sheldon wrote:
[color=blue]
> Perhaps my original post wasn't clear or was too complicated for you.
>
> Server 1: Win2000/IIS5 - Everything works fine
> Server 2: Win2003/IIS6 - Connecting to MySQL through PHP doesn't work
> Both servers have identical PHP/MySQL setups.
>
> This is NOT a coding issue since the code works fine on the W2K server.[/color]

Example 1:
- Sir could you tell me what does the error message say?
- Of course, the error message says xxx xxx
- Okay, the problem is xxx and the solution would be to xxx

Example 2:
- Sir could you tell me what does the error message say?
- No way, didn't you understand, this doesn't work!
- I can't help you if you don't tell me error message.
- Are you stupid? I said that this doesn't work.
- The error message might provide important information about why the
connection fails. Getting error message doesn't mean that you must have
an error in your php code, it can also mean that php doesn't fail the
server socket, or there is problem with privileges or even that there is
not enough memory to commit the action. That's why reading and
understanding the error message helps a lot more rather than using a
crystal ball and trying to guess what might be wrong.
- [ to be continued ]

I might not be able to help even if I see the error message, but without
it, I'm sure that I won't be able to help. I hope that you know what I
mean with the error message?

For example you might have code that looks a little like this:
----------------------------------
<?
$link = mysql_connect("localhost", "username", "password")
or die("Could not connect");
....
----------------------------------



And if you go to web page, you would get error message that looks like this:
----------------------------------
Warning: mysql_connect(): Access denied for user: 'username@localhost'
(Using password: YES) in /home/php/database.ph on line 2
Could not connect
----------------------------------

Now, in this case, I would instantly see that there is no user called
"username" with given password, in database. So problem would be with
privileges. Then I could easily tell how to fix the problem, by using
grant-command to add privileges.

If you fail to connect to the database, you should get somekind of error
message that helps locating the problem.
Sheldon
Guest
 
Posts: n/a
#8: Jul 20 '05

re: mysql set up problem


"Aggro" <spammerdream@yahoo.com> wrote in message
news:7Qbyc.25$Nq5.1@read3.inet.fi...[color=blue]
> Sheldon wrote:
>[color=green]
> >
> > Server 1: Win2000/IIS5 - Everything works fine
> > Server 2: Win2003/IIS6 - Connecting to MySQL through PHP doesn't work
> > Both servers have identical PHP/MySQL setups.
> >[/color][/color]

The error I get when trying to use the mysql_pconnect() function is:

Warning: mysql_pconnect(): Can't create TCP/IP socket (10041)

Again, all code and mysql/php settings/versions are the same. Tested it
using php.exe through the command line and the output was ok. So that
narrows things down a bit.


Aggro
Guest
 
Posts: n/a
#9: Jul 20 '05

re: mysql set up problem


Sheldon wrote:
[color=blue]
> The error I get when trying to use the mysql_pconnect() function is:
>
> Warning: mysql_pconnect(): Can't create TCP/IP socket (10041)[/color]

-----------------------------
WSAEPROTOTYPE (10041)
Protocol wrong type for socket.
A protocol was specified in the socket function call that does not
support the semantics of the socket type requested. For example, the
ARPA Internet UDP protocol cannot be specified with a socket type of
SOCK_STREAM.
-----------------------------

That error message looks very strange. I think it could even be a bug in
php or php is just not fully supported by iis6 or iis6 is not supported
by php. I'm pretty sure it has nothing to do with the MySQL server
anyway, because it seems to fail to create the socket, so connection to
database is not even attempted to be created.

You could ask this question in some php related newsgroup by attaching
the error message + the error explanation in this message. Perhaps they
could tell whether that is the problem with the php or with the iis server.

Good luck
Sheldon
Guest
 
Posts: n/a
#10: Jul 20 '05

re: mysql set up problem


"Aggro" <spammerdream@yahoo.com> wrote in message
news:YGjyc.217$Nq5.189@read3.inet.fi...[color=blue]
> Sheldon wrote:
>[color=green]
> > The error I get when trying to use the mysql_pconnect() function is:
> >
> > Warning: mysql_pconnect(): Can't create TCP/IP socket (10041)[/color]
>
> -----------------------------
> WSAEPROTOTYPE (10041)
> Protocol wrong type for socket.
> A protocol was specified in the socket function call that does not
> support the semantics of the socket type requested. For example, the
> ARPA Internet UDP protocol cannot be specified with a socket type of
> SOCK_STREAM.
> -----------------------------
>
> That error message looks very strange. I think it could even be a bug in
> php or php is just not fully supported by iis6 or iis6 is not supported
> by php. I'm pretty sure it has nothing to do with the MySQL server
> anyway, because it seems to fail to create the socket, so connection to
> database is not even attempted to be created.
>
> You could ask this question in some php related newsgroup by attaching
> the error message + the error explanation in this message. Perhaps they
> could tell whether that is the problem with the php or with the iis[/color]
server.[color=blue]
>
> Good luck[/color]

Thanks very much for your help. I'll give your suggestions a try and also
try an earlier version of PHP.


Closed Thread