BeBot - An Anarchy Online and Age Of Conan chat automaton

Development => Coding and development discussion => Topic started by: BoA-Gert on March 12, 2012, 04:22:10 pm

Title: BeBot on PHP 5.4
Post by: BoA-Gert on March 12, 2012, 04:22:10 pm
Tried to get the bot running on PHP 5.4 but had problems - primarily:

PHP Notice: Undefined offset: 1 in /home/bebot/Sources/Conf.php on line 47

Fatal error: Call-time pass-by-reference has been removed in /home/bebot/Main.php on line 298

Running on Debian - anyone else have issues with PHP 5.4?  Reverting back to PHP 5.3 has no problems.
Title: Re: BeBot on PHP 5.4
Post by: maurograca on March 12, 2012, 05:34:51 pm
Same problem here, Bebot is no more compatible with new php version,

try this workaroud, i donĀ“t know if solves the problem, but...:

Edit all .php files on bebot folders and replace "&$bebot" wtih "$bebot", and all the other "&$" must be replaced too...

PHP now refuses this kind of parameters. Developers must update all the php code that uses "!$"
"pass-by-reference" variables

Maustoth
Title: Re: BeBot on PHP 5.4
Post by: Zeephonz on March 13, 2012, 01:12:10 am
Had same problems when migrating bots to a new machine. Worked perfectly back at 5.3.6 so just installed that instead.
Title: Re: BeBot on PHP 5.4
Post by: Khalem on March 13, 2012, 02:11:19 am
Stick with php 5.3 for now if possible. The workaround proposed by maurograca is not recommended as variables are usually passed by reference for a reason.

I'll see if I can find some time soon to work my way trough and rewrite all functions that currently use pass by reference.
Title: Re: BeBot on PHP 5.4
Post by: Khalem on May 28, 2012, 12:46:32 pm
You can give the current snapshot a try.

I think most PHP 5.4 issues should be resolved now.
https://github.com/J-Soft/BeBot-legacy/zipball/master
SimplePortal 2.3.7 © 2008-2024, SimplePortal