HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Old Version 2.1 Throwing Errors on Image Upload after PHP7.2 upgrade

My client is running an old version of Vanilla (I'm working on talking them into updating it). Anyway - a recent upgrade to php7.2 created a problem when uploading an image. It seems the image uploads correctly and is accessible via browser, but there is some kind of process going on in the background that is not letting me embed or use the image in a page. I'm new to Vanilla, so I'm not quite sure if the problem is in the Fileupload plugin or GD or some other issue. Any help is much appreciated.

Thanks,

Jay



Fatal Error in PHP.include();

Declaration of MediaModel::Delete($Media, $DeleteFile = true) should be compatible with Gdn_Model::Delete($Where = '', $Limit = false, $ResetData = false)

The error occurred on or near: /chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload/class.mediamodel.php


11: class MediaModel extends VanillaModel {


12:   public function __construct() {


13:      parent::__construct('Media');


14:   }


Backtrace:


[/chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload/class.mediamodel.php:11] PHP::Gdn_ErrorHandler();

[/chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload/class.fileupload.plugin.php:45] PHP::include();

[/chroot/home/mysiteco/mysite.com/html/portal/library/core/class.pluginmanager.php:286] PHP::include_once();

[/chroot/home/mysiteco/mysite.com/html/portal/library/core/class.pluginmanager.php:111] Gdn_PluginManager->IncludePlugins();

[/chroot/home/mysiteco/mysite.com/html/portal/bootstrap.php:189] Gdn_PluginManager->Start();

[/chroot/home/mysiteco/mysite.com/html/portal/index.php:33] PHP::require_once();


Variables in local scope:

[EnabledPlugins] array (

 'FileUpload' =>

 array (

   'Description' => 'Images and files may be attached to discussions and comments. Mod to work with 2.1.5 by Peregrine',

   'Version' => '1.8.4.1',

   'RequiredApplications' =>

   array (

     'Vanilla' => '2.1',

   ),

   'RequiredTheme' => false,

   'RequiredPlugins' => false,

   'HasLocale' => false,

   'MobileFriendly' => true,

   'RegisterPermissions' =>

   array (

     'Plugins.Attachments.Upload.Allow' => 'Garden.Profiles.Edit',

     'Plugins.Attachments.Download.Allow' => 'Garden.Profiles.Edit',

   ),

   'Author' => 'Tim Gunter',

   'AuthorEmail' => 'tim@vanillaforums.com',

    'AuthorUrl' => 'http://www.vanillaforums.com',

   'Index' => 'FileUpload',

   'ClassName' => 'FileUploadPlugin',

   'PluginFilePath' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload/class.fileupload.plugin.php',

   'PluginRoot' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload',

   'Name' => 'FileUpload',

   'Folder' => 'FileUpload',

   'RealFile' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload/class.fileupload.plugin.php',

   'RealRoot' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload',

   'SearchPath' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins',

 ),

 'HtmLawed' =>

 array (

   'Description' => 'Adapts HtmLawed to work with Vanilla.',

   'Version' => '1.0.1',

   'RequiredApplications' => NULL,

   'RequiredTheme' => false,

   'RequiredPlugins' => false,

   'HasLocale' => false,

   'Author' => 'Todd Burry',

   'AuthorEmail' => 'todd@vanillaforums.com',

    'AuthorUrl' => 'http://vanillaforums.com/profile/todd',

   'Hidden' => true,

   'Index' => 'HtmLawed',

   'ClassName' => 'HTMLawedPlugin',

   'PluginFilePath' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/HtmLawed/class.htmlawed.plugin.php',

   'PluginRoot' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/HtmLawed',

   'Name' => 'HtmLawed',

   'Folder' => 'HtmLawed',

   'RealFile' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/HtmLawed/class.htmlawed.plugin.php',

   'RealRoot' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/HtmLawed',

   'SearchPath' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins',

 ),

)


[PluginManager] array (

 'Trace' => false,

 'EventArguments' =>

 array (

   'ActiveCache' => 'dirtycache',

 ),

 'Returns' =>

 array (

 ),

 'HandlerType' => 'NORMAL',

 'FireAs' => NULL,

)


[Trash] array (

 'Description' => 'Images and files may be attached to discussions and comments. Mod to work with 2.1.5 by Peregrine',

 'Version' => '1.8.4.1',

 'RequiredApplications' =>

 array (

   'Vanilla' => '2.1',

 ),

 'RequiredTheme' => false,

 'RequiredPlugins' => false,

 'HasLocale' => false,

 'MobileFriendly' => true,

 'RegisterPermissions' =>

 array (

   'Plugins.Attachments.Upload.Allow' => 'Garden.Profiles.Edit',

   'Plugins.Attachments.Download.Allow' => 'Garden.Profiles.Edit',

 ),

 'Author' => 'Tim Gunter',

 'AuthorEmail' => 'tim@vanillaforums.com',

  'AuthorUrl' => 'http://www.vanillaforums.com',

 'Index' => 'FileUpload',

 'ClassName' => 'FileUploadPlugin',

 'PluginFilePath' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload/class.fileupload.plugin.php',

 'PluginRoot' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload',

 'Name' => 'FileUpload',

 'Folder' => 'FileUpload',

 'RealFile' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload/class.fileupload.plugin.php',

 'RealRoot' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload',

 'SearchPath' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins',

)


[PluginName] 'FileUpload'


[PluginInfo] array (

 'Description' => 'Images and files may be attached to discussions and comments. Mod to work with 2.1.5 by Peregrine',

 'Version' => '1.8.4.1',

 'RequiredApplications' =>

 array (

   'Vanilla' => '2.1',

 ),

 'RequiredTheme' => false,

 'RequiredPlugins' => false,

 'HasLocale' => false,

 'MobileFriendly' => true,

 'RegisterPermissions' =>

 array (

   'Plugins.Attachments.Upload.Allow' => 'Garden.Profiles.Edit',

   'Plugins.Attachments.Download.Allow' => 'Garden.Profiles.Edit',

 ),

 'Author' => 'Tim Gunter',

 'AuthorEmail' => 'tim@vanillaforums.com',

  'AuthorUrl' => 'http://www.vanillaforums.com',

 'Index' => 'FileUpload',

 'ClassName' => 'FileUploadPlugin',

 'PluginFilePath' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload/class.fileupload.plugin.php',

 'PluginRoot' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload',

 'Name' => 'FileUpload',

 'Folder' => 'FileUpload',

 'RealFile' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload/class.fileupload.plugin.php',

 'RealRoot' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload',

 'SearchPath' => '/chroot/home/mysiteco/mysite.com/html/portal/plugins',

 'FileUpload' =>

 array (

   'Description' => 'Images and files may be attached to discussions and comments. Mod to work with 2.1.5 by Peregrine',

   'Version' => '1.8.4.1',

   'RequiredApplications' =>

   array (

     'Vanilla' => '2.1',

   ),

   'RequiredTheme' => false,

   'RequiredPlugins' => false,

   'HasLocale' => false,

   'MobileFriendly' => true,

   'RegisterPermissions' =>

   array (

     'Plugins.Attachments.Upload.Allow' => 'Garden.Profiles.Edit',

     'Plugins.Attachments.Download.Allow' => 'Garden.Profiles.Edit',

   ),

   'Author' => 'Tim Gunter',

   'AuthorEmail' => 'tim@vanillaforums.com',

    'AuthorUrl' => 'http://www.vanillaforums.com',

 ),

)


[ClassName] 'FileUploadPlugin'


[ClassFile] '/chroot/home/mysiteco/mysite.com/html/portal/plugins/FileUpload/class.fileupload.plugin.php'


Need Help?


If you are a user of this website, you can report this message to a website administrator.


If you are an administrator of this website, you can get help at the Vanilla Community Forums.

Additional information for support personnel:


   Application: Vanilla

   Application Version: 2.1.3

   PHP Version: 7.2.15

   Operating System: Linux

   Server Software: Apache/2.2.34 (Unix)

   User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0

   Request Uri: /index.php?p=/embed/advanced

   Controller: PHP

   Method: include

Comments

  • charrondevcharrondev Vanilla Staff

    Could you wrap that up in a code block style? It’s really hard to read.

    You won’t get Vanilla 2.1 running on PHP 7.2 successfully without major modifications. It took us probably a couple days of dev work for the PHP 7.0 incompatibilities alone (Vanilla 2.5 I think?)

    Anyways, there are so many critical security vulnerabilities in that version of Vanilla you shouldn’t be able to run it in good conscience. It contains numerous SQL injection, XSS, CSRF, SSRF, and RCE exploits.

    Please do the upgrade.

Sign In or Register to comment.