MyBB Community Forums

Full Version: chdir error, although the code still works :/
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Image: error.png]

okay, so it says it can't find the CHDIR but it still recognizes if i'm logged in and so on :/

here is the code DennisTT gave me a while back
PHP Code:
<?php
define
("IN_MYBB"1);
chdir('forums'); // path to your forums directory
require './global.php'// require MyBB core

echo $welcomeblock
?>

any ideas what could be going wrong?

http://nintendoextreme.co.uk if you want to see it properly.

it's even worse on IE when you're not logged in (i use safari)

i'm also using TikiTiki's new to site plugin

[Image: errorIE.png]

the header error php on line 1216 is:
PHP Code:
    header($cookiefalse); 

:/
Quote:Warning: chdir(): No such file or directory (errno 2) in /hsphere/local/home/submeth/nintendoextreme.co.uk/forumhead.php on line 5

brootal Wrote:
PHP Code:
<?php
define
("IN_MYBB"1);
chdir('forums'); // path to your forums directory
require './global.php'// require MyBB core

echo $welcomeblock
?>
^ Sure that's the code? Cause nothing's on line 5...


The header error is caused by the one above.
this is what the whole code looks like

PHP Code:
<p><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
  <
tr>
    <
td width="100%" background="http://nintendoextreme.co.uk/images/breadcrumbs_bg4.gif"><font color="#ffffff"><div style="margin-bottom:8px; margin-top:8px; margin-left:8px; margin-right:8px;"><?php
define
("IN_MYBB"1);
chdir('forums'); // path to your forums directory
require './global.php'// require MyBB core

echo $welcomeblock
?></font></div></td>
  </tr>
</table></p> 

i made a table around it so it would like the forum.
I see.

Not sure then.

Try using this instead:
PHP Code:
chdir('./forums/'); 
- see if that works.
nope, still the same error.
Try this:
PHP Code:
chdir('/hsphere/local/home/submeth/nintendoextreme.co.uk/forums'); 
ZiNgA BuRgA Wrote:Try this:
PHP Code:
chdir('/hsphere/local/home/submeth/nintendoextreme.co.uk/forums'); 

i figured something out

i changed dennisTT's code to:
PHP Code:
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 "forums"

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

echo 
$welcomeblock

now, on safari and firefox, the error is gone
on IE, the error has minimized, but is still there.

:/
If you want, you can PM me your FTP details and I'll try to fix it for you.
it's fixed now. no worries Smile

thanks anyway ZiNgA! Big Grin
Reference URL's