-
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?
-
Moderator
Phew - hard to say. Anymore info like filename, line the error was thrown, some var_dumps?
-
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"
-
Please try to catch the exception that is thrown (obviously by adding a catch-block right after the try-block). That should do it.
-
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.
-
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?
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- Anhänge hochladen: Nein
- Beiträge bearbeiten: Nein
Foren-Regeln
Lesezeichen