PLEASE WATCH IN HD! SOOO BLURRY IN 360p

or download with jdownloader 2 beta in 720p

or minitube (very cool app)

su; # become super user/root
aptitude update; # update packet definitions
aptitude install lighttpd php5-cgi mysql-server mysql-client phpmyadmin php5-mysql php5-gd php5-dev php-pear; # install stuff needed
pecl install xdebug; # install xdebug binary -> last line reads "zend_extension=/usr/lib/php5/20131226/xdebug.so" to php.ini
find / -name xdebug.so; # search for install path of xdebug binary

point your browser to: http://localhost

You should be greated with the lighttpd default page

configure lighttpd

vim /etc/lighttpd/conf-enabled/10-fastcgi.conf
# /usr/share/doc/lighttpd/fastcgi.txt.gz
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi

# Start an FastCGI server for php needs the php5-cgi package
server.modules += ( "mod_fastcgi" )

fastcgi.server = ( ".php" =>
  ((
    "socket" => "/usr/bin/php-cgi",
    "bin-path" => "/var/run/lighttpd/php-fastcgi.socket",
    "max-procs" => 2,
    "idle-timeout" => 20,
    "bin-environment" => (
      "PHP_FCGI_CHILDREN" => "4",
      "PHP_FCGI_MAX_REQUESTS" => "10000"
    ),
    "bin-copy-environment" => (
      "PATH", "SHELL", "USER"
    ),
    "broken-scriptfilename" => "enable"
  ))
)
echo "<?php phpinfo();" > /var/www/html/info.php; # create a new file and fill it with phpinfo()

point your browser to it: http://localhost/info.php

you should see a page like this:

phpinfo tells you where php.ini is

it will tell you that the php.ini-config file in use is located at /etc/php5/cgi/php.ini

vim /etc/php5/cgi/php.ini; # open php.ini config file
/Extensions; # search for extensions section

add this lines:

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

zend_extension=/usr/lib/php5/20131226/xdebug.so

[debug]

; Remote settings
xdebug.remote_autostart=off
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000

; General
xdebug.auto_trace=off
xdebug.collect_includes=on
xdebug.collect_params=off
xdebug.collect_return=off
xdebug.default_enable=on
xdebug.extended_info=1
xdebug.manual_url=http://www.php.net
xdebug.show_local_vars=0
xdebug.show_mem_delta=0
xdebug.max_nesting_level=100

;xdebug.idekey=
; Trace options
xdebug.trace_format=0
xdebug.trace_output_dir=/tmp
xdebug.trace_options=0
xdebug.trace_output_name=crc32

; Profiling
xdebug.profiler_append=0
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=0
xdebug.profiler_output_dir=/tmp
;xdebug.profiler_output_name=crc32

restart the webserver

/etc/init.d/lighttpd restart

if you go point your browser again to: http://localhost/info.php

You should find a section that reads:

UPDATE: 2013.01.

when starting eclipse and you get a: MOZILLA_FIVE_HOME not set error.

install these two packages: (maybe aptitude search libhunspell to find the right version)

aptitude install libhunspell-1.2-0

aptitude install xulrunner-firebug

XDEBUG GETS STUCK ON 57% LAUNCHING – WAITING FOR XDEBUG SESSION

this problem could result out of:

1. some other programm is using the same port as xdebug (9000), you can check what ports are open (under linux) with this command: (you might need to install it with aptitude install lsof)

root@debian7:~# lsof -i -P

2. r-click -> debug as -> debug configuration -> that XDebug is choosen as debugger (not Zend)

 IF ALL THIS FAILS: TRY TO LAUNCH A DIFFERENT FILE!

BECAUSE IF THERE ARE PHP-SYNTAX-ERRORS IN YOUR FILE, XDEBUG WILL ALSO NOT LAUNCH! (NO KIDDING)

So it would be recommended to turn

display_errors = On

in

vim /etc/php5/cgi/php.ini

then you should see something like this if you have an error in your file.php

display_errors_php

alternatively you can also enable logging errors to file like this:

SESSION("GROUP") = $group; // instead of $SESSION["GROUP"] = $group;

AND XDEBUG FAILS MISERABLY WITH THE ABOVE BEHAVIOUR!

TURN ON PHP ERROR REPORTING (TO FILE) IN YOUR
vim /etc/php5/cgi/php.ini

error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
; Besides displaying errors, PHP can also log errors to locations such as a
; server-specific log, STDERR, or a location specified by the error_log
; directive found below. While errors should not be displayed on productions
; servers they should still be monitored and logging is a great way to do that.
; Default Value: Off
; Development Value: On
; Production Value: On
; http://php.net/log-errors
log_errors = On
; Log errors to specified file. PHP's default behavior is to leave this value
; empty.
; http://php.net/error-log
; Example:
error_log = php_errors.log

; Set maximum length of log_errors. In error_log information about the source is
; added. The default is 1024 and 0 allows to not apply any maximum length at all.
; http://php.net/log-errors-max-len
log_errors_max_len = 1024

then search for: php_errors.log
in the same directory as your Filename.php that does not want to start.

there you have it:
[09-Aug-2012 18:15:59] PHP   1. {main}() /var/www/Filename.php:0
[09-Aug-2012 18:16:07] PHP Fatal error:  Can't use function
return value in write context in /var/www/Filename on line 42

THIS IS A REALLY REALLY ANNOYING "FEATURE"! PLEASE XDEBUG DEVELOPERS IF
YOU READ THIS FIX IT IF POSSIBLE :D
admin