ubuntu con php5.4 usa enmod e spezza la configurazione in vari files(come apache)

php5enmod apc
sudo /etc/init.d/apache2 start

PECL extension

sudo pecl install mongo
 
# Open your php.ini file and add to it:
extension=mongo.so

mail

linux_exim4

XDebug

NB

xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey=
 
; abilita il profiling nel progetto( via htaccess ), non globale per il server o si riempirà di logs pesantissimi
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 1
xdebug.profiler_append = 1
xdebug.profiler_output_name = cachegrind.out.%s
 
xdebug.trace_output_dir=/tmp
// Making XDebug more chatty in Development Environment
if (APPLICATION_ENV == 'development') {
    
ini_set('xdebug.collect_vars''on');
    
ini_set('xdebug.collect_params''4');
    
ini_set('xdebug.dump_globals''on');
    
ini_set('xdebug.dump.SERVER''REQUEST_URI');
    
ini_set('xdebug.show_local_vars''on');
}

test connection

// crea una connessione al socket di XDBG
$sock socket_create(AF_INETSOCK_STREAM0);
$port=9003// 9000 before php8
socket_bind($sock$address'127.0.0.1'$port ) or die('Unable to bind');
socket_listen($sock);
$client socket_accept($sock);
echo 
"connection established: $client";
socket_close($client);
socket_close($sock);

PHP8+xdebug3 (@see upgrade guide ):

xdebug.mode=debug
 
// Or, on the command line:
 
export XDEBUG_MODE=debug
php script-name.php
 
Xdebug's default debugging port has changed from 9000 to 9003.

apc

php_apc

htaccess flag pass

config manual

    <Directory "/path/to/web">
        Options Indexes FollowSymLinks
        Order Allow,Deny
        Allow from all
        AllowOverride all
        <IfModule mod_php5.c>
            # use in apache confif
            php_admin_flag engine on
            php_admin_flag safe_mode off
            php_admin_value open_basedir none
            # use in .htaccess
            php_value error_reporting E_ALL
            php_flag register_globals Off
 
            # Disable magic quotes
            php_value magic_quotes_gpc 0
            php_value magic_quotes_runtime 0
            php_value magic_quotes_sybase 0
            php_flag display_errors Off
 
            # Disabled registering of globals and arg*
            php_value register_globals 0
            php_value register_argc_argv 0
 
            # Disallow some security holes
            php_value allow_call_time_pass_reference 0
            php_value allow_url_fopen 1
            php_flag short_open_tag On
            php_flag enable_dl Off
 
            # Gzip compress the output
            php_flag output_buffering Off
            php_flag zlib.output_compression On
 
            php_value  upload_max_filesize  2M
        </ifModule>
    </Directory>