Hello all,

I want install the pear/memcache
but it ends with an error (zlib not found) but zlib is installed
how can I give the installer this Use --with-zlib-dir=<DIR>

I discovered in /usr/lib the following files

-rwxr-xr-x 1 root root 71704 Sep 12 2004 /usr/lib/libz.a
lrwxrwxrwx 1 root root 15 Sep 8 15:10 /usr/lib/libz.so -> libz.so.1.2.1.2
lrwxrwxrwx 1 root root 15 Sep 8 15:08 /usr/lib/libz.so.1 -> libz.so.1.2.1.2
-rwxr-xr-x 1 root root 63528 Sep 12 2004 /usr/lib/libz.so.1.2.1.2

I have installed a new zlib in /usr/local/lib
http://mesh.dl.sourceforge.net/sourceforge/libpng/zlib-1.2.3.tar.gz

a make install writes
-rwxr-xr-x 1 root root 81288 Nov 2 20:49 /usr/local/lib/libz.a

I have added this dir to /etc/ld.so.conf
I have startet ldconfig

I have no experience with this stuff (librarys)
all I can say is ldconfig -v don't show any of this (the old and the new one) but it shows my freshly installed libmemcached and libevent (depencies from libmemcache) and memcache-damon works (ok it starts without error - if he work I can't really say till i' have a client :-)

pecl install memcache
downloading memcache-1.5.tgz ...
Starting to download memcache-1.5.tgz (14,291 bytes)
.....done: 14,291 bytes
4 source files, building
running: phpize
Configuring for:
PHP Api Version: 20031224
Zend Module Api No: 20041030
Zend Extension Api No: 220040412
building in /var/tmp/pear-build-root/memcache-1.5
running: /tmp/tmpkGktxv/memcache-1.5/configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20041030
checking for re2c... exit 0;
checking for gawk... gawk
checking whether to enable memcache support... yes, shared
checking for the location of libz... no
checking for the location of zlib... configure: error: memcache support requires ZLIB. Use --with-zlib-dir=<DIR>
ERROR: `/tmp/tmpkGktxv/memcache-1.5/configure' failed

what can I do
OS = Fedora core 3

How do I nstall this extension manual
Have tried pecl download memcache
but I don't have any idea what to do with the files in the downloaded memcache-1.5.tgz no configure no make 😕

greetings from germany
micha

    No way, I'm having installing memcache also. You can try to install the extention manually.

    Download the archive file and save it to your local source directory (usually /usr/local/src).

    Unpack it with tar -zxvf name_of_archive.tar.gz

    Go into the newly created memcache-[version] directory and run phpize to create the build environment

    Run ./configure --help to see the options (the only one you should need it --with-zlib-dir
    so for me it would be ./configure --with-zlib-dir=/usr/include

    Then make && make install , that should be it

    If you get a compile error when running make complaining about not being able to find openssl/ssl.h and find a sollution then please let me know as that is what I'm having trouble with.

      OK, I'm a dumbass!

      I hadn't installed openssl-devel :rolleyes:

      Everything else worked fine, my testing server now has memcache support 😃

        Hello bubblenut,

        thanks for your reply
        I was able to configure , make & make install w/o an error
        make install
        Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20041030/

        but if I start the attached examble.php

        [micha@akira memcache-1.5]$ php example.php
        Content-type: text/html; charset=iso-8859-15

        <br />
        <b>Fatal error</b>: Call to undefined function memcache_connect() in <b>/home/micha/memcache-1.5/example.php</b> on line <b>3</b><br />

        What' wrong?

        mfg micha

          Did you enable the module in your php.ini?

            Hello bubblenut

            yes I have it enabled.Here some Infos;

            [root@akira ~]# grep extension /etc/php.ini

            extension_dir = /usr/lib/php4
            extension=memcache.so

            [root@akira ~]# php -v
            PHP 5.0.5 (cgi-fcgi) (built: Sep 9 2005 20:10:27)
            Copyright (c) 1997-2004 The PHP Group
            Zend Engine v2.0.5, Copyright (c) 1998-2004 Zend Technologies

            [root@akira ~]# ls -l /usr/lib/php4/
            total 112
            -rwxr-xr-x 1 root root 61070 Nov 7 18:55 memcache.so
            -rwxr-xr-x 1 root root 44340 Aug 25 11:26 mysql.so

            I hope that's OK - or do I have something else to enable the module?

            kind regards
            micha

              Write a Reply...