introduction screenshots faq forum blog modules components download
Please use the search function and/or read the FAQ first.

Go to Topic: PreviousNext
Go to: Message ListNew TopicSearchLog InPrint View

PDO and mysqli - ERRORS



Posted by: Trebly
February 19, 2010 07:16PM
Hello,

Nota : I could not make a good search on the whole forums subjects because of a crash of the search function of your site (reported separately by mail ).

I have not found where is said, what I think as true, that the 5.3.0 is configured for MYSQL in the mode server "mysqli". This seems to me normal.

Nevertheless this generates a problem for which one I have not found any solution till know.

If the application (in my case TikiWiki) uses PDO, the extension is php_pdo_mysql.dll (not php_pdo_mysqli.dll) and the instruction
"$mydb=NEW PDO(mysqli:...);"
crashed with error "driver not found", this while
$mydb=NEW PDO(mysql:...);"
(If you have activated the extension php_pdo_mysql.dll)
returns a NULL object without any error as the server don't exist.

So I don't know how to use PDO raised in the Easyphp context.

As for tikiwiki the problem is severe.
TikiWiki for which I simultaneously try to install two four installation on windows, enhanced as developer with the experience, a full windows installation (and compatibility patch) of 4.1 version and future ones (installation which was OK with version till 3.3 of tiki), and help for French translation.
The problem is severe because the program hold only the error with exception process.

Because the PDO extension don't returns an error when the existing TikiWiki goes on, till a crash much more later as most of function don't raises errors when operating on NULL db object. The result is erratic.

I had the idea idea that the file for a PDO extension for mysqli should be named "php_pdo_mysqli.dll" I search on the net.
I found it inside an important document about PHP6...

It seams to me today that the difficulties of the PHP6 release, and complete desynchronization with PDO (and ADODB which have not compatible version with php5.3) is the source of the problem.

There is in my opinion five solutions (only the first one reasonable) :

1- Develop a php_pdo_mysqli.dll by "retro-compatibility" from the php6 dll ("php_pdo_mysqli.dll") or from the php_pdo_mysql.dll

2- Admit that it became impossible to install the new TikiWiki version (the older where using connect_mysql...) and any other application using PDO on windows with updated configurations and so don't use it till PHP6 should be released. Stop developments.

3- Go back to older version of php and easy php to have a mysql php extension available with mysql and admit that other new applications can't function on the same computer....

4- install a mysql version and php which will be able to hold both mysql and mysqli extensions (NEW PDO become available with both mysql and mysqli servers with one unique extension !!!

5- Make multiple installations of Mysql as different servers depending of the soft using it.

Thank's to give me an available answer, while nobody could give me any advice either than develop myself.

Anyway, I believe that a solution should be found so that a call to mysql:... server (php extension mysql) raises an error when the unique server is mysqli, even normally the returned object is NULL.

Best regards

Trebly
Options: ReplyQuote
Posted by: Thierry
February 23, 2010 10:53PM
I'm not aware about mysqli and PDO.

Is the problem specific to EasyPHP ?
Is it specific to TikiWiki ?

If not, you'd better ask to official PHP/TikiWiki support.

If it's an EasyPHP problem, I will try to understand the problem :-)
Options: ReplyQuote


Go to: Message ListSearchLog In
Your Name: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.