OVH Community, your new community space.

Gentoo-OVH php5 APC module - not working?!


Myatu
29-08-2009, 16:10
Right, you .so got installed somewhere PHP5 does not expect it to be, or your php INI file is pointing to the wrong location (either in php.ini itself or in the "conf.d" directory if it uses that).

Do a "find / -name apc.so" and have a look where it is actually located, then correct this in your INI file

JordanM
29-08-2009, 07:07
This is how i did it just before

Create a new dir
wget latest-apc.tar.gz
tar xfz latest-apc.tar.gz
cd extracted-folder
/usr/local/php5/bin/phpize
./configure --enable-apc --with-php-config=./usr/local/php5/bin/php-config
make
make install

Myatu
08-08-2009, 18:16
Use Debian!

According to some other site, these are the steps to take on CentOS:

Code:
# yum install php-pear
# yum install php-devel
# yum install httpd-devel
# pecl install apc 
# echo "extension=apc.so" > /etc/php.d/apc.ini
# /etc/init.d/httpd restart
Also, your error said "No such file or directory". So before you try the above, where is "apc.so" really (find / -iname apc.so) and use the full path to it (ie., /usr/share/php5/lib/apc.so or the likes).

yonatan
08-08-2009, 08:36
Hello,
well the topic covers my issue- i have installed the OVH release 2 to check it out and run a site on it, everything is working fine , just the "APC" php module wont work for some reason.

Code:
 ~ # php5 -m
PHP Warning:  PHP Startup: Unable to load dynamic library './apc.so' - ./apc.so: cannot open shared object file: No such file or directory in Unknown on line 0
[PHP Modules]
the funny thing is , sometimes it shows as loaded and sometimes not.

im sure its about the include path or something related, but i have put this module in manualy , and did not use emerge to fetch it.


when i try to install it via emerge i get this :
Code:
 emerge dev-php5/pecl-apc
Calculating dependencies... done!
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) dev-php5/pecl-apc-3.0.16-r1 to /
 * APC-3.0.16.tgz RMD160 SHA1 SHA256 size ;-) ...                    [ ok ]
 * checking ebuild checksums ;-) ...                                 [ ok ]
 * checking auxfile checksums ;-) ...                                [ ok ]
 * checking miscfile checksums ;-) ...                               [ ok ]
 * checking APC-3.0.16.tgz ;-) ...                                   [ ok ]
 *
 * ERROR: dev-php5/pecl-apc-3.0.16-r1 failed.
 * Call stack:
 *                   ebuild.sh, line 1717:  Called dyn_setup
 *                   ebuild.sh, line  768:  Called qa_call 'pkg_setup'
 *                   ebuild.sh, line   44:  Called pkg_setup
 *   pecl-apc-3.0.16-r1.ebuild, line   26:  Called has_php
 *           depend.php.eclass, line  180:  Called die
 * The specific snippet of code:
 *              die "Unable to find an installed dev-lang/php package"
 *  The die message:
 *   Unable to find an installed dev-lang/php package
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-php5/pecl-apc-3.0.16-r1/temp/build.log'.
 *

 * Messages for package dev-php5/pecl-apc-3.0.16-r1:

 *
 * ERROR: dev-php5/pecl-apc-3.0.16-r1 failed.
 * Call stack:
 *                   ebuild.sh, line 1717:  Called dyn_setup
 *                   ebuild.sh, line  768:  Called qa_call 'pkg_setup'
 *                   ebuild.sh, line   44:  Called pkg_setup
 *   pecl-apc-3.0.16-r1.ebuild, line   26:  Called has_php
 *           depend.php.eclass, line  180:  Called die
 * The specific snippet of code:
 *              die "Unable to find an installed dev-lang/php package"
 *  The die message:
 *   Unable to find an installed dev-lang/php package
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-php5/pecl-apc-3.0.16-r1/temp/build.log'.
 *
so i would guess i need to emerge dev-lang/php
which gives me
Code:
~ # emerge dev-lang/php
Calculating dependencies... done!
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.
wow this blows my mind already.

i have tryed the same on fedora 11 , which for some reason got a broken apache from yum ( some wierd errors in the error_logs about client sockts ).

and centos 5.3 has an outdated subversion of php which is not compatible with the version of APC that i need.

ouch


my next step if i wont fix this on gentoo is to try the plesk panel , but really my goal was to work without a control panel ( i dont like em... ) this module is wicked and wont compile :\

btw for gentoo
Code:
 APC-3.1.2 # phpize
-bash: phpize: command not found
maybe that's what i need to do .. .blows my mind.

hope someone can guide me on how to get this working.

Thanks!