Menu

script does not even connect

Help
2003-03-16
2004-02-07
  • Nobody/Anonymous

    heya, i just uploaded
    - defines.inc.php
    - phpSmartIRCclass.inc.php
    - example.php

    on my shell

    ..then did
    php example.php

    and all i get is:
    [dude@scsi1 phpbot]$ php example.php
    X-Powered-By: PHP/4.1.2
    Content-type: text/html

    Mar 16 17:01:35 DEBUG_ACTIONHANDLER: actionhandler(0) registered
    Mar 16 17:01:35 DEBUG_ACTIONHANDLER: actionhandler(1) registered
    Mar 16 17:01:35 DEBUG_CONNECTION: connecting
    Mar 16 17:01:35 DEBUG_SOCKET: using real sockets
    Mar 16 17:01:35 DEBUG_CONNECTION: logging in
    Mar 16 17:01:35 DEBUG_IRCMESSAGES: sent: "NICK phpSmartIRCclass"
    Mar 16 17:01:35 DEBUG_IRCMESSAGES: sent: "USER phpSmartIRCclass 0 * :phpSmartIRCclass Client 0.4.0"

    ..what am i doin wrong ?

     
    • Mirco Bauer

      Mirco Bauer - 2003-03-16

      eerrr, you are using a very old version of SmartIRC, the old name is phpSmartIRCclass, which was > 0.5.0...
      The current version is 0.5.2 which I recommend to download and try the example again...

       
    • Nobody/Anonymous

      hi,
      my fault, yes, thought smartirc is somethin different.

      well, just downloaded the package, and uploaded exactly as i downloaded to my shell.

      went into /examples dir
      made php example.php

      ...all i got was:

      [dude@scsi1 examples]$ php example.php
      X-Powered-By: PHP/4.1.2
      Content-type: text/html

      Mar 16 18:22:21 DEBUG_ACTIONHANDLER: actionhandler(0) registered
      Mar 16 18:22:21 DEBUG_ACTIONHANDLER: actionhandler(1) registered
      Mar 16 18:22:21 DEBUG_CONNECTION: connecting
      Mar 16 18:22:21 DEBUG_SOCKET: using real sockets
      Mar 16 18:22:24 DEBUG_CONNECTION: connected
      Mar 16 18:22:24 DEBUG_CONNECTION: logging in
      Mar 16 18:22:24 DEBUG_IRCMESSAGES: sent: "NICK Net_SmartIRC"
      Mar 16 18:22:24 DEBUG_IRCMESSAGES: sent: "USER Net_SmartIRC 0 * :Net_SmartIRC Client 0.5.1 (example.php)"

      ..still same prob

       
    • Nobody/Anonymous

      Hm are you sure your shell isn't blocking the connection? Just a thought...

       
      • Mirco Bauer

        Mirco Bauer - 2003-03-17

        probably its a firewall that blocks the connection, or the server is bad... try some other IRC servers...

         
    • Nobody/Anonymous

      ..well, tried antoher irc server, same problem.
      and blocking by a firewall....dunno, i got an eggdrop running on the shell, so i think it shouldnt be blocked...

      ..and btw.
      can i make it work like a real bot ? like an eggdrop ?

      or will my shell have a 99% resource needed .php running, while i'm using it ?

      ...thx so far
      great help forum!

       
      • Mirco Bauer

        Mirco Bauer - 2003-03-17

        it will run like an eggdrop, and will use very less CPU time, about 0.01%... is it now using 99% ?? I think it got maybe in a loop or something..
        try it without using sockets....
        just comment the line with "$irc->setUseSockets(true);" out and try again...

         
    • Nobody/Anonymous

      ...okay, cool!
      works much better now!

      i can connect not, whenn i comment the line you said.
      but whats the difference now, is there any disadvantage for me ?

      ...and, when i'm starting php example.php on my shell, and want the bot still running, but want to close the shell connection, how can i do this ?
      all the time i close my shell connection, the php cmd i've done will be closed too...

      but THX!
      i got it at least running now! :D

       
      • Mirco Bauer

        Mirco Bauer - 2003-03-17

        now it uses fsocks instead of real sockets, there is no real disadvantage.... just a different way of communicating with IRC servers...

        I think in 0.5.1 the enabling of sockets is broken... so that made the problem...

        to put a linux program into background is to call the command with a "&" at the end, like: "php example.php &"

        have fun with it! ;)

         
    • Nobody/Anonymous

      ...w000t, kicks ass!
      real cool bot!

      works all fine now, and i'm just hacking my own functions for irc for hours now ;)

      ...eggdrop has an ecryption function,
      i think it uses blowfish.

      your bot does have this feature too ?
      or if not do you want to add it ?

      grts

       
    • Mirco Bauer

      Mirco Bauer - 2003-03-22

      what kind of encryption, give me some URL where I can read some specs about it...

       
    • Nobody/Anonymous

      Hi! I'm experiencing some simular problems.. My script will neighter connect:

      Apr 07 21:17:25 DEBUG_CONNECTION: connecting
      Apr 07 21:17:25 DEBUG_SOCKET: using real sockets
      Apr 07 21:17:28 DEBUG_NOTICE: couldn't connect to "irc.freenet.de" reason: "Connection refused".

      Using Fsockets:

      Apr 07 21:27:13 DEBUG_CONNECTION: connecting
      Apr 07 21:27:13 DEBUG_SOCKET: using fsockets
      Warning: socket_last_error() expects parameter 1 to be resource, null given in /mnt/home3/s/sa/sangen/public_html/SmartIRC/SmartIRC.php on line 758
      Apr 07 21:27:16 DEBUG_NOTICE: couldn't connect to "irc.freenet.de" reason: "Success"

      I've been in contact whith the technicans on the server, but according to them, there shouldn't be anything blocking (firewall etc). I've also tried 3 different servers, but still I can't get it to connect. Any Ideas of what's wrong?

      Another q: I read the current version is 0.5.2? but on this site I can't only find 0.5.1. Where can I download latest release?

       
    • Nobody/Anonymous

      I had the same problem but commenting the line with "$irc->setUseSockets(true);" worked. Thanks meebey!!

       

Log in to post a comment.