Jump to content

Amired

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Everything posted by Amired

  1. This is the line that is generated when I manually activate the server: [s_API FAIL] SteamAPI_Init() failed; unable to update local steamclient. Continuing with current version anyway. And exactly instead of it the PHP put out the error. he cant make it to this line. the error itself is not important it's something like "there was an error. server restart in 10 seconds"..
  2. The log was really helpful. It actually showed that the file actually runs, and there is an inside error which makes him crash. The only thing is that when I manually login to PuTTy and do the exact same thing it works fine. What the hell?
  3. it's okay, anyway it's still not working. Look what I wrote 1 comment up
  4. Hey it's not my folder, it's a HL dedicated server >_< I'm just making the PHP. I'll try it now. Edit: Nope, still not working. I tried to make a "try" file and put a simple "wget" in it, and it worked. I don't know why this doesn't.
  5. Hi, Thanks for the reply I've tried it manually, [1@localhost ~]$ sh hlds/server_run & [1] 11653 [1@localhost ~]$ hlds/server_run: line 1: ./hlds_run: No such file or directory How can I overcome that? thanks
  6. Hi, I'm trying to execute a process via PHP (ssh2). Here's the code: $connection = ssh2_connect(**,22); $stream = ssh2_auth_password($connection, $on_ssh, $on_pass); $command = ssh2_exec($connection, "cd hlds"); $command = ssh2_exec($connection, "sh server_run &"); Everything here seems ok, $connection is good, and 'server_run' has chmod 777. Actually if I login manually via PuTTy and do the exact same actions it works. Why doesn't it now? Thanks!
  7. Hi, I'm trying to limit time for fsockopen(), so if it doesn't succeed in 2 seconds it will stop. I have this: $fp = fsockopen('udp://'.$ip,$port,$errno,$errstr); $start = time(); $allok = 1; if($allok == 1) { while(1) // infinite loop { if (time() > $start + '2') { $allok = 0; return 1; } } } else { throw new Exception("function exceeded time"); } But when I use it - all I get in the .php page is "Resource id #8" instead of what I need. when I remove what I wrote and put just $fp = fsockopen('udp://'.$ip,$port,$errno,$errstr); Everything works fine. what's the problem?
  8. Okay, Thanks! Now, when I try to use your class, it says: Fatal error: Uncaught exception 'Exception' with message 'Command '/usr/bin/unzip samp.zip' timed out' in /home/amirtuk/public_html/db/ssh.class.php:209 Stack trace: #0 /home/amirtuk/public_html/db/install_samp.php(98): ssh->cmd('/usr/bin/unzip ...', 'Archive: samp....', NULL) #1 {main} thrown in /home/amirtuk/public_html/db/ssh.class.php on line 209 what is it?
  9. OMG it worked, thank you so much! How can I use the function 'ssh' for other needs? what can I replace it with? It's great!
  10. Hi, Thanks for your response! I'm not sure I understand what you're saying, what I have to do. Can you explain? Thanks! (pm sent)
  11. Hi, Here's my script: ssh2_exec($connection, 'wget http://file.zip); ssh2_exec($connection, 'unzip file.zip); I've even tried: ssh2_exec($connection, 'wget http://unzip.zip); ssh2_exec($connection, 'wget http://.../unzip'); ssh2_exec($connection, 'chmod +x unzip'); ssh2_exec($connection, './unzipr &'); Untar has "unzip unzip.zip" in it. Nothing works. When I login manually to the SSH via PuTTY - the unzipping works, of course. what can I do?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.