Summary: | www-apps/owncloud-4.0.0 should depend on dev-lang/php[pdo] | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Ramin <gentoo> |
Component: | New packages | Assignee: | Alexey Shvetsov <alexxy> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | blackstar86, suka, voyageur, web-apps |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Ramin
2012-05-26 09:57:28 UTC
Same is true when using the mysql backend for owncloud. If php has been built without USE="pdo" there is an error after the database initialization: "Fatal error: Class 'PDO' not found in /var/www/htdocs/owncloud/lib/db.php on line 123" I am guessing from the content of that file: /var/www/localhost/htdocs/owncloud/lib/db.php that either "dev-lang/php[pdo]" or MDB2 is mandatory. None of these are installed on my system: emerge --search mdb2 | grep dev-php * dev-php/PEAR-MDB2 * dev-php/PEAR-MDB2_Driver_ibase * dev-php/PEAR-MDB2_Driver_mssql * dev-php/PEAR-MDB2_Driver_mysql * dev-php/PEAR-MDB2_Driver_mysqli * dev-php/PEAR-MDB2_Driver_oci8 * dev-php/PEAR-MDB2_Driver_pgsql * dev-php/PEAR-MDB2_Driver_sqlite Function getDBBackend from /var/www/localhost/htdocs/owncloud/lib/db.php /** * check which backend we should use * @return BACKEND_MDB2 or BACKEND_PDO */ private static function getDBBackend(){ $backend=self::BACKEND_MDB2; if(class_exists('PDO') && OC_Config::getValue('installed', false)){//check if we can use PDO, else use MDB2 (instalation always needs to be do ne my mdb2) $type = OC_Config::getValue( "dbtype", "sqlite" ); if($type=='sqlite3') $type='sqlite'; $drivers=PDO::getAvailableDrivers(); if(array_search($type,$drivers)!==false){ $backend=self::BACKEND_PDO; } } } Hello, i am using also Owncloud 4 and i am using it with MySQL und without PEAR-NMD2 and without PDO of php5! What you say is true... i looks like pdo or nmd2 is needed, but in daily use none of these is needed... I had also this error like you and it was a bug of OC only... The install script generate strange errors about missing pdo class or that it cant connect to database and this messages start also with "nmd2". My fault was that i want to create the OC DB as root. You need only a dbuser say "mycloudadmin" which has als rights for your empty database say "mycloud" and then it is working without pdo or mdb2. i also had this messages and neither pdo or installing mdb2 solve this errors, only a other user... OC is very buggy in my eyes... sadly but true. best regards chris OC self says that pdo or mdb2 is optionally... but the comments in the files says that it is needed... but my daily experience say for mysql and maybe other db-systems you dont need it. maybe somewhere which know about the real fact can help us? how is it possible that it is working without pdo or mdb2 for me??? Hello everyone, to stop speculation I have asked the author of that file "Frank Karlitschek". He told me: "I´m sorry for the confusion. The installation instructions are a bit outdated here. We require PDO with ownCloud 4. I hope this is not a big problem. It´s default in PHP since several years and I don´t see a big point in using PHP without it." Therefore we can conclude www-apps/owncloud-4.0.0 depends on dev-lang/php[pdo] . I propose this patch :) : --- /usr/portage/www-apps/owncloud/owncloud-4.0.0.ebuild 2012-05-24 19:04:29.000000000 +0200 +++ /usr/portage/www-apps/owncloud/owncloud-4.0.0-r1.ebuild 2012-05-29 19:04:57.000000000 +0200 @@ -16,7 +16,7 @@ REQUIRED_USE="|| ( mysql postgres sqlite3 )" DEPEND="" -RDEPEND="dev-lang/php[curl?,gd,json,mysql?,postgres?,sqlite3?,xmlwriter,zip]" +RDEPEND="dev-lang/php[curl?,gd,json,mysql?,pdo,postgres?,sqlite3?,xmlwriter,zip]" need_httpd_cgi need_php_httpd Thanks everyone! 4.0.0 now depends on php[pdo], I also added 4.0.1 (and its bugfixes) to tree |