BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => BeBot 0.2 support => Topic started by: Keepbrave on February 04, 2007, 10:07:28 pm

Title: AOkex
Post by: Keepbrave on February 04, 2007, 10:07:28 pm
Hi,

Can someone please tell me step by step how to do aokex?
Like where do upload it, do i do it through ssh, if so how etc..

I have had trouble for over 2months now, i bought a dedicated server spacifically to run the bot and move my websites onto, and i am unable to get the bot working

My host say they have installed aokex 3times nwo and yet i am still getting errors and the bot is not loading.
They will not help em anymore and told em to get the dev team of aokex to help em or install it as they will not help anymore.

I have no idea how to install aokex as last i tried it just didnt work..
do i need to upload to root? ftp or ssh? binary or ascii? i changed it to openssl as per the readme but i dont know how to install it from there..

can someone please get really dumb on me and give me a step by step on how to do it as i am starting to pull my hair out and wasting money on a server for a bot i cant use..
Title: Re: AOkex
Post by: Khalem on February 04, 2007, 11:03:50 pm
Step 1 into getting help would be to give us the information we need to help you.

You say you encounter errors, but you do not specify in any way nor show the exact errors leaving us guessing.
Title: Re: AOkex
Post by: Keepbrave on February 04, 2007, 11:25:17 pm
Thats because i asked for step by step on how to install it, i want to start fresh..

The error i am getting at the moment is
php: symbol lookup error:
/usr/local/lib/php/extensions/no-debug-non-zts-20020429/aokex.so: undefined
symbol: __gmp_set_memory_functions

Someone mentioned to me that this is a gmp error and i need to recompile aokex to work with gmp..
I have no idea how to do this and as the host installed it the first time i dont know where the files are or anything.

So i wanted ot start fresh knowing how to do it step by step and changing it to work with openssl
Title: Re: AOkex
Post by: Khalem on February 05, 2007, 04:36:15 pm
Which OS/Distro is this and which version?

It should not be necessary to recompile aokex, however you appear to be missing the actual gmp library.
Title: Re: AOkex
Post by: Keepbrave on February 06, 2007, 01:21:55 pm
using o.2 and it is running ona  cent-os vps

My php -m doesnt actually show gmp and yet everytime i ask my host to re-install aokex for me they say it is done and working fine..

i have openssl in php -m so if anyone can give me step by step on how to install aokex again i can do it with openssl instead.
i tried phpize like the readme said but i must be doing something wrong.

if someone can tell me how to do it and where to actually upload the aokex files too i can prolly get it working with openssl
Title: Re: AOkex
Post by: Malosar on February 06, 2007, 02:12:15 pm
You keep saying that they tell you it's working fine. Once again, have you asked them whether they've compiled it with GMP instead of OpenSSL? I could never get it working with OpenSSL, GMP worked fine for me.
Title: Re: AOkex
Post by: Khalem on February 06, 2007, 06:28:42 pm
Make sure GMP is installed properly first of all.

yum install gmp gmp-devel

The php gmp module is different from aokex using the actual gmp library, you should not confuse these two different. One is a module in php providing gmp functions inside of php, the other is the OS level library which provides running programs access to it.
Title: Re: AOkex
Post by: Keepbrave on February 06, 2007, 11:03:55 pm
Quote
[root@***** ~]# yum install gmp gmp-devel
Setting up Install Process
Setting up repositories
update                    100% |=========================|  951 B    00:00
base                      100% |=========================| 1.1 kB    00:00
addons                    100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================|  78 kB    00:00
update    : ################################################## 227/227
Added 15 new packages, deleted 0 old in 0.71 seconds
primary.xml.gz            100% |=========================|  34 kB    00:00
extras    : ################################################## 131/131
Added 7 new packages, deleted 0 old in 0.20 seconds
Parsing package install arguments
Nothing to do

I am gonna get really noobie on you all..
Done that what next?
Title: Re: AOkex
Post by: Keepbrave on February 07, 2007, 02:49:59 am
ok i tried to do it myself,
i uploaded the php-aokex folder to my bebot folder

Logged into SSH
went into the bebot/php-aokex folder and done the following

phpize
./configure --with-aokex=shared
make

everything seemed fine untill i done

make install

and i got this error

[ecu@**** php-aokex]$ make install
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20020429/
cp: cannot create regular file `/usr/local/lib/php/extensions/no-debug-non-zts-20020429/#INST@29728#': Permission denied
make: *** [install-modules] Error 1


The only thing i can come up with is i am not logged in as root only as a user i have created

Any help would be great



Title: Re: AOkex
Post by: pusikas on February 07, 2007, 07:41:17 am
That user obviously does not have enough rights to install the newly compiled PHP module. You can try running "make install" through sudo, or use a root account. Or generally a user that has permission to write in /usr/local/lib/php/extensions/no-debug-non-zts-20020429/. You can check the permissions on that folder with "ls -l /usr/local/lib/php/extensions/no-debug-non-zts-20020429/", or, if you are using ACLs, with getfacl.
It would probably be unwise to change permissions of that folder, but you may check what groups it belongs to, and see if you can add the newly created user to that group.
Title: Re: AOkex
Post by: Keepbrave on February 07, 2007, 10:55:24 am
ok that made no sense to me pusikas :)
LIke i said earlier in thread i am a linux noob

my root account only shows
directadmin
setup.sh

when logged into ssh

I will mail my host about setting permissions for the ecu user but other than that i dont know how to fix it
Title: Re: AOkex
Post by: pusikas on February 07, 2007, 01:43:11 pm
OK, simpler then. If you have a root user, use it to do "make install". Do not use just any user, you need to do this with one that has sufficient permission. Root can always do just about everything, so, if you do not know how to give enough rights to another user, try running the command that gave you trouble with the root user.
Title: Re: AOkex
Post by: Keepbrave on February 07, 2007, 06:38:21 pm
Yes but as my root only sees directadmin and setup.sh when logged into ssh how am i to get to the directory with bebot and run the make install?
Title: Re: AOkex
Post by: pusikas on February 07, 2007, 07:46:34 pm
Can't you directly change to that directory? And what do you mean, you only see these two files? That you are somehow locked into a directory and cannot get out? Try to enter "pwd" and see if it shows you the directory that you are in.
Also, what you "see" when you type "ls" or "dir" depends on certain setting for that user. Try a "ls -alF" on your root account for example, and you should see a lot more files. By default, a linux box does not show files that start with a dot for example.

Try to log your non-root user, do as you said until the "make" has finished, but before the "make install". Type "pwd" and write down the directory it shows. Log in the root user and do a "cd <directory you wrote down>". Unless your root user is in some kind of sandbox, this should directly get you into the right directory, so you only have to do the "make install" to get aokex installed.

Another thing you can try is log the non-root user, and try a "sudo make install". Depending on your configuration, you should be asked for your root password - the command is then executed with root-rights.
Or you can try to switch to the root user before "make install" by typing "su -". Again, you should be asked for the root-password, and afterwards be in the same directory, just as user root. do the "make install" then.
Title: Re: AOkex
Post by: Keepbrave on February 07, 2007, 09:20:59 pm
Ok, i half got it working

I done the su like you said before runnin make install and that worked
But the bot still didnt load with the same error above.

So i re-done it under openssl and now i get a new error aftr starting the bot

it goes somehtign liek this:

[LOGIN] [STATUS] Connecting
[LOGIN] [STATUS] Authenticating
Using AOKex for login key generation
[LOGIN] [RESULT] Error
[LOGIN] [STATUS] Loggin In
AOChat: not expecting login.

i checked my conf fiel and the account details are fine so i am unsure what it is now
 
Title: Re: AOkex
Post by: Keepbrave on February 07, 2007, 09:30:06 pm
I double checked that i had "dl("aokex.so");" in AOChat.php and i didnt..

I added it at the top like it says but it still is not working

Code: [Select]
   * 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
   */
  dl("aokex.so");
  if((float)phpversion() < 4.2)
  {
    die("AOChat class needs PHP version >= 4.2.0 to work.\n");
  }
 
  if(!extension_loaded("sockets"))
  {
    die("AOChat class needs the Sockets extension to work.\n");
  }

  if(!extension_loaded("gmp") &&
     !extension_loaded("bcmath") &&
     !extension_loaded("aokex"))
  {
    die("AOChat class needs either AOkex, GMP or BCMath extension to work.\n");
  }

When dl("aokex.so"); is in AOChat.php i get the following error according to where in the file i place it

Warning: Function registration failed - duplicate name - aokex_login_key in AOChat.php on line ***

The line number is where dl("aokex.so"); is
Title: Re: AOkex
Post by: Khalem on February 07, 2007, 10:10:11 pm
dl("aokex.so"); should already have happened in Main.php. Also you are seeing the message that AOChat.php is using AOKex to generate the login key which means it works and it's using it.

Unfortunately it appears that AOKex is generating an invalid key on your system for some reason :(
Make absolutely certain that you have entered the correct username and password for the account in Bot.conf.

We really need to find a good way to get php based key generation working reliably again across all platforms :(

On a side note, this is a problem that affects ALL php based bots, so we are all in the same boat until we find a way to generate keys reliably again.

Could you post the output from "uname -a" ?
Title: Re: AOkex
Post by: pusikas on February 07, 2007, 10:16:17 pm
I was told that the bot can be bitchy if you dont use a capital first letter for the username. Mebbe check that you did that, and the passord is case-sensitive, anyway.

Man, it is really slow going for you. But at least there is progress. :)
Title: Re: AOkex
Post by: Keepbrave on February 07, 2007, 10:34:40 pm
[ecu@vps607 ~]$ uname -a
Linux vps607.solidhost.com 2.6.9-022stab078.14-entnosplit #1 SMP Wed Jul 19 14:43:31 MSD 2006 i686 i686 i386 GNU/Linux

And checking username/pass and changing username to start with a Capitol didnt work still getting

[LOGIN] [RESULT] Error

AOChat: not expecting login

thats without dl("aokex.so"); in AOChat.php

i changed the user/pass to a diff account that i use and get exactly the same error
So thats 2 accounts tested on
Title: Re: AOkex
Post by: Khalem on February 07, 2007, 10:50:39 pm
php is bitchy :(

I really hope php 6 does something to address these large integer issues.

There was a suggested workaround posted at http://aodevs.com/index.php/topic,67.0.html by Icidw, but i haven't had the time to look into it.

I suspect that pack() could very well be the culprit, although i cannot seem to find Auno's post on the subject when the issue first emerged sometime around the release of PHP 5/4.4.x
Title: Re: AOkex
Post by: pusikas on February 07, 2007, 11:02:27 pm
thats without dl("aokex.so"); in AOChat.php

You will need that line in there. :)

Or... you can try http://www.onedot.nl/AOChat.phps (http://www.onedot.nl/AOChat.phps) from this post: http://bebot.link/index.php/topic,274.msg2717.html#msg2717 (http://bebot.link/index.php/topic,274.msg2717.html#msg2717). I used that for a while, until I got aokex to run. Which took me quite some time, too. Does not use aokex and I used it with some flavor of PHP5. No idea if it runs with the current bebot, tho. But then again, just trying it won't hurt in your situation.  ;D

EDIT: I just realized that I basically posted the same stuff that Khalem posted, just from a thread in this forum... sry
Title: Re: AOkex
Post by: Khalem on February 07, 2007, 11:13:57 pm
Keepbrave, do you have enough control over the system to add user accounts?

It would be nice to have a system where i can reliably reproduce this issue (aokex generating bad keys). I'm aiming to get some testing done this weekend.
If it would be possible i would be grateful :)
Title: Re: AOkex
Post by: Keepbrave on February 07, 2007, 11:24:27 pm
Khalem i am on a vps server
i have the ability to add users not a problem, the only draw back is that my host is security conscious and have told em this

"Due to security reasons user cannot install any component on a server or VPS. You have to use the server wide installation of aokex on your server."

In other words you have to use the root account to install things like aokex but once its installed it works system wide.

If your still interested i can set you up a user account with ftp and small webspace so you can upload the files and have a directadmin account to make things easier, catch me on msn and i will sort you out, or send me a pm on these forums.

Details are in my profile
SimplePortal 2.3.7 © 2008-2024, SimplePortal