|
Install
InstallRequirements
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 CompilingShell: svn checkout http://peclapm.googlecode.com/svn/trunk/ peclapm-read-only phpize ./configure make make install Configure your PHPphp.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 databaseShell: # 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 frontendYou 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. |
► Sign in to add a comment
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
Hi, just replace the hashs with semicolons.
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.
Is that possible to build APM on MacOSX ? I can't ./configure the sources !
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
/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 1What's wrong ?
Thank you for your help.
Can you specify which revision was and wich version of PHP ?
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
Oh Sorry i mean Revision 124
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/
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
bf.oeskan, snaitmouloud: the issue should be solved now, APM was previously compatible with PHP >= 5.2.2 only.
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
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.
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.