MyBB Community Forums

Full Version: Duplication of Plugin not Installing?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

I'm trying to Install an edited version of BAM Announcement, but when I drop the php for the plugin in, it kills my plugin backend page on MyBB.

What I've done:

- opened all the BAM files, and replaced all the 'bam' with 'bamquotes', saved - I used find & replace in Adobe Dreamweaver to make the changes.
- renamed all the files 'bamquotes', following the conventions of the original file names
- uploaded all the files to the appropriate locations

Everything goes fine until I drop [inc/plugins]bamquotes.php into the folder. When I refresh, my index.php?module=config-plugins page is a white block. Removing the php file restores it.

I'm not sure what I've done to muck it up. Any assistance would be outstanding.


[Image: 0dca8cd7de39e93158f6a45f08c16ed4.png]
have you checked recent entries of server error log ? there should be a clue.
@.m. , thanks for the pointer. This is all that is in my error log;

[07-Mar-2020 09:35:49 UTC] PHP Parse error:  syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /public_html/blood-ties/rp/global.php(1056) : eval()'d code on line 37
[07-Mar-2020 09:41:05 UTC] PHP Parse error:  syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /public_html/blood-ties/rp/global.php(1056) : eval()'d code on line 39
[07-Mar-2020 09:41:25 UTC] PHP Parse error:  syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /public_html/blood-ties/rp/global.php(1056) : eval()'d code on line 39
[07-Mar-2020 09:43:10 UTC] PHP Parse error:  syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /public_html/blood-ties/rp/global.php(1056) : eval()'d code on line 39
[07-Mar-2020 09:44:18 UTC] PHP Parse error:  syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /public_html/blood-ties/rp/global.php(1056) : eval()'d code on line 39
[07-Mar-2020 09:44:34 UTC] PHP Parse error:  syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /public_html/blood-ties/rp/global.php(1056) : eval()'d code on line 39
[07-Mar-2020 09:44:58 UTC] PHP Parse error:  syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /public_html/blood-ties/rp/global.php(1056) : eval()'d code on line 39
[07-Mar-2020 09:45:09 UTC] PHP Parse error:  syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /public_html/blood-ties/rp/global.php(1056) : eval()'d code on line 39
[07-Mar-2020 09:46:49 UTC] PHP Parse error:  syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /public_html/blood-ties/rp/global.php(1056) : eval()'d code on line 39
[28-May-2020 04:39:30 America/Chicago] PHP Parse error:  syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /public_html/blood-ties/rp/member.php(2952) : eval()'d code on line 108
[28-May-2020 04:41:39 America/Chicago] PHP Parse error:  syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /public_html/blood-ties/rp/member.php(2952) : eval()'d code on line 108
[28-May-2020 04:44:50 America/Chicago] PHP Parse error:  syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /public_html/blood-ties/rp/member.php(2952) : eval()'d code on line 108
[28-May-2020 04:44:54 America/Chicago] PHP Parse error:  syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /public_html/blood-ties/rp/member.php(2952) : eval()'d code on line 108
[28-May-2020 04:49:34 America/Chicago] PHP Parse error:  syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /public_html/blood-ties/rp/member.php(2952) : eval()'d code on line 108
[21-Jul-2020 20:33:44 America/Chicago] PHP Parse error:  syntax error, unexpected '"' in /public_html/blood-ties/rp/inc/plugins/ougc_pages.php(672) : eval()'d code on line 3
[21-Jul-2020 20:34:00 America/Chicago] PHP Parse error:  syntax error, unexpected '"' in /public_html/blood-ties/rp/inc/plugins/ougc_pages.php(672) : eval()'d code on line 3
[21-Jul-2020 20:34:21 America/Chicago] PHP Parse error:  syntax error, unexpected '"' in /public_html/blood-ties/rp/inc/plugins/ougc_pages.php(672) : eval()'d code on line 3
[21-Jul-2020 20:34:40 America/Chicago] PHP Parse error:  syntax error, unexpected '"' in /public_html/blood-ties/rp/inc/plugins/ougc_pages.php(672) : eval()'d code on line 3

^ most recent errors (21st July) are referring to ougc pages plugin
Quote:unexpected '"' --- ougc_pages.php(672) : eval()'d code on line 3

most probably that error is related to code used in a created page
Thanks, I’ll look into that.



Where should I go next to look for issues with the plugin, though? I’m at a loss Sad
hi,

Still not getting anywhere with this one Sad


I've attached the folder with the changes in it. All I've done is change the text from 'bam' to 'bamquote'. 

After dropping all the files in their correct locations, however, when I open the Plugin page, I get the above resulting image.
Hi, developer here! 

Duplication of plugins is a little complicated. In general, 99% of it was replaced perfectly. However, (as I discovered looking at it) there were certain functions that did not have "bam" in their name, and therefore they weren't changed. As a result, it ended up declaring certain functions twice, of course resulting in a PHP error. 

I fixed it by manually adding the bamquote prefix to these functions and replacing them. I've attached it below in case anyone ever needs to install a duplicate in the future. (If you're stumbling on Google, never install the one below unless you specifically need two instances of this plugin. Toungue)

I haven't tested this beyond a simple install/uninstall, but it should work exactly as intended.