IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

PHP & Base de données Discussion :

Connection php postgres


Sujet :

PHP & Base de données

  1. #1
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2017
    Messages
    68
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Service public

    Informations forums :
    Inscription : Mars 2017
    Messages : 68
    Par défaut Connection php postgres
    Bonjour,

    Je souhaite établir une connection php à ma base postgres.
    j'ai créer un fichier db.php dans mon répertoire /var/www/html/

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    <?php
    $dns = ‘pgsql:host=localhost;port=5435;dbname=nomdelabase_db’;
    $user = ‘userapp’;
    $password = ‘*******’;
    try{
        $db = new PDO ($dns, $user, $pass);
    }catch( PDOException $e){
        $error = $e->getMessage();
        echo $error;
    }
    ?>
    Cependant quand je test de joindre la page URL/db.php rien ne s'affiche. J'ai vérifié l'option display_errors de mon fichier ini et elle bien sur on en developement. Si
    Par ailleurs quand je cherche à visualiser le code source de la page rien ne s'affiche. Si quelqu'un à un tuyaux je suis preneur.

  2. #2
    Membre chevronné Avatar de Freudd
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2014
    Messages
    165
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 32
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2014
    Messages : 165
    Par défaut
    Bonjour Solevita,

    si ton fichier db.php ne contient que le code que tu viens de montrer, il est normale qu'il n'affiche rien puisqu'il ne s'agit que d'une connexion à ta base de données.
    Il faut que tu réalises des requête à ta base et que tu les affiches pour y voir un contenu

  3. #3
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2017
    Messages
    68
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Service public

    Informations forums :
    Inscription : Mars 2017
    Messages : 68
    Par défaut
    Arf autant pour moi, j'ai rajouté dans la boucle try, mais ca change rien j'ai une page blanche .

  4. #4
    Membre chevronné Avatar de Freudd
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2014
    Messages
    165
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 32
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2014
    Messages : 165
    Par défaut
    Tiens essaye ça :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    <?php
    // Force l'affichage d'erreurs.
    ini_set('display_errors', 1);
     
    $dns      = 'pgsql:host=localhost;port=5435;dbname=nomdelabase_db';
    $user     = 'userapp';
    $password = '*******';
     
    try {
        $db = new \PDO($dns, $user, $password);
        echo 'connexion';
    } catch (\PDOException $e) {
        $error = $e->getMessage();
        echo $error;
    }
    En essayant ton code j'ai remarqué que les simple quottes que tu utilises ne sont pas bonnes.
    Et que la variable $password n'est jamais utilisé (car l'objet PDO utilise $pass et pas $password).

    Je te conseille également d’utiliser le namespace globale sur tes objets car tu risques d'avoir de mauvaises surprises dans certain cas.
    De plus pour ce type de fichier PHP ne le ferme pas avec ?>.

    Perso de mon coté ça marche.

  5. #5
    Membre Expert
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Août 2012
    Messages
    631
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Août 2012
    Messages : 631
    Par défaut
    J'ai vérifié l'option display_errors de mon fichier ini et elle bien sur on en developement
    Il y a aussi les directives suivantes qui doivent être activées pour afficher les erreurs.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    error_reporting = E_ALL
     
    display_startup_errors = On
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
        $db = new PDO ($dns, $user, $pass);
    la variable $pass n'est declarée nulle part.

    ensuite le port par défaut(sauf tu l'as changé) sur postgres est 5432.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
     
    <?php
    $dns = 'pgsql:host=localhost;port=5435;dbname=nomdelabase_db';
    $user = 'userapp';
    $password = '*******';
    try{
        $db = new PDO ($dns, $user, $password);
        echo "=========== connecté =============";
    }catch( PDOException $e){
        $error = $e->getMessage();
        echo $error;
    }
    ?>
    en cas d'échec de connexion, une exception doit être levée indiquant la nature de l'erreur( voir le bloc catch).

  6. #6
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2017
    Messages
    68
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Service public

    Informations forums :
    Inscription : Mars 2017
    Messages : 68
    Par défaut
    Merci pour les réponses.
    Je confirme j'ai pas vu que j'avais effacé un bout de "password".
    Pour ce qui est d'activé d'activé les messages d'erreur en dessous de ma balise php j'ai :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);
    Mais même après correction ca ne change rien :/.

    Pour ce qui est du port j'utilise effectivement pas le port part défaut

  7. #7
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2017
    Messages
    68
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Service public

    Informations forums :
    Inscription : Mars 2017
    Messages : 68
    Par défaut
    Re

    Bon j'ai finalement fais un copier coller de ta réponse Freudd en modifiant et là, tada .. "could not find driver" j'imagine que c'est le fameux PDO qui est pas installé..
    J'ai fais un tour sur phpinfo() et PDO affiche no value.

    Edit : ahem j'ai pas mal de module qui ne se chargent pas en fait :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    /etc/php/7.2/mods-available$ php -m
    PHP Warning:  Failed loading Zend extension 'opcache.so' (tried: ext/opcache.so (ext/opcache.so: cannot open shared object file: No such file or directory), ext/opcache.so.so (ext/opcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: ext/pdo_pgsql (ext/pdo_pgsql: cannot open shared object file: No such file or directory), ext/pdo_pgsql.so (ext/pdo_pgsql.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'pgsql' (tried: ext/pgsql (ext/pgsql: cannot open shared object file: No such file or directory), ext/pgsql.so (ext/pgsql.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo.so' (tried: ext/pdo.so (ext/pdo.so: cannot open shared object file: No such file or directory), ext/pdo.so.so (ext/pdo.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'xml.so' (tried: ext/xml.so (ext/xml.so: cannot open shared object file: No such file or directory), ext/xml.so.so (ext/xml.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'calendar.so' (tried: ext/calendar.so (ext/calendar.so: cannot open shared object file: No such file or directory), ext/calendar.so.so (ext/calendar.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'ctype.so' (tried: ext/ctype.so (ext/ctype.so: cannot open shared object file: No such file or directory), ext/ctype.so.so (ext/ctype.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'dom.so' (tried: ext/dom.so (ext/dom.so: cannot open shared object file: No such file or directory), ext/dom.so.so (ext/dom.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'exif.so' (tried: ext/exif.so (ext/exif.so: cannot open shared object file: No such file or directory), ext/exif.so.so (ext/exif.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'ffi.so' (tried: ext/ffi.so (ext/ffi.so: cannot open shared object file: No such file or directory), ext/ffi.so.so (ext/ffi.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'fileinfo.so' (tried: ext/fileinfo.so (ext/fileinfo.so: cannot open shared object file: No such file or directory), ext/fileinfo.so.so (ext/fileinfo.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'ftp.so' (tried: ext/ftp.so (ext/ftp.so: cannot open shared object file: No such file or directory), ext/ftp.so.so (ext/ftp.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'gettext.so' (tried: ext/gettext.so (ext/gettext.so: cannot open shared object file: No such file or directory), ext/gettext.so.so (ext/gettext.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'iconv.so' (tried: ext/iconv.so (ext/iconv.so: cannot open shared object file: No such file or directory), ext/iconv.so.so (ext/iconv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: ext/imagick.so (ext/imagick.so: cannot open shared object file: No such file or directory), ext/imagick.so.so (ext/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'imap.so' (tried: ext/imap.so (ext/imap.so: cannot open shared object file: No such file or directory), ext/imap.so.so (ext/imap.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'json.so' (tried: ext/json.so (ext/json.so: cannot open shared object file: No such file or directory), ext/json.so.so (ext/json.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: ext/memcache.so (ext/memcache.so: cannot open shared object file: No such file or directory), ext/memcache.so.so (ext/memcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_pgsql.so' (tried: ext/pdo_pgsql.so (ext/pdo_pgsql.so: cannot open shared object file: No such file or directory), ext/pdo_pgsql.so.so (ext/pdo_pgsql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'pgsql.so' (tried: ext/pgsql.so (ext/pgsql.so: cannot open shared object file: No such file or directory), ext/pgsql.so.so (ext/pgsql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'phar.so' (tried: ext/phar.so (ext/phar.so: cannot open shared object file: No such file or directory), ext/phar.so.so (ext/phar.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'posix.so' (tried: ext/posix.so (ext/posix.so: cannot open shared object file: No such file or directory), ext/posix.so.so (ext/posix.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'readline.so' (tried: ext/readline.so (ext/readline.so: cannot open shared object file: No such file or directory), ext/readline.so.so (ext/readline.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'shmop.so' (tried: ext/shmop.so (ext/shmop.so: cannot open shared object file: No such file or directory), ext/shmop.so.so (ext/shmop.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'simplexml.so' (tried: ext/simplexml.so (ext/simplexml.so: cannot open shared object file: No such file or directory), ext/simplexml.so.so (ext/simplexml.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'snmp.so' (tried: ext/snmp.so (ext/snmp.so: cannot open shared object file: No such file or directory), ext/snmp.so.so (ext/snmp.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'sockets.so' (tried: ext/sockets.so (ext/sockets.so: cannot open shared object file: No such file or directory), ext/sockets.so.so (ext/sockets.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'sysvmsg.so' (tried: ext/sysvmsg.so (ext/sysvmsg.so: cannot open shared object file: No such file or directory), ext/sysvmsg.so.so (ext/sysvmsg.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'sysvsem.so' (tried: ext/sysvsem.so (ext/sysvsem.so: cannot open shared object file: No such file or directory), ext/sysvsem.so.so (ext/sysvsem.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'sysvshm.so' (tried: ext/sysvshm.so (ext/sysvshm.so: cannot open shared object file: No such file or directory), ext/sysvshm.so.so (ext/sysvshm.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'tidy.so' (tried: ext/tidy.so (ext/tidy.so: cannot open shared object file: No such file or directory), ext/tidy.so.so (ext/tidy.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'tokenizer.so' (tried: ext/tokenizer.so (ext/tokenizer.so: cannot open shared object file: No such file or directory), ext/tokenizer.so.so (ext/tokenizer.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'xmlreader.so' (tried: ext/xmlreader.so (ext/xmlreader.so: cannot open shared object file: No such file or directory), ext/xmlreader.so.so (ext/xmlreader.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'xmlrpc.so' (tried: ext/xmlrpc.so (ext/xmlrpc.so: cannot open shared object file: No such file or directory), ext/xmlrpc.so.so (ext/xmlrpc.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'xmlwriter.so' (tried: ext/xmlwriter.so (ext/xmlwriter.so: cannot open shared object file: No such file or directory), ext/xmlwriter.so.so (ext/xmlwriter.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'xsl.so' (tried: ext/xsl.so (ext/xsl.so: cannot open shared object file: No such file or directory), ext/xsl.so.so (ext/xsl.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    [PHP Modules]
    Core
    date
    filter
    hash
    libxml
    openssl
    pcntl
    pcre
    Reflection
    session
    sodium
    SPL
    standard
    zlib

  8. #8
    Expert confirmé Avatar de CosmoKnacki
    Homme Profil pro
    Justicier interdimensionnel
    Inscrit en
    Mars 2009
    Messages
    2 988
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Charente Maritime (Poitou Charente)

    Informations professionnelles :
    Activité : Justicier interdimensionnel

    Informations forums :
    Inscription : Mars 2009
    Messages : 2 988
    Par défaut
    ahem j'ai pas mal de modules qui ne se chargent pas en fait
    Question bête: est-ce que tu les as installés? Genre sudo apt-get install php7.2-opcache php7.2-xml ... si tu es sous un debian-like.

  9. #9
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2017
    Messages
    68
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Service public

    Informations forums :
    Inscription : Mars 2017
    Messages : 68
    Par défaut
    en partie oui

  10. #10
    Expert confirmé Avatar de CosmoKnacki
    Homme Profil pro
    Justicier interdimensionnel
    Inscrit en
    Mars 2009
    Messages
    2 988
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Charente Maritime (Poitou Charente)

    Informations professionnelles :
    Activité : Justicier interdimensionnel

    Informations forums :
    Inscription : Mars 2009
    Messages : 2 988
    Par défaut
    en partie oui
    Ça veut dire quoi précisément?

    Fais une installe de tous les modules manquants avec apt-get (ou apt) et regarde ce qui se passe, s'ils s'installent ou s'ils sont déjà présent.

    À noter aussi qu'il est possible de faire coexister plusieurs versions de php sur un même système: si ça se trouve tu as installé les modules idoines pour une autre version de php que celle utilisée par apache.

  11. #11
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2017
    Messages
    68
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Service public

    Informations forums :
    Inscription : Mars 2017
    Messages : 68
    Par défaut
    C'est exactement ce qui s'est passé, j'ai copié une ligne de commande d'installation, et j'avais pas mal de paquet qui refusait de s'installer, j'ai tenté un par un et je me retrouve avec 5 versions de php différentes. Quand je fais un apt get install ... il me met généralement que le paquet est déjà installé :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    Note, selecting 'php7.2-common' instead of 'php7.2-pdo'
    php7.2-common is already the newest version (7.2.34-8+0~20201103.52+debian10~1.gbpafa084).

  12. #12
    Expert confirmé Avatar de CosmoKnacki
    Homme Profil pro
    Justicier interdimensionnel
    Inscrit en
    Mars 2009
    Messages
    2 988
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Charente Maritime (Poitou Charente)

    Informations professionnelles :
    Activité : Justicier interdimensionnel

    Informations forums :
    Inscription : Mars 2009
    Messages : 2 988
    Par défaut
    Ça à l'air d'être un sacré bazar dans tes paquets!
    il me met généralement que le paquet est déjà installé
    Là il ne faut pas être général mais être précis. Pour ce qui est du paquet php7.2-pdo la réponse est normale car PDO est inclus dans l'installation de base de php et n'est plus un module séparé comme auparavant. Qu'en est-il des autres?


    1. Quelle est ta distribution linux et sa version?
    2. Montre ton fichier /etc/apt/sources.list
    3. As-tu dans /etc/apt/sources.list.d/ des fichiers ondrej-....ini (donnes leurs noms)

  13. #13
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2017
    Messages
    68
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Service public

    Informations forums :
    Inscription : Mars 2017
    Messages : 68
    Par défaut
    Re

    Alors au niveau de la liste de mes dépots j'ai :

    deb http://deb.debian.org/debian/ buster main
    deb-src http://deb.debian.org/debian/ buster main
    deb http://deb.debian.org/debian/ buster-updates main
    deb-src http://deb.debian.org/debian/ buster-updates main
    deb http://security.debian.org/debian-security buster/updates main
    deb-src http://security.debian.org/debian-security buster/updates main
    deb https://packages.sury.org/php/ buster main
    # deb-src https://packages.sury.org/php/ buster main

    et dans sources.list.d/ j'ai juste un fichier pgdg.list,

  14. #14
    Expert confirmé Avatar de CosmoKnacki
    Homme Profil pro
    Justicier interdimensionnel
    Inscrit en
    Mars 2009
    Messages
    2 988
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Charente Maritime (Poitou Charente)

    Informations professionnelles :
    Activité : Justicier interdimensionnel

    Informations forums :
    Inscription : Mars 2009
    Messages : 2 988
    Par défaut
    Bon on va commencer par faire ça:
    1. D'abord mise à jour: sudo apt-get update; sudo apt-get upgrade
    2. Ensuite, vérification des versions utilisées par défaut sur ton système: php -v dans le terminal pour connaître la version utilisée en ligne de commande, et <?php phpinfo(); ?> placé dans un fichier .php sur ton serveur pour connaître la version utilisée par apache. (appelles le dans ton navigateur)


    On avisera selon ce que ça donnera.

  15. #15
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2017
    Messages
    68
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Service public

    Informations forums :
    Inscription : Mars 2017
    Messages : 68
    Par défaut
    Ayant perdu trop de temps j'en suis venu à la manière la plus simple et visiblement la plus efficace, désinstaller réinstaller.
    Merci en tous cas pour votre coup de main

Discussions similaires

  1. [PHP-POSTGRES] PB de requète
    Par shensi dans le forum PostgreSQL
    Réponses: 1
    Dernier message: 06/06/2006, 16h02
  2. Problème de connection php mysql
    Par Vlacar dans le forum SQL Procédural
    Réponses: 5
    Dernier message: 20/04/2006, 19h52
  3. [PostgreSQL] [PostGreSQL] menu dynamique php-postgre-css
    Par tyrann dans le forum PHP & Base de données
    Réponses: 6
    Dernier message: 02/11/2005, 17h23
  4. PHP - postgres
    Par 74160 dans le forum PostgreSQL
    Réponses: 4
    Dernier message: 02/07/2003, 14h27
  5. [Class/PHP/Postgres] Problème de modélisation...
    Par k-reen dans le forum PostgreSQL
    Réponses: 4
    Dernier message: 27/02/2003, 08h49

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo