Forum Moderators: coopster

Message Too Old, No Replies

mybb parse error

         

VonDutch

8:55 pm on Jun 27, 2010 (gmt 0)

10+ Year Member





Hi. Say I downloaded mybb software yesterday

and now I'm getting this message when I try to enter from

"My Categories"

Parse error: syntax error, unexpected '.', expecting '}' in /home/#*$!#*$!#*$!/public_html/forumdisplay.php(1148) : eval()'d code on line 4


I'm a Noob

Thus if you could give a detailed answer

I know cars not Computers lol


Thank You ! in advance

rocknbil

11:16 pm on Jun 27, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard VonDutch, you say you downloaded this software, it should run fine without knowing a whole lot - UNLESS you modified the code in some way. If the install instructions asked you to do that, review the part you modified.

For example, some script installations ask you to modify a config file, like:

$db = 'YOUR DATABASE';

and so on. You might change the previous to say, mysql.example.com like so

$db = 'mysql.example.com';

Note the quotes there. They can be either double or single quotes, but if you took one out

$db = 'mysql.example.com;

or have them mismatched

$db = 'mysql.example.com";

it could be the cause. If all this is correct, next is to make sure you followed the installation instructions to the letter. For example, if it asked you to enter a value at some point and you didn't understand it and skipped it, this may be the cause.

Go over the instructions again, make sure everything it asked you to do is correct.

The next stop would be the help area of the mybb software.

If all that is correct and you get no help from the mybb forum or help files, then it's no fault of yours, the deployed script is faulty (which would seem unlikely.)

VonDutch

1:22 am on Jun 28, 2010 (gmt 0)

10+ Year Member



Thank you Bill

The only part I modified was this

html>
<head>
<title>{$mybb->settings['bbname']} - {$foruminfo['name']} </title>
{$headerinclude}
{$rssdiscovery}
<script type="text/javascript">
<!--

where it says 'name' & 'bbname' I put my website in there

I copied it before I made the change

But I can't find it now lol

Oh well

ergophobe

5:46 pm on Jun 28, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Make sure you have your website name in single quotes, as in your example.

The problem, which makes this harder to debug that it might be, is because, it's "eval'd" code, which means code being sent as a variable.

>>forumdisplay.php(1148)

This tells you the error is happening on line 1148 of that file.

>> eval()'d code on line 4

But this tells you that the error is caused by code being fed to lin 1148. So you need to figure out what that code is. So look for a variable ($variable) on line 1148. Insert two blank lines above line 1148 and then put, on those two lines
print_r($variable);
exit;

See what that output is and post it back here.

You might be too new at this to get anything out of this, but this post might help:
[webmasterworld.com...]

rocknbil

9:11 pm on Jun 28, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The only part I modified was this


Well, there **should** be a setting somewhere so you can use the system's variable for that, something like

<title>{$mybb->settings['sitename']}</title>

but I've no idea if it's actually called "sitename." But if you did this, with the brackets,

<title>{Here is the name of my site}</title>

It's likely the code is "doing something" with everything between { and }, and if you just typed something in, it will cause an error because there's no variable "Here is the name of my site". You could give this a try.

<title>Here is the name of my site</title>

If that doesn't work, start over, re-install it fresh, make sure it's working, then modify but back up your files. :-) A good way of working, if you edit file.php, first save it as file-bu06-28-10.php and save it to the same directory, that way you'll always be able to revert.

An aside, modifying existing code is a really good way to get your feet wet in any language - so long as you make backups. :-)

VonDutch

10:02 pm on Jun 28, 2010 (gmt 0)

10+ Year Member



I appreciate everyone's input

I am utilizing your information

I help many online with their car troubles/Corvettes

And I love doing it

I know you all here get asked extremely obvious questions
and you answer them over and over

This is a Sea of information for a new guy

But I truly appreciate your time

I get the same thing on car sites,

The same questions asked over and over

But it does not bother me because I know they intimidated and I am someone to turn to



It's nice to have a big brother to go to in times of trouble lol



Thank You,

To all !

ergophobe

10:28 pm on Jun 28, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



One more tip - most of us prefer to play around in a "sandbox" by installing a server on our local machines and getting things tested that way before pushing changes out to live sites.

The easiest way to do this is to search on XAMPP or WAMP and installing one of those packages on your machine. Just getting things up and running locally will give you a much better understanding of how everything fits together.

It's not like taking apart a car - if you get irreparably lost, you just delete everything and reinstall from a backup. No big deal.

VonDutch

11:15 pm on Jun 28, 2010 (gmt 0)

10+ Year Member



Well I thought I did make a back in my " Host Cpanel "

I backed the site up everyday

And then it sent me a copy to my email address

I am going to try and download XAMPP at your suggestion

I don't want to wipe this install just yet because

I have not even designed a Corvette Forum page yet



I still have the Mybb front page while I am learning

this way I don't lose all my work done building a forum front page and I can still learn

I was hoping to keep it the site simple for me and the user
while building an attractive site Loaded full content those
in need

I have built other peoples sites enough attracting members
and now I wish to build my own

For pleasure

Thanks

offshoredevelopment

10:23 am on Jun 29, 2010 (gmt 0)

10+ Year Member



Hi
Hope you doing great vondutch,

first of all you will tell me you want to download MyBB 1.4.8 or 1.4.13?

VonDutch

11:58 am on Jun 29, 2010 (gmt 0)

10+ Year Member



I have mybb 1.4.13

I'm looking to eliminate this error I get when I click on my
forum links

Parse error: syntax error, unexpected '.', expecting '}' in /home/#*$!#*$!#*$!/public_html/forumdisplay.php(1148) : eval()'d code on line 4

I've searched for it but can't find it

ergophobe

3:25 pm on Jun 29, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>>I've searched for it but can't find it

As I say, you can't search for it. The error is in "eval()'d code" - that means code that is generated dynamically, passed as a variable and evaluated on the fly. So it doesn't exist in a file, so you can't search for it.

Did you take the steps I mentioned in the my first post?

VonDutch

12:53 am on Jun 30, 2010 (gmt 0)

10+ Year Member



Thanks ergo

I only looked for the error but as you say

I don't think I will be able to find it

originally I used their single quotes

But the train derailed on me anyway

I may have to wipe it

Develop a Home page and then re-load it all and back it up this time XAMPP as soon as I find a trustworthy site to get it from

Thanks,

Also I will download

ergophobe

2:06 am on Jun 30, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Please reread my first post. I gave you specific instructions and you are not following them. If you follow them, you will be able to find the code that has the error I think.

VonDutch

12:29 pm on Jun 30, 2010 (gmt 0)

10+ Year Member



Thanks again for your response

ergophobe


I really do appreciate it

I have spent alot of time following your first post

I even had my very nice Host try and find it

Neither me nor them has had any luck thus far

We are looking in the wrong area obviously

I will continue to search though

Thanks again !

ergophobe

4:20 pm on Jun 30, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What output did you get to the browser screen when you followed my instructions from the first post?

One thing, is if it doesn't fail on the first pass, my method won't work, but you can still remove the "exit" command and it should fail on the last pass.

VonDutch

2:39 am on Jul 1, 2010 (gmt 0)

10+ Year Member



I received the same error as before
ergophobe

I just wiped the forum and re-installed it lol



I am now in the process of learning to use the software

at this time

Your a Awesome guy for helping a guy you don't even know

ergophobe

And by way I really like site better than any I have visited thus far

Thanks to Rocknbil & Offshoredevlopment as well


ergophobe

4:42 pm on Jul 1, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks Von Dutch! Positive comments are appreciated more than you might guess!

If you don't have a lot invested, starting over is the best policy.

In fact, I usually recommend that people who are new to these things install the package and try to "break" it. Plan to throw away the first couple of installs. Then it's time to get building.

VonDutch

2:46 pm on Jul 4, 2010 (gmt 0)

10+ Year Member



XAMPP or WAMP which would be a better local server for a

Noob to use ?

Also if you have a link to download from

I am reading about it now and there seems to be conflicting
reports on which is easier to use


I've never seen any of this program language before




Thanks