[PHP] json_decode mistery

2013-05-24 Thread Radek Krejča
Hello, I am usin json regulary, but in one script I have mistery: echo($decrypted_data).\n\n; var_dump(json_decode($decrypted_data, true)); echo \n; var_dump(json_decode('{result_ok:true,result_message:null,client_name:Radek Krej\u010da}', true)); I got:

[PHP] RE: json_decode mistery - solved

2013-05-24 Thread Radek Krejča
var_dump(json_decode(Trim($decrypted_data), true)); I dont know why, but there is any spaces, this is working. Radek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Problem with soap - Error Fetching http headers

2013-03-28 Thread Radek Krejča
Hello, I am starting to make my first soap server/client. I found nice tutorial (manual pages on PHP is not detailed) and I have this server script: http://codeviewer.org/view/code:3131 boxing.wsdl looks: http://codeviewer.org/view/code:3132 and client script looks

[PHP] __autoload not work in cgi?

2013-03-27 Thread Radek Krejča
Hello, I have installed lighttp with php support. It looks like, that function __autoload doesnt work in cgi mode (in the manual I only see, that it should not work in cli mode). I have this code fragment: function __autoload($class) { if(File_Exists(PATH_EXTRAS_CLASSES.$class..php)) {

RE: [PHP] __autoload not work in cgi?

2013-03-27 Thread Radek Krejča
spl_autoload_register is working. Thank you. So - __autoload isnt already supported? Radek Did you tried with spl_autoload_register ? http://php.net/manual/en/function.spl-autoload-register.php Kind regards,

[PHP] Problem with ssh2 public/private key connecting

2012-06-12 Thread Radek Krejča
Hi, I have problem with ssh2_Auth_Pubkey_File. I have one server for connecting to others. On all of theese is FreeBSD installed, but different versions. I am using dsa keys for connecting. From command line works everything fine (with using the same key files). But from php I have problem - a

[PHP] ssh2_exec line width problem

2010-09-28 Thread Radek Krejča
Hi, I need to get about 500 chars over ssh2_exec, but this doesnt work: $stream = ssh2_Exec($this-_connection, system identity print;ip address print detail;system routerboard print;interface wireless print, false, NULL, 500); Where could be a problem? Its connection to Mikrotik. php5-5.3.3_1

RE: [PHP] Problem with ssh2_connect

2010-06-24 Thread Radek Krejča
Hi, new symptoms... So, I have following: 1. created rsa keys - tested over ssh command - on remote server is public key renamed to authorized_keys, on local machine i have both keys 2. rights on local machine: -r 1 radek wheel 1675 23 led 2007 radek -r 1 radek wheel

RE: [PHP] Problem with ssh2_connect - finished

2010-06-24 Thread Radek Krejča
Hi, so I have (hope) finished. There is problem with rsa keys in function ssh2_connect (probably bug, I dont see any problem on my side), so I created two pairs - rsa and dsa. rsa method isnt working, but dsa method without problems. Its little complication, because I have everwhere rsa keys,

[PHP] Problem with ssh2_connect

2010-06-23 Thread Radek Krejča
Hello, I am trying connect to freebsd. I have php 5.3.2 installed. I have to connect using public keys, but without succes. Function ssh2_connect throws me following error (then I have invalid resource for function ssh2_auth_pubkey_file)... PHP Warning: ssh2_connect(): Error starting up SSH

[PHP] FW: Problem with ssh2_connect

2010-06-23 Thread Radek Krejča
Hello, I am trying connect to freebsd. I have php 5.3.2 installed. I have to connect using public keys, but without succes. Function ssh2_connect throws me following error (then I have invalid resource for function ssh2_auth_pubkey_file)... PHP Warning: ssh2_connect(): Error starting up SSH

RE: [PHP] FW: Problem with ssh2_connect

2010-06-23 Thread Radek Krejča
Have you tried opening the connection from the command line with OpenSSL or similar tools? Do you know those credentials will actually work? Yes, It is my key (now I am testing), but I got this message before I run ssh2_auth_public... Radek -- PHP General Mailing List (http://www.php.net/)

RE: [PHP] Problem with ssh2_connect

2010-06-23 Thread Radek Krejča
Make sure that the key file exists by that name in the location you're specifying (hint: use a full path). it is the right key for that server. the permissions on the file are very strict (chmod 0400 ssh-rsa). I got error message immediately after

RE: [PHP] Problem with ssh2_connect

2010-06-23 Thread Radek Krejča
Make sure that the key file exists by that name in the location you're specifying (hint: use a full path). Its in ssh2_auth_public..., yes, I am using full path there. it is the right key for that server. Yes, I use it with ssh command from line on the same

RE: [PHP] Problem with ssh2_connect

2010-06-23 Thread Radek Krejča
Do you have lexneter installed. I think that could be the problem. 2010/6/23 Radek Krejča radek.kre...@starnet.cz    Make sure that What is lexneter please? Radek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Howto send command over ssh using sockets

2010-04-05 Thread Radek Krejča
Hello, thank you for response, more in you text: Instead of ssh, you could use telnet to connect to the Cisco router (which incidentally runs on port 23, but is likely to be disabled on I want to use my script against FreeBSD router and against RouterOS so I need ssh. I can use system function

[PHP] Howto send command over ssh using sockets

2010-04-04 Thread Radek Krejča
Hello, I am trying send command to remote host over ssh with sockets. But I need to set up username/password. I am trying to modify this script (from www.php.net - function fsockopen), but I dont know, where set username/password because I got this message: Bad protocol version identification