views:

49

answers:

1

I have inherited a moderately large PHP codebase. In order to better understand how it works, I'd like to be able to print to logs a function or file trace whenever I hit a page, so I can correlate pages with source code. Are there any tools I can install? I have root on the server, and so have the ability to install anything as far as Apache or PHP add-ons goes.

I have heard about XDebug, but when reading up on installation, I've discovered that it is not compatible with Zend Optimizer. Unfortunately, this codebase requires Zend Optimizer, so XDebug does not appear to be an option for me at this time.

I'm developing under Linux.

A: 

Pisto,

running such tools would probably degrade the performance of your webserver anyway so you shouldn't do that on your production server. So I would advice you to copy the code on a different server disable Zend Optimizer and use Xdebug there.

Zend also provide their own debugging extension Zend debugger may be it work with the Zend optimizer.

RageZ
I do have two servers already; production and development. I don't know how the Zend framework works, but I was under the impression Zend Optimizer is required for the site to run. I will investigate. Thanks for your response.
Pistos
Okay, here's where that led:Zend Optimizer not installedThis file was encoded by the Zend Guard. In order to run it, please install the Zend Optimizer (available without charge), version 3.0.0 or later.
Pistos
They (previous developers) do have some Guarded / encrypted code. So now what are my options? :(
Pistos
Zend Guard cannot be reversed (never used it). I would think it is somehow reversible.
RageZ
Ask the previous developers for the source code.
troelskn
@troekskn: since he is trying to analyze the code I think the previous developer ran away of the company. Just my opinion ;-)
RageZ
@troelskn: They have been out of the picture for many months now, and when they were around, were extremely uncooperative. Getting the full source, or getting them to explain much of it are not likely prospects. :)
Pistos