BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => AO 0.6 support => Topic started by: Aliantin on May 17, 2012, 04:58:32 pm

Title: Setting up for first time error
Post by: Aliantin on May 17, 2012, 04:58:32 pm
When setting my bot up I was orriginally going to use 5.4 well vhab told me to use 5.2 because in 5.4 there was new language included which would make the bot not see things, okay so I went down to 5.2 and now I am getting this error

Warning: dl(): unable to load dynamic library 'c:\php5\php_sockets.dll' - the specified module could not be found.  in main.php on line 127 Loading php_sockets.dll failed. Sockets extention required to run this bot
Title: Re: Setting up for first time error
Post by: Aliantin on May 17, 2012, 05:57:58 pm
I could really use the help when someone could please?
Title: Re: Setting up for first time error
Post by: Glarawyn on May 17, 2012, 06:17:51 pm
You need PHP to run BeBot. See http://bebot.link/wiki/installation
Title: Re: Setting up for first time error
Post by: Aliantin on May 17, 2012, 11:27:36 pm
but thats the thing I do have php on it???
Title: Re: Setting up for first time error
Post by: Glarawyn on May 18, 2012, 03:41:14 pm
The error message shows that php isn't finding the php_sockets.dll file. Make sure that the DLL exists in your PHP installation and the bot is using the correct path. Check php.ini files as well for any possible errors.
Title: Re: Setting up for first time error
Post by: Getrix on May 18, 2012, 03:46:20 pm
'c"\php5\php_sockets.dll' <- wrong path...

'c:\php5\php_sockets.dll' is more correct
Title: Re: Setting up for first time error
Post by: Aliantin on May 18, 2012, 11:58:29 pm
thats actually my screw up getrix, and alright glarawyn ill check as I copy pasted the basic one from the install helper
Title: Re: Setting up for first time error
Post by: Aliantin on May 20, 2012, 03:17:49 am
and I checked if everything is there, it is.,.....
Title: Re: Setting up for first time error
Post by: Shelly on May 20, 2012, 07:00:40 am
What windows OS are you running it under? Might be some permission problems.
Title: Re: Setting up for first time error
Post by: Glarawyn on May 21, 2012, 07:21:33 pm
Check for a php.ini file in your BeBot installation directory. Rename it php.txt and try again. (Assuming you have PHP and BeBot in different directories.)
Title: Re: Setting up for first time error
Post by: Aliantin on May 21, 2012, 08:27:37 pm
Still getting the line 127 error, and ive done every single step that the wiki install guide said to do, and I am running on Windows 7 64 bit OS

**Edit**

Also tried running as administrator and it auto exits, and then tried doing it through CMD itself and it still gave me line 127 error
Title: Re: Setting up for first time error
Post by: Aliantin on May 21, 2012, 08:50:44 pm
This is the main part of the file, and also the error and also my computer propertys to show what Windows
Title: Re: Setting up for first time error
Post by: Aliantin on May 21, 2012, 10:30:39 pm
If any of you could please help me on this step... I think this is where my line 127 issue might be????

Here is my startbot.php

<?php
/*
* StartBot.php - Starts and restarts the bot
*
* BeBot - An Anarchy Online & Age of Conan Chat Automaton
* Copyright (C) 2004 Jonas Jax
* Copyright (C) 2005-2010 Thomas Juberg, ShadowRealm Creations and the BeBot development team.
*
* Developed by:
* - Alreadythere (RK2)
* - Blondengy (RK1)
* - Blueeagl3 (RK1)
* - Glarawyn (RK1)
* - Khalem (RK1)
* - Naturalistic (RK1)
* - Temar (RK1)
*
* See Credits file for all aknowledgements.
*
*  This program is free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; version 2 of the License only.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software
*  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
*  USA
*
* File last changed at $LastChangedDate: 2009-01-23 09:21:51 +0100 (Fri, 23 Jan 2009) $
* Revision: $Id: StartBot.php 1959 2009-01-23 08:21:51Z temar $
*/

/*
Take a decent stab at what OS we run on and try using some sane defaults
*/
$os = getenv("OSTYPE");
if (empty($os))
{
   $os = getenv("OS");
}

if (preg_match("/^windows/i", $os))
{
   /*
   This default should work for Windows installs where php is installed to the bot directory.
   */
   $php_bin = "php.exe";
   $php_args = " -c ./ ";
   $main_php = "Main.php";   
   
   /*
   If the above fails you can try specifying full paths, example:
   $php_bin = "C:\php\php.exe";
   $main_php = "C:\BeBot\Main.php";
   */
}
else
{
   /*
   This is a sane default for the php binary on Unix systems.
   If your php binary is located someplace else, edit the php_bin path accordingly.
   */
   $php_bin = trim(shell_exec('which php'));
   $php_args = " -c ./ ";
   $main_php = "Main.php";
}
$confc = TRUE;
require_once "./Sources/Conf.php";
if($argv[1] != $conf -> argv)
{
   echo "Use \"StartBot.php ".$conf -> argv."\" to start bot next time\n";
   $argv[1] = $conf -> argv;
   $conf -> ask("Press Enter to load Bot");
   if(!$argv[1] || $argv[1] == "")
      $argc = 1;
   else
      $argc = 2;
}
if(!empty($conf -> pw))
{
   $pw = $conf -> pw;
   $conf -> pw = NULL;
}

// Create the command to execute in the system() call of the main loop:
$systemcommand = $php_bin . $php_args . " " . $main_php;
if ($argc > 1)
{
   $systemcommand .= " " . $argv[1];
}

while (true)
{
   if($pw)
   {
      $fp = fopen('./conf/pw', 'w');
      fwrite($fp, $pw);
      fclose($fp);
   }
   $last_line = system($systemcommand);

   if (preg_match("/^The bot has been shutdown/i", $last_line))
   die();
   else
   sleep(1);
}

?>

and heres my conf/bot.conf

<?php
  /*
    These are the general settings of the bot:
  */

  $ao_username = "";               // Account username
  $ao_password = "";               // Account password (optional, will request on running of Bot if not entered here)
  $bot_name = "";                  // Name of the bot-character
  $dimension = "";                 // The name of the server you play on, or (1, 2 or 3 for AO)
  $guild = "";                     // Name of the guild running the bot (AOC only)

/*
    Suggested values for owner and super_admin:
    We suggest that the owner should be the main characer on the
    account for $ao_username.
    super_admis should be alts on the same account.

    Defining a superadmin in the config file prevents their removal and banning.
    You are able to add more superadmins with the ingame interface.
    Superadmins defined in game are able to be removed and banned.
*/
  $owner = "";                     // Owner of the bot.
  // $super_admin["Superadmin1"] = true;// Bot superadmins.
  // $super_admin["Superadmin2"] = true;


  // $other_bots["Bot1"] = true;   // All other bots that are guildmembers/raidbotmembers
  // $other_bots["Bot2"] = true;


  $guildbot = true;                // false if its a raidbot.
  $guild_id = 00000001;            // Only for AO guildbots! See ReadMe.txt on how to find out the id.


  $log = "chat";                     // logging all/chat/off
  $log_path = "./log";             // relative/absolute path of logfiles
  $log_timestamp = "none";   //Valid options are: datetime, date, time, none.  Always defaults to datetime if missing or invalid.


  /*
  The next two entries define a list of additional core and module directories to be loaded after the core/ and custom/core/
  btw the module/ and custom/module/ directories. The list is parsed as a comma-seperated list relative the the base directory
  of the bot, without any / at the end of the directory names.
  */
  $core_directories = "";   // optional additional core directories
  $module_directories = "";   // optional additional module directories


  $command_prefix = "!";      // Please make sure this is in a Reg-Exp format... (exampe: for "." use "\.")
                           // The prefix cannot be more then one character - either empty or one character (more only for regexp format)


  $cron_delay = 30;                // Number of seconds before the cron jobs get executed the first time.
  $tell_delay = 2222;              // Number of miliseconds between tells. (anti-flooding)
  $reconnect_time = 60;            // Time to wait for auto reconnect after an error has accured.
  if(is_numeric($dimension))
   $max_blobsize = 12000;            // Maximum size of text blobs in byte. For AO
  else
   $max_blobsize = 8000;            // Maximum size of text blobs in byte. For AoC
  $accessallbots = FALSE;          // Allow Access to All Bots in modules like BotStatistics

  /*
  WARNING!  Enabling proxies will allow you to pull information from web servers if you have been blocked.
  The more proxy addresses you have, the slower each lookup will be.  It is recommended that no more than
  one proxy be added at any given time.  Proxies will only be used as a fallback (if the first lookup fails).
  Format for $proxy_server_address: IP:PORT (The list is parsed as a comma-seperated list)
  Example: $proxy_server_address = "4.2.2.2:80,4.2.2.3:80,4.2.2.4:80";
  */
  $use_proxy_server = false;                // Enable simple web proxy server for HTTP lookups?
  $proxy_server_address = "";                // Proxy server to use address to use

?>
Title: Re: Setting up for first time error
Post by: Getrix on May 21, 2012, 10:33:27 pm
Do you have the folder: c:\php5\
If it exist, does it contain the file: php_sockets.dll ?
Title: Re: Setting up for first time error
Post by: Aliantin on May 21, 2012, 10:48:19 pm
I actually do have c:\php5\ in the bebot folder
Title: Re: Setting up for first time error
Post by: Glarawyn on May 22, 2012, 07:05:02 pm
I actually do have c:\php5\ in the bebot folder

 :o

Either put your PHP installation where the bot expects it to be (Recommended!!!) or modify your bat scripts and php.ini files to point to the path where you extracted the PHP files. You are getting a file not found error because you're telling PHP to look for the needed files IN THE WRONG PLACE, it's not a code error on line 127. The code is doing EXACTLY what it should be doing: throwing a file not found error.

Title: Re: Setting up for first time error
Post by: Yite on May 26, 2012, 03:53:03 pm
Quote from http://bebot.link/wiki/installation (http://bebot.link/wiki/installation)
Quote
Install PHP on Windows

We highly recommend installing the parts of PHP you really need instead of a full PHP install. First obtain the latest stable release of PHP from http://windows.php.net/download/ At the time of writing this, you want the VC9 x86 Non Thread Safe version packaged as a zip archive.

From this archive you want to copy the following files into your BeBot directory:

    libeay32.dll
    php.exe
    php5.dll (If you have a php5ts.dll instead you have the thread safe binaries)
    ssleay32.dll

Then you want to create a folder in your BeBot directory named: phpext In this directory copy the following files from the PHP archive ext/ folder:

    php_curl.dll
    php_mbstring.dll
    php_mysql.dll
    php_sockets.dll
Title: Re: Setting up for first time error
Post by: Aliantin on May 30, 2012, 03:38:49 am
that is exactly what I did.....
SimplePortal 2.3.7 © 2008-2024, SimplePortal