Configuring Xdebug in Lamp for debugging
Page 1 of 1
Configuring Xdebug in Lamp for debugging
In case you do not know, Lamp is the linux apache mysql Perl/Python/PHP thingy for linux.
And the xampp for linux is something else.
The difference? You need to configure Lamp, xampp has everything pre configured.
After you install lamp, you have to configure lots of things, but that still does not include the debugging things for lamp.
To debug, Xdebug is a worthy choice. (is there any better alternative?)
To install it, at first go to this website.
Then follow the instructions from there.
After you follow the instructions, you only have installed xDebug, not configured and prepared it for programming.
I will consider that you have installed in the standard settings.
I.e. your php.ini file is in /etc/php5/apache2/
Now,open a terminal, and write:
inside the file, you need to make 3 changes, and a couple of new entries.
change 1:
implicit_flush = Off
to
implicit_flush = On
change 2:
display_errors = Off
to
display_errors = On
change 3:
html_errors = Off
to
html_errors = On
New entries:
Now restart the server:
And you are done.
And the xampp for linux is something else.
The difference? You need to configure Lamp, xampp has everything pre configured.
After you install lamp, you have to configure lots of things, but that still does not include the debugging things for lamp.
To debug, Xdebug is a worthy choice. (is there any better alternative?)
To install it, at first go to this website.
Then follow the instructions from there.
After you follow the instructions, you only have installed xDebug, not configured and prepared it for programming.
I will consider that you have installed in the standard settings.
I.e. your php.ini file is in /etc/php5/apache2/
Now,open a terminal, and write:
- Code:
sudo gedit /etc/php5/apache2/php.ini
inside the file, you need to make 3 changes, and a couple of new entries.
change 1:
implicit_flush = Off
to
implicit_flush = On
change 2:
display_errors = Off
to
display_errors = On
change 3:
html_errors = Off
to
html_errors = On
New entries:
- Code:
;must have xdebug settings
;xdebug.profiler_output_dir = "/tmp/xdebug/"
xdebug.remote_mode=req
xdebug.profiler_enable = On
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
;xDebug Configuration ends
;optional xdebug settings
xdebug.collect_vars=On
xdebug.show_local_vars=On
xdebug.dump.SERVER=HTTP_HOST, SERVER_NAME
xdebug.dump_globals=On
xdebug.collect_params=4
Now restart the server:
- Code:
sudo /etc/init.d/apache2 restart
And you are done.
Similar topics
» How to configuring the Cisco ASA 5505 Firewall ?
» Preparing Eclipse PDT for Debugging PHP
» BIT0122: Presentation on Common mistakes, Error Handling and Debugging
» Preparing Eclipse PDT for Debugging PHP
» BIT0122: Presentation on Common mistakes, Error Handling and Debugging
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Tue Sep 29, 2015 2:45 pm by Sophiawood
» Cisco EHWIC SFP/GE WAN Card
Mon Sep 07, 2015 11:08 am by Sophiawood
» Huawei S1700-28GFR-4P-AC Price
Thu Jun 25, 2015 2:31 pm by Sophiawood
» teach yourself C++ / Herbert Schildt Solutions
Wed Jun 03, 2015 1:52 pm by Abdullah Al Noman
» teach yourself c by herbert schildt pdf
Wed May 13, 2015 11:01 pm by Raquib Ridwan
» ASA 5506X With Firepower ASA5506-K9
Fri Apr 10, 2015 4:31 pm by Sophiawood
» New Trends in Deal Business
Tue Feb 03, 2015 9:38 pm by nersoa
» PoE Power Allocation for WS-C2960S-24PS-L
Wed Nov 05, 2014 11:12 am by Sophiawood
» How to cure back pain
Fri Oct 31, 2014 7:15 pm by Bergen Guildford