+ Antworten
Ergebnis 1 bis 6 von 6

Thema: PHPIDS goes OSCommerce

  1. #1
    Neuer Benutzer
    Registriert seit
    11.06.2009
    Beiträge
    3
    When I stumbled across the heise articles about PHPIDS I decided to give it a shot for OSCommerce since we noticed an increasing number of attacks during the last months. The idea was to create an installation instruction for all OSC users and put it up to the add-ons server.

    So far, so good.

    Since OSC has a database, I thought it'd be a good idea to store the results in a table and later on write a script which displays any attack attempts at the admin section. But I always get the error PDOException: could not find driver.

    I'm running PHP MySQL Bibliothek 5.0.51a. with php_pdo.dll loaded.

    Any ideas?

  2. #2
    Moderator Avatar von .mario
    Registriert seit
    30.05.2007
    Beiträge
    924
    Phew - hard to say. Anymore info like filename, line the error was thrown, some var_dumps?

  3. #3
    Neuer Benutzer
    Registriert seit
    11.06.2009
    Beiträge
    3
    Oh, sorry, thought It'd be clear since database.php is the only file which accesses the database... My bad!

    The error comes up, when the script tries to establish a connection to the database using the parameters passed by config.ini.

    try {
    $this->handle = new PDO(
    $this->wrapper,
    $this->user,
    $this->password
    );

    Here's the parameter:
    wrapper = "mysql:host=localhost;port=3306;dbname=osc_tes t"

  4. #4
    Benutzer
    Registriert seit
    13.06.2007
    Beiträge
    64
    Please try to catch the exception that is thrown (obviously by adding a catch-block right after the try-block). That should do it.

  5. #5
    Neuer Benutzer
    Registriert seit
    11.06.2009
    Beiträge
    3
    Fixed it. I was missing the PDO driver file on my configuration. Added it and it's working like a charme. Thanks for your help anyways.

  6. #6
    Neuer Benutzer
    Registriert seit
    07.03.2012
    Beiträge
    1
    Hi, I have the same problem with the database access.
    When testing ?id=1&test=">XXX I get
    Exception: PDOException: SQLSTATE[HY000] [2005] Unknown MySQL server host 'localhost:/tmp/mysql5.sock'

    IDS created all the database tables during the installation. Why can't it find the database anymore?

+ Antworten

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein