2009-05-25, 03:58 PM
2009-05-26, 04:40 PM
Hello I badly need this for my website.. But I'm having problem and getting lot's of error. I have some questions that might solve the error that I am getting. I'm not a coder and I'm new in making websites. So pls. guys bear with me if I am not getting it right.
Questions:
1.) Do I need to edit something on the class content?
2.) My forum files is in the the folder "forum" and I put the class content on the root directory where my main website is located. Did I placed the class content on the right folder?
3.) Here's the code that I put on my .php page
<?php
require_once('../MyBBLatest.class.php');
$mybb = new MyBBLatest('forum', 'http://www.mywebsite.com /forum/');
echo $mybb->threads();
echo $mybb->posts();
?>
*Note that this file where I put this code is in a folder called "php-IncludeFiles" where all my php inlclude files is located that's why you'll notice that the diretory in require_once is '../MyBBLatest.class.php'
Is my code correct??
Here is the error that I'm getting
Warning: require_once(../MyBBLatest.class.php) [function.require-once]: failed to open stream: No such file or directory in /home/mydirectory/public_html/mywebsite.com/php-IncludeFiles/ContentRight.php on line 26
Fatal error: require_once() [function.require]: Failed opening required '../MyBBLatest.class.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mydirectory/public_html/mywebsite.com/php-IncludeFiles/ContentRight.php on line 26
What do you think is the problem?
I'm using php5 and MyBB 1.4
thanks in advance!
Questions:
1.) Do I need to edit something on the class content?
2.) My forum files is in the the folder "forum" and I put the class content on the root directory where my main website is located. Did I placed the class content on the right folder?
3.) Here's the code that I put on my .php page
<?php
require_once('../MyBBLatest.class.php');
$mybb = new MyBBLatest('forum', 'http://www.mywebsite.com /forum/');
echo $mybb->threads();
echo $mybb->posts();
?>
*Note that this file where I put this code is in a folder called "php-IncludeFiles" where all my php inlclude files is located that's why you'll notice that the diretory in require_once is '../MyBBLatest.class.php'
Is my code correct??
Here is the error that I'm getting
Warning: require_once(../MyBBLatest.class.php) [function.require-once]: failed to open stream: No such file or directory in /home/mydirectory/public_html/mywebsite.com/php-IncludeFiles/ContentRight.php on line 26
Fatal error: require_once() [function.require]: Failed opening required '../MyBBLatest.class.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mydirectory/public_html/mywebsite.com/php-IncludeFiles/ContentRight.php on line 26
What do you think is the problem?
I'm using php5 and MyBB 1.4
thanks in advance!
2009-05-26, 05:16 PM
Quote:No such file or directoryisn't it clear enough? :>
2009-05-26, 05:25 PM
marines sorry.. I'm new to this..
Does it mean that my directory is wrong or class content should also be in "php-IncludeFiles" folder?
Does it mean that my directory is wrong or class content should also be in "php-IncludeFiles" folder?
2009-05-26, 05:35 PM
you linked to wrong path. you have to give relative path to class file.
2009-05-26, 05:42 PM
Hmm so is should be
require_once('MyBBLatest.class.php');
Am I right marines? I will try this... Thanks!
marines I tried it already. The error is gone but nothing is showing up.
here's the code..
<?php
require_once('MyBBLatest.class.php');
$mybb = new MyBBLatest('forum', 'http://www.mywebsite.com/forum/');
echo $mybb->threads();
echo $mybb->posts();
?>
What do you think is the prob? I also tried putting the class content on the folder where the php pages is located.
Thanks!
Any help here guys?
require_once('MyBBLatest.class.php');
Am I right marines? I will try this... Thanks!
marines I tried it already. The error is gone but nothing is showing up.
here's the code..
<?php
require_once('MyBBLatest.class.php');
$mybb = new MyBBLatest('forum', 'http://www.mywebsite.com/forum/');
echo $mybb->threads();
echo $mybb->posts();
?>
What do you think is the prob? I also tried putting the class content on the folder where the php pages is located.
Thanks!
Any help here guys?
2009-05-28, 11:57 AM
Hi! This has been working great for my site up until a couple of days ago when it suddenly stopped updating although there have been new discussion at my forums. (site where the snippet is, forums). I'm wondering if this because I just upgraded MyBB and something has been changed that affects the code?
2009-05-28, 12:08 PM
bugzy, it's quite hard to recognize the problem because i don't know the conditions in which the script is running.
Mervi, i've noticed one more occurence of a failure after upgrade to 1.4.6. i have to find out what's wrong.
Mervi, i've noticed one more occurence of a failure after upgrade to 1.4.6. i have to find out what's wrong.
2009-05-29, 03:15 PM
marines do I need to edit something on the class content?
2009-05-29, 03:48 PM
no, you don't.