My favorites | Sign in
Project Home Downloads Wiki Source
Search
for
Install  

Phase-Deploy
Updated Jan 16, 2011 by patrick.allaert@gmail.com

Install

Requirements

  • sqlite3 (ex: sqlite3 + libsqlite3-dev package under ubuntu, =dev-db/sqlite-3* under gentoo)

if it's missing, you can see the following error message when you execute ./configure "configure: error: Please install SQLite 3.* first or check libsqlite3-dev is present"

See: http://www.php.net/manual/en/install.pecl.phpize.php

Compiling

Shell:

svn checkout http://peclapm.googlecode.com/svn/trunk/ peclapm-read-only
phpize
./configure
make
make install

Configure your PHP

php.ini

; default configuration for php APM module

extension=apm.so

[apm]
; Whether the extension is globally active or not (overrides apm.event_enabled and apm.slow_request_enabled)
apm.enabled="1"
; Enable the capture of events such as errors, notices, warnings,...
apm.event_enabled="1"
; Enable the capture of slow requests
apm.slow_request_enabled="1"
; Maximum duration in ms a request can take before it gets recorded
apm.slow_request_duration="100"
; Path to the SQLite DB directory
; Note: the directory should be readable and writable, SQLite needs to be able to create temporary files in this directory
apm.sqlite_db_path="/var/php/apm/db"
; Maximum time in ms the extension will keep trying to insert an event into the database
; Setting this to high may slow down your application if you have lot of concurrent events.
; Setting this to low, you may loose some of your concurrent events
apm.sqlite_max_event_insert_timeout="100"

Create the sqlite database

Shell:

# You may have to run the following commands as root

cd /path/to/apm/source
# Create the directory according to the apm.db_path directive
mkdir -p /var/php/apm/db
# Create the database file
sqlite3 /var/php/apm/db/events < apm.sql
# Change user/group ownership and/or permissions to let web server's processes manipulate the database
chgrp -R www-data /var/php/apm/db
chmod -R ug+rw /var/php/apm/db

Access the frontend

You can use script apm.php located in the web directory to see what has been stored in the database.

VERY IMPORTANT: IT IS YOUR RESPONSIBILITY TO PROTECT THE ACCESS TO SUCH FILE AS IT MAY PROVIDE IMPORTANT INFORMATION ON YOUR APPLICATION.

Comment by francois...@gmail.com, Mar 10, 2009

the php.ini example make problem with the comment "# Whether the extension is globally active or not (overrides apm.event_enabled and apm.slow_request_enabled)" it seems PHP try to use the arguments in the bracket as if its was real line and not a commented line

Comment by rose.and...@gmail.com, May 25, 2009

Hi, just replace the hashs with semicolons.

Comment by V.Yesau...@gmail.com, Oct 16, 2009

Hello! i install apm, but after run apm.php in my browser i see "Fatal error: Call to undefined function apm_get_events() in /home/yes/www/apm.php on line 11" what's wrong ?

p.s. path to file apm.so in php.ini correct.

Comment by adrien.mogenet, Nov 15, 2009

Is that possible to build APM on MacOSX ? I can't ./configure the sources !

Comment by snaitmou...@gmail.com, Nov 29, 2009

Hello,

I'm trying to compile the peclapm sources under debian etch ( 2.6.24.2-xxxx-std-ipv4-64 #3 SMP Tue Feb 12 12:27:47 CET 2008 x86_64 GNU/Linux ).

make returns me the following errors:

/peclapm-read-only# make /bin/sh /root/peclapm-read-only/libtool --mode=compile gcc -I. -I/root/peclapm-read-only -DPHP_ATOM_INC -I/root/peclapm-read-only/include -I/root/peclapm-read-only/main -I/root/peclapm-read-only -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/peclapm-read-only/backtrace.c -o backtrace.lo

gcc -I. -I/root/peclapm-read-only -DPHP_ATOM_INC -I/root/peclapm-read-only/include -I/root/peclapm-read-only/main -I/root/peclapm-read-only -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/peclapm-read-only/backtrace.c -fPIC -DPIC -o .libs/backtrace.o
/root/peclapm-read-only/backtrace.c: In function 'debug_backtrace_get_args': /root/peclapm-read-only/backtrace.c:349: error: 'zend_uintptr_t' undeclared (first use in this function) /root/peclapm-read-only/backtrace.c:349: error: (Each undeclared identifier is reported only once /root/peclapm-read-only/backtrace.c:349: error: for each function it appears in.) make: [backtrace.lo] Error 1

What's wrong ?

Thank you for your help.

Comment by project member idaf...@gmail.com, Nov 29, 2009

Can you specify which revision was and wich version of PHP ?

Comment by bf.oes...@gmail.com, Apr 21, 2010

Hi,

i've got the same Error like snaitmouloud. Debian Etch 2.6.26 PHP 5.2.0-8+etch16 (out of the standard debian repository) Revision 214

Any Ideas?

Thx for the help.

For my Debian Lenny Machine it works great. Debian Lenny 2.6.26 PHP 5.2.6-1+lenny4 (out of the repository) Revision 214

Comment by bf.oes...@gmail.com, Apr 21, 2010

Oh Sorry i mean Revision 124

Comment by project member patrick.allaert@gmail.com, Apr 23, 2010

bf.oeskan, snaitmouloud: your issue should be solved by now, but be sure to take the latest version of APM at: http://svn.php.net/repository/pecl/apm/

Comment by bf.oes...@gmail.com, Apr 26, 2010

Thx for your help but the Problem isn't solved.

/root/peclapm-read-only/backtrace.c: In function 'debug_backtrace_get_args': /root/peclapm-read-only/backtrace.c:354: error: 'zend_uintptr_t' undeclared (first use in this function) /root/peclapm-read-only/backtrace.c:354: error: (Each undeclared identifier is reported only once /root/peclapm-read-only/backtrace.c:354: error: for each function it appears in.) make: [backtrace.lo] Fehler 1

i've done the checkout from the given url http://svn.php.net/repository/pecl/apm/

Revision 298594

Comment by project member patrick.allaert@gmail.com, Apr 27, 2010

bf.oeskan, snaitmouloud: the issue should be solved now, APM was previously compatible with PHP >= 5.2.2 only.

Comment by bf.oes...@gmail.com, May 7, 2010

Thx for your help but the Problem isn't solved.

Revision: 299098

Errors: /root/peclapm/drivers/sqlite3.c: In function 'event_callback_event_info': /root/peclapm/drivers/sqlite3.c:368: error: 'TIMELIB_NO_CLONE' undeclared (first use in this function) /root/peclapm/drivers/sqlite3.c:368: error: (Each undeclared identifier is reported only once /root/peclapm/drivers/sqlite3.c:368: error: for each function it appears in.) make: [drivers/sqlite3.lo] Fehler 1

libsqlite3-dev & sqlite3 are installed out of the repository

Comment by project member patrick.allaert@gmail.com, May 7, 2010

bf.oeskan: this should be fixed as per revision: 299100. Could you please use the bug reporting interface next time: http://pecl.php.net/bugs/search.php or alternatively the apm-user ML: http://groups.google.com/group/apm-user Thanks in advance.

Comment by Andrew.S...@gmail.com, Jun 17, 2011

Hi! When I trying to install APM via PECL I get an error: "ERROR: could not chdir to /tmp/pear/temp/APM/web". Platform: Ubuntu Server 11.04.


Sign in to add a comment
Powered by Google Project Hosting