FS#22072 - [php] Unable to load PDO drivers

Attached to Project: Arch Linux
Opened by Evangelos Foutras (foutrelis) - Sunday, 12 December 2010, 18:46 GMT
Last edited by Pierre Schmitz (Pierre) - Thursday, 16 December 2010, 20:54 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Pierre Schmitz (Pierre)
Architecture i686
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

It would appear that the PDO drivers are broken on i686 in the latest release. On the other hand, on x86_64 they load with no problem whatsoever.

On a i686 machine with the the MySQL and PostgreSQL PDO drivers enabled, I get the following errors:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_mysql.so' - /usr/lib/php/modules/pdo_mysql.so: undefined symbol: php_pdo_unregister_driver in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_pgsql.so' - /usr/lib/php/modules/pdo_pgsql.so: undefined symbol: php_pdo_unregister_driver in Unknown on line 0

Additional info:
* package version(s): php 5.3.4-1


Steps to reproduce:

Uncomment the pdo.so and pdo_mysql.so extensions in /etc/php/php.ini and run `php -m'. At the beginning you should see an error saying "Unable to load dynamic library '/usr/lib/php/modules/pdo_mysql.so'".
This task depends upon

Closed by  Pierre Schmitz (Pierre)
Thursday, 16 December 2010, 20:54 GMT
Reason for closing:  None
Comment by Evangelos Foutras (foutrelis) - Sunday, 12 December 2010, 19:00 GMT
Also reported the bug upstream: http://bugs.php.net/bug.php?id=53529.
Comment by Pierre Schmitz (Pierre) - Sunday, 12 December 2010, 19:17 GMT
Make sure to load pdo.so before pdo_mysql.so. (Maybe I should change the order of the modules in the default php.ini; its just alphabetical now)
Comment by Evangelos Foutras (foutrelis) - Sunday, 12 December 2010, 19:28 GMT
Putting pdo.so on top works indeed.

Please do move pdo.so before the drivers in the default php.ini too.

I closed the upstream report.

(I guess I'll be left wondering why it worked on x86_64. :p)
Comment by Evangelos Foutras (foutrelis) - Monday, 13 December 2010, 09:46 GMT
Closed as "Not a bug"? It most certain is a bug if the extensions are wrongly sorted by default.
Comment by Pierre Schmitz (Pierre) - Monday, 13 December 2010, 10:25 GMT
I see no point in discussing whether I chose the right reason to close this task or not. I already changed the ordering because I see that this was not ideal. But this is still up to the user; you'll get the same obvious error when you forget to enable the pdo extension while trying to use a pdo_driver.

It's a documentation issue at best and there is no reason to release a new package as this wont change anything.
Comment by Evangelos Foutras (foutrelis) - Monday, 13 December 2010, 10:43 GMT
I spent an hour trying to figure out why that error was happening and then proceeding to open bug reports here and on bugs.php.net. I believe that I'm not the only one that would be confused by this issue, thus a new package release with the correct ordering would possibly prevent other people's time from being wasted.

Ultimately, you're the package's maintainer, so you decide how to proceed. I'm just presenting my point of view and trying to be proactive.
Comment by AC (AlexC_) - Thursday, 16 December 2010, 19:51 GMT
On a fresh install of Arch I also ran into this error, it seems quite odd that the default simply wont work. As for the obvious error, it doesn't state that PDO needs to be loaded first.
Comment by Pierre Schmitz (Pierre) - Thursday, 16 December 2010, 20:53 GMT
The next release will come without PDO as shared module which seems to be recommend by upstream since PHP 5.3. As PHP cannot handle module dependencies this is the only way to make it work regardless the order the users chooses to load the modules.

Loading...