Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

1.1.1 to 1.1.2 update problem: syntax error, unexpected $end

Aloittaja backend, marraskuu 11, 2010, 11:35:07 IP

« edellinen - seuraava »

backend

I was trying to apply the update to 1.1.2 from the package manager, but I got a failure at Subs-package.php , so I decided to edit the file manually.

Now when I try to update, I get the following error:


Parse error: syntax error, unexpected $end in /home/content/a/s/user/html/forum/Sources/Subs-Package.php on line 3201


line 3201 is the very last line in this block of text:

Lainaa
// crc32 doesn't work as expected on 64-bit functions - make our own.
// http://www.php.net/crc32#79567
if (!function_exists('smf_crc32'))
{
   function smf_crc32($number)
   {
      $crc = crc32($number);
   
      if($crc & 0x80000000){
         $crc ^= 0xffffffff;
         $crc += 1;
         $crc = -$crc;
      }
   
      return $crc;
   }
}

?>


Any idea what is screwing my code?


Thanks in advance

Bigguy

Check to see that there is only one of these in the file.

?>

backend

Thanks for the quick reply. Just checked, and there is only one instance (the last one)


Bigguy

Have you tried re-uploading the large upgrade package and overwritting all the files and trying the upgrade again. ???

Kays

Check the edits you did in Subs-Package.php. I think one of them is missing a closing brace "}".

Otherwise, use a file comparison program like WinMerge to check what the differences are from the files in the install or upgrade package. It's also a better method of updating files like you just did.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

backend

Lainaus käyttäjältä: Kays - marraskuu 12, 2010, 10:49:20 AP
Check the edits you did in Subs-Package.php. I think one of them is missing a closing brace "}".

Otherwise, use a file comparison program like WinMerge to check what the differences are from the files in the install or upgrade package. It's also a better method of updating files like you just did.

I looked but don't seem to find a missing brace...

i am not sure about the second option, dont want it to mess up my board?

backend

can I simply replace my existing Subs-Package.php file with the one from the new update? would that work? and if it doesn't work and causes problems for other mods, can I simply revert back to the old version and that should solve the issue?

Kays

By replacing that file, if any mods had made changes to that file, then chances are that the mod might not work now.

WinMerge is a good tool to have. Download it from here and install it on your PC. Then open the original (1.1.11) file in one window and the latest version in another. Any differences between the files will be highlighted so you can see the changes made by the upgrade as well as code added by a mod to the original file. If you don't trust WinMerge, you can copy and paste any differences manually also.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Advertisement: