I was trying to add forum topics from my MyBB forum into my Drupal portal when I added a block of php coding (see below) into the blocks form.

This is the code that I added:

<?php
// Recent Posts Plugin
// By Rogem
// Version 1.0

define("IN_MYBB", 1);
define("KILL_GLOBALS", 1);
define("NO_ONLINE", 1);

// The Directory to the forum you are using this on. 
// You do not need a beggining or trailing slash
$directory_to_forum = ""; 

require dirname(__FILE__)."/".$directory_to_forum."/global.php";

$plugins->run_hooks("Recent_Posts_Plugin_run");

?>

In the end, I received this error message:
Fatal error: require() [function.require]: Failed opening required '/home/anthroas/public_html/portal/includes//global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/anthroas/public_html/portal/includes/common.inc(1180) : eval()'d code on line 14

I'd really like to reverse this process, can anyone please help me?

Comments

liquidcms’s picture

$directory_to_forum = "" so you are ending up with a path with 2 "/"

/includes//global.php

that likely isnt a good thing.

Peter Lindstrom
LiquidCMS - Content Management Solution Experts

Andylkl’s picture

That's the problem... Drupal doesn't even use the global.php file, it's a file from the MyBB forums. I'm thinking this problem has something to do with my Drupal's MySQL database. I really need to get those commands reversed.

Andylkl’s picture

I should've thought about this solution! I went through my MySQL database, exported the database, scrutinised over it and finally I recognised the offending block and deleted it! Thanks nontheless!

liquidcms’s picture

$directory_to_forum = "" so you are ending up with a path with 2 "/"

/includes//global.php

that likely isnt a good thing.

Peter Lindstrom
LiquidCMS - Content Management Solution Experts

MGadAllah’s picture

Have you done the integration correctly for drupal and mybb