Problem with using APD

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
songwind
Forum Newbie
Posts: 14
Joined: Wed Jul 26, 2006 9:27 am

Problem with using APD

Post by songwind »

I have installed Advanced PHP Debugger (APD) in Fedora core 5, it seemed installation is sucessful.

and I modified the php.ini to put the absolute path of apd.so inside it.

But when I added "apd_set_pprof_trace();" into a test php script.

it displayed an error message:

Fata error: Call to undefined function aped_set_pprof_trace() in /path/test.php on line 2

Does anyone know what is the reason to cause it that? Thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The function referenced in your error is aped_set_pprof_trace().
songwind
Forum Newbie
Posts: 14
Joined: Wed Jul 26, 2006 9:27 am

Post by songwind »

Sorry, typing mistake.

It was "Call to undefined function apd_set_pprof_trace() in /path/test.php.."

And I couldn't see APD in phpinfo.php...!! does it mean I didn't install it properly?

I installed it by commands:

#pecl install apd
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Is APD a dynamic library?
  • If yes, did you add the appropriate "extension=php_apd.so" (or whatever Fedora uses) to the extensions section of php.ini? Did you restart Apache afterward?

    If no, did you recompile PHP with the proper --with-blah added?
songwind
Forum Newbie
Posts: 14
Joined: Wed Jul 26, 2006 9:27 am

Post by songwind »

Thanks for replying.

I added the following in php.ini:

zend_extension=/path/apd.so #path is the absolute path of apd.so in my machine.
apd.dumpdir=/tmp/trances
apd.statement_trace = 0

By the way, do I need to install zend_extension to make it work?

I didn't see any other zend_extension that mentioned in php.ini

I did restart the apache for several times after that.
songwind
Forum Newbie
Posts: 14
Joined: Wed Jul 26, 2006 9:27 am

Post by songwind »

I can see the APD in phpinfo.php now, but still getting "Fata erro: Call to undefined function apd_set_pprof_trace()... " message,
are there any other configuration that I need to add into php.ini?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I don't recall needing anything else, but I haven't used it in a Linux machine as yet.

You could try Xdebug.. :idea:
songwind
Forum Newbie
Posts: 14
Joined: Wed Jul 26, 2006 9:27 am

Post by songwind »

Thanks feyd, I have tried to install APD for almost 2 days, I could see it in phpinfo, but I still got that error message, it seems a lot of people getting same errors when I searched it on google, but only few solutions could be found and none of them works so far.

I have installed Xdebug,too, but no sure how to use it, its document seems a bit complicate.

Does anyone know any articles that have some simple tutorials about it?
Post Reply