php-windows Digest 18 Aug 2005 06:25:47 -0000 Issue 2753

Topics (messages 26265 through 26272):

MySQL and PHP
        26265 by: Jon
        26266 by: Paul Menard
        26268 by: Soheil Noori Bushehri
        26270 by: Jon

PHP 4.4.0 with MySQL 4.1.13 on Win XP
        26267 by: Soheil Noori Bushehri
        26271 by: Jon
        26272 by: Soheil Noori Bushehri

WAMP Clustering
        26269 by: JM

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Is there some way to have PHP test if MySQL is running and if not make the
system call to start it?

This is just an ME test machine but I would also like to know how on XP PRO
cause I have another test machine available.

--- End Message ---
--- Begin Message ---
Well you can start with the mysql_connect() call. If you are unable to 
connection check the error
code. Then take action if needed.



--- Jon <[EMAIL PROTECTED]> wrote:

> Is there some way to have PHP test if MySQL is running and if not make the
> system call to start it?
> 
> This is just an ME test machine but I would also like to know how on XP PRO
> cause I have another test machine available.
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
you may also consider using 

  $mysql = @mysql_connect(...);

to get rid of the warning if it is on.




On 8/17/05, Paul Menard <[EMAIL PROTECTED]> wrote:
> Well you can start with the mysql_connect() call. If you are unable to 
> connection check the error
> code. Then take action if needed.
> 
> 
> 
> --- Jon <[EMAIL PROTECTED]> wrote:
> 
> > Is there some way to have PHP test if MySQL is running and if not make the
> > system call to start it?
> >
> > This is just an ME test machine but I would also like to know how on XP PRO
> > cause I have another test machine available.
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
Soheil Noori Bushehri
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Well I ended up with a slightly different way to do it but it seems to work
for me.
Don't know if anyone else will find it useful but here is the code.

//Use windows netstat to check for port 3306 (MySQL)
//If it is not in the list then run MySQL
exec ('netstat -a -n', $reply, $error);
$reply = implode($reply);
$mysqlrunning = eregi( ':3306',$reply );
if (!$mysqlrunning){
    exec
('C:\mysql\bin\mysqld.exe --defaults-file=C:\mysql\bin\my.cnf --standalone')
;
}



""Jon"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is there some way to have PHP test if MySQL is running and if not make the
> system call to start it?
>
> This is just an ME test machine but I would also like to know how on XP
PRO
> cause I have another test machine available.

--- End Message ---
--- Begin Message ---
I have used php 4.3.7 with mysql 4.0.20d on windows xp running iis 5.1
as well as php 4.4.0 with mysql 4.1.13 on linux redhat 8.0 running apache 2.0.54
successfully.

Now, I have encountered a problem on windows xp:

php 4.4.0 (maunally-installed package) phpinfo works fine.
mysql 4.1.13

os: windows xp sp1 and sp2
webserver: tried both iis 5.1 and apache 2.0.54

Problem: php cannot connect to mysql. Error is something like:


 Warning: mysql_connect(): Client does not support authentication protocol
 requested by server; consider upgrading MySQL client in
 C:\Program Files\Apache Group\Apache2\htdocs\mysqltest.php on line 35

Have I missed something? Meanwhile, how could I make my php know MySQLi 
(Improved MySQL) library as I haven't seen anywhere that this library is
not supported by windows?

Thanks

-- 
Soheil Noori Bushehri
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
You need to check the MySQL manual about the password hashing
http://dev.mysql.com/doc/mysql/en/password-hashing.html and change to the
old version of passwords as a workaround.  I don't know if PHP5 supports the
new authentication or not.

"Soheil Noori Bushehri" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I have used php 4.3.7 with mysql 4.0.20d on windows xp running iis 5.1
as well as php 4.4.0 with mysql 4.1.13 on linux redhat 8.0 running apache
2.0.54
successfully.

Now, I have encountered a problem on windows xp:

php 4.4.0 (maunally-installed package) phpinfo works fine.
mysql 4.1.13

os: windows xp sp1 and sp2
webserver: tried both iis 5.1 and apache 2.0.54

Problem: php cannot connect to mysql. Error is something like:


 Warning: mysql_connect(): Client does not support authentication protocol
 requested by server; consider upgrading MySQL client in
 C:\Program Files\Apache Group\Apache2\htdocs\mysqltest.php on line 35

Have I missed something? Meanwhile, how could I make my php know MySQLi
(Improved MySQL) library as I haven't seen anywhere that this library is
not supported by windows?

Thanks

-- 
Soheil Noori Bushehri
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Thanks for your help. I beleive it was the point.

I tried php 5.0.4 with mysql 4.1.13a on Windows XP running apache
2.0.54. Knowing the fact that mysql support is not enabled by default,
and must be manually set in php.ini, it works fine with this new auth.
hashing.




On 8/17/05, Jon <[EMAIL PROTECTED]> wrote:
> You need to check the MySQL manual about the password hashing
> http://dev.mysql.com/doc/mysql/en/password-hashing.html and change to the
> old version of passwords as a workaround.  I don't know if PHP5 supports the
> new authentication or not.
> 
> "Soheil Noori Bushehri" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> I have used php 4.3.7 with mysql 4.0.20d on windows xp running iis 5.1
> as well as php 4.4.0 with mysql 4.1.13 on linux redhat 8.0 running apache
> 2.0.54
> successfully.
> 
> Now, I have encountered a problem on windows xp:
> 
> php 4.4.0 (maunally-installed package) phpinfo works fine.
> mysql 4.1.13
> 
> os: windows xp sp1 and sp2
> webserver: tried both iis 5.1 and apache 2.0.54
> 
> Problem: php cannot connect to mysql. Error is something like:
> 
> 
>  Warning: mysql_connect(): Client does not support authentication protocol
>  requested by server; consider upgrading MySQL client in
>  C:\Program Files\Apache Group\Apache2\htdocs\mysqltest.php on line 35
> 
> Have I missed something? Meanwhile, how could I make my php know MySQLi
> (Improved MySQL) library as I haven't seen anywhere that this library is
> not supported by windows?
> 
> Thanks
> 
> --
> Soheil Noori Bushehri
> [EMAIL PROTECTED]
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
Soheil Noori Bushehri
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Does anyone have any experience clustering this configuration?
Windows, Apache, mySQL, and PHP? I'm doing research now and could use
any info. TIA.

John

--- End Message ---

Reply via email to