From: Reini U. <ru...@x-...> - 2004-09-15 10:32:45
|
Dan Frankowski schrieb: > I'd like to run the Advanced PHP Debugger (APD) to try to get some > detailed performance profiling. > > To do so, I have to be able to run PHP from the command-line to get a > page I think is loading slowly. I have PHP 4.3.2, which has a command > line interface. When I run I use php-4.3.9 with xdebug, which has a much better profiler. http://www.xdebug.org/docs-profiling2.php But you need the latest version (CVS best), KDE and KCacheGrind. The old version is similar to APD, but I never used that with perl -mDevel::DProf The zend debugger also has some good profiling support and works much easier than via cmdline. > % php index.php Page=Book SERVER_NAME=localhost > > > I get some of the HomePage (not the "Book" page I asked for), and also > errors like: > > <div class="error"><p>lib/config.php:475: Warning[2]: gethostbyaddr(): > Address is not a valid IPv4 or IPv6 address</p> > </div> > <div class="error"><p>lib/Request.php:442: Warning[2]: session_start(): > Cannot send session cookie - headers already sent by (output started at > /scratch/gibson/apache2/doc/dfrankow/phpwiki/lib/XmlElement.php:326)</p> > </div> > ... > DB Error: constraint violation > > Has anyone done this? no, we use the tests/units for command-line. > Any hints? use the correct parameters: pagename=Book gethostbyaddr(), ...: put the required $_SERVER vars which are not filled in by the command-line client into config/config.ini. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |