php.ini file for eclipse php debugging - debugging

I have been searching high and low and still cannot get debugging working with 'eclipse for PHP Developers 3.0.2'.
At the moment eclipse is just hanging at 57% with 'Launching: waiting for XDebug session. But while eclipse is hanging, the php file opens in an external browser and runs???
I'm using 'XAMPP 3.1.0.3.1.0' for the web server and have the appropriate 'php_xdebug.dll' file in the php ext folder.
I have tried numerous setting from other forums but still no luck, here is my php.ini file config for XDebug:
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dllstack"
;xdebug.profiler_append = 0
;xdebug.profiler_enable = 1
;xdebug.profiler_enable_trigger = 0
;xdebug.profiler_output_dir = "\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 0n
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
;xdebug.trace_output_dir = "\xampp\tmp"
Anyone have an idea to what I need to change?

Seems like the configuration setting were not correct, good tool to use is http://xdebug.org/wizard.php.
Downloaded new version, added it the php/ext and updated php.ini:
[XDebug]
zend_extension = \xampp\php\ext\php_xdebug-2.2.2-5.4-vc9.dll
;zend_extension = "\xampp\php\ext\php_xdebug.dll"
;xdebug.profiler_append = 0
;xdebug.profiler_enable = 1
;xdebug.profiler_enable_trigger = 0
;xdebug.profiler_output_dir = "\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
;xdebug.remote_enable = 0
;xdebug.remote_handler = "dbgp"
;xdebug.remote_host = "127.0.0.1"
;xdebug.trace_output_dir = "\xampp\tmp"

Related

Gitlab-runner Interactive Web Terminals not connected

I have installed successfully a gitlab-runner on a VM, and it is used by some of my projects. I would like to use the Interactive Web Terminal to have a chance to debug when some pipeline fails.
I'm trying to configure my config.toml file, following this docu of GitLab but I'm not understanding which ip address I should use in the setting listen_address. Should it be the ip of the running machine? The docker container instance? Or what?
Here is my current configuration:
concurrent = 2
check_interval = 0
log_level = "panic"
[session_server]
listen_address = "0.0.0.0:8093" # listen on all available interfaces on port 8093
session_timeout = 1800
[[runners]]
name = "A test private repo"
url = "https://gitlab.com/"
token = "myToken"
executor = "docker"
[runners.custom_build_dir]
[runners.docker]
tls_verify = false
image = "alpine:latest"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/cache"]
shm_size = 0
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[runners.custom]
run_exec = ""
Screen of error I get
I noticed that when I hit the 0.0.0.0:8093 address on the machine where the gitlab-runner is running I get this response:
Your configuration should use:
[session_server]
session_timeout = 1800
listen_address = "0.0.0.0:8093"
advertise_address = "<your runner IP/hostname>:8093"
Should it be the ip of the running machine?
Yes

Problems with MySQL server

I have the issue with MySQL server.
I installed a Xampp server on top of an older one based on some other instructions. The old one was in my C drive (c:/Xampp) and the new one I put on my desktop C:/Users/user/Desktop/xampp.
I managed to fix the Apache server by changing the port number but I am still having issues with SQL Server.
Tried the following:
Step 1: Search for ['client'], you can see some thing like this
[client]
# password = your_password
port = 3306
socket = "C:/xampp/mysql/mysql.sock"
Now in the port section remove 3306 and add port = 3306 > 3307 as shown below.
[client]
# password = your_password
port = 3306 > 3307
socket = "C:/xampp/mysql/mysql.sock"
Step 2: similarly searched for ['mysqld'], you can see something like this
[mysqld]
port= 3306
socket = "C:/xampp/mysql/mysql.sock"
basedir = "C:/xampp/mysql"
tmpdir = "C:/xampp/tmp"
datadir = "C:/xampp/mysql/data"
pid_file = "mysql.pid"
# enable-named-pipe
key_buffer = 16M
max_allowed_packet = 1M
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log_error = "mysql_error.log"
Now here I changed the port number 3306 to 3307 and add a line innodb_force_recovery = 1 exactly as shown below:
[mysqld]
port= 3307
socket = "C:/xampp/mysql/mysql.sock"
basedir = "C:/xampp/mysql"
tmpdir = "C:/xampp/tmp"
datadir = "C:/xampp/mysql/data"
pid_file = "mysql.pid"
# enable-named-pipe
key_buffer = 16M
max_allowed_packet = 1M
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log_error = "mysql_error.log"
innodb_force_recovery = 1**
Did not work.
Any suggestions? Thanks.

Add ports on Observium

I've installed Observium and it's working great, except for one thing: no ports are showing up.
I've added 3 devices with snmpd installed (Debian 7), all the graphs are displayed (cpu, mem) except for the network traffic ones, and on the front page, it shows:
Ports 0 0 up 0 down 0 ignored 0 disabled
I've also installed the agent on one device, it didn't change anything.
The config used is here (all the private informations are noted xx):
$config['db_host'] = 'localhost';
$config['db_user'] = 'xx';
$config['db_pass'] = 'xx';
$config['db_name'] = 'xx';
// Base directory
$config['install_dir'] = "/opt/observium";
// Default community list to use when adding/discovering
$config['snmp']['community'] = array("xx");
// Authentication Model
$config['auth_mechanism'] = "mysql"; // default, other options: ldap, http-auth, please see documentation for config he$
// Enable alerter (not available in CE)
#$config['poller-wrapper']['alerter'] = TRUE;
// Set up a default alerter (email to a single address)
$config['alerts']['alerter']['default']['descr'] = "Observium - Alert";
$config['alerts']['alerter']['default']['type'] = "email";
$config['alerts']['alerter']['default']['contact'] = "xx#xx.com";
$config['alerts']['alerter']['default']['enable'] = TRUE;
$config['poller_modules']['unix-agent'] = 1;
$config['collectd_dir'] = '/var/lib/collectd/rrd';
$config['int_customers'] = 1; # Enable Customer Port Parsing
$config['int_transit'] = 1; # Enable Transit Types
$config['int_peering'] = 1; # Enable Peering Types
$config['int_core'] = 1; # Enable Core Port Types
$config['int_l2tp'] = 0; # Enable L2TP Port Types
$config['show_locations'] = 1; # Enable Locations on menu
$config['show_locations_dropdown'] = 1; # Enable Locations dropdown on menu
$config['show_services'] = 0; # Enable Services on menu (Disabled by default as this option is deprecated)
$config['ports_page_default'] = "details/"; ## eg "details/" "graphs/bits/"
$config['show_overview_tab'] = true;
$config['overview_show_sysDescr'] = true;
$config['frontpage']['device_status']['ports'] = true;
$config['device_traffic_iftype'] = array('/loopback/','/tunnel/','/virtual/','/mpls/');
$config['device_traffic_descr'] = array('/loopback/','/vlan/','/tunnel/','/:\d+/');
// End config.php
Is the configuration the problem ? Is it only from Professional editions ?
Thank you for your help, I'm new to Observium and I really find it awesome (excepted this one little problem...)
Problem solved !
Easy fix on my MySQL Observium database:
ALTER TABLE `ports` CHANGE `port_label_short` `port_label_short` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ;
Explanation:
I've ran ./discovery.php -d -m ports -h 4 (4 being my host id), and it showed a lot of errors when running queries:
ERROR[Error in query: (1364) Field 'port_label_short' doesn't have a default value]
This error was the key, as I only needed to set a default value on this column.

NetBeans and Zend Framework debug

I need to debug my Zend project with NetBeans but it's not work.
My configuration in php.ini:
; XDEBUG Extension
zend_extension = "c:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11-x86_64.dll"
;
[xdebug]
xdebug.remote_enable = off
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
xdebug.show_local_vars=0
These also not work:
xdebug.remote_enable = on
xdebug.profiler_enable = on
xdebug.profiler_enable_trigger = on
{...}
Any suggestions?
There are two PHP Configuration files in WAMP Server
The first is used by the command line: C:\wamp64\bin\php\phpX.X.XX\php.ini
The second is used by Apache Server: C:\wamp64\bin\php\phpX.X.XX\phpForApache.ini
You need to make changes in the second configuration file which is used by Apache Server.

XAMPP, Xdebug and phpStorm

I'm having a heck of a time getting xdebug working on xampp. I'm trying to be able to debug php in the browser with phpStorm.
I'm on Windows 7 (64bit edition).
I downloaded the appropriate version of Xdebug (I think). PHP 5.4 VC9 TS (64 bit)
Put this in php.ini (the same php.ini from my phpinfo())
[XDebug]
zend_extension_ts = "\xampp\php\ext\php_xdebug-2.2.0RC1-5.4-vc9-x86_64.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable=on
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=”dbgp”
xdebug.trace_output_dir = "\xampp\tmp"
I had previous edited php.ini to change the default htdocs to another location (I am not sure if this would affect xdebug)
Also, I see the answer to many this kind of questions is to use the xdebug wizard. That's not working for me - doesn't tell me which binary to download for some reason.
Thanks #LazyOne
Made sure I had the 32-bit version (per this thread).
Made sure xdebug.remote_enable = 1
The following is working:
[XDebug]
zend_extension = "C:\Program Files (x86)\xampp\php\ext\php_xdebug-2.2.3-5.4-vc9.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\Program Files (x86)\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
xdebug.trace_output_dir = "C:\Program Files (x86)\xampp\tmp"

Resources