Apached Don't WildPHP Bot not joining Server!

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Apached Don't WildPHP Bot not joining Server!

Postby DonGolss » 11. July 2016 16:54

Hello,
when i start and go to localhost/bot.php it says:
"Undefine Offset on line 113"
Here's the code:
unction main($config)
{
$data = fgets($this->socket, 256);

echo nl2br($data);

flush();

$this->ex = explode(' ', $data);


if($this->ex[0] == 'PING')
{
$this->send_data('PONG', $this->ex[1]); //Plays ping-pong with the server to stay connected.
}

LINE 113 >> $Command = str_replace(array(chr(10), chr(13)), '', $this->ex[3]);

switch($Command) //List of commands the bot responds to from a user.
{
case ':!join':
$this->join_channel($this->ex[4]);
break;
case ':!part':
$this->send_data('PART '.$this->ex[4].' :', 'Wildphp.com Free IRC Bot Script');
break;

case ':!say':
$message = "";
for($i=5; $i <= (count($this->ex)); $i++)
{
$message .= $this->ex[$i]." ";
}

$this->send_data('PRIVMSG '.$this->ex[4].' :', $message);
break;

case ':!restart':
echo "<meta http-equiv=\"refresh\" content=\"5\">";
exit;
case ':!shutdown':
$this->send_data('QUIT', 'Wildphp.com Free IRC Bot Script');
exit;
}

$this->main($config);
}
DonGolss
 
Posts: 5
Joined: 11. July 2016 12:46
XAMPP version: v3.2.2
Operating System: Windows 10

Re: Apached Don't WildPHP Bot not joining Server!

Postby Altrea » 11. July 2016 20:28

Hi,

Debug $this->ex[3].

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8298
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Apached Don't WildPHP Bot not joining Server!

Postby DonGolss » 12. July 2016 07:16

Thanks :)
DonGolss
 
Posts: 5
Joined: 11. July 2016 12:46
XAMPP version: v3.2.2
Operating System: Windows 10

Re: Apached Don't WildPHP Bot not joining Server!

Postby DonGolss » 12. July 2016 08:43

I'm sorry but how to debug?
I'm a begginer.
Please help me
DonGolss
 
Posts: 5
Joined: 11. July 2016 12:46
XAMPP version: v3.2.2
Operating System: Windows 10

Re: Apached Don't WildPHP Bot not joining Server!

Postby Altrea » 12. July 2016 08:59

Output the contents of $this->ex with var_dump or print_r
Check if the third key of this array exists and contains the expected value.
If not, debug where the array comes from and debug the source data from this.

Most preferred: Ask the developer of this script to debug this issue.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8298
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Apached Don't WildPHP Bot not joining Server!

Postby DonGolss » 13. July 2016 20:11

Can u Debug it for me please?
I didn't know how to do it.
DonGolss
 
Posts: 5
Joined: 11. July 2016 12:46
XAMPP version: v3.2.2
Operating System: Windows 10

Re: Apached Don't WildPHP Bot not joining Server!

Postby Altrea » 13. July 2016 20:54

No. I don't have access to your environment and code, log files, etc.
It is your code (or the code of someone else) and we cannot provide any support for third party scripts.
Ask the developer of the script what to do with this issue.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8298
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Apached Don't WildPHP Bot not joining Server!

Postby DonGolss » 13. July 2016 21:14

okay thanks
DonGolss
 
Posts: 5
Joined: 11. July 2016 12:46
XAMPP version: v3.2.2
Operating System: Windows 10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 30 guests