|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 me in order to fix the problem? Tanks in advance for your replies. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Feb 14, 12:02 pm, aalber...@gmail.com wrote:
> 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 me in order to fix the problem? > > Tanks in advance for your replies. Enable display_errors and set error_reporting to at least E_ALL. Then run your code and see what happens. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On 14 Feb, 18:11, ZeldorBlat <zeldorb...@gmail.com> wrote:
> On Feb 14, 12:02 pm, aalber...@gmail.com wrote: > > > > > 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 me in order to fix the problem? > > > Tanks in advance for your replies. > > Enable display_errors and set error_reporting to at least E_ALL. Then > run your code and see what happens. OK, just a "little" problem with PHP.ini ... I edited the wrong copy of it! :-)))) Now it works! Bye |
|
![]() |
| Outils de la discussion | |
|
|