Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 90004

Summary: Mambo 4.5.2 problem with PHP class vCard not found
Product: Gentoo Linux Reporter: Kevin <gentoo>
Component: [OLD] ServerAssignee: Gentoo Web Application Packages Maintainers <web-apps>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Kevin 2005-04-21 21:31:54 UTC
Package installs fine, but when using mambo with the default example site and following the "Contact Us" link in the example/demo site, I get the following:

126) ) { // always encode "\t", which is *not* required $h2 = floor($dec/16); $h1 = floor($dec%16); $c = $escape.$hex["$h2"].$hex["$h1"]; } if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted $output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay $newline = " "; } $newline .= $c; } // end of for $output .= $newline; if ($jproperties[$key] = quoted_printable_encode($number); } // UNTESTED !!! function setPhoto($type, $photo) { // $type = "GIF" | "JPEG" $this->properties["PHOTO;TYPE=$type;ENCODING=BASE64"] = base64_encode($photo); } function setFormattedName($name) { $this->properties["FN"] = quoted_printable_encode($name); } function setName($family="", $first="", $additional="", $prefix="", $suffix="") { $this->properties["N"] = "$family;$first;$additional;$prefix;$suffix"; $this->filename = "$first%20$family.vcf"; if ($this->properties["FN"]=="") $this->setFormattedName(trim("$prefix $first $additional $family $suffix")); } function setBirthday($date) { // $date format is YYYY-MM-DD $this->properties["BDAY"] = $date; } function setAddress($postoffice="", $extended="", $street="", $city="", $region="", $zip="", $country="", $type="HOME;POSTAL") { // $type may be DOM | INTL | POSTAL | PARCEL | HOME | WORK or any combination of these: e.g. "WORK;PARCEL;POSTAL" $key = "ADR"; if ($type!="") $key.= ";$type"; $key.= ";ENCODING=QUOTED-PRINTABLE"; $this->properties[$key] = encode($name).";".encode($extended).";".encode($street).";".encode($city).";".encode($region).";".encode($zip).";".encode($country); if ($this->properties["LABEL;$type;ENCODING=QUOTED-PRINTABLE"] == "") { //$this->setLabel($postoffice, $extended, $street, $city, $region, $zip, $country, $type); } } function setLabel($postoffice="", $extended="", $street="", $city="", $region="", $zip="", $country="", $type="HOME;POSTAL") { $label = ""; if ($postoffice!="") $label.= "$postoffice\r\n"; if ($extended!="") $label.= "$extended\r\n"; if ($street!="") $label.= "$street\r\n"; if ($zip!="") $label.= "$zip "; if ($city!="") $label.= "$city\r\n"; if ($region!="") $label.= "$region\r\n"; if ($country!="") $country.= "$country\r\n"; $this->properties["LABEL;$type;ENCODING=QUOTED-PRINTABLE"] = quoted_printable_encode($label); } function setEmail($address) { $this->properties["EMAIL;INTERNET"] = $address; } function setNote($note) { $this->properties["NOTE;ENCODING=QUOTED-PRINTABLE"] = quoted_printable_encode($note); } function setURL($url, $type="") { // $type may be WORK | HOME $key = "URL"; if ($type!="") $key.= ";$type"; $this->properties[$key] = $url; } function getVCard() { $text = "BEGIN:VCARD\r\n"; $text.= "VERSION:2.1\r\n"; foreach($this->properties as $key => $value) { $text.= "$key:$value\r\n"; } $text.= "REV:".date("Y-m-d")."T".date("H:i:s")."Z\r\n"; $text.= "MAILER:PHP vCard class by Kai Blankenhorn\r\n"; $text.= "END:VCARD\r\n"; return $text; } function getFileName() { return $this->filename; } } // USAGE EXAMPLE /* $v = new vCard(); $v->setPhoneNumber("+49 23 456789", "PREF;HOME;VOICE"); $v->setName("Mustermann", "Thomas", "", "Herr"); $v->setBirthday("1960-07-31"); $v->setAddress("", "", "Musterstrasse 20", "Musterstadt", "", "98765", "Deutschland"); $v->setEmail("thomas.mustermann@thomas-mustermann.de"); $v->setNote("You can take some notes here.\r\nMultiple lines are supported via \\r\\n."); $v->setURL("http://www.thomas-mustermann.de", "WORK"); $output = $v->getVCard(); $filename = $v->getFileName(); Header("Content-Disposition: attachment; filename=$filename"); Header("Content-Length: ".strlen($output)); Header("Connection: close"); Header("Content-Type: text/x-vCard; name=$filename"); echo $output; */ ?>
Fatal error: Class 'vCard' not found in /var/www/www.website.com/htdocs/mambo/components/com_contact/contact.class.php on line 86

Oddly, the file vcard.class.php (which contains the vCard class) is present in /site-root/htdocs/mambo/includes/

Not sure why the other file can't see it.

Any thoughts here?  I'm guessing this is a problem with the upstream package?


Reproducible: Always
Steps to Reproduce:
1. ACCEPT_KEYWORDS="~x86" emerge mambo
2. configure mambo
3. visit default demo/example site's link entitled: "Contact Us"

Actual Results:  
See details

Expected Results:  
Nicely formatted web page.

Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.4, glibc-2.3.4.20040808-r1,
2.4.27-gentoo-r1 i686)
=================================================================
System uname: 2.4.27-gentoo-r1 i686 Intel(R) Xeon(TM) CPU 2.40GHz
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.3,dev-lang/python-2.1.3-r1 [2.3.3 (#1,
Feb 19 2004, 15:11:46)]
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.3, 2.1.3-r1
sys-devel/autoconf:  2.59-r5
sys-devel/automake:  1.8.5-r1
sys-devel/binutils:  2.15.90.0.1.1-r3
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.4.21
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/
http://128.213.5.34/gentoo/ http://mirror.datapipe.net/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="acl afs alsa apache2 apm avi bash-completion bcmath berkdb bitmap-fonts
bzlib calendar cpdflib crypt ctype cups curl curlwrappers dba doc emacs emacs-w3
emboss encode esd ethereal exif fam fdftk firebird flac flash foomaticdb fortran
ftp gd gdbm gif gmp gpm gtk gtk2 guile hardenedphp iconv icq imagemagick imap
imlib inetd innodb ipv6 jabber jack java javascript jikes jpeg junit kerberos
krb4 ldap libg++ libwww mad maildir mcal mhash mikmod mime ming motif mp3
mpatrol mpeg mysql ncurses nls odbc oggvorbis opengl oss pam pcre pdflib pear-db
perl png posix postgis postgres ppds prelude proj python qt quicktime readline
ruby samba sasl sdl session simplexml slang slp snmp soap spell spl sqlite sse
ssl svga sysvipc tcltk tcpd tetex tidy tiff tokenizer truetype truetype-fonts
type1-fonts unicode usb vhosts x86 xml xml2 xmlrpc xmms xpm xsl xv yaz zeo zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Elfyn McBratney (beu) (RETIRED) gentoo-dev 2005-04-30 10:34:46 UTC
I'd think so, and as I don't use the package, we'll probably have to refer this one upstream.
Comment 2 Renat Lumpau (RETIRED) gentoo-dev 2005-07-03 11:08:42 UTC
Works for me with 4.5.2.3.