Can't connect to a mySQL DB



Hi everyone
I'm trying connecting to a mySQL DBm but I've some troubles.
The code is

<?php
echo "Connecting ... ";
$connection = mysql_connect("localhost", $usename, $password)
or die ("KO: " . mysql_error());
echo "OK";
....

When I execute, the php page just writes:
"Connecting ..."
and then the execution stops, without printing anything else.
The problem is not dipendent by the parameters, it happens the same
also if I write wrong parameters.

Can someone help me in order to fix the problem?

Tanks in advance for your replies.

.



Relevant Pages

  • Re: working with mysql
    ... throw new Exception('Error connecting to host. ... I would like to be able to get php to pull the data. ... Did you take out your throw statement and put in the echo like I asked? ...
    (comp.lang.php)
  • Re: [PHP] Fatal error when calling nested function
    ... return $dollars * $conversion; ... echo convert_pound; ... you can only execute the outer function once. ...
    (php.general)
  • Re: [PHP] Function returning but continues execution
    ... I have come across what appears to be a bug in PHP, but one that I am having difficulty writing test code for. ... Checks to make sure that the friend being added is not already added. ... No further code in the function should execute. ...
    (php.general)
  • Re: working with mysql
    ... throw new Exception('Error connecting to host. ... I would like to be able to get php to pull the data. ... Did you take out your throw statement and put in the echo like I asked? ...
    (comp.lang.php)
  • Re: Cant connect to a mySQL DB
    ... I'm trying connecting to a mySQL DBm but I've some troubles. ... echo "Connecting ... ... the php page just writes: ... and then the execution stops, ...
    (comp.lang.php)