View Full Version : error message PHP7
Kraxell
01-16-2021, 09:10 AM
Hey,
i installed a plugin and got an error when i load the site:
ParseError: syntax error, unexpected 'new' (T_NEW) in ..../includes/init.php(357) : eval()'d code on line 22
if (!defined('VB_AREA') AND !defined('THIS_SCRIPT'))
{
echo 'VB_AREA and THIS_SCRIPT must be defined to continue';
exit;
}
if (isset($_REQUEST['GLOBALS']) OR isset($_FILES['GLOBALS']))
{
echo 'Request tainting attempted.';
exit;
}
@ini_set('pcre.backtrack_limit', -1);
Any idea how to solve it?
exit;
is line 22.
snakes1100
01-16-2021, 09:53 AM
Edit the file/plugin and change:
=& new
to
= new
Kraxell
01-16-2021, 10:10 AM
There isn't such a code :(
snakes1100
01-16-2021, 10:19 AM
init.php
edit, didnt mean to paste the 357 reference in the response.
Kraxell
01-16-2021, 10:47 AM
// $new_datastore_fetch does not require single quotes
$new_datastore_fetch = $datastore_fetch = array();
($hook = vBulletinHook::fetch_hook('init_startup')) ? eval($hook) : false;
if (!empty($datastore_fetch))
{
Line 357 would be
($hook = vBulletinHook::fetch_hook('init_startup')) ? eval($hook) : false;
snakes1100
01-16-2021, 11:03 AM
remove all instances of =& new
=& new
to
= new
in any vbulletin files as you havent bothered to update your vbulletin.
Kraxell
01-17-2021, 04:11 PM
Nope, it doesnt help :(
snakes1100
01-18-2021, 08:41 AM
what version of vb are you running?
i installed a plugin and got an error when i load the site:
Which plugin?
Kraxell
01-18-2021, 12:29 PM
Plugin is vbet (vbulletin enterprise translator). Iam using vb 4.2.5.
Sure vbet is your problem? Other plugins all disabled for test?
Kraxell
01-18-2021, 01:04 PM
Sure vbet is your problem? Other plugins all disabled for test?
yes. The site works fine until i install vbet.
Hostboard
01-21-2021, 01:00 PM
What version of PHP are you running? VB 4.2.5 will work with and up to PHP 7.1 (might limp along under PHP 7.2 with warnings turned off). Mods are completely hit and miss. Remember the majority were written when PHP 5.x was the norm. vBet is clearly the issue and you will need to work with a PHP developer (you do not need a Vbulletin developer) to look at your PHP log file and recode the lines that have issues. It really should not be too difficult...
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.