views:

48

answers:

3

I have a live server which I want to occasionally use for testing purposes. I only have access to FTP and some basic administration tools there.

Reading the documentation for dl() gives me hope I can load xDebug dynamically even though I can't add it to the loaded extension list. I have little idea how though.

Question: How to obtain the appropriate compiled version of xdebug (or any other PHP extension) which would be ready to be used with dl()?

BTW, AFAIK the OS is CentOS 4 in my case, but I'd appreciate a broader answer too - for future reference.

A: 

I usually use php_uname to determine the server OS

function os_check() {
$os_string = php_uname('s');
if (strpos(strtoupper($os_string), 'WIN')!==false) {
 return 'windows';
} else {
 return 'linux';
}
bangbambang
A: 

Such information is in various places in phpInfo()

<?php
phpinfo();
?>
TheLQ
+2  A: 

xdebug is a zend-engine extension and thus cant be loaded dynamically.

You can try with xhprof instead. That should be possible to load at run time (I haven't much experience with it though, so i cant offer you specifics)

troelskn
That's totally new to me. Could you explain or give references on to how do they differ - php and zend engine extensions?
Raveren
http://stackoverflow.com/questions/1758014/whats-the-difference-between-extension-and-zend-extension-in-php-ini
troelskn