I get the error waiting for connection xdebug on netbeans on ubuntu 14.04 - netbeans

I have configured my file php.ini so:
the path is /etc/php5/apache/
zend_extension="/usr/lib/php5/20131226/xdebug.so"
xdebug.remote_autostart=1
xdebug.remote_enable = 1
xdebug.remote_handler= "dbpg"
xdebug.remote_mode ="req"
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.remote_connect_back = 1
xdebug.idekey="netbeans-xdebug"
In my info.php appears active
img localhost/info.php

You've misspelled:
xdebug.remote_handler= "dbpg"
It should be dbgp (or rather, just remove the whole line).

Related

Audit daemon does not take rules from audit.rules

I am unable to add rules to audit daemon using /etc/audit/audit.rules
Every time i add the rules using auditctl it gets removed on reboot or audit daemon restart I have attached the /etc/audit/audit.rules and /etc/audit/auditd.conf
cat /etc/audit/auditd.conf
$ cat /etc/audit/auditd.conf
#
# This file controls the configuration of the audit daemon
#
local_events = yes
write_logs = yes
log_file = /NU_Application/audit.log
log_group = root
log_format = RAW
flush = INCREMENTAL_ASYNC
freq = 50
max_log_file = 8
num_logs = 5
priority_boost = 4
disp_qos = lossy
dispatcher = /sbin/audispd
name_format = NONE
##name = mydomain
max_log_file_action = ROTATE
space_left = 75
space_left_action = SYSLOG
verify_email = yes
action_mail_acct = root
admin_space_left = 50
admin_space_left_action = SUSPEND
disk_full_action = SUSPEND
disk_error_action = SUSPEND
use_libwrap = yes
##tcp_listen_port = 22
tcp_listen_queue = 5
tcp_max_per_addr = 1
##tcp_client_ports = 1024-65535
tcp_client_max_idle = 0
enable_krb5 = no
krb5_principal = auditd
##krb5_key_file = /etc/audit/audit.key
distribute_network = no
cat /etc/audit/audit.rules
$ cat /etc/audit/audit.rules
## First rule - delete all
## Increase the buffers to survive stress events.
## Make this bigger for busy systems
-b 8192
## This determine how long to wait in burst of events
--backlog_wait_time 0
## Set failure mode to syslog
-f 1
-w /var/log/lastlog -p wa
root#iWave-G22M:~# auditctl
When i restart the audit daemon ( i.e /etc/init.d/auditd restart ) and try to list the rules i get the message No rules
$ /etc/init.d/auditd restart
Restarting audit daemon auditd
type=1305 audit(1558188111.980:3): audit_pid=0 old=1148 auid=4294967295 ses=4294967295
res=1
type=1305 audit(1558188112.010:4): audit_enabled=1 old=1 auid=4294967295 ses=4294967295
res=1
type=1305 audit(1558188112.020:5): audit_pid=30342 old=0 auid=4294967295 ses=4294967295
res=1
1
$ auditctl -l
No rules
OS INFO
$ uname -a
Linux iWave-G22M 3.10.31-ltsi-svn743 #5 SMP PREEMPT Mon May 27 18:28:01 IST 2019 armv7l GNU/Linux
audit_2.8.4.bb file was used to install auditd daemon via yocto
path of audit_2.8.4.bb -- http://git.yoctoproject.org/cgit/cgit.cgi/meta-selinux/tree/recipes-security/audit/audit_2.8.4.bb?h=master
audit rules add via /etc/audit/audit.rules and auditctl command are not permanent. to make them permanent across reboot you have to add them /etc/audit/rules.d/audit.rules file.
after adding the rule, restart auditd service and run command auditctl -l, it will list all the rules and also reflect in /etc/audit/audit.rules file.

pymssql/freetds date from sqlserver

I am trying to get the date datatype from SQLserver 2014 as native python date through pymssql. Based on pymssql doc, I need to have 0.95+ freetds lib and 7.3 freetds ver.
# tsql -C
Compile-time settings (established with the "configure" script)
Version: freetds v0.95.8
freetds.conf directory: /etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: no
OpenSSL: no
GnuTLS: no
And I made following config:
#/etc/freetds.conf
[sqlsvr1]
host = sqlsvr1
port = 1433
tds version = 7.3
And I still get python string instead of date. This is from the TDSDUMPCONFIG. Is it because freetds 0.95.8 does not support tds 7.3? (The major/minor version seem to have been replace to 7/1).
config.c:620:IP addr is 172.16.12.26.
config.c:580: port = '1433'
config.c:580: tds version = '7.3'
config.c:886:Setting tds version to 7.3 (0x703).
config.c:568: Reached EOF
config.c:300:Success: [sqlsvr1] defined in /etc/freetds.conf.
config.c:765:Setting 'dump_file' to '/tmp/freetds.log' from $TDSDUMP.
config.c:689:tds_config_login: client_charset is UTF-8.
config.c:213:Final connection parameters:
config.c:214: server_name = sqlsvr1:1433
config.c:215: server_host_name = sqlsvr1
config.c:218: ip_addr = 172.16.12.26
config.c:218: ip_addr = 172.16.12.26
config.c:218: ip_addr = 172.16.12.26
config.c:223: instance_name =
config.c:224: port = 1433
config.c:225: major_version = 7
config.c:226: minor_version = 1
config.c:227: block_size = 0
config.c:228: language = us_english
config.c:229: server_charset =
config.c:230: connect_timeout = 0
config.c:231: client_host_name = rh1.int
config.c:232: client_charset = UTF-8
config.c:233: use_utf16 = 0
config.c:234: app_name = pymssql
config.c:235: user_name = USER
config.c:238: library = DB-Library
config.c:239: bulk_copy = 0
config.c:240: suppress_language = 0
config.c:241: encrypt level = 0
config.c:242: query_timeout = 0
config.c:245: database =
config.c:246: dump_file = /tmp/freetds.log
config.c:247: debug_flags = 0
config.c:248: text_size = 64512
config.c:249: emul_little_endian = 0
config.c:250: server_realm_name =
config.c:251: server_spn =
config.c:252: cafile =
config.c:253: crlfile =
If I set the tds version to 7.4 in the config, then I notice this error in the log:
config.c:580: tds version = '7.4'
config.c:881:error: no such version: 7.4
config.c:568: Reached EOF
config.c:213:Final connection parameters:
... ...
config.c:225: major_version = 7
config.c:226: minor_version = 1
Env: Linux/RH 6 + Python3.4.3 + pymssql(2.1.1) all x64
Any suggestions?
You have most of the required pieces.
But the one missing is the fact you are using pymssql 2.1.1.
Support for the DATE and TIME data types is implemented but targeted for pymssql 2.2.0 which isn't released yet. If you need it now you'll need to build it yourself from the 'master' Git branch first.

The transport failed to connect to the server error

Set emailObj = CreateObject("CDO.Message")
emailObj.Sender = "zzz#xxx.com"
emailObj.To = "xxx#xxx.com"
emailObj.Subject = "Test CDO"
emailObj.TextBody = "Test CDO"
Set emailConfig = emailObj.Configuration
emailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.live.com"
emailConfig.Fields("----/smtpserverport") = 465
emailConfig.Fields("----/sendusing") = 2
emailConfig.Fields("----/smtpauthenticate") = 1
emailConfig.Fields("----/smtpusessl") = true
emailConfig.Fields("----/sendusername") = "xxxx#gmail.com"
emailConfig.Fields("----/sendpassword") = "*****"
emailConfig.Fields.Update
emailObj.Send
If Err.Number = 0 Then
MsgBox "Done"
End If
If Err.Number <> 0 Then
MsgBox "Can't Proceed"
End If
It's a code to send email via live.com, but I am getting "The transport failed to connect to the server" error. Can anyone help me out in resolving this error?
mail.live.com is just a webserver(farm):
xxx#iridium:~ $ nmap mail.live.com
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-31 08:53 CEST
Nmap scan report for mail.live.com (157.56.198.204)
Host is up (0.029s latency).
Other addresses for mail.live.com (not scanned): 157.55.230.252
rDNS record for 157.56.198.204: origin.du130w.dub130.mail.live.com
Not shown: 965 closed ports, 33 filtered ports
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap done: 1 IP address (1 host up) scanned in 8.32 seconds
For mail submission to outlook.com use smtp-mail.outlook.com and port 25 or 587 (see here).
Not sure if you can use a Gmail address to authenticate to Microsoft's mail service, though.

FATAL: no indexes found in config file

I am trying to run the indexer of my sphinx server.
This is the command I use (through root access) to start the indexing:
indexer --all
When I use the command, this is the reponse I get:
Sphinx 2.1.9-id64-release (rel21-r4761)
Copyright (c) 2001-2014, Andrew Aksyonoff
Copyright (c) 2008-2014, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinxsearch/sphinx.conf'...
FATAL: no indexes found in config file '/etc/sphinxsearch/sphinx.conf'
This is the sphinx.conf file that is located in /etc/sphinxsearch/
#############################################################################
## indexer settings
#############################################################################
indexer
{
# memory limit, in bytes, kiloytes (16384K) or megabytes (256M)
# optional, default is 32M, max is 2047M, recommended is 256M to 1024M
mem_limit = 1024M
}
#############################################################################
## searchd settings
#############################################################################
searchd
{
listen = 127.0.0.1:9312
listen = 127.0.0.1:9306:mysql41
log = /var/log/sphinxsearch/searchd.log
query_log = /var/log/sphinxsearch/query.log
read_timeout = 5
client_timeout = 300
max_children = 30
pid_file = /var/log/sphinxsearch/searchd.pid
max_matches = 1000
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
mva_updates_pool = 1M
max_packet_size = 8M
max_filters = 256
max_filter_values = 4096
workers = threads # for RT to work
}
index myindex
{
type = rt
path = /var/www/vhosts/user/sphinx/myindex
rt_field = description
rt_field = searchcode
rt_field = weight
rt_field = productid
rt_attr_uint = stockproduct
rt_attr_uint = instock
charset_type = utf-8
min_infix_len = 3
enable_star = 1
expand_keywords = 1
dict = keywords
}
# --eof--
Can someone help me with resolving this error?
FATAL: no indexes found in config file '/etc/sphinxsearch/sphinx.conf
the indexer command only works on traditional disk-index. Not real time indexes.
Because indexer doesn't do anything with type=rt it doesnt 'see' them, hence your config file has no indexes to index.
I guess in an ideal world it would say 'no plain indexes found' or similar to clarify its ignoring rt (same as it ignores distributed)
All you have to do is put sphinx.conf file inside bin folder, which mean it will be inside this path for example "etc/sphinxsearch/bin/sphinx.conf".

xDebug session never starts

I've just change my OS to Windows 7 64.
I have Apache 2.2, PHP 5.3 (32bit) TS and Eclipse 3.7 (64bit) with PDT installed on my machine.
xDebug section in my php.ini
zend_extension = "C:\Program Files (x86)\PHP\ext\php_xdebug-2.1.4-5.3-vc9.dll"
xdebug.auto_trace = 0
xdebug.collect_includes = 1
xdebug.collect_params = 0
xdebug.collect_return = 0
xdebug.default_enable = 1
xdebug.extended_info = 1
xdebug.idekey = "STATION24$"
xdebug.max_nesting_level = 100
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "C:\WINDOWS\temp"
xdebug.profiler_output_name = "xdebug_profile.%p"
xdebug.remote_autostart = 0
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_log = 1
xdebug.remote_mode = "req"
xdebug.remote_port = 9001
xdebug.show_exception_trace = 0
xdebug.show_local_vars = 0
xdebug.show_mem_delta = 1
xdebug.trace_format = 0
xdebug.trace_output_dir = "C:\WINDOWS\Temp"
xdebug.trace_output_name = "trace.%c"
xdebug.var_display_max_depth = 5
In Eclipse I've configured PHP->Debug section as shown on images:
And now, when I try to launch debug, Eclipse freeze at starting debug session.
So, I'd read about this problem in past, people say this is because some application use xDebug port (in my case 9001), but I've checked, no other use this port, only xDebug do.
My firewall disabled, so no one application can block connection to xDebug. And one thing - "debug as CLI application" works well, only "debug as Web application" does not work.
I don't know what to do, please help.
If you run into problems and you don't know whether the Xdebug side is not working, or the IDE's side, then from Xdebug 2.2.0RC1 the remote debug log will also log connection issues.
Just a thought, you mention PHP TS. Maybe you should use xdebug TS too then?
(Although I read everywhere that lately you better not use TS at all, so might want to change php not TS or so).