mysql / php5 configuration

mysql / php5 configuration

am 18.10.2007 05:29:23 von jcoder

im using win xp and installed apache 2.x and php5...both working fine.
when i test:

phpinfo();
?>

it works fine. trouble starts when i started installing mysql 4.x
server on the same machine. mysql run successfully but the issue is i
cant integrate it with php. i already copied -- php_mysql.dll on my
\php\ext and libmysql.dll on \php as well as on \windows\system32.

also i made necessary changes on php.ini, but when i run :

mysql_connect("localhost","root","123") or die("cannot connect");
?>

it's not working. what could have gone wrong?

Re: mysql / php5 configuration

am 18.10.2007 05:37:49 von Jerry Stuckle

jcoder wrote:
> im using win xp and installed apache 2.x and php5...both working fine.
> when i test:
>
> > phpinfo();
> ?>
>
> it works fine. trouble starts when i started installing mysql 4.x
> server on the same machine. mysql run successfully but the issue is i
> cant integrate it with php. i already copied -- php_mysql.dll on my
> \php\ext and libmysql.dll on \php as well as on \windows\system32.
>
> also i made necessary changes on php.ini, but when i run :
>
> > mysql_connect("localhost","root","123") or die("cannot connect");
> ?>
>
> it's not working. what could have gone wrong?
>
>

What do you get for an error?

If it's just "cannot connect", print a REAL informative message - such
as that returned by mysql_error();

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: mysql / php5 configuration

am 18.10.2007 08:43:20 von jcoder

actually there's no error msg..it just gave me blank page.

mysql_connect("localhost","root","123") or die("cannot connect");
echo'ok';
?>

even the work "ok" is not showing either. im wondering, if my password
or username, or the host is wrong it should give me the msg "cannot
connect", but there's nothing. and if i restart apache, no error msgs
also.

Re: mysql / php5 configuration

am 18.10.2007 12:02:54 von DAP

jcoder pisze:
> actually there's no error msg..it just gave me blank page.
>
> > mysql_connect("localhost","root","123") or die("cannot connect");
> echo'ok';
> ?>
>
> even the work "ok" is not showing either. im wondering, if my password
> or username, or the host is wrong it should give me the msg "cannot
> connect", but there's nothing. and if i restart apache, no error msgs
> also.
>

try

if (function_exists(mysql_connect)) {
mysql_connect("localhost","root","123") or die("cannot connect");
print('OK');
} else {
print ('I forgot about php_mysql');
}

What does it show ?
also put error_reporting(E_ALL) at top of Your script

D.

Re: mysql / php5 configuration

am 18.10.2007 13:01:38 von Jerry Stuckle

jcoder wrote:
> actually there's no error msg..it just gave me blank page.
>
> > mysql_connect("localhost","root","123") or die("cannot connect");
> echo'ok';
> ?>
>
> even the work "ok" is not showing either. im wondering, if my password
> or username, or the host is wrong it should give me the msg "cannot
> connect", but there's nothing. and if i restart apache, no error msgs
> also.
>
>

OK, then in your php.ini file, enable display_errors and set
error_reporting to E_ALL. That will get you some error messages.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: mysql / php5 configuration

am 18.10.2007 18:56:30 von henri

On Wed, 17 Oct 2007 20:29:23 -0700, jcoder wrote:

> im using win xp and installed apache 2.x and php5...both working fine.
> when i test:
>
> > phpinfo();
> ?>
>
> it works fine. trouble starts when i started installing mysql 4.x server
> on the same machine. mysql run successfully but the issue is i cant
> integrate it with php. i already copied -- php_mysql.dll on my \php\ext
> and libmysql.dll on \php as well as on \windows\system32.
>
> also i made necessary changes on php.ini, but when i run :
>
> > mysql_connect("localhost","root","123") or die("cannot connect");
> ?>
>
> it's not working. what could have gone wrong?

how can you tell it's not working?