Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417599 - www-apps/owncloud-4.0.0 should depend on dev-lang/php[pdo]
Summary: www-apps/owncloud-4.0.0 should depend on dev-lang/php[pdo]
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alexey Shvetsov
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-26 09:57 UTC by Ramin
Modified: 2012-06-07 22:36 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ramin 2012-05-26 09:57:28 UTC
=www-apps/owncloud-4.0.0 does not work with an own sqlite database if php was build without the "pdo" use flag.
PDO (PHP Data Objects) is the database interface of PHP.

I the official documentation
  http://owncloud.org/install
states that pdo is optional but it is required at least with the default database sqlite3. I guess that is is required with mysql as well.

I fixed my PDO Problem by rebuilding php with the pdo use flag

Reproducible: Always




Portage 2.1.10.49 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.3, glibc-2.14.1-r3, 3.3.4-gentoo x86_64)
=================================================================
System uname: Linux-3.3.4-gentoo-x86_64-AMD_E-450_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.1
Timestamp of tree: Fri, 25 May 2012 18:50:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.6.6-r2, 2.7.3-r1, 3.1.4-r3, 3.2.3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.9.3
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -msse3 -msse4a"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openfire/resources/security/ /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -msse3 -msse4a"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --autounmask=n"
FEATURES="assume-digests binpkg-logs buildpkg distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersandbox"
FFLAGS=""
GENTOO_MIRRORS="http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/                 http://gentoo.intergenia.de                 http://mirror.netcologne.de/gentoo/                 ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/                 http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en de"
MAKEOPTS="-j3 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X Xaw3d a52 aac aacs aalib acl acpi alsa amd64 apache2 apm asf atlas audiofile authdaemond autoipd automount avahi bash-completion bcmath berkdb bittorrent blas bluetooth bluray branding btrfs bzip2 cairo calendar cdb cdda cddb cdio cdr cgi clamav cli consolekit cracklib crypt css ctype cups curl cxx daap dbus declarative device-mapper dga disk-partition diskio dmx dri dts dv dvb dvbplayer dvbsetup dvd dvdr ecc emboss encode exif fam ffmpeg fftw firefox flac font-server fontconfig fortran fortune fping ftp fts3 fuse gd gdbm geoip gif ginac git glitz glut glw gmath gnuplot gnutls gpac gphoto2 gpm graphviz gs gstreamer gtk hddtemp heartbeat history iconv icu id3 id3tag idea ieee1394 imagemagick imlib inotify ipv6 irc isag jack java java6 javascript jbig joystick jpeg jpeg2k kde kipi kpathsea kvm kvm-trace lame lastfm latex lcms ldap libcaca libnotify libvisual libwww linuxthreads-tls lirc live lm_sensors logrotate logwatch loop-aes lzo mad maildir math matroska mbox mdnsresponder-compat mime minizip mjpeg mktemp mmx mng modules motif mp3 mp3tunes mp4 mpeg mplayer mtp mudflap multilib musepack musicbrainz mysql mysqlnd ncurses neXt netboot network network-cron networkmanager nls nntp nocd normalize nptl nsplugin ntfs nuv nxclient oav ocaml odk offensive ofx ogg omega openal openexr opengl openmp pacemaker pam pango parse-clocks pcre pda pdf pdo perl phonon plasma plotutils png policykit povray ppds pppd pulseaudio pvr python qalculate qemu qemu-ifup qt3support qt4 quicktime radio radosgw rdesktop readline redland reiserfs replaygain replytolist rrdcgi rrdtool samba science sdl semantic-desktop sensord session sha512 slang smp sms snmp sockets sound sox speex spell sql sqlite sqlite3 sse sse2 sse3 sse4 sse4a ssh ssl startup-notification stats subtitles subversion svg svgz swat symlink szip tcl tcpd tex4ht theora threads thunderbird tidy tiff tk tordns truetype udev udisks unicode upnp upower usb v4l v4l2 vcd vde videos vlc vlm vnc vorbis webdav webkit webserver wmf wxwidgets x264 xanim xcb xcomposite xft xine xinerama xinetd xml xmlwriter xorg xpm xrandr xscreensaver xulrunner xv xvid xvmc zeroconf zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authz_host mime cgi cgid dav dav_fs dav_lock dir rewrite userdir" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="canon" COLLECTD_PLUGINS="cpu cpufreq disk hddtemp logfile mbmon multimeter network processes sensors snmp thermal uptime users" DVB_CARDS="usb-dib0700" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="keyboard mouse evdev joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en de" LIRC_DEVICES="devinput" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="fglrx vesa fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Reto Gantenbein (ganto) 2012-05-26 13:46:35 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"
Comment 2 Ramin 2012-05-27 17:13:41 UTC
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;
                        }
                }
        }
Comment 3 No Name 2012-05-28 15:31:07 UTC
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
Comment 4 No Name 2012-05-28 15:33:16 UTC
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???
Comment 5 Ramin 2012-05-29 17:06:30 UTC
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
Comment 6 Bernard Cafarelli gentoo-dev 2012-06-07 22:36:05 UTC
Thanks everyone! 4.0.0 now depends on php[pdo], I also added 4.0.1 (and its bugfixes) to tree