MyBB Community Forums

Full Version: Site News
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
After trying to install and use this mod on my site, I am getting the following errors-

Warning: main(./inc/init.php) [function.main]: failed to open stream: No such file or directory in /home/bigmoney/public_html/forums/global.php on line 13

Fatal error: main() [function.require]: Failed opening required './inc/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bigmoney/public_html/forums/global.php on line 13

Anyone have any suggestions?
does inc/init.php exist?
I get the Exact same proble, its a shame because this plugin looks really good Smile

and yes, /forums/inc/init.php does exist O.o
I GOT THE EXACT SAME PROBLEM

please help.
I hope it's ok that I bump this up. >_> I have the same problem and I haven't been able to find an answer anywhere else.

My forum works perfectly fine, I tried overwriting global.php and inc/init.php with fresh copies, fiddling with them a bit and even messing with the CHMOD settings but it still kicks that error at me when I try to load the news on my site. I used just a basic php include to add it to the index.php file of my site.

Any chance on getting any help with this? I'd really like to use this plugin, CuteNews just doesn't cut it with me anymore.
it looks like an error that would only come up depending on where you put the file

try it in different places on your site and post back your results.

if i'm correct on this it should work if you put it in the same directory as your main forum files. (index.php, forumdisplay.php etc etc)
Ok, here's what I did. I put a stripped-down file named index2.php in my main forum directory that looked like this:
<html>
<head><title>News Test Page</title></head>
<body>
<?php
 include("news.php");
?>
</body>
</html>
I also moved the news.php file into the same directory, but changed the $directory_to_forum variable to "". It shows me the news that way. Here is the link to that file: http://ziedrich.net/forums/index2.php

But on my main site file, index.php, it still gives me the error. That file looks like this:
<?php
include('header.php');
if(!$_SERVER['QUERY_STRING']) { ?>

<div align="center">

<?php
 include("news.php");
?>

<?php
 $number = "10";
 include("news/show_news.php");
?>

</div>

<? }  
include('footer.php'); ?>
(The show_news.php include is the old CuteNews.)
ok, the results are as i predicted.

to fix this you will need to edit the core mybb files and doing this will remove your error but create the same error on your forums instead.

all i can suggest at the moment is adding an iframe on your main page to /forum/index2.php

Hope that helps.
Erm. Not really. I'll just stick with the CuteNews for now then. >_>

EDIT: Nevermind, I seem to have fixed it myself. I went into global.php on line 13, and removed the ./ before inc/init.php.
So line 13 looks like this:
require_once "inc/init.php";
I haven't really tested the forum yet but on a cursory inspection I see no errors.

Now I just need to figure out why the boxes are eating each other.
Ok, an update here. The forums work fine with that change. However, in Internet Explorer 6 and the latest version of Safari, I'm getting a "headers already sent" error on the main page of my site, where I include the news.

This error does NOT appear in Firefox, so I didn't notice it at first. It doesn't break anything, but it's an ugly error. o_o I believe this error has already been reported on this thread, so I'll just sit tight for now, I guess.
Pages: 1 2