Compiling PHP with IMAP enabled

I am trying to run software that requires the IMAP module of PHP enabled. I don't see a module in Server Admin that I can simply turn on. What options do I have for enabling the IMAP module of PHP on Mac OS 10.5 server?
Thanks in advance!

Hi,
first of all please mind that PHP 5.2 is out of support by the PHP developers on php.net. To receive bug fixes petc. you should use PHP 5.3.
Secondly it is worth noticing that there are three function libraries (extensions) which allow accessing the MySQL database. One is the classic "mysql" extension, one is called mysqli, with "i" as in improved, and a driver for the PDO database abstraction - PDO_mysql. You are only activating one of these, in most situations you want all three of them gor maximum application compatibility.
Now with PHP 5.3 PHP bundles an implementation complete of the MySQL Client functionality. So linking against a local installation is not needed. This implementation is called mysqlnd - MySQL native driver.
To build w/ mysqlnd and all three function libraries use a configure line like this:
./configure with-apxs2=/usr/local/apache2/bin/apxs with-mysql=mysqlnd with-mysqli=mysqlnd with-pdo-mysql=mysqlnd
If you have a strong reason for 5.2 or using libmysql I'd need more information, like which version of mysql was installed. Was it self-compiled or binaries from mysql.com etc. But I hope the above is fine.
johannes

Similar Messages

  • Compiling PHP with SOAP/Iconv/OpenSSL support

    Hi,
    I'm not sure if this is the best place for this but the other topics seem even less related.
    I'm trying to compile PHP with SOAP and SSL on a Mac for use with Salesforce.com (it works without any issues on Gentoo and RedHat). Anytime I try to connect I get an invalid SOAP header error. It seems to be happening because the Salesforce SOAP server requires SSL connections and I don't have SSL enabled, but it's hard to backtrace. Regardless, I can't get SSL or iconv support working.
    I've installed OpenSSL both from Macports and from source using the default ./config options, neither method worked. It may be related to some issues I'm having getting iconv working as well (which I also can't seem to get right, it's installed via Macports).
    Here's my PHP configure, if anyone can let me in on what I'm doing wrong that would be great!!! Thanks in advance!
    root# MACOSXDEPLOYMENTTARGET=10.5 \
    CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" \
    CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" \
    CXXFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" \
    LDFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bindatload"
    root# ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man \
    --infodir=/usr/share/info \
    --with-apxs2=/usr/sbin/apxs \
    --with-config-file-path=/etc \
    --sysconfdir=/private/etc \
    --enable-cli \
    --with-curl=/opt/local \
    --enable-ftp \
    --enable-mbstring \
    --enable-mbregex \
    --enable-sockets \
    --with-ldap=/usr \
    --with-kerberos=/usr \
    --with-mime-magic=/etc/apache2/magic \
    --with-zlib-dir=/usr \
    --with-xmlrpc \
    --with-xsl=/usr \
    --with-iconv=shared,/opt/local \
    --with-openssl=shared,/opt/local \
    --with-gd \
    --with-png-dir=/usr/X11R6 \
    --with-xpm-dir=/usr/X11R6 \
    --with-jpeg-dir=/opt/local \
    --enable-exif \
    --with-freetype-dir=/opt/local \
    --with-t1lib=/opt/local \
    --enable-pdo \
    --with-pdo-mysql \
    --with-mysql-sock=/var/mysql \
    --with-mysqli=/usr/bin/mysql_config \
    --with-mysql=/usr/local/mysql \
    --with-iodbc=/usr \
    --with-curl \
    --with-config-file-path=/etc \
    --sysconfdir=/private/etc \
    --enable-soap
    Message was edited by: mkenney - bad grammar

    mkenney wrote:
    Hi,
    I'm not sure if this is the best place for this but the other topics seem even less related.
    Welcome to Apple Discussions:
    Use our Unix forum here:
    http://discussions.apple.com/forum.jspa?forumID=735
    (yes, it's a tad hidden )
    Message was edited by: nerowolfe

  • Can not compile php with "-with-oracle=/usr/local/oracle"

    I work on Linux engine with a x86_64 architecture and use Oracle 10g 10.2.0.1 client for x86_64 linux
    so - when i try to compile php with the oracle argument (-with-oracle=/usr/local/oracle) i get everytime the same error:
    checking Oracle version... configure: error: Oracle needed libraries not found
    I think, maybe i have a problem because configure not found my "64 bit libraries"...
    Can someone help me? I am realy helpless...
    thx

    Did you really want the obsolete "oracle" driver - why not use --with-oci8?
    The user comments in http://www.php.net/oci8 have some good info on 64bit configuration.

  • Update PHP with IMAP (installing SugarCRM on 10.5.4)

    I have seen parts of this covered before for 10.4.x but i am now trying to include c-client on 10.5.4.
    see http://discussions.apple.com/thread.jspa?messageID=4598819&#4598819
    I get sugar installed fine but on OSX when i try and set up mail it gives me this error:-
    Inbound Email cannot function without the IMAP c-client libraries enabled/compiled with the PHP module. Please contact your administrator to resolve this issue.
    *so far i have done the following.*
    sudo mkdir -p /SourceCache
    cd /SourceCache
    sudo curl -O ftp://ftp.cac.washington.edu/imap/c-client.tar.Z
    sudo tar xzf c-client.tar.Z
    cd imap-200XX (folder will represent the latest version)
    sudo make oxp
    mkdir /usr/local/imap/include
    mkdir /usr/local/imap/lib
    cd c-client/
    cp *.h /usr/local/imap/include
    cp *.c /usr/local/imap/lib
    cp c-client.a /usr/local/imap/lib
    cd /usr/local/imap/lib
    ln c-client.a libc-client.a
    # i hate renaming when it might be needed in its real name.
    i need to make mysql headers available too as trying to build php now brings up errors...
    see here.
    http://docs.info.apple.com/article.html?artnum=306782
    I think the mysql headers (or client libs) must be installed to make php with the same configure command that it was installed with
    I have downloaded the same version of mysql that 10.5 uses mysql-5.0.45.tar.gz and have expanded that into the /SourceCache - it configures and makes without erros but i am unable to build php with the mysql statements included - see below
    cd /SourceCache
    get php-5.2.6.tar.gz from your local mirror
    cd cd /SourceCache/php-5.2.6
    sudo ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --with-apxs2=/usr/sbin/apxs --with-ldap=/usr --with-kerberos=/usr --enable-cli --with-zlib-dir=/usr --enable-trans-sid --with-xml --enable-exif --enable-ftp --enable-mbstring --enable-mbregex --enable-dbx --enable-sockets --with-iodbc=/usr --with-curl=/usr --with-config-file-path=/etc --sysconfdir=/private/etc --with-openssl --with-xmlrpc --with-xsl=/usr --with-pear --with-imap=/usr/local/imap --with-mysql-sock=/var/mysql --with-mysqli=/usr/bin/mysql_config --with-mysql=/SourceCache/mysql/mysql-5.0.45
    I added my --with-imap=/usr/local/imap statement to include the libc-client c-client kit..
    BUT i can only get it to build without the mysql statements.. do i really need mysql built in... it was in the original php configure script so i want to keep as much like the original as possible so i do not break things.
    The build (with out mysql statmens) also throws up these few errors.. which is strange as these were in the build line from a info.php script i ran against the server...
    Notice: Following unknown configure options were used:
    --disable-dependency-tracking
    --enable-trans-sid
    --with-xml
    --enable-dbx
    Referances
    my main source of info was from here...
    http://discussions.apple.com/thread.jspa?messageID=4598819&#4598819
    looks like apple have come up against this before but is for an earlier version of MySQL so i would not install it.
    http://docs.info.apple.com/article.html?artnum=306782
    http://discussions.apple.com/thread.jspa?messageID=7828379

    It sounds like you need to download the MySQL headers. Yes you do need MySQL.
    Here's how I solved this problem. I used this thread as my basis:
    http://discussions.apple.com/message.jspa?messageID=6112771
    My updated instructions are located below with sources. I had to complete these steps again today. You had better get good at this, because Leopard updates may force you to repeat these steps. I completed this stuff back in Dec and here I am again. I did not have to re-download, but that means that I am using older versions of these programs/modules. BTW - the older stuff still works for SugarCRM. You may be using more updated files if you are downloading/have downloaded newer stuff, make sure to adjust these instructions for the newer updated files and folders.
    BTW - I just realized that you may be on a workstation, you may need to change the "/usr/lib" and "/usr/include" to "/usr/local/lib" and "/usr/local/include" respectively.
    Good luck!
    It took me a while to get this going, but I was able to install SugarCRM on Mac OS X using the following threads as my guideline. My major problem was missing MySQL Headers preventing PHP 5 from being compiled.
    MySQL headers were missing from the Mac OS X Server distribution and I needed to get these before starting (see thread: http://lists.apple.com/archives/macos-x-server/2007/Nov/msg00277.html). Then, I followed the steps to download and compile PHP 5 with IMAP. Followed the steps to compile PHP5 and then once I recompiled PHP, Apache did not work, so I recompiled Apache.
    If you can not compile PHP and it stops at searching for the MySQL headers, you can download them here (see thread: http://lists.apple.com/archives/macos-x-server/2007/Nov/msg00277.html).
    As per the thread, you can download the headers from here:
    (Follow instructions in ReadMe)
    download and unpack from:
    http://www.opensource.apple.com/darwinsource/other/MySQL-43.binaries.tar.gz
    sudo tar -xzvf MySQL-43.root.tar.gz -C /
    Follow steps for recompiling php and IMAP in THIS thread from David Shauger1 (Thanks David)
    To install the IMAP extensions do this (as root):
    sudo mkdir -p /SourceCache
    cd /SourceCache
    You may not need to download new c-client - look in /SourceCache for prior downloads (this note is for me)
    sudo curl -O ftp://ftp.cac.washington.edu/imap/c-client.tar.Z
    sudo tar xzf c-client.tar.Z
    sudo mv imap-2006k imap-2006h
    cd imap-2006h
    sudo make oxp
    cd c-client
    sudo cp *.h /usr/include
    sudo cp *.c /usr/lib
    sudo cp c-client.a /usr/lib/libc-client.a
    Then, download recompile the latest version of PHP 5 following these instructions:
    http://downloads.topicdesk.com/docs/UpdatingPHP_on_OS_XServer.pdf
    You may not need to download a new PHP - look in /SourceCache for a previous download (this note is for me)
    mkdir -p /SourceCache
    cd /SourceCache
    curl -O http://us3.php.net/distributions/
    php-5.2.6.tar.gz
    tar xzpf php-5.2.6.tar.gz
    cd /SourceCache/php-5.2.6
    sh
    CFLAGS=-DBIND8COMPAT
    export CFLAGS
    php configuration command:
    sudo ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --with-apxs2=/usr/sbin/apxs --with-ldap=/usr --with-kerberos=/usr --enable-cli --with-zlib-dir=/usr --enable-trans-sid --with-xml --enable-exif --enable-ftp --enable-mbstring --enable-mbregex --enable-dbx --enable-sockets --with-iodbc=/usr --with-curl=/usr --with-config-file-path=/etc --sysconfdir=/private/etc --with-mysql-sock=/var/mysql --with-mysqli=/usr/bin/mysql_config --with-mysql=/usr --with-openssl --with-xmlrpc --with-xsl=/usr --without-pear --with-imap --with-imap-ssl
    make
    make install
    exit
    Finally, follow steps for recompiling apache
    Read entire thread (http://discussions.apple.com/thread.jspa?messageID=5676677&tstart=0)
    1. Download the Apache2 source from http://httpd.apache.org/download.cgi (latest version is 2.2.9) and extract it.
    2. Open Terminal and go to that directory. If you extract sources into your Downloads folder, type "cd ~/Downloads/httpd-2.2.9" and hit return
    3. Type "./configure --enable-layout=Darwin --enable-mods-shared=all" and hit return
    4. Wait for the process to complete and then type "make" and return
    5. Wait for the process to complete and then type "sudo make install" and return

  • Compiling PHP with MySQL

    Hello all,
    I am having trouble compiling php 5.2 (also tried 5.3). This is my configure line:
    =======
    ./configure with-apxs2=/usr/local/apache2/bin/apxs with-mysql=/opt/mysql/mysql
    =======
    When I run "make", I get the following error:
    =======
    Undefined first referenced
    symbol in file
    mysql_set_character_set ext/mysql/php_mysql.o
    ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
    collect2: ld returned 1 exit status
    *** Error code 1
    make: Fatal error: Command failed for target `sapi/cli/php'
    =======
    Here are my machine details:
    =======
    @[machine-name]-/usr/local/php5.2 # uname -a
    SunOS [machine-name] 5.10 Generic_138889-03 i86pc i386 i86pc Solaris
    @[machine-name]-/usr/local/php5.2 # isainfo -kv
    64-bit amd64 kernel modules
    =======
    PHP compiles fine when I do it without MySQL. Any assistance is greatly appreciated.
    Please let me know if you need additional information.
    Thank you.
    -Ryan

    Hi,
    first of all please mind that PHP 5.2 is out of support by the PHP developers on php.net. To receive bug fixes petc. you should use PHP 5.3.
    Secondly it is worth noticing that there are three function libraries (extensions) which allow accessing the MySQL database. One is the classic "mysql" extension, one is called mysqli, with "i" as in improved, and a driver for the PDO database abstraction - PDO_mysql. You are only activating one of these, in most situations you want all three of them gor maximum application compatibility.
    Now with PHP 5.3 PHP bundles an implementation complete of the MySQL Client functionality. So linking against a local installation is not needed. This implementation is called mysqlnd - MySQL native driver.
    To build w/ mysqlnd and all three function libraries use a configure line like this:
    ./configure with-apxs2=/usr/local/apache2/bin/apxs with-mysql=mysqlnd with-mysqli=mysqlnd with-pdo-mysql=mysqlnd
    If you have a strong reason for 5.2 or using libmysql I'd need more information, like which version of mysql was installed. Was it self-compiled or binaries from mysql.com etc. But I hope the above is fine.
    johannes

  • Compile PHP with GD and IMAP

    Hello,
    I want to use GD and IMAP functions in PHP.
    PHP Version 5.3.3
    But Apple doesn't compile those functions in the default setup.
    Who can help me to install the functions, or can tell me where i can find a manual?
    Tnkx!

    I've got imap installed.
    1. Grab this file from my dropbox: http://dl.dropbox.com/u/8756757/imap.so
    2. Now move it to the following directory: /usr/lib/php/extensions/no-debug-non-zts-20090626/
    3. Then just edit /etc/php.ini and under the extension commands towards the bottom add this line:
    extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/imap.so
    For the GD, here is a link to a pdf tutorial which will tell you all the steps to do for it:
    http://docs.google.com/viewer?a=v&q=cache:jh1vwDhHBBIJ:downloads.topicdesk.com/d ocs/AddingGD2_to_PHP_on_OS_X_Server_10_5_Leopard.pdfadding+gd2+to+php+os+xserver&hl=en&gl=us&pid=bl&srcid=ADGEESj-au1neHxRQ_y6WXStCnuXZHPDayNb5z3W9o3JuMA9 4gEB9Ppp3946o5jed1IfA5Tsy5lR9xWKdakYVxa7zG7L7fy-uSZrvrdHJwh1KPk3g1QkfDkIMKO0Mj7s 4W8OJxUWw0zz&sig=AHIEtbTxKgQtrOR52onsNE6j1JVb2CabQ

  • Php with mysqli, mbstring and xsl extensions

    I don't understand why php isn't build with mysqli and mbstring extensions since mysql4 is installed and there are a lot of languages that need multibytes strings. Here is a PKGBUILD that enable them. I also added xsl extension to use xsl files with php.
    # $Id: PKGBUILD,v 1.51 2004/12/16 22:03:19 judd Exp $
    # Maintainer: dorphell <[email protected]>
    # Contributor: Benoit Chesneau <[email protected]>
    pkgname=php
    pkgver=5.0.3
    pkgrel=2
    pkgdesc="A high-level scripting language"
    url="http://www.php.net"
    backup=(etc/php.ini)
    depends=('openssl' 'libjpeg' 'freetype2' 'libpng' 'pam'
    'gdbm' 'libxml2' 'openldap' 'ncurses' 'curl' 'libxslt')
    makedepends=('apache' 'mysql' 'imap' 'postgresql' 'bzip2' 'smtp-server'
    'gd' 'fam' 'sqlite3' 'unixodbc')
    source=(http://www.php.net/distributions/$pkgname-$pkgver.tar.gz php.ini)
    md5sums=('bf89557056ce34d502e20e24071616c7' 'd5b9b37fbb746f0967d795763106735a')
    build() {
    cd $startdir/src/$pkgname-$pkgver
    ./configure --with-apxs2 --prefix=/usr --sysconfdir=/etc
    --with-layout=PHP
    --with-ttf --enable-mailparse --with-config-file-scan-dir=/etc
    --enable-bcmath=shared --enable-calendar=shared --enable-ftp=shared
    --enable-gd-native-ttf --enable-magic-quotes --enable-posix=shared
    --enable-session --enable-shared --enable-shmop=shared --with-imap
    --with-imap-ssl --with-ncurses --with-readline --with-sqlite=shared
    --enable-sysvsem=shared --enable-sysvshm=shared --enable-track-vars
    --enable-trans-sid --enable-safe-mode --enable-sockets=shared
    --enable-xml --with-bz2=shared --with-curl --with-mime-magic
    --with-unixODBC=shared
    --enable-dba --without-db2 --without-db3 --with-inifile --with-flatfile
    --with-gdbm --with-freetype-dir=/usr --with-gd=shared --enable-exif
    --with-jpeg-dir=/usr --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config
    --with-ldap=shared
    --with-mysql-sock=/tmp/mysql.sock --with-openssl --with-gettext
    --with-pear=/usr/share/pear --with-dom --with-dom-xslt
    --with-pgsql=shared --with-pgsql-sock=/tmp/pgsql.sock
    --with-png-dir=/usr --with-regex=php --with-zlib --with-fam=shared
    --with-xsl
    --enable-mbstring=all --enable-mbregex
    # fixes a build error in sqlite support
    ln -s main/php_config.h ./config.h
    make || return 1
    mkdir -p $startdir/pkg/usr/lib/apache
    # cp config_vars.mk config_vars.old
    # sed "s|^INSTALL_IT.*$|INSTALL_IT = apxs -i -a -S LIBEXECDIR=$startdir/pkg/usr/lib/apache -n php4 libs/libphp4.so|" config_vars.old >config_vars.mk
    sed -i "s|-i -a -n php5|-i -n php5|g" Makefile
    make INSTALL_ROOT=$startdir/pkg EXTENSION_DIR=/usr/lib/php install
    cp ../php.ini $startdir/pkg/etc

    i suggest filing a feature request through the bug tracker.
    As for why such features may not be compiled in is that whoever maintains the package may have never had the need to have such features in php or experienced any issue because of it. You will experience this with many distros so I suggest not getting accusatory and simply request the feature through the proper channels.
    Each persons needs and experience are different and that is why developers write their code to encompass as many features as their users request.  How robust a package needs to be in arch is up to people like you giving the crucial feedback.
    (btw i don't see why your request would not be granted. I suggest the feature request though because i know the maintainer of the PHP package is not a frequent visitor to this forum but he will get your request if you make to the bug tracker)

  • Php with xsl on Sun Java Web Server 7.0

    Hi anyone,
    i installed php as nsapi via phppack. Now i need xsl support in php. I've tryed to compile php with the following line (php 5.2.6):
    ./configure with-nsapi=/export/netscape_71 enable-force-cgi-redirect with-gettext with-zlib --with-xsl=/usr/lib64/php5/extensions
    magnus.conf, obj.conf and mime.types are assimilate to this article:
    http://developers.sun.com/webtier/reference/techart/php2.html
    After compiling, i copy the libphp5.so in the .plugins/php/ dir an restart the webserver.
    He stops with this message:
    failure: CORE2253: Error running Init function load-modules: dlopen of /export/netscape_71/plugins/php/libphp5.so failed (/export/netscape_71/plugins/php/libphp5.so: wrong ELF class: ELFCLASS64)
    failure: server initialization failed
    What's going wrong?
    How i get xsl Support on Sun Java Web Server?
    thanks!

    essential wrote:
    ./configure with-nsapi=/export/netscape_71 enable-force-cgi-redirect with-gettext with-zlib --with-xsl=/usr/lib64/php5/extensionsYou are pointing to 64-bit library path. Change it to 32-bit library path.
    failure: CORE2253: Error running Init function load-modules: dlopen of /export/netscape_71/plugins/php/libphp5.so failed (/export/netscape_71/plugins/php/libphp5.so: wrong ELF class: ELFCLASS64)
    failure: server initialization failedThis means that it expects a 32-bit library but it found a 64-bit one.

  • Library error when configuring PHP with OCI8

    I'm running into a problem running the configure command to include OCI8 in our Linux PHP in order to connect to a remote Oracle database. I've been following the instructions on the page:
    http://www.oracle.com/technology/pub/notes/technote_php_instant.html
    We have a CentOS 4.6 server:
    * 2.6.9-67.0.4.ELsmp
    * Apache Apache/2.0.52
    * PHP 4.x
    I've downloaded the latest PHP we can get for 4.x (4.4.8). I can compile and install the default PHP 4.4.8 without issue. However, trying to configure the OCI8 runs into problems:
    I've added the types to the httpd.conf file and installed the rpms:
    oracle-instantclient-basic-11.1.0.1-1.i386.rpm
    oracle-instantclient-devel-11.1.0.1-1.i386.rpm
    I'm unsure if 4.4.8 config.m4 is correct -- but if we try to use the php_oci8c_buildpatch, it fails, so I went with the default config.m4 in PHP 4.4.8.
    I try to configure with the command:
    ./configure with-oci8-instant-client prefix=/usr/local/bin/php with-apxs2 enable-sigchild --with-config-file-path=/etc/httpd/conf
    ...and get the error it can't find the libraries:
    checking for Oracle (OCI8) support using ORACLE_HOME installation... no
    checking for Oracle (OCI8) support using Oracle Instant Client... yes
    checking Oracle Instant Client directory... /usr/lib/oracle/11.1.0.1/client/lib
    checking Oracle Instant Client SDK header directory... /usr/include/oracle/11.1.0.1/client
    checking Oracle Instant Client version... configure: error: Oracle Instant Client libraries not found
    Yet, when I look at the directory where it says it is looking, I see the libraries:
    # ls -l /usr/lib/oracle/11.1.0.1/client/lib
    total 124160
    lrwxrwxrwx 1 root root 17 Feb 6 14:35 libclntsh.so -> libclntsh.so.11.1
    -rw-r--r-- 1 root root 35295891 Aug 1 2007 libclntsh.so.11.1
    -rw-r--r-- 1 root root 5839373 Aug 1 2007 libnnz11.so
    lrwxrwxrwx 1 root root 15 Feb 6 14:35 libocci.so -> libocci.so.11.1
    -rw-r--r-- 1 root root 2331572 Aug 1 2007 libocci.so.11.1
    -rw-r--r-- 1 root root 79215373 Aug 1 2007 libociei.so
    -rw-r--r-- 1 root root 129285 Aug 1 2007 libocijdbc11.so
    -rw-r--r-- 1 root root 1879924 Aug 1 2007 ojdbc5.jar
    -rw-r--r-- 1 root root 1977444 Aug 1 2007 ojdbc6.jar
    -rw-r--r-- 1 root root 299640 Aug 1 2007 ottclasses.zip
    Can anyone shed some light on what I'm missing? I've searched, poked, and prodded -- but am unable to find a solution.
    Thanks!
    Keith

    The problem is in PHP. If you open configure script you will see that PHP 4.4.8 does not know instantclient 11g. He just know 10g.
    So you have three options:
    1. use 10g instant client
    2. use PHP5 instead of PHP4 (as PHP4 are deprecated, so no new versions in the future)
    "Support for PHP 4 has been discontinued since 2007-12-31. Please consider upgrading to PHP 5.2. The release below is the last PHP 4 release."
    3. You can rewrite configure script :-) which is possible but according to option 2 this option is silly.

  • Unable to compile PHP on pSeries AIX 5.1

    Hello, I have Oracle 9.2 installed and running ok.
    When I try to compile PHP with oci8 support, this is what I get:
    nd/zend_dynamic_array.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo main/internal_functions_cli.lo -lintl -lgdbm -lm -ldl -lm -lodm -lbsd_r -lld -lperfstat -lclntsh -o sapi/cli/php
    ar: 0707-101 . is not a valid flag.
    make: *** [libphp4.la] Error 1
    make: *** Waiting for unfinished jobs....
    ld: 0711-317 ERROR: Undefined symbol: .OCIEnvInit
    ld: 0711-317 ERROR: Undefined symbol: .OCIHandleAlloc
    ld: 0711-317 ERROR: Undefined symbol: .OCIInitialize
    ld: 0711-317 ERROR: Undefined symbol: .OCIHandleFree
    ld: 0711-317 ERROR: Undefined symbol: .OCITransRollback
    ld: 0711-317 ERROR: Undefined symbol: .OCIDescriptorFree
    ld: 0711-317 ERROR: Undefined symbol: .OCIErrorGet
    ld: 0711-317 ERROR: Undefined symbol: .OCIServerVersion
    ld: 0711-317 ERROR: Undefined symbol: .OCIDescriptorAlloc
    ld: 0711-317 ERROR: Undefined symbol: .OCIAttrSet
    ld: 0711-317 ERROR: Undefined symbol: .OCIStmtPrepare
    ld: 0711-317 ERROR: Undefined symbol: .OCIAttrGet
    ld: 0711-317 ERROR: Undefined symbol: .OCIStmtExecute
    ld: 0711-317 ERROR: Undefined symbol: .OCIParamGet
    ld: 0711-317 ERROR: Undefined symbol: .OCIDefineByPos
    ld: 0711-317 ERROR: Undefined symbol: .OCIStmtFetch
    ld: 0711-317 ERROR: Undefined symbol: .OCIStmtSetPieceInfo
    ld: 0711-317 ERROR: Undefined symbol: .OCILobGetLength
    ld: 0711-317 ERROR: Undefined symbol: .OCILobRead
    ld: 0711-317 ERROR: Undefined symbol: .OCILobFileClose
    ld: 0711-317 ERROR: Undefined symbol: .OCILobFileOpen
    ld: 0711-317 ERROR: Undefined symbol: .OCISessionBegin
    ld: 0711-317 ERROR: Undefined symbol: .OCISessionEnd
    ld: 0711-317 ERROR: Undefined symbol: .OCIServerAttach
    ld: 0711-317 ERROR: Undefined symbol: .OCIServerDetach
    ld: 0711-317 ERROR: Undefined symbol: .OCIBindByName
    ld: 0711-317 ERROR: Undefined symbol: .OCIBindObject
    ld: 0711-317 ERROR: Undefined symbol: .OCIBindDynamic
    ld: 0711-317 ERROR: Undefined symbol: .OCILobWrite
    ld: 0711-317 ERROR: Undefined symbol: .OCITransCommit
    ld: 0711-317 ERROR: Undefined symbol: .OCIPasswordChange
    ld: 0711-317 ERROR: Undefined symbol: .OCIObjectFree
    ld: 0711-317 ERROR: Undefined symbol: .OCICollAppend
    ld: 0711-317 ERROR: Undefined symbol: .OCINumberFromReal
    ld: 0711-317 ERROR: Undefined symbol: .OCIDateFromText
    ld: 0711-317 ERROR: Undefined symbol: .OCIStringAssignText
    ld: 0711-317 ERROR: Undefined symbol: .OCICollGetElem
    ld: 0711-317 ERROR: Undefined symbol: .OCINumberToReal
    ld: 0711-317 ERROR: Undefined symbol: .OCIDateToText
    ld: 0711-317 ERROR: Undefined symbol: .OCIStringPtr
    ld: 0711-317 ERROR: Undefined symbol: .OCICollAssign
    ld: 0711-317 ERROR: Undefined symbol: .OCICollAssignElem
    ld: 0711-317 ERROR: Undefined symbol: .OCICollSize
    ld: 0711-317 ERROR: Undefined symbol: .OCICollMax
    ld: 0711-317 ERROR: Undefined symbol: .OCICollTrim
    ld: 0711-317 ERROR: Undefined symbol: .OCITypeByName
    ld: 0711-317 ERROR: Undefined symbol: .OCIDescribeAny
    ld: 0711-317 ERROR: Undefined symbol: .OCITypeByRef
    ld: 0711-317 ERROR: Undefined symbol: .OCIObjectNew
    ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
    collect2: ld returned 8 exit status
    make: *** [sapi/cli/php] Error 1
    I am using gcc 3.3.3.
    ./configure output:
    checking for Oracle-OCI8 support... yes
    checking Oracle Install-Dir... /oracle/product/920
    checking Oracle version... 8.1
    checking for OCILobIsTemporary in -lclntsh... (cached) no
    checking for OCILobIsTemporary in -locijdbc8... (cached) no
    I already type gencltsh as user oracle. Perhaps this is a problem with PHP trying to read 64 bit libs while running on 32 bit mode ? Anyone has been thru this ?
    Any hints ?
    Thanks,
    Álvaro

    Maybe my bug report http://bugs.php.net/bug.php?id=31345
    can help you, and also
    http://bugs.php.net/bug.php?id=31001
    because i remembre have same message when I was searching for my problems
    Regards

  • [SOLVED] Error when compiling conky with audacious support

    Edit: See post #8 for solution
    Hello.
    When trying to compile conky with the --enable-audacious option, I get the following error.
    checking for Audacious... configure: error: Package requirements (audacious >= 1.4.0 audclient dbus-glib-1 glib-2.0 gobject-2.0) were not met:
    No package 'audclient' found
    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.
    Alternatively, you may set the environment variables Audacious_CFLAGS
    and Audacious_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.
    ==> ERROR: A failure occurred in build().
    Aborting...
    My PKGBUILD is the one in the repos, with the addition of an --enable-audacious line. See below:
    # $Id: PKGBUILD 205494 2014-02-06 05:24:01Z bisson $
    # Maintainer: Gaetan Bisson <[email protected]>
    # Contributor: Giovanni Scafora <[email protected]>
    # Contributor: James Rayner <[email protected]>
    # Contributor: Partha Chowdhury <[email protected]>
    pkgname=conky
    pkgver=1.9.0
    pkgrel=4
    pkgdesc='Lightweight system monitor for X'
    url='http://conky.sourceforge.net/'
    license=('BSD' 'GPL')
    arch=('i686' 'x86_64')
    makedepends=('docbook2x')
    depends=('glib2' 'curl' 'lua' 'wireless_tools' 'libxml2' 'libxft' 'libxdamage' 'imlib2')
    source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
    sha1sums=('a8d26d002370c9b877ae77ad3a3bbd2566b38e5d')
    backup=('etc/conky/'conky{,_no_x11}.conf)
    options=('!emptydirs')
    build() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    CPPFLAGS="${CXXFLAGS}" LIBS="${LDFLAGS}" ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --enable-ibm \
    --enable-curl \
    --enable-rss \
    --enable-weather-xoap \
    --enable-imlib2 \
    --enable-wlan \
    --enable-audacious \
    make
    package() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    make DESTDIR="${pkgdir}" install
    install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    install -Dm644 extras/vim/syntax/conkyrc.vim "${pkgdir}"/usr/share/vim/vimfiles/syntax/conkyrc.vim
    install -Dm644 extras/vim/ftdetect/conkyrc.vim "${pkgdir}"/usr/share/vim/vimfiles/ftdetect/conkyrc.vim
    Note: While similar, I don't think this problem is the same as this one.
    Last edited by Sudowoodo (2014-06-29 10:07:02)

    drcouzelis wrote:Remove the "\" from the end of "--enable-audacious". Does it work now?
    No, it's exactly the same.
    drcouzelis wrote:EDIT: Also, there's already a package for conky-audacious in the AUR.
    I tried it, that doesn't compile either, and its orphan & outdated.
    For the record, its PKGBUILD is
    Edit: Remove unnecessary text. See post #8 for solution.
    and the error is the same:
    Edit: Remove unnecessary text. See post #8 for solution.
    Have you been able to reproduce the problem? I'm using an amd64 processor and trying to build with "makepkg -s". Thank you for replying.
    Last edited by Sudowoodo (2014-06-28 12:13:28)

  • Errors trying to compile PHP for use with MySQL

    I have installed and am using the GNU based tools from the Sunfreeware site to compile PHP. I already have Apache, MySQL, and Oracle compiled and working properly. Below is my configure string for my PHP build:
    ./configure --prefix=/usr/local/php5 \
    --with-config-file-scan-dir=/usr/local/php5/php.d \
    --with-apxs2=/var/apps/apache/bin/apxs \
    --with-ldap \
    --with-mysql=/var/apps/mysql \
    --with-mysqli=/var/apps/mysql/bin/mysql_config \
    --with-xsl=/usr/local/include/libxslt \
    --with-ncurses \
    --enable-xslt \
    --with-xslt-sablot \
    --with-bz2=/usr \
    --with-gd \
    --with-gdbm=/usr/local/lib \
    --with-openssl \
    --with-imap=/usr/local/imap-2006e \
    --with-imap-ssl \
    --with-freetype-dir=/usr/local/include/freetype2/freetype/freetype.h \
    --with-expat-dir \
    --with-tiff-dir \
    --with-zlib \
    --with-jpeg-dir=/usr/local/include/jpeglib.h \
    --with-png-dir=/usr/include/libpng12/png.h \
    --with-mcrypt \
    --with-curl \
    --with-curlwrappers \
    --with-gettext \
    --disable-short-tags \
    --disable-debug \
    --enable-calendar \
    --enable-ctype \
    --enable-discard-path \
    --enable-exif \
    --enable-ftp \
    --enable-memory-limit \
    --enable-sysvem \
    --enable-sysvshm \
    --enable-gd-native-ttf \
    --enable-soap \
    --enable-shmop \
    --enable-sockets \
    --enable-xslt \
    --enable-mbstring \
    --with-sqlite=shared \
    --with-pdo-sqlite=shared \
    --with-pdo-mysql=shared,/var/apps/mysql \
    --enable-pdo=shared \
    --enable-bcmath \
    --with-oci8=sharedI have ld, make, and various tools linked to /usr/local/bin/<toolname>. The configure string completes with no issue and the make runs for about 30 minutes before it stops with the following warnings/errors:
    /usr/ccs/bin/ld: warning: libssl.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libssl.so.0.9.7
    /usr/ccs/bin/ld: warning: libssl.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libssl.so.0.9.7
    /usr/ccs/bin/ld: warning: libssl.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libssl.so.0.9.7
    /usr/ccs/bin/ld: warning: libssl.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libssl.so.0.9.7
    /usr/ccs/bin/ld: warning: libssl.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libssl.so.0.9.7
    /usr/ccs/bin/ld: warning: libssl.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libssl.so.0.9.7
    /usr/ccs/bin/ld: warning: libcrypto.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libcrypto.so.0.9.7
    /usr/ccs/bin/ld: warning: libcrypto.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libcrypto.so.0.9.7
    /usr/ccs/bin/ld: warning: libcrypto.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libcrypto.so.0.9.7
    /usr/ccs/bin/ld: warning: libcrypto.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libcrypto.so.0.9.7
    /usr/ccs/bin/ld: warning: libcrypto.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libcrypto.so.0.9.7
    /usr/ccs/bin/ld: warning: libcrypto.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libcrypto.so.0.9.7
    <snip>....
    /var/apps/php-5.2.5/ext/mysqli/mysqli_nonapi.c:209: undefined reference to `mysql_sqlstate'
    /var/apps/php-5.2.5/ext/mysqli/mysqli_nonapi.c:200: undefined reference to `mysql_set_server_option'
    /var/apps/php-5.2.5/ext/mysqli/mysqli_nonapi.c:212: undefined reference to `mysql_set_server_option'
    ext/mysqli/.libs/mysqli_nonapi.o: In function `zif_mysqli_query':
    /var/apps/php-5.2.5/ext/mysqli/mysqli_nonapi.c:251: undefined reference to `mysql_set_server_option'
    ext/mysqli/.libs/mysqli_nonapi.o: In function `zif_mysqli_get_warnings':
    /var/apps/php-5.2.5/ext/mysqli/mysqli_nonapi.c:298: undefined reference to `mysql_warning_count'
    ext/mysqli/.libs/mysqli_nonapi.o: In function `zif_mysqli_stmt_get_warnings'
    /var/apps/php-5.2.5/ext/mysqli/mysqli_warning.c:195: undefined reference to `mysql_warning_count'
    collect2: ld returned 1 exit status
    make: *** [sapi/cli/php] Error 1:
    There are many, many more "undefined reference" messages all mysql related.
    Here is my environment and crle output:
    LD_LIBRARY_PATH=/usr/local/ssl/lib:/usr/local/lib:/usr/local/BerkeleyDB.4.2/lib:/var/apps/mysql/lib/mysql
    PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/opt/sfw/bin:/usr/local/ssl/bin:/usr/ucb:/usr/ccs/bin:/opt/VRTS/bin:/etc:/opt/EMCpower/bin:/opt/EMCpower/bin/sparcv9:/etc/emc/bin:/opt/VRTSagents/ha/bin:/usr/local/include:/usr/include:/usr/platform/`uname -i`/sbin:/var/apps/mysql/bin:/var/apps/mysql/include/mysql:/opt/RICHPse/bin:/usr/local/php5/bin:/opt/sfw/sbin
    crle output
    Configuration file [version 4]: /var/ld/ld.config
    Default Library Path (ELF): /lib:/usr/lib:/usr/local/lib
    Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default)
    Any ideas as to how I can get around the MySQL errors, etc. would be appreciated.

    Here are the requirments for 10.5.8:
    Mac computer with an Intel, PowerPC G5, or PowerPC G4 (867MHz or faster) processor
    512MB of memory
    DVD drive for installation
    9GB of available disk space
    You have to purchase the upgrade from Apple for $129. You ned to call and order ti since it is not listed in their on-line store. You can also try eBay or Craig's List. 

  • Error Compiling php 5.1.6 with Oracle Instant Client 10.1.0.5 on Fedora 5

    Hello
    I have Oracle 10.1.0 enterprise database installed on a Windows 2003 server.
    I have another machine that has Fedora Core 5 installed on it. I downloaded:
    Apache 2.2.3
    Php 5.1.6
    OracleInstantClient 10.1.0.5 (base and skdk packages) from technet.oracle.com
    I created a directory called /usr/lib/instantclient10_1 in which I unzipped
    the files for the Oracle Instant Client and the SDK into /usr/lib/instantclient10_1.
    So inside /usr/lib/instantclient10_1 I have:
    all the unzipped filed from the base for the instant client as well as
    a directory called sdk with files inside this subdirectory.
    I compiled and installed Apache.
    I then tried to configure php using the instantclient with the configure option
    --with-oci8=instantclient/usr/lib/instantclient10_1
    The first time I did this I got the error: "link from
    /usr/lib/instantclient10_1/libclntsh.so to libclntsh.so.10
    not found"
    Well I had the libclntsh.so.10 but no such link. So I did the following:
    ln -s libclntsh.so.10.1 libclntsh.so
    I assume this was OK to do but I found it strange that I had to do this.
    Question #1 - why should I have to do this?
    I then tried to configure php again but got an error that I paste in from
    the debug.log. From this debug log you can see the configure options I gave for
    php as well as the error. It says "cannot find -lirc". Now I did put into
    /etc/ld.so.conf the line /usr/lib/gaim since that is where libirc.so is and ran
    ldconfig but it still complained. When I copied libirc.so into /usr/lib it then said there were
    lots of errors in that libirc.so. The only item in the configure options depending on lirc is
    the with-oci8.  Why does with-oci8 depend on lirc?
    I also tried the above on Red Hat AS 4.0 and got the same errors.
    Question #2 -- what do I do?
    Thank You
    Gail Lange
    Here is the debug.log in the case when libirc.so is just in /usr/lib/gaim:
    CONFIGURE: './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-track-vars'
    '--enable-inline-optimization' '--with-gd' '--with-zlib' '--enable-debug'
    '--with-oci8=instantclient,/usr/lib/instantclient10_1' '--enable-sigchild'
    CC: gcc
    CFLAGS: -I/usr/include -g -O2
    CPPFLAGS:
    CXX:
    CXXFLAGS:
    INCLUDES: -I/usr/include/libxml2 -I/home/gail/php/php-5.1.6/ext/date/lib
    -I/usr/lib/instantclient10_1/sdk/include
    LDFLAGS: -L/usr/lib -Wl,-rpath,/usr/lib/instantclient10_1 -L/usr/lib/instantclient10_1
    LIBS: -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -ldl -lm -lnsl
    -lirc -lclntsh -lxml2 -lz -lm
    DLIBS:
    SAPI: apache2handler
    PHP_RPATHS: /usr/lib/instantclient10_1
    uname -a: Linux localhost.localdomain 2.6.15-1.2054_FC5smp #1 SMP Tue Mar 14 16:05:46 EST 2006
    i686 i686 i386 GNU/Linux
    gcc -o conftest -I/usr/include -g -O2 -L/usr/lib -Wl,-rpath,/usr/lib/instantclient10_1
    -L/usr/lib/instantclient10_1 conftest.c -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm
    -lxml2 -lz -lm -ldl -lm -lnsl -lirc -lclntsh -lxml2 -lz -lm 1>&5
    conftest.c: In function 'main':
    conftest.c:3: warning: incompatible implicit declaration of built-in function 'exit'
    /usr/bin/ld: cannot find -lirc
    collect2: ld returned 1 exit status
    Thanks

    To be perfectly honest, I'm not sure. Everything I could find on it had to do with IRC or some kind of remote control thing (for controlling audio/media players). Maybe if Ivan stops by he'll know what it means... he knows quite a lot about the inner workings of many of these libraries.
    http://us3.php.net/install.unix was the most useful info I could find.
    There's also this thread:
    Cannot find ld -lirc PHP Linux
    ~Jer

  • Trouble compiling PHP extension w/ threaded PHP 5.2.4

    Hello,
    I'm having some trouble installing the Berkeley DB XML PHP extension on Debian Sarge 3.1.
    First, I installed Berkeley DB XML 2.3.10 using the buildall.sh script into /usr/local/dbxml-2.3.10/.
    Then, I downloaded PHP 5.2.4 source code, compiled it using pthreads (configure --enable-maintainer-zts) and installed it in /usr/local/php-5.2.4/.
    I've built the db4.so extension and it seems to work (verified by running the example simple_counter.php script and seeing that the counter is incremented).
    However, building the Berkeley DB XML extension fails with the following error:
    /home/dbxml-2.3.10/dbxml/src/php/php_dbxml_eventreadertowriter.cpp: In function `void zim_XmlEventReaderToWriter_XmlEventReaderToWriter(int, zval*, zval**, zval*, int, void***)':
    /home/dbxml-2.3.10/dbxml/src/php/php_dbxml_eventreadertowriter.cpp:27: error: parse error before `*' token
    /home/dbxml-2.3.10/dbxml/src/php/php_dbxml_eventreadertowriter.cpp:27: error: `reader' declared as reference but not initialized
    /home/dbxml-2.3.10/dbxml/src/php/php_dbxml_eventreadertowriter.cpp:29: error: parse error before `*' token
    /home/dbxml-2.3.10/dbxml/src/php/php_dbxml_eventreadertowriter.cpp:29: error: `writer' declared as reference but not initialized
    It's solved by changing TSRMLS_DC to TSRMLS_CC in these two lines:
    26 XmlEventReader &reader =
    27 php_dbxml_get_XmlEventReader_object_pointer(rval TSRMLS_CC);
    28 XmlEventWriter &writer =
    29 php_dbxml_get_XmlEventWriter_object_pointer(wval TSRMLS_CC);
    However, there are still errors:
    /usr/local/php-5.2.4/include/php/Zend/zend_exceptions.h: In function `void php_dbxml_init_exceptions()':
    /usr/local/php-5.2.4/include/php/Zend/zend_exceptions.h:33: error: too few arguments to function `zend_class_entry* zend_exception_get_default(void***)'
    /home/loumz/xspc2/dbxml-2.3.10/dbxml/src/php/php_dbxml_exception.cpp:25: error: at this point in file
    /home/loumz/xspc2/dbxml-2.3.10/dbxml/src/php/php_dbxml_exception.cpp:25: error: `tsrm_ls' undeclared (first use this function)
    /home/loumz/xspc2/dbxml-2.3.10/dbxml/src/php/php_dbxml_exception.cpp:25: error: (Each undeclared identifier is reported only once for each function it appears in.)
    This is because maybe zend_exception_get_default needs the tsrm_ls (what is this anyway? some sort of thread-local storage pointer?)
    OK, but inside the php_dbxml_init_exceptions() there is no pointer so it is fixed with a fetch (also there is another one like that on line 51):
    22 void php_dbxml_init_exceptions()
    23 {
    24 zend_class_entry ce;
    25 TSRMLS_FETCH();
    26 PHP_DBXML_REGISTER_CLASS_WITH_PARENT(XmlException, zend_exception_get_default(TSRMLS_C), php_dbxml_XmlException_dtor);
    49 zval *xml_ex;
    50 TSRMLS_FETCH();
    51 MAKE_STD_ZVAL(xml_ex);
    In php_dbxml_document.cpp there is also use of TSRMLS_DC inside code that leads to errors (Looking at the macro definition I think this is for declarations right?) so we change it.
    80 XmlEventWriter &writer = php_dbxml_get_XmlEventWriter_object_pointer(zv TSRMLS_CC);
    103 XmlEventReader &reader = php_dbxml_get_XmlEventReader_object_pointer(zstr TSRMLS_CC);
    And finally it compiled and worked (judging by the examples anyway).
    Please tell me if I did something wrong along the way. Is it better to compile PHP without ZTS and compile BDB XML without pthreads to avoid this mess?

    It seems like that was not the end of the troubles. When executing examples/10.php php crashes with a relocation error saying that it can't find php_db4_getDbEnvFromObj (which should be in the db4.so php module).
    OK, so I grab the g++ linking command that the libtool invocation spits out and add the installed db4.so to the object files and the extension diretory to rpath (I don't know if I can use the config.m4 because the db4.so has no lib prefix i.e. libdb4.so). Now ldd reports that it's linking correctly to the installed db4.so so I try again. The same relocation error pops up.
    When I checked, it seems like db4.so has C++ mangled symbol of php_db4_getDbEnvFromObj(_zval_struct*, void***), but not the C form, and dbxml.so is expecting the C form because it includes php_db4.h inside extern "C".
    This is probably because while the header php_db4.h is included within extern "C" {} within the db4.cpp impl file, the prototypes don't match (there is one additional param in the impl) between the ones in the header and the ones in the .cpp file because of the threading additions...
    Why do I get the feeling the compilation w/ threaded PHP has not been tested at all :-(. I give up, I'm compiling a nonthreaded version of PHP instead. For my use, this shouldn't matter anyway, but it would be nice if it was possible (or at least say it's not quite tested in the README file).

  • Very slow retrieval of messages with IMAP

    I have a problem with javamail versions greater than 1.4.4:
    I use IMAP and STARTTLS to connect to Exchange Server 2010
    The mail I try to read in this example has RFC822.SIZE = 2317220 but the problem occurs with all mails.
    This is the code where it happens ( line 3 )
    msg = (MimeMessage)currentFolder.getMessage(1);
    log.debug(mailBoxID +" start reading mail");
    fullMessage = new MimeMessage(msg);
    log.debug(mailBoxID +"   end reading mail");
    With 1.4.5 and higher it takes approx. 8 minutes ( in debug mode ) to get the full mail.
    With 1.4.4 it takes only 4 seconds ( also in debug mode ).
    I tried 3 scenario's with 1.5.1: ( but I have the same problem with 1.4.5 and 1.4.6 )
    mail.imap.fetchsize: 16384 ==> 8 minutes
    mail.imap.fetchsize: 102400 ==> 7 minutes
    mail.imap.partialfetch: false ==> 9 minutes
    I tried 2 scenario's with 1.4.4:
    mail.imap.fetchsize: 16384 ==> 4 seconds
    mail.imap.partialfetch: false ==> 4 seconds
    I suppose fetchsize and partialfetch are not part of the problem.
    There must be some configuration issue but I don't find it.
    And I have the same problem with the demo programs.
    Here are some snippets from the protocol debug and the program debug for all scenario's:
    DEBUG: setDebug: JavaMail version 1.5.1
    DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle]
    DEBUG IMAP: mail.imap.fetchsize: 16384
    DEBUG IMAP: mail.imap.ignorebodystructuresize: false
    DEBUG IMAP: mail.imap.statuscachetimeout: 1000
    DEBUG IMAP: mail.imap.appendbuffersize: -1
    DEBUG IMAP: mail.imap.minidletime: 10
    DEBUG IMAP: disable AUTH=PLAIN
    DEBUG IMAP: disable AUTH=NTLM
    DEBUG IMAP: enable STARTTLS
    ==> fetches in blocks of 16384
    A10 FETCH 1 (BODY[]<0.16384>)
    * 1 FETCH (BODY[]<0> {16384}
    FLAGS (\Seen))
    A11 OK FETCH completed.
    A12 FETCH 1 (BODY[]<32768.16384>)
    * 1 FETCH (BODY[]<32768> {16384}
    FLAGS (\Seen))
    A202 OK FETCH completed.
    A203 FETCH 1 (BODY[]<3162112.16384>)
    * 1 FETCH (BODY[]<3162112> {11800}
    FLAGS (\Seen))
    A203 OK FETCH completed.
    2013-11-19 13:10:31 [Thread-4] DEBUG MailHandler :67 -  start reading mail
    2013-11-19 13:18:31 [Thread-4] DEBUG MailHandler :69 -    end reading mail
    ==> 8 minutes
    DEBUG: setDebug: JavaMail version 1.5.1
    DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle]
    DEBUG IMAP: mail.imap.fetchsize: 102400
    DEBUG IMAP: mail.imap.ignorebodystructuresize: false
    DEBUG IMAP: mail.imap.statuscachetimeout: 1000
    DEBUG IMAP: mail.imap.appendbuffersize: -1
    DEBUG IMAP: mail.imap.minidletime: 10
    DEBUG IMAP: disable AUTH=PLAIN
    DEBUG IMAP: disable AUTH=NTLM
    DEBUG IMAP: enable STARTTLS
    ==> fetches in blocks of 102400
    FLAGS (\Seen))
    A10 OK FETCH completed.
    A11 FETCH 1 (BODY[]<102400.102400>)
    * 1 FETCH (BODY[]<102400> {102400}
    FLAGS (\Seen))
    A39 OK FETCH completed.
    A40 FETCH 1 (BODY[]<3072000.102400>)
    * 1 FETCH (BODY[]<3072000> {101912}
    FLAGS (\Seen))
    A40 OK FETCH completed.
    2013-11-19 14:23:42 [Thread-4] DEBUG MailHandler :67 -  start reading mail
    2013-11-19 14:30:30 [Thread-4] DEBUG MailHandler :69 -    end reading mail
    ==> 7 minutes
    DEBUG: setDebug: JavaMail version 1.5.1
    DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle]
    DEBUG IMAP: mail.imap.partialfetch: false
    DEBUG IMAP: mail.imap.ignorebodystructuresize: false
    DEBUG IMAP: mail.imap.statuscachetimeout: 1000
    DEBUG IMAP: mail.imap.appendbuffersize: -1
    DEBUG IMAP: mail.imap.minidletime: 10
    DEBUG IMAP: disable AUTH=PLAIN
    DEBUG IMAP: disable AUTH=NTLM
    DEBUG IMAP: enable STARTTLS
    ==> 1 big fetch
    2013-11-19 13:21:35 [Thread-4] DEBUG MailHandler :67 -  start reading mail
    2013-11-19 13:30:47 [Thread-4] DEBUG MailHandler :69 -    end reading mail
    ==> 9 minutes
    DEBUG: setDebug: JavaMail version 1.4.4
    DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]
    DEBUG: mail.imap.fetchsize: 16384
    DEBUG: mail.imap.statuscachetimeout: 1000
    DEBUG: mail.imap.appendbuffersize: -1
    DEBUG: mail.imap.minidletime: 10
    DEBUG: disable AUTH=PLAIN
    DEBUG: disable AUTH=NTLM
    DEBUG: enable STARTTLS
    ==> 1 big fetch
    2013-11-19 13:55:47 [Thread-4] DEBUG MailHandler :67 -  start reading mail
    2013-11-19 13:55:51 [Thread-4] DEBUG MailHandler :69 -    end reading mail
    ==> 4 seconds
    DEBUG: setDebug: JavaMail version 1.4.4
    DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]
    DEBUG: mail.imap.partialfetch: false
    DEBUG: mail.imap.statuscachetimeout: 1000
    DEBUG: mail.imap.appendbuffersize: -1
    DEBUG: mail.imap.minidletime: 10
    DEBUG: disable AUTH=PLAIN
    DEBUG: disable AUTH=NTLM
    DEBUG: enable STARTTLS
    ==> 1 big fetch
    2013-11-19 14:02:52 [Thread-4] DEBUG MailHandler :67 -  start reading mail
    2013-11-19 14:02:58 [Thread-4] DEBUG MailHandler :69 -    end reading mail
    ==> 4 seconds
    Here is a listing of all properties:
    java.runtime.name=Java(TM) SE Runtime Environment
    sun.boot.library.path=H:\java\jre6\bin
    java.vm.version=20.5-b03
    java.vm.vendor=Sun Microsystems Inc.
    java.vendor.url=http://java.sun.com/
    path.separator=;
    mail.mime.decodefilename=true
    java.vm.name=Java HotSpot(TM) Client VM
    file.encoding.pkg=sun.io
    user.country=BE
    sun.java.launcher=SUN_STANDARD
    sun.os.patch.level=Service Pack 2
    mail.imap.auth.ntlm.disable=true
    java.vm.specification.name=Java Virtual Machine Specification
    user.dir=H:\EclipseSpace\DigisMailBatchNewDev
    java.runtime.version=1.6.0_30-b12
    java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
    mail.imap.fetchsize=102400
    java.endorsed.dirs=H:\java\jre6\lib\endorsed
    os.arch=x86
    java.io.tmpdir=D:\Temp\
    line.separator=
    java.vm.specification.vendor=Sun Microsystems Inc.
    user.variant=
    os.name=Windows XP
    sun.jnu.encoding=Cp1252
    java.library.path=H:\java\jre6\bin;C:\WINDOWS\Sun\Java\...
    mail.imap.auth.plain.disable=true
    java.specification.name=Java Platform API Specification
    java.class.version=50.0
    mail.mime.address.strict=false
    sun.management.compiler=HotSpot Client Compiler
    os.version=5.1
    user.home=C:\Documents and Settings\******
    user.timezone=Europe/Paris
    java.awt.printerjob=sun.awt.windows.WPrinterJob
    java.specification.version=1.6
    file.encoding=Cp1252
    user.name=******
    java.class.path=H:\EclipseSpace\DigisMailBatchNewDev;...
    mail.mime.decodetext.strict=false
    java.vm.specification.version=1.0
    sun.arch.data.model=32
    java.home=H:\java\jre6
    sun.java.command=com.dexia.digis.mail.Launcher
    mail.imap.partialfetch=true
    java.specification.vendor=Sun Microsystems Inc.
    user.language=nl
    awt.toolkit=sun.awt.windows.WToolkit
    java.vm.info=mixed mode
    java.version=1.6.0_30
    java.ext.dirs=H:\java\jre6\lib\ext;C:\WINDOWS\Sun\J...
    sun.boot.class.path=H:\java\jre6\lib\resources.jar;H:\jav...
    java.vendor=Sun Microsystems Inc.
    file.separator=\
    java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport...
    mail.imap.starttls.enable=true
    sun.cpu.endian=little
    sun.io.unicode.encoding=UnicodeLittle
    mail.mime.parameters.strict=false
    sun.desktop=windows
    sun.cpu.isalist=
    And here is the complete protocol stacktrace up to the point where the mail is retrieved.
    It's the same for all cases except the snippets above:
    DEBUG IMAP: trying to connect to host "our-email-server.be", port 143, isSSL false
    * OK The Microsoft Exchange IMAP4 service is ready.
    A0 CAPABILITY
    * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN STARTTLS UIDPLUS CHILDREN IDLE NAMESPACE LITERAL+
    A0 OK CAPABILITY completed.
    DEBUG IMAP: AUTH: NTLM
    DEBUG IMAP: AUTH: GSSAPI
    DEBUG IMAP: AUTH: PLAIN
    DEBUG IMAP: protocolConnect login, host=our-email-server.be, user=mydomain\userid\aliasname, password=<non-null>
    A1 STARTTLS
    A1 OK Begin TLS negotiation now.
    A2 CAPABILITY
    * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN UIDPLUS CHILDREN IDLE NAMESPACE LITERAL+
    A2 OK CAPABILITY completed.
    DEBUG IMAP: AUTH: NTLM
    DEBUG IMAP: AUTH: GSSAPI
    DEBUG IMAP: AUTH: PLAIN
    DEBUG IMAP: LOGIN command trace suppressed
    DEBUG IMAP: LOGIN command result: A3 OK LOGIN completed.
    A4 CAPABILITY
    * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN UIDPLUS CHILDREN IDLE NAMESPACE LITERAL+
    A4 OK CAPABILITY completed.
    DEBUG IMAP: AUTH: NTLM
    DEBUG IMAP: AUTH: GSSAPI
    DEBUG IMAP: AUTH: PLAIN
    A5 LIST "" myfolder
    * LIST (\HasNoChildren) "/" myfolder
    A5 OK LIST completed.
    DEBUG IMAP: connection available -- size: 1
    A6 SELECT myfolder
    * 1 EXISTS
    * 0 RECENT
    * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
    * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags
    * OK [UIDVALIDITY 39147] UIDVALIDITY value
    * OK [UIDNEXT 141] The next unique identifier value
    A6 OK [READ-WRITE] SELECT completed.
    A7 EXPUNGE
    * 1 EXISTS
    A7 OK EXPUNGE completed.
    A8 FETCH 1 (FLAGS)
    * 1 FETCH (FLAGS (\Seen))
    A8 OK FETCH completed.
    A9 FETCH 1 (ENVELOPE INTERNALDATE RFC822.SIZE)
    * 1 FETCH (ENVELOPE ("Fri, 9 Aug 2013 14:17:14 +0200" "subject" ........ INTERNALDATE "09-Aug-2013 14:17:14 +0200" RFC822.SIZE 2317220)
    A9 OK FETCH completed.
    A10 FETCH 1 (BODY[]<0.102400>)
    * 1 FETCH (BODY[]<0> {102400}

    The MimeMessage constructor you're using needs to copy the entire message from the server.  It uses the Message.writeTo method, writing the message content into a pipe that is read by the constructor.  It was a bug in previous releases that the writeTo method wasn't fetching the data in chunks, as it does in other cases.  Setting partialfetch=false will revert to the old behavior for writeTo, and for all other accesses of the message content.
    It looks like both 1.4.4 and 1.5.1 are fetching the message content using a single FETCH command when you set partialfetch=false, according to your message.  If they're both sending the same commands to the server, I can't explain why it would be fast in one case and slow in the other.
    I did similar testing using my Exchange 2010 server.  Fetching a similar size message took less than 20 seconds.  Setting partialfetch=false brought it down to less than 5 seconds.  Something's clearly wrong in your environment, but I don't know what.
    Finally, I'm sure you understand that you only need to use that MimeMessage copy constructor in special circumstances, and you should probably avoid using it unless it's absolutely necessary.  Even in the best case it's wasting time and memory.

Maybe you are looking for

  • Error in installing ATI catalyst control center after formatting my laptop

    please see this thread. thankyou http://h30434.www3.hp.com/t5/Notebook-Operating-Systems-and/error-in-installing-ATI-catalyst-control...

  • Newbie: problems with drivers

    Hello everybody. I am running an application under Linux, and I have a SQLServer running in another machine, but in the same LAN. The server's name is 'stardual.stardomain' and the database name is 'market'. How can my application work with the datab

  • HT4718 Does command r during start up delete data and documents?

    Does command r during start up delete data and documents? My Mac Book Pro 2012 running OS X Mountain Lion, and it started glitching. Now, it will turn on, have a loading bar, at the bottom, and turn off in a minute. I don't wan't to lose my saved dat

  • Leading zeros for 9AMATNR creating problem

    Hi Experts, In the DP Planning book, we are using product (9AMATNR) as one of the characteristics. If I open the shuffler and enter a product number (numeric), the system attaches the leading zeros to make it 40 characters. If I put a product number

  • How to set the actionname property in B2B 11g

    I have an outbound file sent via AS2 over http. I gather from other b2b forums/documents that for preserving the file name I have to set the actionname property. I have a BPEL process which is setting the fromTP, toTP, document TYPE etc, and then inv