PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > Can't connect to a mySQL DB
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Can't connect to a mySQL DB

Réponse
 
LinkBack Outils de la discussion
Vieux 14/02/2008, 17h02   #1
aalberani@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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 me in order to fix the problem?

Tanks in advance for your replies.

  Réponse avec citation
Vieux 14/02/2008, 17h11   #2
ZeldorBlat
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't connect to a mySQL DB

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.
  Réponse avec citation
Vieux 14/02/2008, 17h28   #3
aalberani@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't connect to a mySQL DB

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
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 11h52.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09206 seconds with 11 queries