Yet another try to install APC

Discussion in 'PHP' started by weird, Sep 21, 2006.

  1. weird

    weird New Member

    According Wiki I compile lsphp with options:
    ./configure --prefix=/opt/php5 --with-litespeed --with-config-file-path=../conf --enable-magic-quotes --with-zlib --with-gd=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --with-mysql=/usr --with-imap=/usr --with-kerberos --with-imap-ssl

    Then copy sapi/litespeed/php to /opt/lsws/fcgi-bin/lsphp.
    It works fine. I see phpinfo().

    Also, I do make; make install to copy php-related files to /opt/php5.

    Again, according Wiki I compile APC:
    skrepka:/tmp/APC-3.0.11# /opt/php5/bin/phpize
    Configuring for:
    PHP Api Version: 20041225
    Zend Module Api No: 20050922
    Zend Extension Api No: 220051025

    skrepka:/tmp/APC-3.0.11# ./configure --enable-apc --with-php-config=/opt/php5/bin/php-config
    ...

    skrepka:/tmp/APC-3.0.11# make
    ...

    skrepka:/tmp/APC-3.0.11# make install
    Installing shared extensions: /opt/php5/lib/php/extensions/no-debug-non-zts-20050922/

    Modify /opt/lsws/conf/php.ini:

    extension=apc.so
    include_path = ./:/opt/php5
    ;extension_dir = ./

    Not work! Error 503. Why?
  2. mistwang

    mistwang LiteSpeed Staff

    Got anything in lsws/logs/stderr.log?
  3. mistwang

    mistwang LiteSpeed Staff

    I think php may not able to locate apc.so.

    What I would do is to copy apc.so to lsws/lib, then change /opt/lsws/conf/php.ini to

    extension=../lib/apc.so
  4. weird

    weird New Member

    I just copy apc.so to /opt/lsws/lib, and write

    extension_dir = /opt/lsws/lib
    extension = apc.so

    Now in phpinfo() I see correct apc section. Thanks :)

Share This Page