Koozali.org: home of the SME Server

Xdebug extension for PHP 5 contrib

Offline HebsgaardS

  • *
  • 14
  • +0/-0
Xdebug extension for PHP 5 contrib
« on: December 09, 2009, 07:48:43 AM »
Does anyone know how to install the Xdebug extension (http://xdebug.org/) with the PHP 5 contrib for SMEServer 7?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Xdebug extension for PHP 5 contrib
« Reply #1 on: December 09, 2009, 04:52:49 PM »
Does anyone know how to install the Xdebug extension (http://xdebug.org/) with the PHP 5 contrib for SMEServer 7?
Yes, but it is not trivial as you will have to manually compile from source code. Perhaps I might be able to mock up something as I already have it compiled somewhere IIRC. I will have a look around later today for you.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline HebsgaardS

  • *
  • 14
  • +0/-0
Re: Xdebug extension for PHP 5 contrib
« Reply #2 on: December 09, 2009, 05:29:07 PM »
Thanks, that would be great! I would rather avoid installing gcc on the server if possible!

I am currently trying out gallery 3 and it has a big slowdown on all pageloads (5 seconds+) so the gallery developers have asked for som debug info using Xdebug.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Xdebug extension for PHP 5 contrib
« Reply #3 on: December 09, 2009, 05:40:27 PM »
Thanks, that would be great! I would rather avoid installing gcc on the server if possible!

I am currently trying out gallery 3 and it has a big slowdown on all pageloads (5 seconds+) so the gallery developers have asked for som debug info using Xdebug.
I have been looking but I have not found a compatible version. I am not sure if pecl is installed with php5-cgi otherwise you could try and install it through pecl.
Here are some pointers: http://www.spiration.co.uk/post/1372/how%20to%20install%20xdebug%20on%20linux
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline HebsgaardS

  • *
  • 14
  • +0/-0
Re: Xdebug extension for PHP 5 contrib
« Reply #4 on: December 09, 2009, 09:40:14 PM »
I tried to follow the instructions on the linked page, but when I try to run pecl install xdebug I get the following output:
Code: [Select]
configure.in:9: warning: underquoted definition of PHP_WITH_PHP_CONFIG
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.in:32: warning: underquoted definition of PHP_EXT_BUILDDIR
configure.in:33: warning: underquoted definition of PHP_EXT_DIR
configure.in:34: warning: underquoted definition of PHP_EXT_SRCDIR
configure.in:35: warning: underquoted definition of PHP_ALWAYS_SHARED
acinclude.m4:19: warning: underquoted definition of PHP_PROG_RE2C
configure.in:65: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
ERROR: `phpize' failed
Any ideas on how to fix the error?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Xdebug extension for PHP 5 contrib
« Reply #5 on: December 09, 2009, 09:50:50 PM »
I tried to follow the instructions on the linked page, but when I try to run pecl install xdebug I get the following output:
Code: [Select]
configure.in:9: warning: underquoted definition of PHP_WITH_PHP_CONFIG
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.in:32: warning: underquoted definition of PHP_EXT_BUILDDIR
configure.in:33: warning: underquoted definition of PHP_EXT_DIR
configure.in:34: warning: underquoted definition of PHP_EXT_SRCDIR
configure.in:35: warning: underquoted definition of PHP_ALWAYS_SHARED
acinclude.m4:19: warning: underquoted definition of PHP_PROG_RE2C
configure.in:65: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
ERROR: `phpize' failed
Any ideas on how to fix the error?
You are most likely using pecl from the PHP4 package (also installed on your machine). What is the output of
Code: [Select]
rpm -qf `which pecl`
From a quick look at the php5-cgi package it does not contain pecl AFAICT
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline HebsgaardS

  • *
  • 14
  • +0/-0
Re: Xdebug extension for PHP 5 contrib
« Reply #6 on: December 09, 2009, 10:02:00 PM »
the output is:
Code: [Select]
php-pear-4.3.9-3.26
So I guess you are right :-(

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Xdebug extension for PHP 5 contrib
« Reply #7 on: December 11, 2009, 11:03:34 PM »
I have been trying to compile a xdebug version for php5-cgi. Please try to install by enabling my repository like stated here. It might take a few hours for the mirrors to sync.

After that you should be able to install it like this:
Code: [Select]
yum install php5-cgi-Xdebug --enablerepo=snetram
After installation you need to modify the php5-cgi configuration file (/etc/php5/php.ini) and add the following line:
Code: [Select]
zend_extension="/usr/lib/php5/xdebug.so"
the rest of the options is listed on the documentation pages of Xdebug.

After that it might be needed to restart your webserver like this to reload the changes:
Code: [Select]
sv t httpd-e-smith
You can check if Xdebug is loaded after that by executing the following line of code:
Code: [Select]
/usr/bin/php5/php-cgi -i | grep xdebugIt should output something like this:
Code: [Select]
[root@smetest7-i386 ~]# /usr/bin/php5/php-cgi -i | grep xdebug
<h2><a name="module_xdebug">xdebug</a></h2>
<tr class="h"><th>xdebug support</th><th>enabled</th></tr>
<tr><td class="e">xdebug.auto_trace</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">xdebug.collect_includes</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">xdebug.collect_params</td><td class="v">0</td><td class="v">0</td></tr>
<tr><td class="e">xdebug.collect_return</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">xdebug.collect_vars</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">xdebug.default_enable</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">xdebug.dump.COOKIE</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">xdebug.dump.ENV</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">xdebug.dump.FILES</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">xdebug.dump.GET</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">xdebug.dump.POST</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">xdebug.dump.REQUEST</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">xdebug.dump.SERVER</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">xdebug.dump.SESSION</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">xdebug.dump_globals</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">xdebug.dump_once</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">xdebug.dump_undefined</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">xdebug.extended_info</td><td class="v">On</td><td class="v">On</td></tr>
<tr><td class="e">xdebug.idekey</td><td class="v">root</td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">xdebug.manual_url</td><td class="v">http://www.php.net</td><td class="v">http://www.php.net</td></tr>
<tr><td class="e">xdebug.max_nesting_level</td><td class="v">100</td><td class="v">100</td></tr>
<tr><td class="e">xdebug.profiler_aggregate</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">xdebug.profiler_append</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">xdebug.profiler_enable</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">xdebug.profiler_enable_trigger</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">xdebug.profiler_output_dir</td><td class="v">/tmp</td><td class="v">/tmp</td></tr>
<tr><td class="e">xdebug.profiler_output_name</td><td class="v">cachegrind.out.%p</td><td class="v">cachegrind.out.%p</td></tr>
<tr><td class="e">xdebug.remote_autostart</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">xdebug.remote_enable</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">xdebug.remote_handler</td><td class="v">dbgp</td><td class="v">dbgp</td></tr>
<tr><td class="e">xdebug.remote_host</td><td class="v">localhost</td><td class="v">localhost</td></tr>
<tr><td class="e">xdebug.remote_log</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
<tr><td class="e">xdebug.remote_mode</td><td class="v">req</td><td class="v">req</td></tr>
<tr><td class="e">xdebug.remote_port</td><td class="v">9000</td><td class="v">9000</td></tr>
<tr><td class="e">xdebug.show_exception_trace</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">xdebug.show_local_vars</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">xdebug.show_mem_delta</td><td class="v">Off</td><td class="v">Off</td></tr>
<tr><td class="e">xdebug.trace_format</td><td class="v">0</td><td class="v">0</td></tr>
<tr><td class="e">xdebug.trace_options</td><td class="v">0</td><td class="v">0</td></tr>
<tr><td class="e">xdebug.trace_output_dir</td><td class="v">/tmp</td><td class="v">/tmp</td></tr>
<tr><td class="e">xdebug.trace_output_name</td><td class="v">trace.%c</td><td class="v">trace.%c</td></tr>
<tr><td class="e">xdebug.var_display_max_children</td><td class="v">128</td><td class="v">128</td></tr>
<tr><td class="e">xdebug.var_display_max_data</td><td class="v">512</td><td class="v">512</td></tr>
<tr><td class="e">xdebug.var_display_max_depth</td><td class="v">3</td><td class="v">3</td></tr>
[root@smetest7-i386 ~]#
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline HebsgaardS

  • *
  • 14
  • +0/-0
Re: Xdebug extension for PHP 5 contrib
« Reply #8 on: December 13, 2009, 07:39:19 PM »
Hi,
I got Xdebug working woth PHP5 now  :D. Thanks so much for the great effort you put into helping me set it up! Now I just hope the gallery developers can find the problem and fix it before gallery3 is released.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Xdebug extension for PHP 5 contrib
« Reply #9 on: December 13, 2009, 07:42:04 PM »
Hi,
I got Xdebug working woth PHP5 now  :D. Thanks so much for the great effort you put into helping me set it up! Now I just hope the gallery developers can find the problem and fix it before gallery3 is released.
Thanks for reporting back and i hope you are able to solve you issues... I will wait a little while for installing Gallery 3 as is still beta AFAIK.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)