Development > Coding and development discussion

BeBot on PHP 5.4

(1/1)

BoA-Gert:
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.

maurograca:
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

Zeephonz:
Had same problems when migrating bots to a new machine. Worked perfectly back at 5.3.6 so just installed that instead.

Khalem:
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.

Khalem:
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

Navigation

[0] Message Index

Go to full version