I can not do a simple easybitcoin command.
Here is my sript :
require_once("../Easy_btc/easybitcoin.php");
$bitcoin = new Bitcoin("pseudo","password");
$result = $bitcoin->getinfo();
var_dump($bitcoin);
I already included the conf file using bitcoind -conf=conf_path
bitcoin.conf :
server = 1
rpcuser=username
rpcpasword = password
By the way,it worked on my ubuntu system but it doesn't on Windows 10
Related
I'm using PHP 5.6 with ssh2 extension to create SSH tunnel to a remote host, here is my code:
$connection = ssh2_connect("example.com", 22);
if (ssh2_auth_password($connection, "root", "123123")) {
if ($tunnel = ssh2_tunnel($connection, '127.0.0.1', 1080)){
//curl commands
}
}
I can do some Linux commands working with ssh2_exec but can not create SSH tunnel with ssh2_tunnel, here the error logs:
PHP Warning: ssh2_tunnel(): Unable to request a channel from remote
host
Anybody can give me some hints?
Note :
i have AllowTcpForwarding yes GatewayPorts yes inside
/etc/ssh/sshd_config
I am trying to run a zend + doctrine web application from a Debian 9 host, using php 5.6
I've the need to connect to a sql server that is on different host (it's a windows machine, obviously)
I tested connection using isql command line and I am correctly able to login and to operate in the desired db
The problem is that the webabb do not return me any error but simply fails to login (i am not the developer of this webapp).
Configuration follows:
odbcinst.ini
[FreeTds]
Description = MS SQL database access with Free TDS
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
UsageCount = 1
Trace = Yes
TraceFile = /tmp/odbcinst.log
freetds.ini
host ip is exact, I removed when pasting here
[flower1]
host = xxx.xxx.xxx.xxx
port = 1433
tds version = 7.3
odbc.ini
[test_flower1]
Description=Test for MSSQL Server on flower1
Driver=FreeTds
Database=test_flower1
ServerName=flower1
TDS_Version=7.3
application.ini
;; Database
doctrine.dsn = "odbc:Driver={Sql_server};Server=flower1;Database=test_flower1;Uid=<redacted but correct>;Pwd=<redacted but correct>;"
How can I debug the source of the problem?
I've not previously experience with zend/doctrine
The problem was due to this
doctrine.dsn = "odbc:Driver={Sql_server};Server=flower1;Database=test_flower1;Uid=<redacted but correct>;Pwd=<redacted but correct>;"
I solved simply adding the port !
doctrine.dsn = "odbc:Driver={Sql_server};Server=flower1;Port=1433;Database=test_flower1;Uid=<redacted but correct>;Pwd=<redacted but correct>;"
I am using Ubuntu 14.04 and i have installed freetds and odbc taking guidance from this link : http://www.bictor.com/2014/05/13/configure-unixodbc-for-ubuntu-14-04-using-freetds/
The database i am trying to connect to is on another system (mssql 2008 r2 express server) .
When i try to connect to that system database using the : isql -v test command .
When i do that i get the below errors :
> [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
> [01000][unixODBC][FreeTDS][SQL Server]Unknown host machine name.
> [ISQL]ERROR: Could not SQLConnect
My odbc.ini file looks like this :
[test]
Driver = FreeTDS
Description = My Test Server
Trace = No
ServerName = HOME-PC\ZOLIPE
Port = 1433
Database = test
TDS_Version = 4.2 (This version is the same as reported by tsql -C command)
i have also added the below in my freetds.conf file :
[mssql]
host = HOME-PC\ZOLIPE
Port = 1433
tds version = 4.2
Please help and thanks in advance .
This is my first experience using Gammu as SMS gateway, and I have a problem with the setup.
This is my system:
Windows 8.1 x64
Gammu 1.33.0 Windows x64
XAMPP 1.8.1
Database connection to MySQL using ODBC
GSM modem used: Wavecom Fastrack M1306B
And here is my smsdrc:
[gammu]
port = com6:
connection = at115200
[smsd]
Service = sql
Driver = odbc
SQL = mysql
host = localmysql
DeliveryReport = sms
logfile = smsdlog
debuglevel = 1
PIN = 1234
commtimeout = 1
sendtimeout = 10
User = root
Password =
# host = localhost
PC = localhost
Database = smsd
And here is my gammudrc :
port = com6:
connection = at115200
What I've did:
Extract the directory of gammu/bin into xampp/htdocs/gammu
Created smsrdc & gammurc files with the configs above
Set the compatibility of gammu-smsd.exe to Run As Administrator
phpmyadmin > Create new db (smsd) > imported the sql from gammu\share\doc\gammu\examples\sql\mysql.sql
My ODBC settings :
(source: kaskus.com)
(I've tested and it's connected)
- I've added the gammu-smsd into windows serices
- test identify by running gammu --identify
- test sending sms manually from console
- test gammu-smsd -c smsdrc, and i had no error at all.
The problem is I couldn't run the gammu-smsd as a service, whether it's manually from the cmd nor started it from the services.
If I started the gammu-smsd from cmd ( gammu-smsd -c smsdrc -s ), the gammu-smsd showed up in the task manager, but disappeared in less than 1 sec.
Whenever I tried to manually start the gammu-smsd service from the Windows Services, it always shows me this kind of error:
(broken image: http://cdn.kaskus.com/images/2014/01/08/270124_20140108085812.png)
I've done some searchs, and what I've found is all about wrong connection into DB, port, or about Run As Administrator. But I'm quite sure it's not from config.
How can I solve this issue, so that I can run the gammu-smsd services properly?
Can you please help me?
Thanks.
Try running not as a service :
gammu-smsd -c smsdrc
in my case that do the job.
I have installed DB2 Express-C V9.7, unixODBC php5-odbc and iSerie-5.4.0-1.6 Drivers for Linux but when i try to connect to the DB2 server php return me this message :
[unixODBC][IBM][iSeries Access ODBC Driver]Communication link failure. comm rc=10061 -
CWBCO1049 - The iSeries server application is not started, SQL state 08004 in SQLConnect
I noticed with tcpdump that php try to connect on port 8741 instead of 50000.
netstat -anp tell me DB2 listen port 50000
This is my configuration file
/etc/odbcinst.ini :
[DB2]
Description = ODBC for DB2
Driver = /opt/ibm/iSeriesAccess/lib/libcwbodbc.so
Setup = /opt/ibm/iSeriesAccess/lib/libcwbodbcs.so
FileUsage = 1
Threading = 2
DontDLClose = 1
UsageCount = 1
/etc/odbc.ini
[local_db2]
Driver = DB2
System = localhost
User = db2inst1
Password = MySecretPassword
Port = 50000
Database = dbname
Option = 1
And my PHP Script :
$dsn = "local_db2";
$user = "db2inst1";
$passwd = "MySecretPassword";
$conn = odbc_connect($dsn,$user,$passwd );
echo "votre id de connexion est : $conn";
if ($conn <= 0) {
echo "\nErreur\n";
}
else { echo "\nSuccès\n";
}
odbc_close($conn);
Now i can connect to DB2 server. I have changed port of db2inst1 in /etc/services but server don't respond me.
My error message is (after a while):
[unixODBC][IBM][System i Access ODBC Driver]Communication link failure. comm rc=8405 - CWBCO1047 - The IBM i server application disconnected the connection, SQL state 08S01 in SQLConnect
Conclusion :
The first problem was the drivers for iSeries that was not the proper drivers for my configuration so i have installed the DB2 ODBC CLI driver which include drivers for linux.
The second problem was the odbc configuration.
My working /etc/odbc.ini configuration :
[DBNAME]
Driver=DB2
My working /etc/odbcinst.ini configuration :
[ODBC]
Trace = yes
Tracefile = /tmp/odbc.log
[DB2]
Description = DB2 Driver
Driver = /opt/ibm/db2/V9.7/lib32/libdb2.so
FileUsage = 1
DontDLClose = 1
You can get more details about your odbc connection in /tmp/odbc.log.
I used too the isql program who test odbc connection.
This program was in unixodbc linux package.
Thanks for your informations
Nicolas.
It's likely the database host server has not been started. The database host server accepts TCP/IP connections to the database.
You can check if it is currently active with the command WRKACTJOB SBSD(QSERVER) JOB(QZDASRVSD).
The command to start it is: STRHOSTSVR SERVER(*DATABASE).
The default port is 8471.